Skip to content

Commit

Permalink
[Setup] Use WiX bootstrapper instead of a custom one
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyoyuppe committed Dec 20, 2021
1 parent 3805348 commit 18394d7
Show file tree
Hide file tree
Showing 55 changed files with 182 additions and 7,096 deletions.
3 changes: 3 additions & 0 deletions .github/actions/spell-check/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ buf
BUFSIZE
bugreport
Buid
BUILDARCH
buildcommand
buildtools
buildtransitive
Expand Down Expand Up @@ -219,6 +220,7 @@ cielab
ciexyz
CImage
cinttypes
CFDB
cla
clangformat
CLASSDC
Expand Down Expand Up @@ -496,6 +498,7 @@ editorconfig
EDITSHORTCUTS
editshortcutswindow
efgh
EFBD
EFile
egistry
ekus
Expand Down
10 changes: 0 additions & 10 deletions .pipelines/build-bootstrapper.cmd

This file was deleted.

5 changes: 5 additions & 0 deletions .pipelines/build-installer-MSI.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cd /D "%~dp0"

call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -winsdk=10.0.18362.0
SET IsPipeline=1
call msbuild ../installer/PowerToysSetup.sln /target:PowerToysInstaller /p:Configuration=Release /p:Platform=x64 /p:CIBuild=true || exit /b 1
19 changes: 0 additions & 19 deletions .pipelines/ci/templates/build-powertoys-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,25 +93,6 @@ steps:
msbuildArgs: ${{ parameters.additionalBuildArguments }}
maximumCpuCount: true

- task: NuGetCommand@2
displayName: Restore NuGet packages for PowerToysBootstrapper.sln
inputs:
command: restore
feedsToUse: config
configPath: NuGet.config
restoreSolution: installer\PowerToysBootstrapper\PowerToysBootstrapper.sln
restoreDirectory: '$(Build.SourcesDirectory)\installer\PowerToysBootstrapper\packages'

- task: VSBuild@1
displayName: 'Build PowerToysBootstrapper.sln'
inputs:
solution: '**\installer\PowerToysBootstrapper\PowerToysBootstrapper.sln'
vsVersion: 16.0
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArgs: ${{ parameters.additionalBuildArguments }}
maximumCpuCount: true

# directly not doing WinAppDriver testing
- task: VSTest@2
displayName: 'MS Tests'
Expand Down
18 changes: 6 additions & 12 deletions .pipelines/pipeline.user.windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ restore:
- !!defaultcommand
name: 'Restore Installer'
command: '.pipelines\restore-installer.cmd'
- !!defaultcommand
name: 'Restore Installer BootStrapper'
command: '.pipelines\restore-bootstrapper.cmd'
- !!defaultcommand
name: 'Restore Localization packages'
command: '.pipelines\restore-localization.cmd'
Expand Down Expand Up @@ -214,23 +211,20 @@ build:
signing_options:
sign_inline: true # This does signing as soon as this command completes
- !!buildcommand
name: 'Build Power Toys Installer'
command: '.pipelines\build-installer.cmd'
name: 'Build Power Toys Installer MSI' # Need to do separately to sign dll before building installer
command: '.pipelines\build-installer-MSI.cmd'
artifacts:
- from: 'installer\PowerToysSetup\x64\Release'
to: 'Build_Installer_Output'
to: 'Build_Output'
include:
- 'PowerToysSetup-*.msi'
signing_options:
sign_inline: true # This does signing as soon as this command completes
- !!buildcommand
name: 'Build Power Toys Bootstrapper'
command: '.pipelines\build-bootstrapper.cmd'
name: 'Build Power Toys Installer'
command: '.pipelines\build-installer.cmd'
artifacts:
- to: 'Symbols'
include:
- 'installer\PowerToysBootstrapper\x64\Release\PowerToysSetup-*.pdb'
- from: 'installer\PowerToysBootstrapper\x64\Release'
- from: 'installer\PowerToysSetup\x64\Release'
to: 'Build_Installer_Output'
include:
- 'PowerToysSetup-*.exe'
Expand Down
6 changes: 3 additions & 3 deletions .pipelines/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ jobs:
inputs:
solution: '**/installer/PowerToysSetup.sln'
vsVersion: 16.0
msbuildArgs: /p:CIBuild=true /bl:$(Build.SourcesDirectory)\msbuild.binlog
msbuildArgs: /p:CIBuild=true /target:PowerToysInstaller /bl:$(Build.SourcesDirectory)\msbuild.binlog
platform: $(BuildPlatform)
configuration: $(BuildConfiguration)
clean: true
Expand All @@ -231,7 +231,7 @@ jobs:
- task: VSBuild@1
displayName: Build Bootstrapper
inputs:
solution: '**/installer/PowerToysBootstrapper/PowerToysBootstrapper.sln'
solution: '**/installer/PowerToysSetup.sln'
vsVersion: 16.0
msbuildArgs: /p:CIBuild=true /bl:$(Build.SourcesDirectory)\msbuild.binlog
platform: $(BuildPlatform)
Expand All @@ -243,7 +243,7 @@ jobs:
displayName: Sign Boostrapper
inputs:
ConnectedServiceName: 'Terminal/Console/WinAppDriver Team Code Signing Connection'
FolderPath: 'installer/PowerToysBootstrapper/$(BuildPlatform)\$(BuildConfiguration)'
FolderPath: 'installer/PowerToysSetup/$(BuildPlatform)\$(BuildConfiguration)'
signType: batchSigning
batchSignPolicyFile: '$(build.sourcesdirectory)\.pipelines\ESRPSigning_installer.json'
ciPolicyFile: '$(build.sourcesdirectory)\.pipelines\CIPolicy.xml'
Expand Down
3 changes: 0 additions & 3 deletions .pipelines/restore-bootstrapper.cmd

