Details
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
- resulted in
-
QTIFW-408 Unify getter methods for settings and installer values.
- Closed
For Gerrit Dashboard: QTIFW-397 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
99076,4 | Don't replace scRunProgram and scRunProgramArguments at the start | master | installer-framework/installer-framework | Status: MERGED | +2 | 0 |