I’m currently updating an existing PB3 x86-only project to be able to build both x86 and x86-64 installers. Everything went fine until reaching the shortcuts step.
In our PB3 project, I used to create shortcuts through the IDE (Create shortcuts menu) and it went fine (that was the easiest way).
Here is what I’m trying to get:
- When installing x86 packages on Windows 32-bit or x86-64 packages on Windows 64-bit:
- Program group name: “MyGroup”
- Shortcut name: “MyShortcut”
- When installing x86 packages on Windows 64-bit:
- Program group name: “MyGroup (x86)”
- Shortcut name: “MyShortcut (x86)”
So I decided to create an %ARCH_SUFFIX% custom variable whose value is empty in case 1 and " (x86)" in case 2.
Here are the issues encountered trying to do so in the “Create shortcuts” menu:
- I cannot use that custom %ARCH_SUFFIX% variable in the “Default Start Menu Folder Name” field: only predefined variables like %APPTITLE% seems to be replaced at run time, %ARCH_SUFFIX% remains unresolved in the resulting string. I think it is the same when using this variable in the Shortcut Filename. Is this a bug?
- I cannot create a variable with an empty value. Is this a bug?
- I cannot create a variable with a value starting with a space. The leading space is removed at runtime and sometimes appears in the custom action events, sometimes not. Is this a bug?
Then I tried to do it with the “Create a folder” + “Create a shortcut (.lnk)” custom actions. This resolves issue 1 from the previous case, but issues 2 & 3 are still blocking.
Moreover, shortcuts created through the custom action are not removed by the uninstaller, unlike stated in the documentation. Am I missing something here?
Thanks for your help.