Twenty years maintaining the WiX Toolset
robmensching.com
robmensching.com
I always wondered what would have happened if the WiX Toolset had been available from the start, and I like to compare the more organic success of the Microsoft Deployment Toolkit (MDT) being more open and hackable as an example. I guess the time just wasn't right.
The entire concept of installing application software “on” the system in a way that modifies the OS is deeply flawed. It’s a security nightmare and it doesn’t scale. As you try to scale it you inevitably have to build a massive baroque state management system that is brittle and terrible for developers to use.
Mobile has the right idea here. Apps are containers. If it seems like an app needs to reach outside of its container this in fact is revealing a shortcoming of the OS APIs that should be addressed there.
Installing an app should be a matter of dropping it on the system. Uninstalling it should be a matter of deleting it.
There might still be a niche for installers in this world but they would be for drivers and OS level third party enhancements. There would not be many of these. 99% of apps do not need this level of access.
Going back to the first paragraph: if you find yourself trudging through a tangled swamp of complexity with no end in sight, I personally believe that this a sign that you are either solving the wrong problem or solving it in a fundamentally wrong way.
When confronted with this a good developer will solve it. A great developer will question it. A genius will make it unnecessary.
The question to always be asking is: is this incidental complexity or essential complexity? Essential complexity is present in the real world problems being solved. Incidental complexity is self inflicted. I personally believe that most software complexity is incidental. It’s at least more than half.
I'd contend Nix is the best package management system yet, and while its certainly complex, much of that complexity only exists to hack around decades of bodges.
EDIT: I do think there's a lot of interesting space to explore, for bringing isolation concepts into NixOS (or one of the other nix-based distro-likes)
But my point was that large commercial installer kits were always required to produce MSIs, in the absence of something like the WiX Toolset.
It's worth it for commercial customers. It's a fair business model for an Open Source project.
To run WiX you would presumably also need the Windows Installer libraries that are part of Windows, which I suspect are not cross-platform. Msitools uses Wine's implementation instead.
I spent a week of trial and error to create an installer just to find out that I had several installations of my app because of some misconfigured xml document from testing. A nightmare to uninstall to say the least.
I highly recommend to test your installers inside a VM or you'll screw up your system.
Also good luck if you want custom behaviour from the installer. The documentation for that is far worse than it is for the standard msi installer.
https://learn.microsoft.com/en-us/windows/security/applicati...
Perfect for testing things that might screw up a Windows system in a 'clean' environment.
> Pristine: Every time Windows Sandbox runs, it's as clean as a brand-new installation of Windows.
I can see my custom fonts in the Sandbox. Which makes me wonder, what else is not actually pristine about it?
Here's my experience loading a wix site: First load: nothing, so I enable javascript execution for base domain. This requests scripts from a second domain which when allowed manually requires scripts from a third domain which when loaded requires scripts to execute from a fourth domain. By this time I've closed the tab.
It's what 99.9% of apps need, so why is there no "do the defaults" path? You even need to pass things through the Heat generator to get multiple resulting files listed automatically. This is not an exclusive Wix issue though - no project offers that as far as I can tell and it really sucks.
Apparently with Wix4, heat is deprecated, unneeded in Wix5. I couldn't even get it to install and have the executable. So confusing!
to even obtain wix v5: first, using scoop, I installed "dotnet-sdk"; second, using the "dotnet" command, I got the wix.exe executable via
> dotnet tool install --prerelease --global wix
> To be written. To volunteer, leave a comment at the related issue on GitHub.
If you start with Visual Studio, create a project with their (free) plugin, and configure Heat [1], you might get a working installer.
orca.exe from one of the older Win SDKs can really help with your understanding of the MSI format, which helps when building for WiX.
And Wix is just installation on one out of 5-6 platforms. Native development is so convoluted and riddled with complexity. Linux though is no exception, since this it’s a distro issue. MacOS is generally much better, with fewer moving pieces – most of the overhead is from notarizing and signing…
In addition to using more sensible and consistent syntax, WixSharp also provides sensible defaults that just work, such as always using "major upgrades" so that you don't have to worry about MSI trying to be clever and sometimes (but sometimes not!) only partially upgrading the app.
Packaging can be hard on any platform but Microsoft really outdid itsself with MSI. If you already have a finished product and just need to package it then NSIS or Inno were much simpler to pick up.
Many products are released as MSI files because that's what enterprise deployment tooling supported, but inside is a setup executable, which defeats the entire transactional rollback design of the thing.
But a thin layer over MSI is actually what you want; the commercial tools that preceded WiX and tried to abstract away what Windows Installer was actually doing were much worse. Because Windows Installer is such a mess of counterintuitive design and bugs that you are going to need to debug it.
WiX is to be saluted for greatly reducing the level of misery involved in making installers for Windows. But the level of misery is still very high indeed.
Intentionally so in parts, because they do not want you to interact with it outside the API.
Example: https://learn.microsoft.com/en-us/windows/win32/msi/msifileh...
You could be forgiven for not catching on that this table is just using slightly obfuscated MD5 hashes.
Why not treat other languages and cultures equally?