Skip to content

Commit ca6f993

Browse files
Copilotvanzue
authored andcommitted
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] <[email protected]> Co-authored-by: vanzue <[email protected]> Co-authored-by: Kai Tao (from Dev Box) <[email protected]> (cherry picked from commit 63da56f)
1 parent 29687d5 commit ca6f993

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+36
-6244
lines changed

.pipelines/ESRPSigning_installer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"SignBatches": [
55
{
66
"MatchedPath": [
7-
"PowerToysSetupCustomActions.dll",
87
"PowerToysSetupCustomActionsVNext.dll",
98
"SilentFilesInUseBAFunction.dll",
109
"PowerToys*Setup-*.exe",

.pipelines/installWiX.ps1

Lines changed: 0 additions & 26 deletions
This file was deleted.

.pipelines/v2/release.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ parameters:
2020
type: string
2121
default: '0.0.1'
2222

23-
- name: installerSuffix
24-
type: string
25-
displayName: "WiX5 installer suffix (e.g., 'wix5', 'vnext', etc.)"
26-
default: "wix5"
27-
2823
- name: buildConfigurations
2924
displayName: "Build Configurations"
3025
type: object
@@ -105,8 +100,7 @@ extends:
105100
useManagedIdentity: $(SigningUseManagedIdentity)
106101
clientId: $(SigningOriginalClientId)
107102
# Have msbuild use the release nuget config profile
108-
installerSuffix: ${{ parameters.installerSuffix }}
109-
additionalBuildOptions: /p:RestoreConfigFile="$(Build.SourcesDirectory)\.pipelines\release-nuget.config" /p:InstallerSuffix=${{ parameters.installerSuffix }} /p:EnableCmdPalAOT=true
103+
additionalBuildOptions: /p:RestoreConfigFile="$(Build.SourcesDirectory)\.pipelines\release-nuget.config" /p:EnableCmdPalAOT=true
110104
beforeBuildSteps:
111105
# Sets versions for all PowerToy created DLLs
112106
- pwsh: |-

.pipelines/v2/templates/job-build-project.yml

Lines changed: 6 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ parameters:
6565
- name: versionNumber
6666
type: string
6767
default: '0.0.1'
68-
- name: installerSuffix
69-
type: string
70-
default: "wix5"
7168
- name: useLatestWinAppSDK
7269
type: boolean
7370
default: false
@@ -240,9 +237,7 @@ jobs:
240237
parameters:
241238
directory: $(build.sourcesdirectory)\src\modules\cmdpal
242239

243-
- pwsh: |-
244-
& "$(build.sourcesdirectory)\.pipelines\installWiX.ps1"
245-
displayName: Download and install WiX 3.14 development build
240+
246241

247242
- ${{ parameters.beforeBuildSteps }}
248243

@@ -508,36 +503,21 @@ jobs:
508503
Copy-Item -Verbose -Force "$(CmdPalPackagePath)" "$(JobOutputDirectory)"
509504
displayName: Stage the final CmdPal package
510505
511-
- template: steps-build-installer.yml
512-
parameters:
513-
codeSign: ${{ parameters.codeSign }}
514-
signingIdentity: ${{ parameters.signingIdentity }}
515-
versionNumber: ${{ parameters.versionNumber }}
516-
additionalBuildOptions: ${{ parameters.additionalBuildOptions }}
517506
518-
- template: steps-build-installer.yml
519-
parameters:
520-
codeSign: ${{ parameters.codeSign }}
521-
signingIdentity: ${{ parameters.signingIdentity }}
522-
versionNumber: ${{ parameters.versionNumber }}
523-
additionalBuildOptions: ${{ parameters.additionalBuildOptions }}
524-
buildUserInstaller: true # NOTE: This is the distinction between the above and below rules
525507
526508
- template: steps-build-installer-vnext.yml
527509
parameters:
528510
codeSign: ${{ parameters.codeSign }}
529511
signingIdentity: ${{ parameters.signingIdentity }}
530512
versionNumber: ${{ parameters.versionNumber }}
531513
additionalBuildOptions: ${{ parameters.additionalBuildOptions }}
532-
installerSuffix: ${{ parameters.installerSuffix }}
533514

534515
- template: steps-build-installer-vnext.yml
535516
parameters:
536517
codeSign: ${{ parameters.codeSign }}
537518
signingIdentity: ${{ parameters.signingIdentity }}
538519
versionNumber: ${{ parameters.versionNumber }}
539520
additionalBuildOptions: ${{ parameters.additionalBuildOptions }}
540-
installerSuffix: ${{ parameters.installerSuffix }}
541521
buildUserInstaller: true # NOTE: This is the distinction between the above and below rules
542522

543523
# This saves ~1GiB per architecture. We won't need these later.
@@ -577,47 +557,26 @@ jobs:
577557
578558
- pwsh: |-
579559
$p = "$(JobOutputDirectory)\"
580-
$installerSuffix = "${{ parameters.installerSuffix }}"
581560
582-
# Calculate hashes for regular installers (without custom suffix)
583-
$userSetupFiles = Get-ChildItem -Path $p -Filter "PowerToysUserSetup*.exe" | Where-Object { $_.Name -notmatch "-$installerSuffix-" }
584-
$machineSetupFiles = Get-ChildItem -Path $p -Filter "PowerToysSetup*.exe" | Where-Object { $_.Name -notmatch "-$installerSuffix-" -and $_.Name -notmatch "PowerToysUserSetup" }
561+
# Calculate hashes for installers
562+
$userSetupFiles = Get-ChildItem -Path $p -Filter "PowerToysUserSetup*.exe"
563+
$machineSetupFiles = Get-ChildItem -Path $p -Filter "PowerToysSetup*.exe" | Where-Object { $_.Name -notmatch "PowerToysUserSetup" }
585564
586565
if ($userSetupFiles.Count -gt 0) {
587566
$userHash = ($userSetupFiles[0] | Get-FileHash).Hash;
588567
$userPlat = "hash_user_$(BuildPlatform).txt";
589568
$combinedUserPath = $p + $userPlat;
590-
echo "Regular User: $userHash"
569+
echo "User: $userHash"
591570
$userHash | out-file -filepath $combinedUserPath
592571
}
593572
594573
if ($machineSetupFiles.Count -gt 0) {
595574
$machineHash = ($machineSetupFiles[0] | Get-FileHash).Hash;
596575
$machinePlat = "hash_machine_$(BuildPlatform).txt";
597576
$combinedMachinePath = $p + $machinePlat;
598-
echo "Regular Machine: $machineHash"
577+
echo "Machine: $machineHash"
599578
$machineHash | out-file -filepath $combinedMachinePath
600579
}
601-
602-
# Calculate hashes for VNext installers (with custom suffix)
603-
$userVNextFiles = Get-ChildItem -Path $p -Filter "PowerToysUserSetup*-$installerSuffix-*.exe"
604-
$machineVNextFiles = Get-ChildItem -Path $p -Filter "PowerToysSetup*-$installerSuffix-*.exe" | Where-Object { $_.Name -notmatch "PowerToysUserSetup" }
605-
606-
if ($userVNextFiles.Count -gt 0) {
607-
$userVNextHash = ($userVNextFiles[0] | Get-FileHash).Hash;
608-
$userVNextPlat = "hash_user_vnext_$(BuildPlatform).txt";
609-
$combinedUserVNextPath = $p + $userVNextPlat;
610-
echo "VNext User: $userVNextHash"
611-
$userVNextHash | out-file -filepath $combinedUserVNextPath
612-
}
613-
614-
if ($machineVNextFiles.Count -gt 0) {
615-
$machineVNextHash = ($machineVNextFiles[0] | Get-FileHash).Hash;
616-
$machineVNextPlat = "hash_machine_vnext_$(BuildPlatform).txt";
617-
$combinedMachineVNextPath = $p + $machineVNextPlat;
618-
echo "VNext Machine: $machineVNextHash"
619-
$machineVNextHash | out-file -filepath $combinedMachineVNextPath
620-
}
621580
displayName: Calculate file hashes for all installers
622581
623582
# Publishing the GPO files

.pipelines/v2/templates/steps-build-installer-vnext.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ parameters:
1414
- name: additionalBuildOptions
1515
type: string
1616
default: ''
17-
- name: installerSuffix
18-
type: string
19-
default: "wix5"
2017

2118
steps:
2219
# Install WiX 5.0.2 tools needed for VNext installer (matching project SDK)
@@ -41,10 +38,10 @@ steps:
4138
# VNext bundle folder; base name intentionally omits the VNext suffix
4239
$InstallerFolder = 'PowerToysSetupVNext'
4340
if ($IsPerUser) {
44-
$InstallerBasename = "PowerToysUserSetup-${{ parameters.versionNumber }}-${{ parameters.installerSuffix }}-$(BuildPlatform)"
41+
$InstallerBasename = "PowerToysUserSetup-${{ parameters.versionNumber }}-$(BuildPlatform)"
4542
}
4643
else {
47-
$InstallerBasename = "PowerToysSetup-${{ parameters.versionNumber }}-${{ parameters.installerSuffix }}-$(BuildPlatform)"
44+
$InstallerBasename = "PowerToysSetup-${{ parameters.versionNumber }}-$(BuildPlatform)"
4845
}
4946
5047
# Export variables for downstream steps
@@ -63,7 +60,6 @@ steps:
6360
msbuildArgs: >-
6461
/t:PowerToysSetupCustomActionsVNext
6562
/p:RunBuildEvents=true;PerUser=${{parameters.buildUserInstaller}};RestorePackagesConfig=true;CIBuild=true
66-
/p:InstallerSuffix=${{ parameters.installerSuffix }}
6763
-restore -graph
6864
/bl:$(LogOutputDirectory)\installer-$(InstallerBuildSlug)-actions.binlog
6965
${{ parameters.additionalBuildOptions }}
@@ -95,7 +91,6 @@ steps:
9591
-restore
9692
/t:PowerToysInstallerVNext
9793
/p:RunBuildEvents=false;PerUser=${{parameters.buildUserInstaller}};BuildProjectReferences=false;CIBuild=true
98-
/p:InstallerSuffix=${{ parameters.installerSuffix }}
9994
/bl:$(LogOutputDirectory)\installer-$(InstallerBuildSlug)-msi.binlog
10095
${{ parameters.additionalBuildOptions }}
10196
platform: $(BuildPlatform)
@@ -142,7 +137,6 @@ steps:
142137
msbuildArgs: >-
143138
/t:SilentFilesInUseBAFunction
144139
/p:RunBuildEvents=true;PerUser=${{parameters.buildUserInstaller}};RestorePackagesConfig=true;CIBuild=true
145-
/p:InstallerSuffix=${{ parameters.installerSuffix }}
146140
-restore -graph
147141
/bl:$(LogOutputDirectory)\installer-$(InstallerBuildSlug)-SilentFilesInUseBAFunction.binlog
148142
${{ parameters.additionalBuildOptions }}
@@ -175,7 +169,6 @@ steps:
175169
-restore
176170
/t:PowerToysBootstrapperVNext
177171
/p:PerUser=${{parameters.buildUserInstaller}};CIBuild=true
178-
/p:InstallerSuffix=${{ parameters.installerSuffix }}
179172
/bl:$(LogOutputDirectory)\installer-$(InstallerBuildSlug)-bootstrapper.binlog
180173
-restore -graph
181174
${{ parameters.additionalBuildOptions }}

0 commit comments

Comments
 (0)