mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 03:37:59 +01:00
Remove WiX v3 infrastructure and migrate exclusively to WiX v5 (#41975)
## Summary: This pull request refactors the installer build pipeline to simplify and modernize the process, focusing exclusively on the WiX 5 (VNext) installer and removing legacy WiX 3 support. It eliminates the use of the `installerSuffix` parameter and related logic, removes the legacy installer build steps and scripts, and updates documentation to reflect the new architecture. The changes streamline the pipeline, reduce complexity, and ensure only the latest installer is built and signed. Pipeline and build system simplification: * Removed the `installerSuffix` parameter and all related logic from pipeline templates and YAML files, including file naming, build steps, and hash calculation scripts. * Removed legacy WiX 3 installer build steps and the associated script `installWiX.ps1`, focusing exclusively on WiX 5 (VNext) installer builds. Installer signing and build process updates: * Updated `.pipelines/ESRPSigning_installer.json` to remove signing configuration for the legacy `PowerToysSetupCustomActions.dll`, ensuring only the VNext DLL is signed. Documentation updates: * Updated `doc/devdocs/core/installer.md` to remove references to WiX 3, clarify the installer architecture as WiX 5 only, and describe the new build process. ## CheckList: - [ ] Should Build successfully and produce installer for both per user and per machine - [ ] Should install without problem --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: vanzue <69313318+vanzue@users.noreply.github.com> Co-authored-by: Kai Tao (from Dev Box) <kaitao@microsoft.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# PowerToys Installer
|
||||
|
||||
## Installer Architecture (WiX 3/ WiX 5)
|
||||
## Installer Architecture (WiX 5)
|
||||
|
||||
- Uses a bootstrapper to check dependencies and close PowerToys
|
||||
- MSI defined in product.wxs
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
### MSI Installer Build Process
|
||||
|
||||
- First builds `PowerToysSetupCustomActions` DLL and signs it, for WiX5 project, installer will build `PowerToysSetupCustomActionsVNext` DLL.
|
||||
- First builds `PowerToysSetupCustomActionsVNext` DLL and signs it
|
||||
- Then builds the installer without cleaning, to reuse the signed DLL
|
||||
- Uses PowerShell scripts to modify .wxs files before build
|
||||
- Restores original .wxs files after build completes
|
||||
@@ -96,9 +96,14 @@ The following manual steps will not install the MSIX apps (such as Command Palet
|
||||
|
||||
#### Prerequisites for building the MSI installer
|
||||
|
||||
1. Install the [WiX Toolset Visual Studio 2022 Extension](https://marketplace.visualstudio.com/items?itemName=WixToolset.WixToolsetVisualStudio2022Extension).
|
||||
1. Install the [WiX Toolset build tools](https://github.com/wixtoolset/wix3/releases/tag/wix3141rtm). (installer [direct link](https://github.com/wixtoolset/wix3/releases/download/wix3141rtm/wix314.exe))
|
||||
1. Download [WiX binaries](https://github.com/wixtoolset/wix3/releases/download/wix3141rtm/wix314-binaries.zip) and extract `wix.targets` to `C:\Program Files (x86)\WiX Toolset v3.14`.
|
||||
PowerToys uses WiX v5 for creating installers. The WiX v5 tools are automatically installed during the build process via dotnet tool.
|
||||
|
||||
For manual installation of WiX v5 tools:
|
||||
```powershell
|
||||
dotnet tool install --global wix --version 5.0.2
|
||||
```
|
||||
|
||||
> **Note:** As of release 0.94, PowerToys has migrated from WiX v3 to WiX v5. The WiX v3 toolset is no longer required.
|
||||
|
||||
#### Building prerequisite projects
|
||||
|
||||
@@ -133,17 +138,9 @@ If you prefer, you can alternatively build prerequisite projects for the install
|
||||
1. In Visual Studio, in the `Solutions Configuration` drop-down menu select `Release`
|
||||
1. From the `Build` menu choose `Build Solution`.
|
||||
|
||||
The resulting `PowerToysSetup.msi` installer will be available in the `installer\PowerToysSetup\x64\Release\` folder.
|
||||
The resulting installer will be available in the `installer\PowerToysSetupVNext\x64\Release\` folder.
|
||||
|
||||
For WiX3 project, run `Developer Command Prompt for VS 2022` in admin mode and execute the following command to build the installer. The generated installer package will be located at `\installer\PowerToysSetup\{platform}\Release\MachineSetup`.
|
||||
|
||||
```
|
||||
git clean -xfd -e *exe -- .\installer\
|
||||
MSBuild -t:restore .\installer\PowerToysSetup.sln -p:RestorePackagesConfig=true /p:Platform="x64" /p:Configuration=Release
|
||||
MSBuild -m .\installer\PowerToysSetup.sln /t:PowerToysInstaller /p:Configuration=Release /p:Platform="x64"
|
||||
MSBuild -m .\installer\PowerToysSetup.sln /t:PowerToysBootstrapper /p:Configuration=Release /p:Platform="x64"
|
||||
```
|
||||
For WiX5 project, run `Developer Command Prompt for VS 2022` in admin mode and execute the following command to build the installer. The generated installer package will be located at `\installer\PowerToysSetupVNext\{platform}\Release\MachineSetup`.
|
||||
To build the installer from the command line, run `Developer Command Prompt for VS 2022` in admin mode and execute the following commands. The generated installer package will be located at `\installer\PowerToysSetupVNext\{platform}\Release\MachineSetup`.
|
||||
|
||||
```
|
||||
git clean -xfd -e *exe -- .\installer\
|
||||
|
||||
Reference in New Issue
Block a user