beeware / briefcase

Tools to support converting a Python project into a standalone native application.
https://briefcase.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
2.57k stars 363 forks source link

Upgrade to using WiX 4 #1185

Open freakboy3742 opened 1 year ago

freakboy3742 commented 1 year ago

What is the problem or limitation you are having?

Windows packaging currently uses WiX Toolset 3. This version of WiX has a known issue with long file paths (#948), as well as no support for ARM64.

Describe the solution you'd like

Briefcase should be updated to use WiX 4.

Describe alternatives you've considered

Stay on WiX 3.

Additional context

WiX 4 release details.

It is unclear how much the format for WiX configuration files has changed - this could be as straightforward as changing the path to the WiX binary that is downloaded.

rmartin16 commented 1 year ago

Figured this would be an easy win....but it's a bit more involved. Here are some notes I made.

WiX 4

So, it seems this affects pretty much anything that could've been affected 🙃 I also think this means supporting both version 3 and 4 of WiX concurrently would be prohibitive....not that we'd necessarily want to...

freakboy3742 commented 1 year ago

Thanks for that audit - a list of annoying changes, to be sure; but nothing that sounds like an unsurmountable challenge.

In terms of supporting both - unless there's a feature of WiX 3 that WiX 4 doesn't (or won't) support, I don't think we need to support both. WiX 3 has at least 2 major missing features (>64 char path name support, and ARM64 support); so IMHO we should migrate as soon as practical.

rmartin16 commented 1 year ago

I made an attempt at this upgrade....but I think the gap in my knowledge about where and how WiX is expecting to fit in to a larger Windows development and packaging workflow is too large.

I converted the WiX files provided by the app template in beeware/briefcase-windows-app-template#14; there are likely some necessary tweaks and optimizations but that should be most of the work.

When I focused my attention on updating the calls to heat.exe, candle.exe, and light.exe, I basically hit a brick wall despite spending hours trying to understand the larger picture. The WiX 4 docs for heat say to "add a reference to the new heat nuget package"....but where exactly? Presumably in to some larger project configuration files. Maybe an MSBuild config? It seems like much more of an assumed project structure is necessary that was not needed for WiX 3.

At any rate, I thought I could power through and figure it out relatively quickly....but I don't think so. I may return to this later if someone else doesn't knock it out.

freakboy3742 commented 1 year ago

Good to know WiX is maintaining its long tradition of near useless documentation... 🙄

rmartin16 commented 5 months ago

FYI; looks like WiX is moving to an annual release schedule.

https://www.firegiant.com/blog/2024/3/8/wix-v5.0.0-rc.1-is-calling/

freakboy3742 commented 5 months ago

Ugh... we really do need to address this so we don't get stuck on v3 forever...