2

I would like to modify the flow of my QtIFW(3.0) installer using a controller function, it seems trivial to do, however I can't seem to find a good example of where the function / script should reside and how to make the installer aware of it.

Things I have tried without success:

  • Putting a controller function into my component script
  • Creating controller.qs file with the function in my packages root directory
  • Including the controller.qs script file in my package.xml configuration

My controller script (controller.qs) is just boilerplate at the moment:

function Controller() {
    console.log("Controller()");
}

During installer runtime the installer executes as expected except the controller function is never called..

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Willeman
  • 720
  • 10
  • 24

1 Answers1

7

According to Qt IFW reference, you just have to add your controller script in the configuration XML:

<?xml version="1.0"?>
<Installer>
    <!-- Your config -->
    <ControlScript>controller.qs</ControlScript>
</Installer>

Not that there is only 1 control script per installer, not per component!

king_nak
  • 11,313
  • 33
  • 58