Qt IFW, ComponentScripting, Operation ConsumeOutput executes third party installer multiple times
-
Hi,
I use Qt IFW 4.1.
I have configured Qt IFW as generator for cpack.
Beside other stuff I want to install the latest Visual C++ Redistributable. (specifically the X64 Version for Windows)
In cpack_ifw_configure_component I have added a SCRIPT “myScript.qs” for the component that contains the VC_redist.x64.exe. This script contains:Component.prototype.createOperations = function() { component.addElevatedOperation("ConsumeOutput", "VCRedistErrorCode", "@TargetDir@\\VC++Redistributable\\VC_redist.x64.exe", "/passive", "/norestart"); }
The problem is that the operation executes the installer 3 times.
If I remove the “/passive” parameter I see that (even though it takes considerably longer) it does not even wait until the already opened installer has finished, before opening another instance of the VC++ Redistributable installer.
What do I need to do to execute the installer only once using the ConsumeOutput operation?
(The “Execute” operation runs the installer only once but I do not think that using the “Execute” operation instead is a valid solution. It does not provide a mechanism to retrieve the exit code returned by the installer. I need that exit code to determine if a reboot is necessary after the installation process as a whole has finished.
The “/passive” parameter is used because it should be possible to run the installation without user interaction. That excludes the option to rely on the VC++ Redistributable installer to notify the user.
I would consider updating Qt IFW, but I cannot find downloadable installers so I would need to build the framework from scratch. Since the current documentation seems to be out of date (there is no "configure" script inside the repository) i do not know where to start building that one. Therefore updating would take a lot of time, another thread and would be most likely futile anyway because the changelog contains nothing that seems to be related to this issue. )