Skip to content

Long project descriptions cause icons to be blank on MSI installers #2864

@freakboy3742

Description

@freakboy3742

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

  1. Create a HelloWorld project with a project description that is more than 256 characters long (say, 260)
  2. Run briefcase package -p msi to build an MSI
  3. 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:
    • Briefcase: 0.4.2

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA crash or error in behavior.good first issueIs this your first time contributing? This could be a good place to start!
    No fields configured for issues without a type.

    Projects

    Status
    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions