5

I added some console.log("xxxxxx") via component / controller scripting to my installer.

ie.

function Controller()
{
    console.log("OS: " + systemInfo.productType);
}

How can I view the console log during the running of the installer?

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Vincent
  • 103
  • 4

2 Answers2

6

Not sure if you can see a log during installation. But after a "successful" installation the TargetDir will contain a file named InstallationLog.txt that contains all the console.log lines from the installation process.

Edit: To see it live, do like @CherryDT points out in his comment: Run your installer from the command line and provide the -v parameter (fx my_installer.exe -v).

Edit: The previous Edit is slightly wrong, check @KcFnMi answer.

KcFnMi
  • 5,516
  • 10
  • 62
  • 136
Hjalti
  • 307
  • 2
  • 12
  • It should be possible to see the log "live" when running the installer with `-v` from a terminal. – CherryDT Feb 23 '21 at 10:54
  • Here on Windows I only get console output at runtime when doing `setup.exe --verbose`, `setup.exe -v` prints nothing. why? – KcFnMi May 18 '22 at 15:03
1

To see console.log information at runtime (the time you're running the installer, not the time you are building the installer) do:

installer.exe -d

or

installer --version

-d, --verbose Verbose mode. Prints out more information.

https://doc.qt.io/qtinstallerframework/ifw-cli.html

Note: It's not -v:

-v, --version Displays version information.

enter image description here

KcFnMi
  • 5,516
  • 10
  • 62
  • 136
  • Interesting, they must have changed it. Probably when they moved from IFW 3 to 4. It used to be `-v` for `verbose`. At least in version 3 of the IFW this `-v` is still the way to get verbose information – Hjalti May 27 '22 at 12:44