Wishlist for Windows installers tooling
Hi all!
A few months ago, I researched whether GStreamer could migrate away from WiX (the FOSS toolkit for making MSI installer packages) to any of the well known EXE based alternatives. At the time, I decided to go with an upgrade from the EOL’d WiX toolset v3 to v5, but forgot to make notes as to why.
However, an update to aws-lc-rs caused us to go over the 2GB limitation of cabinet files, only vaguely documented in section 2.3 of the CAB file format specification (also see this support thread, this merge request’s comments, and this WiX issue). And since all of the toolkits I had researched have a similar limitation, that drove me to better document this wishlist of sorts.
(Note that the bloat caused by aws-lc-rs was itself reported to AWS in this issue.)
GStreamer’s needs
A prospective implementation must support:
- Package/feature dependencies
- Getting and setting Registry entries
- Architecture-specific
ProgramFilesdetection and usage - Cross compilation from Linux
- Both GUI and “quiet” installs
These last three items are an immediate fit towards the well-known Inno Setup and NSIS.
Extras we can also make use of include:
- Visual Studio detection + template installing
- High compression ratio
These are already supported by WiX, but it’s worth to review the latter as Wine does not support other than mszip compression, which causes a substantial increase in binary size.
NSIS
I believe this is one of the most well-known FOSS solutions for making installers; it certainly is one of the most simple and usable ones out there. However, I found the following issues that make it incompatible with my needs:
- Features (“sections”) are standalone, there is no way to declare their dependencies
- Compression is single threaded, the best algorithm available is LZMA
- Many specific functions require custom headers
- No built-in ability to check for and install the MSVC Redistributable (extra, closed source plugins seem to be needed)
- No Visual Studio support
The big plus is that it does not seem to have a maximum file size limitation. It also has an up-to-date look available, but I recall having some trouble porting our headers and logo to it.
## Inno Setup
This one came quite close to being the replacement for WiX, but it had a big incompatibility:
- it does support feature dependencies, it turns them on their head: the file declares which feature(s) it belongs to.
- This means that we’d have to parse the dependency tree, list all the files and their packages, and flatten that into a list of files tagged with all packages that can reach to it
- No built-in ability to check for and install the MSVC Redistributable (extra, closed source plugins seem to be needed) (same as NSIS)
- No Visual Studio support (same as NSIS)
- No support for modern, multithreaded compression (LZMA2 is the maximum but it can consume a lot of memory)
Compared to NSIS, the big plus of this toolkit is their excellent help file, which documents nearly every configuration entry available.
Conclusion
Even though computing has progressed a lot since the 90s, there have been no major changes in the installer toolkits; many are still stuck with design decisions that point to their origin in the Windows 9x/XP era. Even Windows Installer, possibly because of their backwards compatibility needs, is stuck with limitations that are counter intuitive in a time where assets can easily surpass 2GB.
I would like to see this fixed but I have no idea where to start, so if you know of anyone that’s working on this, let me know!