WiX v4 Random Fact No. 5
WiX Toolset v4-preview.0 is available. For more information, see Rob’s blog post on the matter.
Yesterday I mentioned that
The
-arch
switch (and synonym switch-platform
) on thewix.exe
command line determine the set of platform-specific Burn engines and custom actions that will be included.
I undersold the point. It’s true that -arch
/-platform
offer that functionality. It’s similar to how I described -arch
’s ability to simplify your authoring 11 years ago:
Or, just let WiX handle it for you: Specify the -arch switch at the candle.exe command line or the InstallerPlatform property in a .wixproj MSBuild project. When you specify x64 or intel64, Candle automatically sets the package and components in the file being compiled as 64-bit. It’s still useful to be able to say Win64=‘no’ for those components that are 32-bit even in 64-bit packages. Of course, that’s also legal in 32-bit packages, so it’s safe to hard-code.
But for WiX v4, the emphasis should have been that they’re the only way to get that functionality.
In WiX v3, you could sometimes get away with specifying the Package/@Platform
attribute and letting that specify the bitness of your whole package. However, that approach falls down if you use fragments or .wixlibs in your authoring because they don’t “inherit” the Package/@Platform
you specified.
In WiX v4, Package/@Platform
is no more. Instead, -arch
/-platform
(and a property in MSBuild when that’s ready for Preview) is how it’s done.