Uploaded image for project: 'Qt Installer Framework'
  1. Qt Installer Framework
  2. QTIFW-397

strange behaviour of <RunProgram> in config.xml

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 2.0.0
    • 1.4.0
    • General
    • None
    • 4fb18d6b48950bf192e0001b9a99196b623c92e5

    Description

      I tried to add a "Launch Application" to the end of the installation process by using <RunProgram> in the <Installer> section of the config.xml file. But it does not work as expected. Part of the config.xml:

      <Installer>
        <Name>MyApp</Name>
        <Version>1.0</Version>
        <TargetDir>@rootDir@/MyApp</TargetDir>
        <RunProgram>MyApp</RunProgram>
        <RunProgramDescription>Launch My App</RunProgramDescription>
      </Installer>
      

      The "Launch" checkbox appears as expected at the end of the installation process, but the program does not start. I figuerd out, only programs in the system path starts. I tried to change the run tag like:

        <RunProgram>@TargetDir@/MyApp</RunProgram>
      

      Now the program starts, but only if the user not changes the default install path set by <TargetDir>.
      Also, the "Launch Application" Checkbox appears after the uninstall process.

      I figured out the problem for the wrong path.
      File installer-framework\src\libs\installer\packagemanagergui.cpp line 1921

      const QString program = packageManagerCore()->replaceVariables(packageManagerCore()->value(scRunProgram));
      

      this line sould be

      const QString program = packageManagerCore()->replaceVariables(packageManagerCore()->settings().runProgram());
      

      with this change, the path is updated to the users input

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              nath Niels Weber
              wojo Markus B
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes