Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Setup] Use WiX bootstrapper instead of a custom one #15050

Merged
merged 29 commits into from
Jan 5, 2022
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5b75ee0
[Setup] Use WiX bootstrapper instead of a custom one
yuyoyuppe Nov 30, 2021
4020455
[Setup] Remove remaining elevation requirements except for installati…
yuyoyuppe Dec 21, 2021
82f6ca4
Crutkas wix bootstrapper fix (#1)
crutkas Dec 21, 2021
7a7b7b8
[Setup] Fully switch to per user installation
yuyoyuppe Dec 21, 2021
91f58a4
[Setup] Format .wxs files
yuyoyuppe Dec 21, 2021
379c513
[Setup] add explicit Guids to all Components
yuyoyuppe Dec 22, 2021
ff322e4
[Setup] Hide MSI UI
yuyoyuppe Dec 24, 2021
f46eeea
[Setup] Don't use UI Sequence for CA
yuyoyuppe Dec 24, 2021
6ba82b5
[Setup] rebase fix
yuyoyuppe Dec 24, 2021
cb5257e
[Setup] Fix DetectPrevInstallPath CA order which prevented correctly …
yuyoyuppe Dec 24, 2021
de86919
[Setup] Use generated GUIDs for macro-generated components
yuyoyuppe Dec 27, 2021
d1e7a1b
[Setup] Fix CI
yuyoyuppe Dec 28, 2021
6cbb1f2
[Setup] Fixed duplicate key ID
yuyoyuppe Dec 28, 2021
5e18cb6
[Setup] Another CI fix
yuyoyuppe Dec 28, 2021
ea571a3
[Setup] Use perMachine/elevated installation in msi
yuyoyuppe Dec 30, 2021
9e1122a
Block downgrade scenarios
jaimecbernardo Jan 3, 2022
14db2bf
Fix uninstall of older version when upgrading
jaimecbernardo Jan 4, 2022
f711a97
Install in programs and revert to HKLM
jaimecbernardo Jan 4, 2022
c3a6757
Fix spellchecker
jaimecbernardo Jan 4, 2022
898cfd5
Check Windows build number on bootstrapper
jaimecbernardo Jan 4, 2022
aafe421
Use ProgramFiles64Folder as default install location
jaimecbernardo Jan 4, 2022
cbbaa24
Merge branch 'main' into pr15050
jaimecbernardo Jan 4, 2022
f582b4d
Fix spellchecker
jaimecbernardo Jan 4, 2022
bf893a1
Revert "Fix spellchecker"
jaimecbernardo Jan 4, 2022
4313226
fix spellcheck
jaimecbernardo Jan 4, 2022
bc84e7e
Merge branch 'main' into wix_bootstrapper
jaimecbernardo Jan 5, 2022
c8aa4e4
Remove new keypath registry entries
jaimecbernardo Jan 5, 2022
a885904
Fix other folder upgrade scenario
jaimecbernardo Jan 5, 2022
10d5479
fix spellchecker
jaimecbernardo Jan 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .github/actions/spell-check/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,16 @@ AYUV
azurecr
backend
backtracer
BAEC
BAF
bak
bbwe
bck
Bcl
BEEE
betadele
betsegaw
BFB
BGR
bgra
BGSOUNDS
Expand Down Expand Up @@ -178,6 +182,7 @@ buf
BUFSIZE
bugreport
Buid
BUILDARCH
buildcommand
buildtools
buildtransitive
Expand All @@ -201,6 +206,7 @@ CDEF
cdpx
cdpxwin
CENTERALIGN
CFDB
cguid
changecursor
Changemove
Expand Down Expand Up @@ -360,6 +366,8 @@ Datavalue
DATAW
davidegiacometti
Dayof
DBCD
DBDA
dbg
Dbghelp
DBLCLKS
Expand Down Expand Up @@ -488,13 +496,18 @@ dwrite
dxgi
dxgiformat
dxguid
EAF
EBA
EBE
ecount
ededf
EDITKEYBOARD
editkeyboardwindow
editorconfig
EDITSHORTCUTS
editshortcutswindow
EFBD
efgh
EFile
egistry
ekus
Expand Down Expand Up @@ -565,7 +578,10 @@ FANCYZONESDRAWLAYOUTTEST
FANCYZONESEDITOR
Farbraum
FARPROC
FBF
FCCD
fdw
FEEBD
feimage
ffaa
fff
Expand Down Expand Up @@ -1806,8 +1822,8 @@ spdisp
spdlog
spdo
spdth
specialfolder
spec'ing
specialfolder
spesi
splitwstring
sprintf
Expand Down Expand Up @@ -2142,13 +2158,13 @@ wdksetup
wdkvsix
wdp
wdupenv
We'd
weakme
webcam
webclient
webpack
webpage
website
We'd
wekyb
Wevtapi
wgpocpl
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/ESRPSigning_core.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"SignBatches": [
{
"MatchedPath": [
"!(ModernWpf)*.resources.dll",
"*.resources.dll",

"PowerToysSetupCustomActions.dll",

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 @@ -217,23 +214,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
48 changes: 45 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,19 +231,61 @@ 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)
configuration: $(BuildConfiguration)
clean: true
maximumCpuCount: true

- task: CmdLine@2
displayName: 'Insignia: Extract Engine from Bundle'
inputs:
script: '.\installer\packages\WiX.3.11.2\tools\insignia.exe -ib installer\PowerToysSetup\$(BuildPlatform)\$(BuildConfiguration)\PowerToysSetup-${{ parameters.versionNumber }}-$(BuildPlatform).exe -o installer\engine.exe'


- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
displayName: 'ESRP CodeSigning (Engine)'
inputs:
ConnectedServiceName: 'Terminal/Console/WinAppDriver Team Code Signing Connection'
FolderPath: 'installer'
Pattern: engine.exe
signConfigType: inlineSignParams
inlineOperation: |
[
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolSign",
"Parameters": {
"OpusName": "Microsoft",
"OpusInfo": "http://www.microsoft.com",
"FileDigest": "/fd \"SHA256\"",
"PageHash": "/NPH",
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
},
"ToolName": "sign",
"ToolVersion": "1.0"
},
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolVerify",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0"
}
]

- task: CmdLine@2
displayName: 'Insignia: Merge Engine into Bundle'
inputs:
script: '.\installer\packages\WiX.3.11.2\tools\insignia.exe -ab installer\engine.exe installer\PowerToysSetup\$(BuildPlatform)\$(BuildConfiguration)\PowerToysSetup-${{ parameters.versionNumber }}-$(BuildPlatform).exe -o installer\PowerToysSetup\$(BuildPlatform)\$(BuildConfiguration)\PowerToysSetup-${{ parameters.versionNumber }}-$(BuildPlatform).exe'

- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
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 @@ -66,7 +66,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 @@ -85,22 +84,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.

Loading