This file was deleted.

9 changes: 0 additions & 9 deletions .pipelines/restore.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,3 @@ REM Just in case CDPx (Legacy) doesn't do it
git submodule update --init --recursive

nuget restore ../PowerToys.sln || exit /b 1

powershell.exe -Command "Invoke-WebRequest -OutFile %tmp%\wdksetup.exe https://go.microsoft.com/fwlink/p/?linkid=2085767"
%tmp%\wdksetup.exe /q

copy "C:\Program Files (x86)\Windows Kits\10\Vsix\VS2019\WDK.vsix" %tmp%\wdkvsix.zip
powershell Expand-Archive %tmp%\wdkvsix.zip -DestinationPath %tmp%\wdkvsix -Force

robocopy /e %tmp%\wdkvsix\$MSBuild\Microsoft\VC\v160 "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160" || IF %ERRORLEVEL% LEQ 7 EXIT 0
robocopy /e %tmp%\wdkvsix\$VCTargets "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\VC\VCTargets" || IF %ERRORLEVEL% LEQ 7 EXIT 0
2 changes: 1 addition & 1 deletion doc/devdocs/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ We use the awesome [spdlog](https://github.com/gabime/spdlog) library for loggin
<Import Project="..\..\..\deps\spdlog.props" />
```
It'll add the required include dirs and link the library binary itself.
You can see many example usage of the library in its repository or in the [bootstrapper project](../../installer/PowerToysBootstrapper/bootstrapper/bootstrapper.cpp).

11 changes: 1 addition & 10 deletions doc/devdocs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ The installer can only be compiled in `Release` mode, step 1 and 2 must be done
2. Compile `BugReportTool.sln` tool. Path from root: `tools\BugReportTool\BugReportTool.sln` (details listed below)
3. Compile `WebcamReportTool.sln` tool. Path from root: `tools\WebcamReportTool\WebcamReportTool.sln` (details listed below)
4. Compile `PowerToysSetup.sln` Path from root: `installer\PowerToysSetup.sln` (details listed below)
5. Compile `PowerToysBootstrapper.sln` Path from root: `installer\PowerToysBootstrapper\PowerToysBootstrapper.sln` (details listed below)

### Prerequisites for building the MSI installer

Expand All @@ -108,22 +107,14 @@ The installer can only be compiled in `Release` mode, step 1 and 2 must be done
2. In Visual Studio, in the `Solutions Configuration` drop-down menu select `Release`
3. From the `Build` menu, choose `Build Solution`.

### Locally compiling the .MSI installer
### Locally compiling the installer

1. Open `installer\PowerToysSetup.sln`
2. In Visual Studio, in the `Solutions Configuration` drop-down menu select `Release`
3. From the `Build` menu choose `Build Solution`.

The resulting `PowerToysSetup.msi` installer will be available in the `installer\PowerToysSetup\x64\Release\` folder.

### Locally compiling the .EXE Bootstrapper installer

1. Open `installer\PowerToysBootstrapper\PowerToysBootstrapper.sln`
2. In Visual Studio, in the `Solutions Configuration` drop-down menu select `Release`
3. From the `Build` menu choose `Build Solution`.

The `PowerToysSetup-0.0.1-x64.exe` binary is created in the `installer\PowerToysBootstrapper\x64\Release\` folder.

#### Supported arguments for the .EXE Bootstrapper installer

Head over to the wiki to see the [full list of supported installer arguments][installerArgWiki].
Expand Down
43 changes: 0 additions & 43 deletions installer/PowerToysBootstrapper/PowerToysBootstrapper.sln

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions installer/PowerToysBootstrapper/bootstrapper/DotnetInstallation.h

This file was deleted.

14 changes: 0 additions & 14 deletions installer/PowerToysBootstrapper/bootstrapper/LocProject.json

This file was deleted.

Loading

0 comments on commit 18394d7

Please sign in to comment.