A collection of tutorials for the Wix Toolset, which include a bunch of samples and examples.
Wix toolset (v3, v4 and v5) is the tool to create:
- Modern
MSIsetups for the Windows Installer, main file isProduct.wxs - Boostrapper
EXEinstaller to handle prerequisites, main file isBundle.wxs - Custom Actions to write your own C# code inside the Windows Installer, main file is
CustomAction.cs
Slogan from the official Website:
THE MOST POWERFUL SET OF TOOLS AVAILABLE TO CREATE YOUR WINDOWS INSTALLATION EXPERIENCE.
A MSI can be inspected by the tool Orca from Microsoft (Orca - Documenation), which is part of the Windows Installer SDK and installed at C:\Program Files (x86)\Orca\Orca.exe. As an Alternative there is also SuperOrca which is NOT from Microsoft.
The Roadmap of the project.
When GPG signing is not working, try command
gpgconf --launch gpg-agent
Install HeatWave for VS2022 by FireGiant to Visual Studio 2022. With this extension WixToolset v5 will be available and be supported.
The docker usage is for the shell (bash) scripts to do download the HTML pages from Microsoft dotnet SDKs.
| Major | Max Version |
|---|---|
| 5.0 | 5.0.17 |
| 6.0 | 6.0.31 |
| 7.0 | 7.0.20 |
| 8.0 | 8.0.6 |
These versions are stored (additionally) in _variables.sh.
Create the docker image
docker build --tag wixtoolset .Run container interactive from docker image, use PWD as volume inside
docker run -it --rm -v ${pwd}:/ws/data wixtoolset /bin/bashInside the docker container
- Download the dotnet pages
./download-pages.sh, will be stored outside the container in the localdownloadfolder. This folder should be in gitignore and not under version controls. - Parse the local HTML files to JSON with
./html2json.sh, the json files will be stored in a localdatafolder. These json files can be under source control. For each SDK Runtimeasp,desktopandruntimea file will be generated. - Generate the WXS (wix toolset components) files with
./generateWixToolsetFragment.sha localwix-dotnetfolder will be generated.
An example wxs code, for dotnet v8.0.6 SDK Desktop runtime for x64, the original link would be .NET 8.0 Desktop Runtime (v8.0.6) Windows x64.
The code is copied from DotNet_DesktopRuntime_v8_0_6_x64.wxs below the folder wix-dotnet, where all other wxs-files are stored.
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
xmlns:netfx="http://wixtoolset.org/schemas/v4/wxs/netfx"
xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
<Fragment>
<netfx:DotNetCoreSearch
RuntimeType="desktop"
Platform="x64"
MajorVersion="8"
Variable="DOT_NET_VER" />
<PackageGroup Id="DotNet_DesktopRuntime_v8_0_6_x64">
<ExePackage Id="Netfx80"
DisplayName="Microsoft .NET 8.0 Desktop Runtime"
Description="Microsoft .NET 8.0 (8.0.6) Desktop Runtime for windows x64"
PerMachine="yes" Permanent="yes" Vital="yes" InstallArguments="/norestart /quiet"
DetectCondition="DOT_NET_VER >= v8.0.6"
bal:PrereqPackage="yes">
<ExePackagePayload
Name="runtime-desktop-8.0.6-windows-x64.exe"
DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/76e5dbb2-6ae3-4629-9a84-527f8feb709c/09002599b32d5d01dc3aa5dcdffcc984/windowsdesktop-runtime-8.0.6-win-x64.exe"
Hash="91bec94f32609fd194ac47a893cea1466e6ad25a16bbaf39cd6989fa9f09e865ba87669aabfe26cd3c8f2a57296170cc021dc762e238a6c5cb5e843d3df3169f"
Size="58663408" />
<ExitCode Value="0" Behavior="success" />
<ExitCode Behavior="scheduleReboot" />
</ExePackage>
</PackageGroup>
</Fragment>
</Wix>Run the playwright tests inside the docker container. This command will execute all tests and will create a local folder playwright-report, which should be excluded from source control. Before the test can run, run ./joinjson.sh.
docker run -it --rm -v ${pwd}:/ws/data -v ${pwd}/playwright-report:/ws/playwright-report wixtoolset npx playwright test- Create the project on GitHub inside the "n13.org - Open-Source by KargWare"
- Change UI sequence UIRef from
WixUI_MinimaltoWixUI_Advanced - Use Wix-Variables to avoid repeating your self many times, extract version to separate WXI file
- Add a customized dialog
PrerequisitesDlgto the defaultWixUI_FeatureTreeUI. It is also shared as a GitHub Gist. The branch features/AddPrerequisitesPage will stay. - Add a wixtoolset bootstrapper project and add the MSI to it
- Move the folders to a file 'Directories.wxs', Folders and Directories in WixToolset
- Support WixToolset v5 driven by firegiant
Wix Toolset Extensions are stored inside C:\Program Files (x86)\WiX Toolset v3.11\bin (replace the version v3.11 with your version) as .dll and can be used as references inside your project.
| Name | Description |
|---|---|
| WixUIExtension | UI Dialoges, UIRef, e.g. WixUI_Advanced, WixUI_FeatureTree and WixUI_Mondo |