Skip to content

Unable to package Windows apps that contain long file paths #948

@freakboy3742

Description

@freakboy3742

If a Windows application includes deep file paths, it can prevent the application from being packaged.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Pyside6 app
  2. briefcase package windows visualstdio
  3. See error
...
[verify-pyside6] Building MSI...
Compiling application manifest...
heat.exe : error HEAT5059 : The file 'D:\a\briefcase-windows-VisualStudio-template\briefcase-windows-VisualStudio-template\tests\apps\verify-pyside6\windows\VisualStudio\Hello PySide6\x64\Release\app_packages\PySide6\examples\datavisualization\surface_model_numpy\__pycache__\surfacegraph.cpython-38.pyc' cannot be found.
Compiling...


Unable to generate manifest for app verify-pyside6.

Log saved to D:\a\briefcase-windows-VisualStudio-template\briefcase-windows-VisualStudio-template\tests\apps\verify-pyside6\logs\briefcase.2022_10_31-03_27_06.package.log

The build completes successfully; however, packaging fails. The file being referenced actually does exist; however, there is a known error in WiX that prevents packaging from succeeding if any path is longer than 260 characters.

This is due to a limitation of older Windows filesystems. The Windows Python installer provides an option to enable this support at time of installation; however, it's easy to skip the significance of this option if you're not aware of it. If you didn't enable MAX_PATH support when you installed Python, you can manually modify the longPathsEnabled option in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem registry key. However, even if this option is enabled, WiX will fail.

Expected behavior

Apps with long/deep file paths should not prevent an app from being packaged.

Environment:

  • Operating System: Windows
  • Python version: Any
  • Software versions:
    • Briefcase: any
    • PySide 2 or 6

Additional context

The problem has apparently been fixed in WiX 4... but WiX 4 has been in pre-release for years, so it's unclear when we'll be able to adopt this fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA crash or error in behavior.windowsThe issue relates to Microsoft Windows support.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions