I'm fighting with Qt Installer Framework for creating a shortcut for my application into start menu in Windows Platform. I used the same script as into startmenu example, but it throws an error during the creation of the shortcut. I don't understand the reason it looks there is a problem with path in my code:
Component.prototype.createOperations = function()
{
// call default implementation to actually install README.txt!
component.createOperations();
if (systemInfo.productType === "windows") {
component.addOperation("CreateShortcut", "@TargetDir@/EurocontrolGui.exe", "@StartMenuDir@/EurocontrolGui.lnk",
"workingDirectory=@TargetDir@", "iconPath=@TargetDir@/resources/eurocontrol.ico", "description=Eurocontrol Developer Tool");
}
}
Below there is my config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Installer>
<Name>Eurocontrol Developer Tool</Name>
<Version>0.11.0</Version>
<Title>Eurocontrol Developer Tool </Title>
<Publisher>Honeywell Inc.</Publisher>
<StartMenuDir>Eurocontrol Developer Tool</StartMenuDir>
<TargetDir>@ApplicationsDirX86@/Eurocontrol Developer Tool</TargetDir>
<InstallActionColumnVisible>true</InstallActionColumnVisible>
</Installer>
I run also the Installer changing from @TargetDir@/EurocontrolGui.exe
, to @TargetDir@\EurocontrolGui.exe
, (the same for StartMenuDir
). In this case no error was thrown and the shortcut was created although the reference was invalid.
In this case when I run Installer.exe -v from command line, I'm able to see that the path for my application is changed from
C:\Program Files(x86)\Eurocontrol Developer Tool/EurocontrolGui.exe
to
C:\Program Files(x86)\Eurocontrol Developer ToolEurocontrolGui.exe
It looks that the path are malformed during the add Operation.
Any idea how to solve it?