0
votes

I am setting up an installer for node-webkit desktop app. I have successfully created an app shortcut but I can't create a desktop shortcut because it requires an exe file. I am passing working directory reference to nw.exe in shortcut it works fine but there seems no option for creating a custom desktop icon. Here is my inno setup config file:

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}/node-webkit/nw.exe" ; Parameters: "."; WorkingDir: "{app}"; IconFilename: "{app}\{#MyAppIcon}"

Following code creates a desktop shortcut. Is there any way I can pass above icon reference to desktop icon?

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
1
You cannot pass an icon reference to the desktop icon anyhow. That makes no sense. If you mean how to conditionally create that icon if the task is checked, then use the Tasks parameter in your [Icons] entry like ...; Tasks: desktopicon. - TLama

1 Answers

1
votes

Here is the answer if anyone is looking for a solution. Thanks TLama.

[Icons]
Name: "{commondesktop}\{#MyAppName}"; Filename: "your.exe" ; Parameters: "."; WorkingDir: "{app}"; IconFilename: "{app}\{#MyAppIcon}";  Tasks: desktopicon

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";