Qt Installer Framework: call function after component has been dearchived
-
Hello! I am using QTIFW for a Qt application on Windows 11. My project is built using MSVC and I have to bundle + run the vc_redist.x64.exe with my application (only if not installed already).
I have seen posts using something like:
component.addElevatedOperation("Execute", "{0,1602,1638}", redistPath, "/quiet", "/passive", "/norestart");
to add an installation operation to the component. However, I want to do more than this:
- Before installing the redist component, I currently have a message box that pops up alerting the user that the redist component installation is required. This is all working. However, I am using:
function Component() { installer.installationFinished.connect(this, Component.prototype.doVcInstall); }
To actually call the redist installer/updater. The downside to this approach is that once the installation is finished, my app component has already been installed and if the redist reports an error, I would need to uninstall everything. Otherwise, my app could have undefined behavior.
I have two main questions:
- Is it possible to specify the order of component installation? I would like the redist to run first and if not successful, cancel the installation.
- Is it possible to call a function in the components
installscript.qs
AFTER the component has been dearchived. Currently, I can't call the vc_redist.x64.exe until the installation has finished because it is still in the component archive. Another option, is it possible to manually invoke the dearchive operation frominstallscript.qs
?