How to write scripts for Qt Installer

I am trying to write my first Qt installer and have problems. In my installer in one of the packages I need to run the .exe at the end of the installation and add an environment variable as well.

I think the way to do this is with the script parameter in the package.xml file, but I don’t know how to write this script, I can’t find a step-by-step explanation of how to do this anywhere.

Can anyone help?

+7
installer qt qt-installer
source share
1 answer

I recently experienced the same fate as you, but for the most part I managed to achieve what you are trying to make from the examples and documentation of the Qt installer Framework found here http://qt-project.org/doc/qtinstallerframework-1.5/index .html and http://doc.qt.io/qtinstallerframework/qtifwexamples.html .

The information presented on these pages is a bit ambiguous, but with a little experimentation you should create the required installation script.

In the package.xml file you want to implement, install the script to add

 <Script>installscript.qs</Script> 

and that installscript.qs it I should be located in the meta folder of this package. Then installscript.qs will contain among several other things

 component.addOperation("Execute".....) 

which will execute the required .exe . The same process for an environment variable can be implemented using the execute operation to run a batch file that creates a variable in the users system.

I have been trying for the past few weeks to perform user operations, which are described in detail in the qt infrastructure documentation, but have not been successful so far, so if you are making any progress in this area, do not hesitate to transmit information ;;

+9
source share

All Articles