Describe the bug
Originally reported by @initialcommit-io as #2465
When an MSI installer creates a shortcut, if the description field is > 256 characters, the prefix of the icon link is shortened by the amount that the description field overflows the 256 character limit.
The
In this case, the description field was 272 characters, so the first 16 characters was being truncated.
This was only discovered by rolling back to Wix 3. Wix 3 raises a warning in this condition. Wix 5 is silent on the matter. I can't see any obvious "verbose" or "display warnings" mode that we've missed in wix.exe, so... thanks Wix. :-)
So - the immediate workaround is to truncate the description field.
Longer term, there are 2 (well... 3) fixes required:
A patch to the briefcase-windows-app-template and briefcase-windows-visualstudio-template, ensuring that the usage of description in the shortcut link is limited to 256 characters. The actual change will be the same in both repositories.
A patch to Briefcase that does a check when a project configuration is parsed. The description field should be short; longer descriptions should be in the long_description field. So - if the description field is longer than 80 chars, we should output a warning to the user that their description is longer than it should be, may be truncated under some circumstances, and longer descriptions should be in the long_description field.
How to reproduce the bug
- Create a HelloWorld project with a project description that is more than 256 characters long (say, 260)
- Run
briefcase package -p msi to build an MSI
- Install the MSI
Observe that the shortcut icon for the project is a blank page, not the grey Brutus icon.
If you press CTRL+R to open a run window, and run shell:common programs (for an all-users install) or shell:programs (for a per-user install), you can find the start menu shortcut that has been installed. Inspect the properties of the shortcut, and you should see that the path for the icon is malformed at the start, by as many characters as the description is longer than 256 characters. A 260 character description will mean the path is missing the first 4 characters (So it will start sers\<username>... instead of C:\Users\<username>..., or DATA%\... instead of %APPDATA%\...
Environment details
- Operating system and version: Windows 11
- Python version: All (tested on 3.14)
- Software versions:
Logs
WiX produces no error or warning when this happens - it only manifests as a problem at runtime.
Additional context
There are 3 fixes required:
- A patch to the briefcase-windows-app-template, ensuring that the usage of project description in the shortcut link is capped at 256 characters.
- The same change, applied to briefcase-windows-visualstudio-template
- A patch to Briefcase that does a check when a project configuration is parsed. The
description field should be short; longer descriptions should be in the long_description field. So - if the description field is longer than 80 chars, we should output a warning to the user that their description is longer than it should be, may be truncated under some circumstances, and longer descriptions should be in the long_description field.
Describe the bug
Originally reported by @initialcommit-io as #2465
When an MSI installer creates a shortcut, if the description field is > 256 characters, the prefix of the icon link is shortened by the amount that the description field overflows the 256 character limit.
The
In this case, the description field was 272 characters, so the first 16 characters was being truncated.
This was only discovered by rolling back to Wix 3. Wix 3 raises a warning in this condition. Wix 5 is silent on the matter. I can't see any obvious "verbose" or "display warnings" mode that we've missed in wix.exe, so... thanks Wix. :-)
So - the immediate workaround is to truncate the description field.
Longer term, there are 2 (well... 3) fixes required:
A patch to the briefcase-windows-app-template and briefcase-windows-visualstudio-template, ensuring that the usage of description in the shortcut link is limited to 256 characters. The actual change will be the same in both repositories.
A patch to Briefcase that does a check when a project configuration is parsed. The description field should be short; longer descriptions should be in the long_description field. So - if the description field is longer than 80 chars, we should output a warning to the user that their description is longer than it should be, may be truncated under some circumstances, and longer descriptions should be in the long_description field.
How to reproduce the bug
briefcase package -p msito build an MSIObserve that the shortcut icon for the project is a blank page, not the grey Brutus icon.
If you press CTRL+R to open a run window, and run
shell:common programs(for an all-users install) orshell:programs(for a per-user install), you can find the start menu shortcut that has been installed. Inspect the properties of the shortcut, and you should see that the path for the icon is malformed at the start, by as many characters as the description is longer than 256 characters. A 260 character description will mean the path is missing the first 4 characters (So it will startsers\<username>...instead ofC:\Users\<username>..., orDATA%\...instead of%APPDATA%\...Environment details
Logs
WiX produces no error or warning when this happens - it only manifests as a problem at runtime.
Additional context
There are 3 fixes required:
descriptionfield should be short; longer descriptions should be in thelong_descriptionfield. So - if thedescriptionfield is longer than 80 chars, we should output a warning to the user that theirdescriptionis longer than it should be, may be truncated under some circumstances, and longer descriptions should be in thelong_descriptionfield.