From 65a7b88cd18d340183484601794fe479a8959ba3 Mon Sep 17 00:00:00 2001 From: Stefan Markovic Date: Wed, 18 Jan 2023 16:59:09 +0100 Subject: [PATCH 01/14] Add per user installer --- .github/actions/spell-check/expect.txt | 33 +- .gitignore | 3 - .pipelines/ESRPSigning_core.json | 1 + .../ci/templates/build-powertoys-steps.yml | 25 +- .pipelines/versionAndSignCheck.ps1 | 6 +- installer/PowerToysSetup/AlwaysOnTop.wxs | 23 +- installer/PowerToysSetup/Awake.wxs | 30 +- installer/PowerToysSetup/ColorPicker.wxs | 38 +- installer/PowerToysSetup/Common.wxi | 21 +- installer/PowerToysSetup/Core.wxs | 103 +- installer/PowerToysSetup/FancyZones.wxs | 22 +- .../PowerToysSetup/FileExplorerPreview.wxs | 39 +- installer/PowerToysSetup/FileLocksmith.wxs | 70 +- installer/PowerToysSetup/Hosts.wxs | 79 +- installer/PowerToysSetup/ImageResizer.wxs | 154 ++- installer/PowerToysSetup/KeyboardManager.wxs | 25 +- installer/PowerToysSetup/MeasureTool.wxs | 47 +- installer/PowerToysSetup/MonacoSRC.wxs | 1059 +++++++++++++++++ installer/PowerToysSetup/MouseUtils.wxs | 28 +- installer/PowerToysSetup/PowerAccent.wxs | 22 +- installer/PowerToysSetup/PowerRename.wxs | 69 +- installer/PowerToysSetup/PowerToys.wxs | 19 +- .../PowerToysBootstrapper.wixproj | 14 +- .../PowerToysSetup/PowerToysInstaller.wixproj | 65 +- installer/PowerToysSetup/Product.wxs | 40 +- installer/PowerToysSetup/Resources.wxs | 166 +++ installer/PowerToysSetup/Run.wxs | 629 +++++----- installer/PowerToysSetup/Settings.wxs | 138 +-- installer/PowerToysSetup/ShortcutGuide.wxs | 43 +- installer/PowerToysSetup/TextExtractor.wxs | 22 +- installer/PowerToysSetup/Tools.wxs | 25 +- installer/PowerToysSetup/VideoConference.wxs | 23 +- installer/PowerToysSetup/WinAppSDK.wxs | 163 ++- .../generateAllFileComponents.ps1 | 210 ++++ .../PowerToysSetup/generateFileComponents.ps1 | 56 + installer/PowerToysSetup/generateFileList.ps1 | 79 ++ .../CustomAction.cpp | 28 + .../CustomAction.def | 1 + .../PowerToysSetupCustomActions.vcxproj | 26 +- src/Version.props | 2 +- src/common/updating/updating.cpp | 18 +- src/common/updating/updating.vcxproj | 1 + src/common/utils/registry.h | 77 ++ 43 files changed, 2865 insertions(+), 877 deletions(-) create mode 100644 installer/PowerToysSetup/MonacoSRC.wxs create mode 100644 installer/PowerToysSetup/generateAllFileComponents.ps1 create mode 100644 installer/PowerToysSetup/generateFileComponents.ps1 create mode 100644 installer/PowerToysSetup/generateFileList.ps1 diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 3a50dce6b32c..fecd00c623e9 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -40,7 +40,6 @@ ALPHATYPE Altdown alwaysontop amd -AMF AModifier AMPROPERTY AMPROPSETID @@ -52,6 +51,7 @@ ansicolor ANull AOC aocfnapldcnfbofgmbbllojgocaelgdd +AOT APARTMENTTHREADED APeriod APIENTRY @@ -64,8 +64,8 @@ appium Applets Applicationcan applicationconfiguration +applicationconfiguration applicationframehost -Applist applog appmanifest appref @@ -203,7 +203,7 @@ Choibalsan chrdavis chromaticities Chrzan -cht +CHT Chukotka Chuuk CIELAB @@ -237,6 +237,7 @@ CMONITORS cmpgt cmyk cne +Cng cnt Cocklebiddy coclass @@ -293,6 +294,7 @@ cppruntime cppstd cppwinrt CProj +createdump CREATESCHEDULEDTASK CREATESTRUCT CREATEWINDOWFAILED @@ -307,7 +309,6 @@ CSRW CStyle CSY CTest -Ctl CTRLALTDEL Ctrls Ctx @@ -390,7 +391,7 @@ DESKTOPABSOLUTEEDITING DESKTOPABSOLUTEPARSING desktopshorcutinstalled desktopwindowxamlsource -deu +DEU devblogs devdocs devenum @@ -477,7 +478,7 @@ ENABLEDPOPUP endpointvolume endregion ENTERSIZEMOVE -enu +ENU enumerationoptions EOAC epicgames @@ -490,7 +491,6 @@ ERRORLEVEL ERRORTITLE ESettings esize -esn esrp Eswatini etl @@ -599,7 +599,6 @@ GETTEXT GETTEXTLENGTH GHND globalassemblycache -Globbing GMEM GNumber google @@ -793,6 +792,7 @@ ipcmanager IPlugin IPower IPREVIEW +IPREVIEW ipreviewhandler ipreviewhandlervisualssetfont IProperty @@ -821,7 +821,7 @@ jgeosdfsdsgmkedfgdfgdfgbkmhcgcflmi jjw jobject jpe -jpn +JPN jpnime Jsons jsonval @@ -845,6 +845,7 @@ keynum keyremaps Keytool keyup +Kfiles Khakassia Khanty Khovd @@ -862,6 +863,7 @@ Kyzylorda LAlt Lambson langword +lastcodeanalysissucceeded Lastdevice Laute laviusmotileng @@ -902,6 +904,7 @@ LMEM LMENU lnk LOADFROMFILE +LOADFROMFILE LOADLIBRARYASDATAFILE LOBYTE LOCALAPPDATA @@ -914,12 +917,14 @@ logconsole logfile LOGFONT LOGFONTW +LOGFONTW LOGMSG logon LOGPIXELSX LOn longdate LONGLONG +louncher lowlevel LOWORD lparam @@ -981,6 +986,8 @@ MAPTOSAMESHORTCUT MAPVK Markdig markdownpreviewhandler +markdownpreviewhandler +MARKDOWNPREVIEWHANDLERCPP MARKDOWNPREVIEWHANDLERCPP Markovic Marquesas @@ -1014,7 +1021,6 @@ Metadatas metafile mfapi mfc -mfcm mfidl mfobjects mfplat @@ -1439,7 +1445,6 @@ RECTDESTINATION RECTL rectp rects -recyclebin redirectedfrom redist redistributable @@ -1533,7 +1538,7 @@ runtimedepsjsonpath runtimeobject runtimepack runtimes -rus +RUS Rutkas RValue rvm @@ -1603,7 +1608,6 @@ SHGFI Shl shldisp shlobj -Shlw shlwapi shmem shobjidl @@ -1803,6 +1807,7 @@ THICKFRAME THISCOMPONENT THotkey thumbcache +thumbcache TILEDWINDOW timedate timediff @@ -1878,6 +1883,7 @@ Uniquifies unitconverter unittests Unk +Unk unknwn UNLEN Unmap @@ -2075,6 +2081,7 @@ wox wparam wpf wpfdepsjsonpath +wpfgfx wpftmp wpr wprp diff --git a/.gitignore b/.gitignore index 14c1e397376b..cbd74e790c68 100644 --- a/.gitignore +++ b/.gitignore @@ -345,6 +345,3 @@ src/common/Telemetry/*.etl /src/modules/previewpane/SvgThumbnailProvider/$(SolutionDir)$(Platform)/$(Configuration)/modules/FileExplorerPreview/SvgThumbnailProvider.xml /src/modules/powerrename/ui/RCa24464 /src/modules/powerrename/ui/RCb24464 - -# Generated installer file for Monaco source files. -/installer/PowerToysSetup/MonacoSRC.wxs diff --git a/.pipelines/ESRPSigning_core.json b/.pipelines/ESRPSigning_core.json index af84380a24b4..6225c2c215da 100644 --- a/.pipelines/ESRPSigning_core.json +++ b/.pipelines/ESRPSigning_core.json @@ -238,6 +238,7 @@ "modules\\FileExplorerPreview\\Microsoft.Web.WebView2.Wpf.dll", "modules\\FileExplorerPreview\\WebView2Loader.dll", "modules\\Hosts\\Microsoft.Graphics.Canvas.Interop.dll", + "modules\\Hosts\\clrcompression.dll", "modules\\launcher\\e_sqlite3.dll", "modules\\launcher\\LazyCache.dll", "modules\\launcher\\SQLitePCLRaw.batteries_v2.dll", diff --git a/.pipelines/ci/templates/build-powertoys-steps.yml b/.pipelines/ci/templates/build-powertoys-steps.yml index 26754babe853..1f6eab791eaa 100644 --- a/.pipelines/ci/templates/build-powertoys-steps.yml +++ b/.pipelines/ci/templates/build-powertoys-steps.yml @@ -153,7 +153,7 @@ steps: filePath: '$(build.sourcesdirectory)\.pipelines\installWiX.ps1' - task: VSBuild@1 - displayName: 'Build PowerToys MSI' + displayName: 'Build PowerToys per-machine MSI' inputs: solution: '**\installer\PowerToysSetup.sln' vsVersion: 17.0 @@ -163,7 +163,7 @@ steps: maximumCpuCount: true - task: VSBuild@1 - displayName: 'Build PowerToys Bootstrapper' + displayName: 'Build PowerToys per-machine Bootstrapper' inputs: solution: '**\installer\PowerToysSetup.sln' vsVersion: 17.0 @@ -173,6 +173,27 @@ steps: clean: false maximumCpuCount: true +- task: VSBuild@1 + displayName: 'Build PowerToys per-user MSI' + inputs: + solution: '**\installer\PowerToysSetup.sln' + vsVersion: 17.0 + platform: '$(BuildPlatform)' + configuration: '$(BuildConfiguration)' + msbuildArgs: /t:PowerToysInstaller ${{ parameters.additionalBuildArguments }} /p:PerUser=true + maximumCpuCount: true + +- task: VSBuild@1 + displayName: 'Build PowerToys per-user Bootstrapper' + inputs: + solution: '**\installer\PowerToysSetup.sln' + vsVersion: 17.0 + platform: '$(BuildPlatform)' + configuration: '$(BuildConfiguration)' + msbuildArgs: /t:PowerToysBootstrapper ${{ parameters.additionalBuildArguments }} /p:PerUser=true + clean: false + maximumCpuCount: true + # directly not doing WinAppDriver testing - task: VSTest@2 displayName: 'MS Tests' diff --git a/.pipelines/versionAndSignCheck.ps1 b/.pipelines/versionAndSignCheck.ps1 index 168f7d0c25e6..84757b03950e 100644 --- a/.pipelines/versionAndSignCheck.ps1 +++ b/.pipelines/versionAndSignCheck.ps1 @@ -38,7 +38,8 @@ $items | ForEach-Object { (-not $_.Name.EndsWith("Microsoft.Xaml.Interactions.dll")) -and (-not $_.Name.EndsWith("Microsoft.Xaml.Interactivity.dll")) -and (-not $_.Name.EndsWith("hyjiacan.py4n.dll")) -and - (-not $_.Name.EndsWith("Microsoft.WindowsAppRuntime.Release.Net.dll")) + (-not $_.Name.EndsWith("Microsoft.WindowsAppRuntime.Release.Net.dll")) -and + (-not $_.Name.EndsWith("Microsoft.Windows.Widgets.Projection.dll")) ) { Write-Host "Version set to 1.0.0.0: " + $_.FullName @@ -63,7 +64,8 @@ $items | ForEach-Object { (-not $_.Name.EndsWith("MRM.dll")) -and (-not $_.Name.EndsWith("PushNotificationsLongRunningTask.ProxyStub.dll")) -and (-not $_.Name.EndsWith("WindowsAppSdk.AppxDeploymentExtensions.Desktop.dll")) -and - (-not $_.Name.EndsWith("System.Diagnostics.EventLog.Messages.dll")) + (-not $_.Name.EndsWith("System.Diagnostics.EventLog.Messages.dll")) -and + (-not $_.Name.EndsWith("Microsoft.Windows.Widgets.dll")) ) { Write-Host "Version not set: " + $_.FullName diff --git a/installer/PowerToysSetup/AlwaysOnTop.wxs b/installer/PowerToysSetup/AlwaysOnTop.wxs index 3ffc1b7f36d7..f98f84d98720 100644 --- a/installer/PowerToysSetup/AlwaysOnTop.wxs +++ b/installer/PowerToysSetup/AlwaysOnTop.wxs @@ -4,21 +4,22 @@ + + + - - - - - - - - + + - - - + + + + + + + diff --git a/installer/PowerToysSetup/Awake.wxs b/installer/PowerToysSetup/Awake.wxs index 645cb61cf5c3..7228069434fb 100644 --- a/installer/PowerToysSetup/Awake.wxs +++ b/installer/PowerToysSetup/Awake.wxs @@ -4,29 +4,31 @@ - + + + + - - - - - - - + + - - - + + - - - + + + + + + + + diff --git a/installer/PowerToysSetup/ColorPicker.wxs b/installer/PowerToysSetup/ColorPicker.wxs index 85beb5526806..088c94e19e4a 100644 --- a/installer/PowerToysSetup/ColorPicker.wxs +++ b/installer/PowerToysSetup/ColorPicker.wxs @@ -4,33 +4,31 @@ - + + + + - - - - - - - - + + + - - - - - - - + + + - - - - + + + + + + + + diff --git a/installer/PowerToysSetup/Common.wxi b/installer/PowerToysSetup/Common.wxi index 6aad3632b71b..895a340df98b 100644 --- a/installer/PowerToysSetup/Common.wxi +++ b/installer/PowerToysSetup/Common.wxi @@ -17,11 +17,24 @@ - - + + - - + + + + + + + + + + + + + + + diff --git a/installer/PowerToysSetup/Core.wxs b/installer/PowerToysSetup/Core.wxs index 549da15b0f54..330ff1cd7646 100644 --- a/installer/PowerToysSetup/Core.wxs +++ b/installer/PowerToysSetup/Core.wxs @@ -6,15 +6,20 @@ - + - + + + + + + - + @@ -22,7 +27,7 @@ - + @@ -33,20 +38,35 @@ - - + + + + + - - + + + + + - - + + + + + - - + + + + + - - + + + + + @@ -70,33 +90,26 @@ - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + @@ -121,22 +134,30 @@ - + + + + + + + + + + + + - - - - + diff --git a/installer/PowerToysSetup/FancyZones.wxs b/installer/PowerToysSetup/FancyZones.wxs index 555c46057c0f..1a29f8df40fe 100644 --- a/installer/PowerToysSetup/FancyZones.wxs +++ b/installer/PowerToysSetup/FancyZones.wxs @@ -4,22 +4,22 @@ - + + - - - - - - + + - - - - + + + + + + + diff --git a/installer/PowerToysSetup/FileExplorerPreview.wxs b/installer/PowerToysSetup/FileExplorerPreview.wxs index 88f8e97d2b59..ba819ad22c26 100644 --- a/installer/PowerToysSetup/FileExplorerPreview.wxs +++ b/installer/PowerToysSetup/FileExplorerPreview.wxs @@ -4,32 +4,31 @@ - - - - - + + + + - - - - - - + + + - - - - + + + - - - - - + + + + + + + + + diff --git a/installer/PowerToysSetup/FileLocksmith.wxs b/installer/PowerToysSetup/FileLocksmith.wxs index a0e34f7051b3..d0d49c3bb5ae 100644 --- a/installer/PowerToysSetup/FileLocksmith.wxs +++ b/installer/PowerToysSetup/FileLocksmith.wxs @@ -4,70 +4,46 @@ - - + + + + - - - - - - - + + + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/installer/PowerToysSetup/Hosts.wxs b/installer/PowerToysSetup/Hosts.wxs index 217251e054c0..5a63b632f36e 100644 --- a/installer/PowerToysSetup/Hosts.wxs +++ b/installer/PowerToysSetup/Hosts.wxs @@ -4,67 +4,42 @@ - - + + + + - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/installer/PowerToysSetup/ImageResizer.wxs b/installer/PowerToysSetup/ImageResizer.wxs index 22e6b44d94f1..5534e838c83f 100644 --- a/installer/PowerToysSetup/ImageResizer.wxs +++ b/installer/PowerToysSetup/ImageResizer.wxs @@ -4,98 +4,96 @@ - - + + + + - - - - - - - + + + - + - + - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - + + + - - - - - + + + + + + + + diff --git a/installer/PowerToysSetup/KeyboardManager.wxs b/installer/PowerToysSetup/KeyboardManager.wxs index 1bb67443b2a7..925588c41ecf 100644 --- a/installer/PowerToysSetup/KeyboardManager.wxs +++ b/installer/PowerToysSetup/KeyboardManager.wxs @@ -7,26 +7,43 @@ - + + + + - + + + + - + + + + - + + + + + + + + + diff --git a/installer/PowerToysSetup/MeasureTool.wxs b/installer/PowerToysSetup/MeasureTool.wxs index d6223c11eac3..879a3246ac3e 100644 --- a/installer/PowerToysSetup/MeasureTool.wxs +++ b/installer/PowerToysSetup/MeasureTool.wxs @@ -4,42 +4,35 @@ - - + + - - - - - - - - - - - + + - - - - - + + + + + + - - - - - - - - - + + + + + + + + + + diff --git a/installer/PowerToysSetup/MonacoSRC.wxs b/installer/PowerToysSetup/MonacoSRC.wxs new file mode 100644 index 000000000000..b8a997ac4464 --- /dev/null +++ b/installer/PowerToysSetup/MonacoSRC.wxs @@ -0,0 +1,1059 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/installer/PowerToysSetup/MouseUtils.wxs b/installer/PowerToysSetup/MouseUtils.wxs index 0d8ed66f1afd..4d8dbc9cb167 100644 --- a/installer/PowerToysSetup/MouseUtils.wxs +++ b/installer/PowerToysSetup/MouseUtils.wxs @@ -4,24 +4,22 @@ + + + - - - - - - - - - - - + + + - - - - + + + + + + + diff --git a/installer/PowerToysSetup/PowerAccent.wxs b/installer/PowerToysSetup/PowerAccent.wxs index 928a3ca488be..98d78ca856c0 100644 --- a/installer/PowerToysSetup/PowerAccent.wxs +++ b/installer/PowerToysSetup/PowerAccent.wxs @@ -4,22 +4,22 @@ - + + - - - - - - + + - - - - + + + + + + + diff --git a/installer/PowerToysSetup/PowerRename.wxs b/installer/PowerToysSetup/PowerRename.wxs index 623903389445..a30718980e5a 100644 --- a/installer/PowerToysSetup/PowerRename.wxs +++ b/installer/PowerToysSetup/PowerRename.wxs @@ -4,28 +4,24 @@ - - - + + + + - - - - - - - - + + + - + - + @@ -33,38 +29,31 @@ - - - - - + + + + + + - - - - - - - - - - - - + + + - + + + + + + + + + + - - - - - - - - - + diff --git a/installer/PowerToysSetup/PowerToys.wxs b/installer/PowerToysSetup/PowerToys.wxs index 081817027316..682d3a8d0346 100644 --- a/installer/PowerToysSetup/PowerToys.wxs +++ b/installer/PowerToysSetup/PowerToys.wxs @@ -2,6 +2,13 @@ + + + + + + + @@ -36,7 +43,11 @@ - + + + + + @@ -61,7 +72,7 @@ Id="TerminatePowerToys" SourceFile="terminate_powertoys.cmd" Permanent="yes" - PerMachine="yes" + PerMachine="$(var.PerMachineYesNo)" Vital="no"> diff --git a/installer/PowerToysSetup/PowerToysBootstrapper.wixproj b/installer/PowerToysSetup/PowerToysBootstrapper.wixproj index f03cc88b35a9..725d1a1131de 100644 --- a/installer/PowerToysSetup/PowerToysBootstrapper.wixproj +++ b/installer/PowerToysSetup/PowerToysBootstrapper.wixproj @@ -1,4 +1,4 @@ - + PowerToysBootstrapper {31d72625-43c1-41b1-b784-bce4a8dc5543} + + $(DefineConstants);PerUser=true + + + $(DefineConstants);PerUser=false + Release x64 @@ -20,8 +26,10 @@ PowerToysSetup-$(Version)-$(Platform) Bundle True - PowerToysSetup-$(Version)-$(Platform) - $(Platform)\$(Configuration)\ + PowerToysSetup-$(Version)-$(Platform)-perMachine + PowerToysSetup-$(Version)-$(Platform)-perUser + $(Platform)\$(Configuration)\perMachine + $(Platform)\$(Configuration)\perUser obj\$(Platform)\$(Configuration)\ diff --git a/installer/PowerToysSetup/PowerToysInstaller.wixproj b/installer/PowerToysSetup/PowerToysInstaller.wixproj index e4c7dd649e3c..6152b8b99300 100644 --- a/installer/PowerToysSetup/PowerToysInstaller.wixproj +++ b/installer/PowerToysSetup/PowerToysInstaller.wixproj @@ -1,4 +1,4 @@ - + @@ -11,8 +11,8 @@ simulate the build pipeline doing that for you. --> IF NOT DEFINED IsPipeline ( call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -winsdk=10.0.19041.0 -SET PTRoot=..\..\..\.. -call "..\..\publish.cmd" x64 +SET PTRoot=..\..\..\..\.. +call "..\..\..\publish.cmd" x64 ) @@ -27,13 +27,42 @@ call "..\..\publish.cmd" arm64 Always - call move /Y ..\..\Core.wxs.bk ..\..\Core.wxs - call move /Y ..\..\..\PowerToysSetupCustomActions\DepsFilesLists.h.bk ..\..\..\PowerToysSetupCustomActions\DepsFilesLists.h + call move /Y ..\..\..\AlwaysOnTop.wxs.bk ..\..\..\AlwaysOnTop.wxs + call move /Y ..\..\..\Awake.wxs.bk ..\..\..\Awake.wxs + call move /Y ..\..\..\ColorPicker.wxs.bk ..\..\..\ColorPicker.wxs + call move /Y ..\..\..\Core.wxs.bk ..\..\..\Core.wxs + call move /Y ..\..\..\FancyZones.wxs.bk ..\..\..\FancyZones.wxs + call move /Y ..\..\..\FileExplorerPreview.wxs.bk ..\..\..\FileExplorerPreview.wxs + call move /Y ..\..\..\FileLocksmith.wxs.bk ..\..\..\FileLocksmith.wxs + call move /Y ..\..\..\Hosts.wxs.bk ..\..\..\Hosts.wxs + call move /Y ..\..\..\ImageResizer.wxs.bk ..\..\..\ImageResizer.wxs + call move /Y ..\..\..\KeyboardManager.wxs.bk ..\..\..\KeyboardManager.wxs + call move /Y ..\..\..\MeasureTool.wxs.bk ..\..\..\MeasureTool.wxs + call move /Y ..\..\..\MouseUtils.wxs.bk ..\..\..\MouseUtils.wxs + call move /Y ..\..\..\PowerAccent.wxs.bk ..\..\..\PowerAccent.wxs + call move /Y ..\..\..\PowerRename.wxs.bk ..\..\..\PowerRename.wxs + call move /Y ..\..\..\Product.wxs.bk ..\..\..\Product.wxs + call move /Y ..\..\..\Resources.wxs.bk ..\..\..\Resources.wxs + call move /Y ..\..\..\Run.wxs.bk ..\..\..\Run.wxs + call move /Y ..\..\..\Settings.wxs.bk ..\..\..\Settings.wxs + call move /Y ..\..\..\ShortcutGuide.wxs.bk ..\..\..\ShortcutGuide.wxs + call move /Y ..\..\..\TextExtractor.wxs.bk ..\..\..\TextExtractor.wxs + call move /Y ..\..\..\Tools.wxs.bk ..\..\..\Tools.wxs + call move /Y ..\..\..\VideoConference.wxs.bk ..\..\..\VideoConference.wxs + call move /Y ..\..\..\WinAppSDK.wxs.bk ..\..\..\WinAppSDK.wxs + call move /Y ..\..\..\..\PowerToysSetupCustomActions\DepsFilesLists.h.bk ..\..\..\..\PowerToysSetupCustomActions\DepsFilesLists.h PowerToysInstaller + + $(DefineConstants);PerUser=true + + + $(DefineConstants);PerUser=false + + Release @@ -41,15 +70,22 @@ call "..\..\publish.cmd" arm64 3.10 022a9d30-7c4f-416d-a9df-5ff2661cc0ad 2.0 - PowerToysSetup-$(Version)-$(Platform) + PowerToysSetup-$(Version)-$(Platform)-perMachine + PowerToysSetup-$(Version)-$(Platform)-perUser Package True + + + ICE91 + 1026;1076 - $(Platform)\$(Configuration)\ - obj\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\perMachine + $(Platform)\$(Configuration)\perUser + obj\$(Platform)\$(Configuration)\perMachine + obj\$(Platform)\$(Configuration)\perUser ICE40 @@ -137,18 +173,19 @@ call "..\..\publish.cmd" arm64 - --> - + SuppressFragments="false" + SuppressRegistry="false" + SuppressRootDirectory="true"/> + --> + \ No newline at end of file diff --git a/installer/PowerToysSetup/Product.wxs b/installer/PowerToysSetup/Product.wxs index 9d277676d464..8d7d6c739547 100644 --- a/installer/PowerToysSetup/Product.wxs +++ b/installer/PowerToysSetup/Product.wxs @@ -25,7 +25,8 @@ Manufacturer="Microsoft Corporation" UpgradeCode="42B84BF7-5FBF-473B-9C8B-049DC16F7708"> - + + @@ -51,7 +52,7 @@ + Description="Contains all PowerToys features."> @@ -116,13 +117,13 @@ - - + + - + ""]]> @@ -130,8 +131,10 @@ DEFAULTBOOTSTRAPPERINSTALLFOLDER OR PREVIOUSINSTALLFOLDER = ""]]> + + @@ -386,6 +389,13 @@ DllEntry="DetectPrevInstallPathCA" /> + + - + @@ -502,83 +512,65 @@ - - - - - - - - - - - - - - - - - - diff --git a/installer/PowerToysSetup/Resources.wxs b/installer/PowerToysSetup/Resources.wxs index a771c6d8b639..f6bd91eb539d 100644 --- a/installer/PowerToysSetup/Resources.wxs +++ b/installer/PowerToysSetup/Resources.wxs @@ -145,48 +145,72 @@ Id="Launcher_$(var.IdSafeLanguage)_Component" Directory="Resource$(var.IdSafeLanguage)LauncherInstallFolder" Guid="$(var.CompGUIDPrefix)00"> + + + + + + + + + + + + + + + + + + + + + + + + @@ -194,125 +218,267 @@ Id="Launcher_Calculator_$(var.IdSafeLanguage)_Component" Directory="Resource$(var.IdSafeLanguage)CalculatorPluginFolder" Guid="$(var.CompGUIDPrefix)08"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/installer/PowerToysSetup/Run.wxs b/installer/PowerToysSetup/Run.wxs index 6b42d9f6b4bf..f0e0a8323374 100644 --- a/installer/PowerToysSetup/Run.wxs +++ b/installer/PowerToysSetup/Run.wxs @@ -4,308 +4,377 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - + + + + - - - - - + + + + + - - - - - - - - - - - + + + + - - - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - + + + + - - - - - - - - - - - - + + + + + - - - - - - - - - - - - + + + + - - - - - - - - - - - - + + + + + - - - - - - - - - - - + + + + - - - - - - - - - - - + + + + + - - - - - - - - - - - - + + + + - - - - - - - - - - - - + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/installer/PowerToysSetup/Settings.wxs b/installer/PowerToysSetup/Settings.wxs index a1072b59f6e5..fb0e5f45a1b4 100644 --- a/installer/PowerToysSetup/Settings.wxs +++ b/installer/PowerToysSetup/Settings.wxs @@ -4,101 +4,73 @@ - - - - + + + + + + + + + + + + + + + - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - + + + + - - - - - - + + + + - - - - - - + + + + + - - - - - + + + + + + - - - - - - - - diff --git a/installer/PowerToysSetup/ShortcutGuide.wxs b/installer/PowerToysSetup/ShortcutGuide.wxs index 9f425289db73..2053ffae34fd 100644 --- a/installer/PowerToysSetup/ShortcutGuide.wxs +++ b/installer/PowerToysSetup/ShortcutGuide.wxs @@ -4,37 +4,48 @@ + + + - - - - - - - - + + + + - - + + + + + - - + + + + + - - - - + + + + + + + + + + diff --git a/installer/PowerToysSetup/TextExtractor.wxs b/installer/PowerToysSetup/TextExtractor.wxs index f4f4c725b08e..3afbb2a5e195 100644 --- a/installer/PowerToysSetup/TextExtractor.wxs +++ b/installer/PowerToysSetup/TextExtractor.wxs @@ -4,22 +4,22 @@ - + + - - - - - - - + + - - + + + + + + + - diff --git a/installer/PowerToysSetup/Tools.wxs b/installer/PowerToysSetup/Tools.wxs index 23aea33d13b9..a9fe0bf306d7 100644 --- a/installer/PowerToysSetup/Tools.wxs +++ b/installer/PowerToysSetup/Tools.wxs @@ -6,18 +6,33 @@ - - + + + + + - + + + + - + + + + - + + + + + + + diff --git a/installer/PowerToysSetup/VideoConference.wxs b/installer/PowerToysSetup/VideoConference.wxs index 231ed04f8fb5..c2b6915e5c6c 100644 --- a/installer/PowerToysSetup/VideoConference.wxs +++ b/installer/PowerToysSetup/VideoConference.wxs @@ -7,22 +7,28 @@ - + WINDOWSBUILDNUMBER >= 19041 + + + - + - + - + WINDOWSBUILDNUMBER >= 19041 + + + @@ -38,7 +44,14 @@ - + + + + + + + + diff --git a/installer/PowerToysSetup/WinAppSDK.wxs b/installer/PowerToysSetup/WinAppSDK.wxs index b1b7203bc914..4701b969d6a1 100644 --- a/installer/PowerToysSetup/WinAppSDK.wxs +++ b/installer/PowerToysSetup/WinAppSDK.wxs @@ -5,17 +5,15 @@ + - - - - - + + @@ -320,6 +318,9 @@ Id="SettingsV2_WinAppSDKLoc_$(var.IdSafeLanguage)_Component" Directory="WinAppSDKLoc$(var.IdSafeLanguage)SettingsV2InstallFolder" Guid="$(var.CompGUIDPrefix)01"> + + + @@ -327,6 +328,9 @@ Id="PowerRename_WinAppSDKLoc_$(var.IdSafeLanguage)_Component" Directory="WinAppSDKLoc$(var.IdSafeLanguage)PowerRenameInstallFolder" Guid="$(var.CompGUIDPrefix)02"> + + + @@ -334,6 +338,9 @@ Id="MeasureTool_WinAppSDKLoc_$(var.IdSafeLanguage)_Component" Directory="WinAppSDKLoc$(var.IdSafeLanguage)MeasureToolInstallFolder" Guid="$(var.CompGUIDPrefix)03"> + + + @@ -341,23 +348,155 @@ Id="Hosts_WinAppSDKLoc_$(var.IdSafeLanguage)_Component" Directory="WinAppSDKLoc$(var.IdSafeLanguage)HostsInstallFolder" Guid="$(var.CompGUIDPrefix)04"> - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - diff --git a/installer/PowerToysSetup/generateAllFileComponents.ps1 b/installer/PowerToysSetup/generateAllFileComponents.ps1 new file mode 100644 index 000000000000..aa17460b7964 --- /dev/null +++ b/installer/PowerToysSetup/generateAllFileComponents.ps1 @@ -0,0 +1,210 @@ +[CmdletBinding()] +Param( + [Parameter(Mandatory = $True, Position = 1)] + [string]$platform, + [Parameter(Mandatory = $False, Position = 2)] + [string]$installscopeperuser = "false" +) + +if ($platform -eq "arm64") { + $platform = "ARM64" +} + +if ($installscopeperuser -eq "true") { + $registryroot = "HKCU" +} else { + $registryroot = "HKLM" +} + +#AlwaysOnTop +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName AlwaysOnTopFiles -wxsFilePath $PSScriptRoot\AlwaysOnTop.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\AlwaysOnTop""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""AlwaysOnTopFiles"" -wxsFilePath $PSScriptRoot\AlwaysOnTop.wxs -regroot $registryroot" + +#AwakeFiles +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\Awake\PowerToys.Awake.deps.json"" -fileListName AwakeFiles -wxsFilePath $PSScriptRoot\Awake.wxs" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName AwakeImagesFiles -wxsFilePath $PSScriptRoot\Awake.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\Awake\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""AwakeFiles"" -wxsFilePath $PSScriptRoot\Awake.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""AwakeImagesFiles"" -wxsFilePath $PSScriptRoot\Awake.wxs -regroot $registryroot" + +#ColorPicker +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\ColorPicker\PowerToys.ColorPickerUI.deps.json"" -fileListName ColorPickerFiles -wxsFilePath $PSScriptRoot\ColorPicker.wxs" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName ColorPickerResourcesFiles -wxsFilePath $PSScriptRoot\ColorPicker.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\ColorPicker\Resources""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""ColorPickerFiles"" -wxsFilePath $PSScriptRoot\ColorPicker.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""ColorPickerResourcesFiles"" -wxsFilePath $PSScriptRoot\ColorPicker.wxs -regroot $registryroot" + +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\ColorPicker\PowerToys.ColorPickerUI.deps.json"" -fileListName ColorPickerFiles -wxsFilePath $PSScriptRoot\ColorPicker.wxs" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""ColorPickerFiles"" -wxsFilePath $PSScriptRoot\ColorPicker.wxs -regroot $registryroot" + +#FancyZones +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\FancyZones\PowerToys.FancyZonesEditor.deps.json"" -fileListName FancyZonesFiles -wxsFilePath $PSScriptRoot\FancyZones.wxs" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""FancyZonesFiles"" -wxsFilePath $PSScriptRoot\FancyZones.wxs -regroot $registryroot" + +#FileExplorerAdd-ons +#TODO: There are multiple .deps.json files, make sure it works as expected +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\FileExplorerPreview\PowerToys.SvgThumbnailProvider.deps.json"" -fileListName PowerPreviewFiles -wxsFilePath $PSScriptRoot\FileExplorerPreview.wxs" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName MonacoCustomLanguagesFiles -wxsFilePath $PSScriptRoot\FileExplorerPreview.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\FileExplorerPreview\customLanguages""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""PowerPreviewFiles"" -wxsFilePath $PSScriptRoot\FileExplorerPreview.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""MonacoCustomLanguagesFiles"" -wxsFilePath $PSScriptRoot\FileExplorerPreview.wxs -regroot $registryroot" + +#FileLocksmith +#TODO: There are multiple .deps.json files, make sure it works as expected +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\FileLocksmith\PowerToys.FileLocksmithUI.deps.json"" -fileListName FileLocksmithFiles -wxsFilePath $PSScriptRoot\FileLocksmith.wxs -isWinAppSdkProj 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName FileLocksmithAssetsFiles -wxsFilePath $PSScriptRoot\FileLocksmith.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\FileLocksmith\Assets\""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""FileLocksmithFiles"" -wxsFilePath $PSScriptRoot\FileLocksmith.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""FileLocksmithAssetsFiles"" -wxsFilePath $PSScriptRoot\FileLocksmith.wxs -regroot $registryroot" + +#Hosts +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\Hosts\PowerToys.Hosts.deps.json"" -fileListName HostsFiles -wxsFilePath $PSScriptRoot\Hosts.wxs -isWinAppSdkProj 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName HostsAssetsFiles -wxsFilePath $PSScriptRoot\Hosts.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\Hosts\Assets\""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""HostsFiles"" -wxsFilePath $PSScriptRoot\Hosts.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""HostsAssetsFiles"" -wxsFilePath $PSScriptRoot\Hosts.wxs -regroot $registryroot" + +#ImageResizer +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\ImageResizer\PowerToys.ImageResizer.deps.json"" -fileListName ImageResizerFiles -wxsFilePath $PSScriptRoot\ImageResizer.wxs" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName ImageResizerAssetsFiles -wxsFilePath $PSScriptRoot\ImageResizer.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\ImageResizer\Assets\""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""ImageResizerFiles"" -wxsFilePath $PSScriptRoot\ImageResizer.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""ImageResizerAssetsFiles"" -wxsFilePath $PSScriptRoot\ImageResizer.wxs -regroot $registryroot" + +#MouseUtils +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName MouseUtilsFiles -wxsFilePath $PSScriptRoot\MouseUtils.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\MouseUtils\""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""MouseUtilsFiles"" -wxsFilePath $PSScriptRoot\MouseUtils.wxs -regroot $registryroot" + +#MeasureTool +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\MeasureTool\PowerToys.MeasureToolUI.deps.json"" -fileListName MeasureToolFiles -wxsFilePath $PSScriptRoot\MeasureTool.wxs -isWinAppSdkProj 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""MeasureToolFiles"" -wxsFilePath $PSScriptRoot\MeasureTool.wxs -regroot $registryroot" + +#PowerAccent +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\PowerAccent\PowerToys.PowerAccent.deps.json"" -fileListName PowerAccentFiles -wxsFilePath $PSScriptRoot\PowerAccent.wxs" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""PowerAccentFiles"" -wxsFilePath $PSScriptRoot\PowerAccent.wxs -regroot $registryroot" + +#PowerRename +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName PowerRenameFiles -wxsFilePath $PSScriptRoot\PowerRename.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\PowerRename\"" -isWinAppSdkProj 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName PowerRenameAssetsFiles -wxsFilePath $PSScriptRoot\PowerRename.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\PowerRename\Assets\""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""PowerRenameFiles"" -wxsFilePath $PSScriptRoot\PowerRename.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""PowerRenameAssetsFiles"" -wxsFilePath $PSScriptRoot\PowerRename.wxs -regroot $registryroot" + +#Run +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\PowerToys.PowerLauncher.deps.json"" -fileListName launcherFiles -wxsFilePath $PSScriptRoot\Run.wxs" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName launcherImagesComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""launcherFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""launcherImagesComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +## Plugins +###Calculator +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\Calculator\Microsoft.PowerToys.Run.Plugin.Calculator.deps.json"" -fileListName calcComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -isLauncherPlugin 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName calcImagesComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\Calculator\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""calcComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""calcImagesComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +###Folder +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\Folder\Microsoft.Plugin.Folder.deps.json"" -fileListName FolderComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -isLauncherPlugin 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName FolderImagesComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\Folder\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""FolderComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""FolderImagesComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +###Program +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\Program\Microsoft.Plugin.Program.deps.json"" -fileListName ProgramComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -isLauncherPlugin 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName ProgramImagesComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\Program\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""ProgramComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""ProgramImagesComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +###Shell +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\Shell\Microsoft.Plugin.Shell.deps.json"" -fileListName ShellComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -isLauncherPlugin 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName ShellImagesComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\Shell\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""ShellComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""ShellImagesComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +###Indexer +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\Indexer\Microsoft.Plugin.Indexer.deps.json"" -fileListName IndexerComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -isLauncherPlugin 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName IndexerImagesComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\Indexer\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""IndexerComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""IndexerImagesComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +###UnitConverter +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\UnitConverter\Community.PowerToys.Run.Plugin.UnitConverter.deps.json"" -fileListName UnitConvCompFiles -wxsFilePath $PSScriptRoot\Run.wxs -isLauncherPlugin 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName UnitConvImagesCompFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\UnitConverter\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""UnitConvCompFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""UnitConvImagesCompFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +###WebSearch +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\WebSearch\Community.PowerToys.Run.Plugin.WebSearch.deps.json"" -fileListName WebSrchCompFiles -wxsFilePath $PSScriptRoot\Run.wxs -isLauncherPlugin 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName WebSrchImagesCompFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\WebSearch\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""WebSrchCompFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""WebSrchImagesCompFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +###History +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\History\Microsoft.PowerToys.Run.Plugin.History.deps.json"" -fileListName HistoryPluginComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -isLauncherPlugin 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName HistoryPluginImagesComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\History\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""HistoryPluginComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""HistoryPluginImagesComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +###Uri +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\Uri\Microsoft.Plugin.Uri.deps.json"" -fileListName UriComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -isLauncherPlugin 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName UriImagesComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\Uri\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""UriComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""UriImagesComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +###VSCodeWorkspaces +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\VSCodeWorkspaces\Community.PowerToys.Run.Plugin.VSCodeWorkspaces.deps.json"" -fileListName VSCWrkCompFiles -wxsFilePath $PSScriptRoot\Run.wxs -isLauncherPlugin 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName VSCWrkImagesCompFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\VSCodeWorkspaces\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""VSCWrkCompFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""VSCWrkImagesCompFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +###WindowWalker +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\WindowWalker\Microsoft.Plugin.WindowWalker.deps.json"" -fileListName WindowWlkrCompFiles -wxsFilePath $PSScriptRoot\Run.wxs -isLauncherPlugin 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName WindowWlkrImagesCompFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\WindowWalker\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""WindowWlkrCompFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""WindowWlkrImagesCompFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +###OneNote +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\OneNote\Microsoft.PowerToys.Run.Plugin.OneNote.deps.json"" -fileListName OneNoteComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -isLauncherPlugin 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName OneNoteImagesComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\OneNote\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""OneNoteComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""OneNoteImagesComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +###Registry +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\Registry\Microsoft.PowerToys.Run.Plugin.Registry.deps.json"" -fileListName RegistryComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -isLauncherPlugin 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName RegistryImagesComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\Registry\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""RegistryComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""RegistryImagesComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +###Service +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\Service\Microsoft.PowerToys.Run.Plugin.Service.deps.json"" -fileListName ServiceComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -isLauncherPlugin 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName ServiceImagesComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\Service\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""ServiceComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""ServiceImagesComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +###System +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\System\Microsoft.PowerToys.Run.Plugin.System.deps.json"" -fileListName SystemComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -isLauncherPlugin 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName SystemImagesComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\System\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""SystemComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""SystemImagesComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +###TimeDate +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\TimeDate\Microsoft.PowerToys.Run.Plugin.TimeDate.deps.json"" -fileListName TimeDateComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -isLauncherPlugin 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName TimeDateImagesComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\TimeDate\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""TimeDateComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""TimeDateImagesComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +###TimeZone +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\TimeZone\Microsoft.PowerToys.Run.Plugin.TimeZone.deps.json"" -fileListName TimeZoneComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -isLauncherPlugin 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName TimeZoneImagesComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\TimeZone\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""TimeZoneComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""TimeZoneImagesComponentFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +###WindowsSettings +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\WindowsSettings\Microsoft.PowerToys.Run.Plugin.WindowsSettings.deps.json"" -fileListName WinSetCmpFiles -wxsFilePath $PSScriptRoot\Run.wxs -isLauncherPlugin 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName WinSetImagesCmpFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\WindowsSettings\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""WinSetCmpFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""WinSetImagesCmpFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +###WindowsTerminal +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\WindowsTerminal\Microsoft.PowerToys.Run.Plugin.WindowsTerminal.deps.json"" -fileListName WinTermCmpFiles -wxsFilePath $PSScriptRoot\Run.wxs -isLauncherPlugin 1" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName WinTermImagesCmpFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Plugins\WindowsTerminal\Images""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""WinTermCmpFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""WinTermImagesCmpFiles"" -wxsFilePath $PSScriptRoot\Run.wxs -regroot $registryroot" +## Plugins + +#ShortcutGuide +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName ShortcutGuideSvgFiles -wxsFilePath $PSScriptRoot\ShortcutGuide.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\ShortcutGuide\ShortcutGuide\svgs\""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""ShortcutGuideSvgFiles"" -wxsFilePath $PSScriptRoot\ShortcutGuide.wxs -regroot $registryroot" + +#TextExtractor +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\PowerOCR\PowerToys.PowerOCR.deps.json"" -fileListName TextExtractorFiles -wxsFilePath $PSScriptRoot\TextExtractor.wxs" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""TextExtractorFiles"" -wxsFilePath $PSScriptRoot\TextExtractor.wxs -regroot $registryroot" + +#Settings +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\Settings\PowerToys.Settings.deps.json"" -fileListName SettingsV2Files -wxsFilePath $PSScriptRoot\Settings.wxs" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName SettingsV2AssetsFiles -wxsFilePath $PSScriptRoot\Settings.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\Settings\Assets\""" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName SettingsV2AssetsModulesFiles -wxsFilePath $PSScriptRoot\Settings.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\Settings\Assets\Modules\""" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName SettingsV2OOBEAssetsModulesFiles -wxsFilePath $PSScriptRoot\Settings.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\Settings\Assets\Modules\OOBE\""" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName SettingsV2OOBEAssetsFluentIconsFiles -wxsFilePath $PSScriptRoot\Settings.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\Settings\Assets\FluentIcons\""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""SettingsV2Files"" -wxsFilePath $PSScriptRoot\Settings.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""SettingsV2AssetsFiles"" -wxsFilePath $PSScriptRoot\Settings.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""SettingsV2AssetsModulesFiles"" -wxsFilePath $PSScriptRoot\Settings.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""SettingsV2OOBEAssetsModulesFiles"" -wxsFilePath $PSScriptRoot\Settings.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""SettingsV2OOBEAssetsFluentIconsFiles"" -wxsFilePath $PSScriptRoot\Settings.wxs -regroot $registryroot" + +#WinAppSdk +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""WinAppSDKFiles"" -wxsFilePath $PSScriptRoot\WinAppSDK.wxs -regroot $registryroot" diff --git a/installer/PowerToysSetup/generateFileComponents.ps1 b/installer/PowerToysSetup/generateFileComponents.ps1 new file mode 100644 index 000000000000..ad223711e8f1 --- /dev/null +++ b/installer/PowerToysSetup/generateFileComponents.ps1 @@ -0,0 +1,56 @@ +[CmdletBinding()] +Param( + [Parameter(Mandatory = $True, Position = 1)] + [string]$fileListName, + [Parameter(Mandatory = $True, Position = 2)] + [string]$wxsFilePath, + [Parameter(Mandatory = $True, Position = 3)] + [string]$regroot +) + +$wxsFile = Get-Content $wxsFilePath; + +$wxsFile | ForEach-Object { + if ($_ -match "(") { + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments', 'fileList', + Justification = 'variable is used in another scope')] + + $fileList = $matches[2] -split ';' + return + } +} + +$componentId = "$($fileListName)_Component" + +$componentDefs = "`r`n" +$componentDefs += +@" + + + + `r`n +"@ + +foreach ($file in $fileList) { + $fileTmp = $file -replace "-", "_" + $componentDefs += +@" + `r`n +"@ +} + +$componentDefs += +@" + `r`n +"@ + +$wxsFile = $wxsFile -replace "\s+()", $componentDefs + +$componentRef = +@" + +"@ + +$wxsFile = $wxsFile -replace "\s+()", "$componentRef`r`n " + +Set-Content -Path $wxsFilePath -Value $wxsFile \ No newline at end of file diff --git a/installer/PowerToysSetup/generateFileList.ps1 b/installer/PowerToysSetup/generateFileList.ps1 new file mode 100644 index 000000000000..4fbb742e0522 --- /dev/null +++ b/installer/PowerToysSetup/generateFileList.ps1 @@ -0,0 +1,79 @@ +[CmdletBinding()] +Param( + [Parameter(Mandatory = $True, Position = 1)] + [AllowEmptyString()] + [string]$fileDepsJson, + [Parameter(Mandatory = $True, Position = 2)] + [string]$fileListName, + [Parameter(Mandatory = $True, Position = 3)] + [string]$wxsFilePath, + # If there is no deps.json file, just pass path to files + [Parameter(Mandatory = $False, Position = 4)] + [string]$depsPath, + # launcher plugins are being loaded into launcher process, + # so there are some additional dependencies to skip + [Parameter(Mandatory = $False, Position = 5)] + [bool]$isLauncherPlugin, + # Skip winAppSDK dlls as those are hard-linked + [Parameter(Mandatory = $False, Position = 6)] + [bool]$isWinAppSdkProj +) + +$fileWxs = Get-Content $wxsFilePath; + +#Skip PowerToysInterop files +$coreWxs = Get-Content $PSScriptRoot/"Core.wxs" +$coreWxs | ForEach-Object { + if ($_ -match "(") { + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments', 'fileList', + Justification = 'variable is used in another scope')] + + $interopFilesList = $matches[2] -split ';' + return + } +} + +#Skip WinAppSdk files +if ($isWinAppSdkProj -eq $True) { + $winAppSDKWxs = Get-Content $PSScriptRoot/"WinAppSDK.wxs" + $winAppSDKWxs | ForEach-Object { + if ($_ -match "(") { + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments', 'fileList', + Justification = 'variable is used in another scope')] + + $winAppSDKfilesList = $matches[2] -split ';' + return + } + } +} + +$fileExclusionList = @("*Test*", "*.pdb", "*.lastcodeanalysissucceeded", "backup_restore_settings.json", "createdump.exe") + $interopFilesList + $winAppSDKfilesList + +$fileInclusionList = @("*.dll", "*.exe", "*.json", "*.msix", "*png", "*gif", "*ico", "*cur", "*svg", "index.html", "reg.js", "monacoSpecialLanguages.js", "resources.pri") + +if ($fileDepsJson -eq [string]::Empty) { + $fileDepsRoot = $depsPath +} else { + $fileDepsRoot = (Get-ChildItem $fileDepsJson).Directory.FullName + $depsJson = Get-Content $fileDepsJson | ConvertFrom-Json + + $runtimeList = ([array]$depsJson.targets.PSObject.Properties)[-1].Value.PSObject.Properties | Where-Object { + $_.Name -match "runtimepack.*Runtime" + }; + + $runtimeList | ForEach-Object { + $_.Value.PSObject.Properties.Value | ForEach-Object { + $fileExclusionList += $_.PSObject.Properties.Name + } + } +} + +if ($isLauncherPlugin -eq $True) { + $fileExclusionList += @("Ijwhost.dll", "PowerToys.Common.UI.dll", "PowerToys.GPOWrapper.dll", "PowerToys.GPOWrapperProjection.dll", "PowerToys.PowerLauncher.Telemetry.dll", "PowerToys.ManagedCommon.dll", "PowerToys.ManagedTelemetry.dll", "PowerToys.Settings.UI.Lib.dll", "Wox.Infrastructure.dll", "Wox.Plugin.dll") +} + +$fileList = Get-ChildItem $fileDepsRoot -Include $fileInclusionList -Exclude $fileExclusionList -File -Name + +$fileWxs = $fileWxs -replace "(<\?define $($fileListName)=)", "(INSTALLMESSAGE_ERROR + MB_OK), hRecord); + hr = E_FAIL; + } + } + catch (...) + { + } + er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; + return WcaFinalize(er); +} + UINT __stdcall CertifyVirtualCameraDriverCA(MSIHANDLE hInstall) { #ifdef CIBuild // On pipeline we are using microsoft certification diff --git a/installer/PowerToysSetupCustomActions/CustomAction.def b/installer/PowerToysSetupCustomActions/CustomAction.def index 27d59b2fda75..955eea5a29d4 100644 --- a/installer/PowerToysSetupCustomActions/CustomAction.def +++ b/installer/PowerToysSetupCustomActions/CustomAction.def @@ -10,6 +10,7 @@ EXPORTS CreateDotnetRuntimeHardlinksCA DeleteDotnetRuntimeHardlinksCA DetectPrevInstallPathCA + DetectPrevInstallScopeCA RemoveScheduledTasksCA TelemetryLogInstallSuccessCA TelemetryLogInstallCancelCA diff --git a/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj b/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj index 1e5e6c229581..f565b927f446 100644 --- a/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj +++ b/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj @@ -1,4 +1,4 @@ - + @@ -47,8 +47,32 @@ call cmd /C "copy ""$(ProjectDir)DepsFilesLists.h"" ""$(ProjectDir)DepsFilesLists.h.bk""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\AlwaysOnTop.wxs"" ""$(ProjectDir)..\PowerToysSetup\AlwaysOnTop.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Awake.wxs"" ""$(ProjectDir)..\PowerToysSetup\Awake.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\ColorPicker.wxs"" ""$(ProjectDir)..\PowerToysSetup\ColorPicker.wxs.bk"""" call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Core.wxs"" ""$(ProjectDir)..\PowerToysSetup\Core.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\FancyZones.wxs"" ""$(ProjectDir)..\PowerToysSetup\FancyZones.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\FileExplorerPreview.wxs"" ""$(ProjectDir)..\PowerToysSetup\FileExplorerPreview.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\FileLocksmith.wxs"" ""$(ProjectDir)..\PowerToysSetup\FileLocksmith.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Hosts.wxs"" ""$(ProjectDir)..\PowerToysSetup\Hosts.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\ImageResizer.wxs"" ""$(ProjectDir)..\PowerToysSetup\ImageResizer.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\KeyboardManager.wxs"" ""$(ProjectDir)..\PowerToysSetup\KeyboardManager.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\MeasureTool.wxs"" ""$(ProjectDir)..\PowerToysSetup\MeasureTool.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\MouseUtils.wxs"" ""$(ProjectDir)..\PowerToysSetup\MouseUtils.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\PowerAccent.wxs"" ""$(ProjectDir)..\PowerToysSetup\PowerAccent.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\PowerRename.wxs"" ""$(ProjectDir)..\PowerToysSetup\PowerRename.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Product.wxs"" ""$(ProjectDir)..\PowerToysSetup\Product.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Resources.wxs"" ""$(ProjectDir)..\PowerToysSetup\Resources.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Run.wxs"" ""$(ProjectDir)..\PowerToysSetup\Run.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Settings.wxs"" ""$(ProjectDir)..\PowerToysSetup\Settings.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\ShortcutGuide.wxs"" ""$(ProjectDir)..\PowerToysSetup\ShortcutGuide.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\TextExtractor.wxs"" ""$(ProjectDir)..\PowerToysSetup\TextExtractor.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Tools.wxs"" ""$(ProjectDir)..\PowerToysSetup\Tools.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\VideoConference.wxs"" ""$(ProjectDir)..\PowerToysSetup\VideoConference.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\WinAppSDK.wxs"" ""$(ProjectDir)..\PowerToysSetup\WinAppSDK.wxs.bk"""" call powershell.exe -NonInteractive -executionpolicy Unrestricted -File parseRuntimes.ps1 -runtimedepsjsonpath "$(ProjectDir)..\..\$(Platform)\$(Configuration)\Settings\PowerToys.Settings.deps.json" -wpfdepsjsonpath "$(ProjectDir)..\..\$(Platform)\$(Configuration)\modules\ColorPicker\PowerToys.ColorPickerUI.deps.json" -depsfileslistspath "$(ProjectDir)DepsFilesLists.h" -productwxspath "$(ProjectDir)..\PowerToysSetup\Core.wxs" + if not "$(PerUser)" == "true" call powershell.exe -NonInteractive -executionpolicy Unrestricted -File ..\PowerToysSetup\generateAllFileComponents.ps1 -platform $(Platform) + if "$(PerUser)" == "true" call powershell.exe -NonInteractive -executionpolicy Unrestricted -File ..\PowerToysSetup\generateAllFileComponents.ps1 -platform $(Platform) -installscopeperuser $(PerUser) Backing up original files and populating .NET and WPF Runtime dependencies diff --git a/src/Version.props b/src/Version.props index 6b54dbd99a63..258a3316b568 100644 --- a/src/Version.props +++ b/src/Version.props @@ -1,7 +1,7 @@ - 0.0.1 + 0.68.1 Local diff --git a/src/common/updating/updating.cpp b/src/common/updating/updating.cpp index 3bb560319a3d..c196c10a2ea9 100644 --- a/src/common/updating/updating.cpp +++ b/src/common/updating/updating.cpp @@ -8,11 +8,14 @@ #include #include +#include + +using namespace registry::install_scope; namespace // Strings in this namespace should not be localized { - const wchar_t LATEST_RELEASE_ENDPOINT[] = L"https://api.github.com/repos/microsoft/PowerToys/releases/latest"; - const wchar_t ALL_RELEASES_ENDPOINT[] = L"https://api.github.com/repos/microsoft/PowerToys/releases"; + const wchar_t LATEST_RELEASE_ENDPOINT[] = L"https://api.github.com/repos/microsoft/PowerToys/stefansjfw/latest"; + const wchar_t ALL_RELEASES_ENDPOINT[] = L"https://api.github.com/repos/microsoft/PowerToys/stefansjfw"; const wchar_t LOCAL_BUILD_ERROR[] = L"Local build cannot be updated"; const wchar_t NETWORK_ERROR[] = L"Network error"; @@ -45,6 +48,14 @@ namespace updating constexpr const std::wstring_view required_filename_pattern = updating::INSTALLER_FILENAME_PATTERN; // Desc-sorted by its priority const std::array asset_extensions = { L".exe", L".msi" }; + + const InstallScope current_install_scope = get_current_install_scope(); + std::wstring install_scope = L"permachine"; + if (current_install_scope == InstallScope::PerUser) + { + install_scope = L"peruser"; + } + for (const auto asset_extension : asset_extensions) { for (auto asset_elem : release_object.GetNamedArray(L"assets")) @@ -56,7 +67,8 @@ namespace updating const bool extension_matched = filename_lower.ends_with(asset_extension); const bool architecture_matched = filename_lower.find(required_architecture) != std::wstring::npos; const bool filename_matched = filename_lower.find(required_filename_pattern) != std::wstring::npos; - const bool asset_matched = extension_matched && architecture_matched && filename_matched; + const bool scope_matched = filename_lower.find(install_scope) != std::wstring::npos; + const bool asset_matched = extension_matched && architecture_matched && filename_matched && scope_matched; if (asset_matched) { return std::make_pair(Uri{ asset.GetNamedString(L"browser_download_url") }, std::move(filename_lower)); diff --git a/src/common/updating/updating.vcxproj b/src/common/updating/updating.vcxproj index b68206c35836..04625c09cf45 100644 --- a/src/common/updating/updating.vcxproj +++ b/src/common/updating/updating.vcxproj @@ -15,6 +15,7 @@ v143 + diff --git a/src/common/utils/registry.h b/src/common/utils/registry.h index fbb44a23f5ec..cdf05bfc6243 100644 --- a/src/common/utils/registry.h +++ b/src/common/utils/registry.h @@ -16,6 +16,83 @@ namespace registry { + namespace install_scope + { + const wchar_t INSTALL_SCOPE_REG_KEY[] = L"Software\\Classes\\powertoys\\"; + + enum class InstallScope + { + PerMachine = 0, + PerUser, + }; + + inline const InstallScope get_current_install_scope() + { + // Open HKLM key + HKEY perMachineKey{}; + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, + INSTALL_SCOPE_REG_KEY, + 0, + KEY_READ, + &perMachineKey) != ERROR_SUCCESS) + { + // Open HKCU key + HKEY perUserKey{}; + if (RegOpenKeyExW(HKEY_CURRENT_USER, + INSTALL_SCOPE_REG_KEY, + 0, + KEY_READ, + &perUserKey) != ERROR_SUCCESS) + { + // both keys are missing + return InstallScope::PerMachine; + } + else + { + DWORD dataSize{}; + if (RegGetValueW( + perUserKey, + nullptr, + L"InstallScope", + RRF_RT_REG_SZ, + nullptr, + nullptr, + &dataSize) != ERROR_SUCCESS) + { + // HKCU key is missing + RegCloseKey(perUserKey); + return InstallScope::PerMachine; + } + + std::wstring data; + data.resize(dataSize / sizeof(wchar_t)); + + if (RegGetValueW( + perUserKey, + nullptr, + L"InstallScope", + RRF_RT_REG_SZ, + nullptr, + &data[0], + &dataSize) != ERROR_SUCCESS) + { + // HKCU key is missing + RegCloseKey(perUserKey); + return InstallScope::PerMachine; + } + RegCloseKey(perUserKey); + + if (data.contains(L"perUser")) + { + return InstallScope::PerUser; + } + } + } + + return InstallScope::PerMachine; + } + } + namespace detail { struct on_exit From 14f36cb0f127a658c839a6f4b820888179919e4a Mon Sep 17 00:00:00 2001 From: Stefan Markovic Date: Wed, 8 Feb 2023 16:30:39 +0100 Subject: [PATCH 02/14] Separate upgrade codes for per machine and per user installation Move per machine check to bootstrapper Move all defines to common.wxs Fix CI --- .github/actions/spell-check/expect.txt | 182 ++++++++++++++++-- .../ci/templates/build-powertoys-steps.yml | 16 ++ installer/PowerToysSetup/Common.wxi | 18 +- installer/PowerToysSetup/PowerToys.wxs | 43 ++--- .../PowerToysBootstrapper.wixproj | 8 +- .../PowerToysSetup/PowerToysInstaller.wixproj | 16 +- installer/PowerToysSetup/Product.wxs | 16 +- installer/PowerToysSetup/generateFileList.ps1 | 9 +- .../CustomAction.cpp | 30 +-- .../CustomAction.def | 1 - src/Version.props | 2 +- src/common/updating/updating.cpp | 12 +- src/common/updating/updating.h | 1 + src/common/utils/MsiUtils.h | 6 +- 14 files changed, 254 insertions(+), 106 deletions(-) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index fecd00c623e9..ca9ea61a1745 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -1,14 +1,27 @@ aaaa +AAAAEF +AAB +AABAD +AACB +AACD +AAD +AADF +abap +ABE abgr abi ABlocked ABOUTBOX Abug +ACA accctrl Acceleratorkeys ACCEPTFILES ACCESSDENIED accessibilityinsights +ACDB +ACFC +ACFF Acl aclapi AColumn @@ -24,7 +37,18 @@ adml admx advapi advfirewall +AEAA +AEAD +AECC +AED +AEE +AEEB +AFAE +AFAEFC +AFDA +AFE AFeature +AFFE AFFINETRANSFORM AFX AGGREGATABLE @@ -64,7 +88,6 @@ appium Applets Applicationcan applicationconfiguration -applicationconfiguration applicationframehost applog appmanifest @@ -118,15 +141,38 @@ Avanc awakeness awakeversion AYUV +azcli +azor backtracer +BAF bak Bashkortostan Bayan +BBE bbwe +BCA +BCB +BCCE +BCCEA bck +BDB +BDBAD +BDCC +BDDF +BDFB +BEAA +BEB +BEEAADF +BEEC +BEFA Belarus betadele betsegaw +BFC +BFDE +BFEB +BFF +BFFA BGR bgra bhid @@ -177,22 +223,42 @@ Buryatia BValue BYPOSITION bytearray +CABD Caiguna CALG callbackptr +cameligo Cangjie CANRENAME CAPTURECHANGED CAtl +CBA +CBB +CBF +CCCCDE cch CCom CContext +CDAC +CDBF +CDCE +CDD +CDE cdecl CDeclaration CDEF cdpx +CEAF +CEBAC +CEBD +CECB CENTERALIGN ceq +CFAADB +CFBBF +CFEE +CFFEE +CFFF cguid changecursor Changemove @@ -201,7 +267,6 @@ CHILDACTIVATE CHILDWINDOW Choibalsan chrdavis -chromaticities Chrzan CHT Chukotka @@ -237,7 +302,6 @@ CMONITORS cmpgt cmyk cne -Cng cnt Cocklebiddy coclass @@ -332,8 +396,10 @@ cyberrex CYSMICON CYVIRTUALSCREEN cziplib +DAA Dac dacl +DAF damienleroy Danmarkshavn DARKPURPLE @@ -345,18 +411,29 @@ Datavalue DATAW davidegiacometti Dayof +DBAE +DBB +DBBDA +DBDE Dbg Dbghelp DBLCLKS DBLEPSILON +DCAB DCapture DCBA +DCBC +DCCB +DCEFCB +DCF DCOM dcommon dcomp dcompi DComposition DCR +DDCDD +DDCE DDevice ddf DDxgi @@ -365,6 +442,7 @@ debian debugbreak DECLAR declspec +DED Dedup DEFAULTBOOTSTRAPPERINSTALLFOLDER DEFAULTCOLOR @@ -385,7 +463,6 @@ Deondre depersist deprioritized depsfileslistspath -depsjsonpath deref DESKTOPABSOLUTEEDITING DESKTOPABSOLUTEPARSING @@ -398,6 +475,9 @@ devenum DEVMON devpkey DEVSOURCE +DFAB +DFB +DFBEA DIIRFLAG dimm directshow @@ -461,13 +541,41 @@ dxgi dxgidebug dxgiformat dxguid +EAAFE +EABF +EAC +EADC +EAF +EBCF +EBD +EBE +ecl ecount EData +EDB +EDCCC +EDFAE Edid +edis EDITKEYBOARD editkeyboardwindow EDITSHORTCUTS editshortcutswindow +edshift +EEA +EEB +EEBBE +EEBD +EED +EEDA +EEEE +EEF +EEFA +EFB +EFC +EFDD +EFE +EFFEFC EFile ekus emmintrin @@ -492,6 +600,7 @@ ERRORTITLE ESettings esize esrp +estructuredtext Eswatini etl etw @@ -525,15 +634,46 @@ exstyle EXTENDEDKEY EXTENDEDVERBS eyetracker +FABC fabricbot +FAEDDA +FAF +FAFD fancyzones FANCYZONESDRAWLAYOUTTEST FANCYZONESEDITOR Farbraum Faroe FARPROC +FBB +FBC +FBDE +FBF +FCAE +FCB +FCCFF +FCD +FCDB +FCDD +FCE +FDB +FDBF +FDC +FDCD +FDE +FDEF +FDF fdw +FECF +FEDF +FEEF feimage +FFB +FFBCF +FFBE +FFDDD +FFEB +FFEBEF fff fileapi FILEEXPLORER @@ -604,6 +744,7 @@ GNumber google gpo gpu +graphql GSM gtm gui @@ -778,6 +919,7 @@ INSTALLFOLDERTOPREVIOUSINSTALLFOLDER INSTALLLOCATION INSTALLMESSAGE INSTALLPROPERTY +installscopeperuser INSTALLSTARTMENUSHORTCUT INSTALLSTATE Inste @@ -792,7 +934,6 @@ ipcmanager IPlugin IPower IPREVIEW -IPREVIEW ipreviewhandler ipreviewhandlervisualssetfont IProperty @@ -825,11 +966,13 @@ JPN jpnime Jsons jsonval +julia junja jxr jyuwono KBDLLHOOKSTRUCT kbm +KCU KEYBDINPUT keyboardeventhandlers keyboardmanager @@ -853,6 +996,7 @@ KILLFOCUS killrunner Kitts Knownfolders +kotlin Krai KSPROPERTY Kwango @@ -886,6 +1030,7 @@ LError Lessthan LEVELID LExit +lexon lhs lhwnd LIBID @@ -904,7 +1049,6 @@ LMEM LMENU lnk LOADFROMFILE -LOADFROMFILE LOADLIBRARYASDATAFILE LOBYTE LOCALAPPDATA @@ -917,14 +1061,12 @@ logconsole logfile LOGFONT LOGFONTW -LOGFONTW LOGMSG logon LOGPIXELSX LOn longdate LONGLONG -louncher lowlevel LOWORD lparam @@ -986,8 +1128,6 @@ MAPTOSAMESHORTCUT MAPVK Markdig markdownpreviewhandler -markdownpreviewhandler -MARKDOWNPREVIEWHANDLERCPP MARKDOWNPREVIEWHANDLERCPP Markovic Marquesas @@ -1082,6 +1222,7 @@ msc msclr mscorlib msdata +msdax msedge MSGFLT MSIFASTINSTALL @@ -1106,6 +1247,7 @@ Mundrabilla mvvm myfile MYICON +mysql MYTZ NAMECHANGE nameof @@ -1154,6 +1296,7 @@ nielslaute NIF NLD nlog +nls NLSTEXT NOACTIVATE NOAGGREGATION @@ -1277,6 +1420,7 @@ PARENTRELATIVEPARSING PArgb parray PARTIALCONFIRMATIONDIALOGTITLE +pascaligo pathcch Pathto PAUDIO @@ -1302,6 +1446,7 @@ pfn pfo pft pgp +pgsql pguid PHANDLE PHANDLER @@ -1331,10 +1476,12 @@ Pohnpei Popups POPUPWINDOW posix +postiats poweraccent powerlauncher POWEROCR powerpreview +powerquery powerrename POWERRENAMECONTEXTMENU powerrenameinput @@ -1342,6 +1489,7 @@ POWERRENAMETEST powertoy POWERTOYNAME powertoyssetup +powertoysusersetup Powrprof ppidl ppmt @@ -1446,6 +1594,7 @@ RECTL rectp rects redirectedfrom +redis redist redistributable reencode @@ -1462,8 +1611,10 @@ REGFILTERPINS REGISTERCLASSFAILED registerhotkey registrypath +registryroot regkey REGPINTYPES +regroot regsvr reinit REINSTALLMODE @@ -1473,6 +1624,7 @@ remappings REMAPSUCCESSFUL REMAPUNSUCCESSFUL Remotable +Removedir Removelnk renamable RENAMEONCOLLISION @@ -1533,7 +1685,6 @@ rungameid RUNLEVEL runsettings runtimeclass -runtimeconfig runtimedepsjsonpath runtimeobject runtimepack @@ -1710,6 +1861,7 @@ stdcpplatest STDMETHODCALLTYPE STDMETHODIMP stefan +stefansjfw Stereolithography stgm STGMEDIUM @@ -1763,6 +1915,7 @@ SYSMENU SYSTEMAPPS systemroot SYSTEMTIME +systemverilog sysvol Tadele Tajikistan @@ -1783,6 +1936,7 @@ taskkill tasklist taskschd tchar +tcl Tcollab tcscpy TCustom @@ -1807,7 +1961,6 @@ THICKFRAME THISCOMPONENT THotkey thumbcache -thumbcache TILEDWINDOW timedate timediff @@ -1855,6 +2008,7 @@ UAC UAL uap uapmanifestschema +uby udit Udk Udmurtia @@ -1883,7 +2037,6 @@ Uniquifies unitconverter unittests Unk -Unk unknwn UNLEN Unmap @@ -2081,7 +2234,6 @@ wox wparam wpf wpfdepsjsonpath -wpfgfx wpftmp wpr wprp @@ -2116,6 +2268,7 @@ XBUTTONUP xcopy XDocument XElement +xfd XFile XIncrement XLoc @@ -2132,6 +2285,7 @@ yinle yinwang yinyue YOffset +ypescript YStr YUY yuyoyuppe diff --git a/.pipelines/ci/templates/build-powertoys-steps.yml b/.pipelines/ci/templates/build-powertoys-steps.yml index 1f6eab791eaa..923778f87235 100644 --- a/.pipelines/ci/templates/build-powertoys-steps.yml +++ b/.pipelines/ci/templates/build-powertoys-steps.yml @@ -173,6 +173,22 @@ steps: clean: false maximumCpuCount: true +- task: PowerShell@2 + displayName: Clean installer dir before building per-user installer + inputs: + targetType: inline + script: git clean -xfd -e *exe -- .\installer\ + pwsh: true + +- task: NuGetCommand@2 + displayName: Restore NuGet packages for PowerToysSetup.sln + inputs: + command: restore + feedsToUse: config + configPath: NuGet.config + restoreSolution: installer\PowerToysSetup.sln + restoreDirectory: '$(Build.SourcesDirectory)\installer\packages' + - task: VSBuild@1 displayName: 'Build PowerToys per-user MSI' inputs: diff --git a/installer/PowerToysSetup/Common.wxi b/installer/PowerToysSetup/Common.wxi index 895a340df98b..0acab7ae72a5 100644 --- a/installer/PowerToysSetup/Common.wxi +++ b/installer/PowerToysSetup/Common.wxi @@ -17,23 +17,39 @@ + + + + + + + + + + - + + + + + + + diff --git a/installer/PowerToysSetup/PowerToys.wxs b/installer/PowerToysSetup/PowerToys.wxs index 682d3a8d0346..c99e7a37c8f1 100644 --- a/installer/PowerToysSetup/PowerToys.wxs +++ b/installer/PowerToysSetup/PowerToys.wxs @@ -1,33 +1,14 @@ - - - - - - - - - - - - - - - - - - - - - - - + + - + + + + - TargetPowerToysVersion >= DetectedPowerToysVersion OR WixBundleInstalled + + + + MinimumVersion >= DetectedPowerToysVersion + TargetPowerToysVersion >= DetectedPowerToysUserVersion OR WixBundleInstalled + + TargetPowerToysVersion >= DetectedPowerToysVersion OR WixBundleInstalled + @@ -90,7 +81,7 @@ diff --git a/installer/PowerToysSetup/PowerToysBootstrapper.wixproj b/installer/PowerToysSetup/PowerToysBootstrapper.wixproj index 725d1a1131de..ca716075950b 100644 --- a/installer/PowerToysSetup/PowerToysBootstrapper.wixproj +++ b/installer/PowerToysSetup/PowerToysBootstrapper.wixproj @@ -26,10 +26,10 @@ PowerToysSetup-$(Version)-$(Platform) Bundle True - PowerToysSetup-$(Version)-$(Platform)-perMachine - PowerToysSetup-$(Version)-$(Platform)-perUser - $(Platform)\$(Configuration)\perMachine - $(Platform)\$(Configuration)\perUser + PowerToysSetup-$(Version)-$(Platform) + PowerToysUserSetup-$(Version)-$(Platform) + $(Platform)\$(Configuration)\MachineSetup + $(Platform)\$(Configuration)\UserSetup obj\$(Platform)\$(Configuration)\ diff --git a/installer/PowerToysSetup/PowerToysInstaller.wixproj b/installer/PowerToysSetup/PowerToysInstaller.wixproj index 6152b8b99300..be79c46186f4 100644 --- a/installer/PowerToysSetup/PowerToysInstaller.wixproj +++ b/installer/PowerToysSetup/PowerToysInstaller.wixproj @@ -20,8 +20,8 @@ call "..\..\..\publish.cmd" x64 Version=$(Version);MonacoSRCHarvestPath=$(ProjectDir)..\..\ARM64\$(Configuration)\modules\FileExplorerPreview\monacoSRC IF NOT DEFINED IsPipeline ( call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=arm64 -host_arch=amd64 -winsdk=10.0.19041.0 -SET PTRoot=..\..\..\.. -call "..\..\publish.cmd" arm64 +SET PTRoot=..\..\..\..\.. +call "..\..\..\publish.cmd" arm64 ) @@ -70,8 +70,8 @@ call "..\..\publish.cmd" arm64 3.10 022a9d30-7c4f-416d-a9df-5ff2661cc0ad 2.0 - PowerToysSetup-$(Version)-$(Platform)-perMachine - PowerToysSetup-$(Version)-$(Platform)-perUser + PowerToysSetup-$(Version)-$(Platform) + PowerToysUserSetup-$(Version)-$(Platform) Package True @@ -82,10 +82,10 @@ call "..\..\publish.cmd" arm64 1026;1076 - $(Platform)\$(Configuration)\perMachine - $(Platform)\$(Configuration)\perUser - obj\$(Platform)\$(Configuration)\perMachine - obj\$(Platform)\$(Configuration)\perUser + $(Platform)\$(Configuration)\MachineSetup + $(Platform)\$(Configuration)\UserSetup + obj\$(Platform)\$(Configuration)\MachineSetup + obj\$(Platform)\$(Configuration)\UserSetup ICE40 diff --git a/installer/PowerToysSetup/Product.wxs b/installer/PowerToysSetup/Product.wxs index 8d7d6c739547..adbd38c2483a 100644 --- a/installer/PowerToysSetup/Product.wxs +++ b/installer/PowerToysSetup/Product.wxs @@ -23,17 +23,17 @@ Language="1033" Version="$(var.Version)" Manufacturer="Microsoft Corporation" - UpgradeCode="42B84BF7-5FBF-473B-9C8B-049DC16F7708"> + UpgradeCode="$(var.UpgradeCodeGUID)"> - + @@ -131,10 +131,9 @@ DEFAULTBOOTSTRAPPERINSTALLFOLDER OR PREVIOUSINSTALLFOLDER = ""]]> - + - @@ -389,13 +388,6 @@ DllEntry="DetectPrevInstallPathCA" /> - - { virtual void sink_it_(const spdlog::details::log_msg& msg) override @@ -755,38 +752,15 @@ UINT __stdcall DetectPrevInstallPathCA(MSIHANDLE hInstall) UINT er = ERROR_SUCCESS; hr = WcaInitialize(hInstall, "DetectPrevInstallPathCA"); MsiSetPropertyW(hInstall, L"PREVIOUSINSTALLFOLDER", L""); - try - { - if (auto install_path = GetMsiPackageInstalledPath()) - { - MsiSetPropertyW(hInstall, L"PREVIOUSINSTALLFOLDER", install_path->data()); - } - } - catch (...) - { - } - er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; - return WcaFinalize(er); -} - -UINT __stdcall DetectPrevInstallScopeCA(MSIHANDLE hInstall) -{ - HRESULT hr = S_OK; - UINT er = ERROR_SUCCESS; - hr = WcaInitialize(hInstall, "DetectPrevInstallScopeCA"); LPWSTR currentScope = nullptr; hr = WcaGetProperty(L"InstallScope", ¤tScope); try { - auto install_scope = registry::install_scope::get_current_install_scope(); - if (install_scope == registry::install_scope::InstallScope::PerMachine && std::wstring{ currentScope } == L"perUser") + if (auto install_path = GetMsiPackageInstalledPath(std::wstring{ currentScope } == L"perUser")) { - PMSIHANDLE hRecord = MsiCreateRecord(0); - MsiRecordSetString(hRecord, 0, TEXT("PowerToys is already installed on this system for all users. We recommend first uninstalling that version before installing this one.'")); - MsiProcessMessage(hInstall, static_cast(INSTALLMESSAGE_ERROR + MB_OK), hRecord); - hr = E_FAIL; + MsiSetPropertyW(hInstall, L"PREVIOUSINSTALLFOLDER", install_path->data()); } } catch (...) diff --git a/installer/PowerToysSetupCustomActions/CustomAction.def b/installer/PowerToysSetupCustomActions/CustomAction.def index 955eea5a29d4..27d59b2fda75 100644 --- a/installer/PowerToysSetupCustomActions/CustomAction.def +++ b/installer/PowerToysSetupCustomActions/CustomAction.def @@ -10,7 +10,6 @@ EXPORTS CreateDotnetRuntimeHardlinksCA DeleteDotnetRuntimeHardlinksCA DetectPrevInstallPathCA - DetectPrevInstallScopeCA RemoveScheduledTasksCA TelemetryLogInstallSuccessCA TelemetryLogInstallCancelCA diff --git a/src/Version.props b/src/Version.props index 258a3316b568..6b54dbd99a63 100644 --- a/src/Version.props +++ b/src/Version.props @@ -1,7 +1,7 @@ - 0.68.1 + 0.0.1 Local diff --git a/src/common/updating/updating.cpp b/src/common/updating/updating.cpp index c196c10a2ea9..800efd5d1feb 100644 --- a/src/common/updating/updating.cpp +++ b/src/common/updating/updating.cpp @@ -14,8 +14,8 @@ using namespace registry::install_scope; namespace // Strings in this namespace should not be localized { - const wchar_t LATEST_RELEASE_ENDPOINT[] = L"https://api.github.com/repos/microsoft/PowerToys/stefansjfw/latest"; - const wchar_t ALL_RELEASES_ENDPOINT[] = L"https://api.github.com/repos/microsoft/PowerToys/stefansjfw"; + const wchar_t LATEST_RELEASE_ENDPOINT[] = L"https://api.github.com/repos/stefansjfw/PowerToys/releases/latest"; + const wchar_t ALL_RELEASES_ENDPOINT[] = L"https://api.github.com/repos/stefansjfw/PowerToys/releases"; const wchar_t LOCAL_BUILD_ERROR[] = L"Local build cannot be updated"; const wchar_t NETWORK_ERROR[] = L"Network error"; @@ -45,15 +45,14 @@ namespace updating std::pair extract_installer_asset_download_info(const json::JsonObject& release_object) { const std::wstring_view required_architecture = get_architecture_string(get_current_architecture()); - constexpr const std::wstring_view required_filename_pattern = updating::INSTALLER_FILENAME_PATTERN; + std::wstring_view required_filename_pattern = updating::INSTALLER_FILENAME_PATTERN; // Desc-sorted by its priority const std::array asset_extensions = { L".exe", L".msi" }; const InstallScope current_install_scope = get_current_install_scope(); - std::wstring install_scope = L"permachine"; if (current_install_scope == InstallScope::PerUser) { - install_scope = L"peruser"; + required_filename_pattern = updating::INSTALLER_FILENAME_PATTERN_USER; } for (const auto asset_extension : asset_extensions) @@ -67,8 +66,7 @@ namespace updating const bool extension_matched = filename_lower.ends_with(asset_extension); const bool architecture_matched = filename_lower.find(required_architecture) != std::wstring::npos; const bool filename_matched = filename_lower.find(required_filename_pattern) != std::wstring::npos; - const bool scope_matched = filename_lower.find(install_scope) != std::wstring::npos; - const bool asset_matched = extension_matched && architecture_matched && filename_matched && scope_matched; + const bool asset_matched = extension_matched && architecture_matched && filename_matched; if (asset_matched) { return std::make_pair(Uri{ asset.GetNamedString(L"browser_download_url") }, std::move(filename_lower)); diff --git a/src/common/updating/updating.h b/src/common/updating/updating.h index a5a15e47de8a..11ab3b95fd63 100644 --- a/src/common/updating/updating.h +++ b/src/common/updating/updating.h @@ -31,4 +31,5 @@ namespace updating // non-localized constexpr inline std::wstring_view INSTALLER_FILENAME_PATTERN = L"powertoyssetup"; + constexpr inline std::wstring_view INSTALLER_FILENAME_PATTERN_USER = L"powertoysusersetup"; } diff --git a/src/common/utils/MsiUtils.h b/src/common/utils/MsiUtils.h index 1489685005ac..f369dd3b6f88 100644 --- a/src/common/utils/MsiUtils.h +++ b/src/common/utils/MsiUtils.h @@ -12,14 +12,16 @@ namespace // Strings in this namespace should not be localized { const inline wchar_t POWER_TOYS_UPGRADE_CODE[] = L"{42B84BF7-5FBF-473B-9C8B-049DC16F7708}"; + const inline wchar_t POWER_TOYS_UPGRADE_CODE_USER[] = L"{D8B559DB-4C98-487A-A33F-50A8EEE42726}"; const inline wchar_t POWERTOYS_EXE_COMPONENT[] = L"{A2C66D91-3485-4D00-B04D-91844E6B345B}"; } -std::optional GetMsiPackageInstalledPath() +std::optional GetMsiPackageInstalledPath(bool perUser) { constexpr size_t guid_length = 39; wchar_t product_ID[guid_length]; - if (const bool found = ERROR_SUCCESS == MsiEnumRelatedProductsW(POWER_TOYS_UPGRADE_CODE, 0, 0, product_ID); !found) + std::wstring upgradeCode = (perUser ? POWER_TOYS_UPGRADE_CODE_USER : POWER_TOYS_UPGRADE_CODE); + if (const bool found = ERROR_SUCCESS == MsiEnumRelatedProductsW(upgradeCode.c_str(), 0, 0, product_ID); !found) { return std::nullopt; } From 34545dab9cec642eccf790f9daf99e522293fb1f Mon Sep 17 00:00:00 2001 From: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com> Date: Tue, 7 Mar 2023 22:34:12 +0100 Subject: [PATCH 03/14] Update installer/PowerToysSetup/generateFileList.ps1 Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com> --- installer/PowerToysSetup/generateFileList.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/PowerToysSetup/generateFileList.ps1 b/installer/PowerToysSetup/generateFileList.ps1 index f379ca7a6877..175b66848598 100644 --- a/installer/PowerToysSetup/generateFileList.ps1 +++ b/installer/PowerToysSetup/generateFileList.ps1 @@ -47,7 +47,7 @@ if ($isWinAppSdkProj -eq $True) { } } -$fileExclusionList = @("*Test*", "*.pdb", "*.lastcodeanalysissucceeded", "createdump.exe", "backup_restore_settings.json") + $interopFilesList + $winAppSDKfilesList +$fileExclusionList = @("*Test*", "*.pdb", "*.lastcodeanalysissucceeded", "createdump.exe", "backup_restore_settings.json", $interopFilesList, $winAppSDKfilesList); $fileInclusionList = @("*.dll", "*.exe", "*.json", "*.msix", "*png", "*gif", "*ico", "*cur", "*svg", "index.html", "reg.js", "monacoSpecialLanguages.js", "resources.pri") From f44cccaa574ee0a499c8a0c96ba9045263bf0c75 Mon Sep 17 00:00:00 2001 From: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com> Date: Tue, 7 Mar 2023 22:34:51 +0100 Subject: [PATCH 04/14] Update installer/PowerToysSetup/generateAllFileComponents.ps1 Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com> --- installer/PowerToysSetup/generateAllFileComponents.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/PowerToysSetup/generateAllFileComponents.ps1 b/installer/PowerToysSetup/generateAllFileComponents.ps1 index 5218f5491485..60b3ddffbaca 100644 --- a/installer/PowerToysSetup/generateAllFileComponents.ps1 +++ b/installer/PowerToysSetup/generateAllFileComponents.ps1 @@ -6,7 +6,7 @@ Param( [string]$installscopeperuser = "false" ) -if ($platform -eq "arm64") { +if ($platform -ceq "arm64") { $platform = "ARM64" } From 4ba537d6c521d75d9d7ab72f4f4d415fa09b4844 Mon Sep 17 00:00:00 2001 From: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com> Date: Tue, 7 Mar 2023 22:35:07 +0100 Subject: [PATCH 05/14] Update installer/PowerToysSetup/generateFileList.ps1 Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com> --- installer/PowerToysSetup/generateFileList.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/PowerToysSetup/generateFileList.ps1 b/installer/PowerToysSetup/generateFileList.ps1 index 175b66848598..d4495282ec6d 100644 --- a/installer/PowerToysSetup/generateFileList.ps1 +++ b/installer/PowerToysSetup/generateFileList.ps1 @@ -70,7 +70,7 @@ if ($fileDepsJson -eq [string]::Empty) { } } -$fileExclusionList = $fileExclusionList.where({$_ -notin $dllsToIgnore}) +$fileExclusionList = $fileExclusionList | Where-Object {$_ -notin $dllsToIgnore} if ($isLauncherPlugin -eq $True) { $fileInclusionList += @("*.deps.json") From 9bc160fce07000228c30ae72d4207f8beb2283da Mon Sep 17 00:00:00 2001 From: Stefan Markovic Date: Tue, 7 Mar 2023 22:36:04 +0100 Subject: [PATCH 06/14] expect.txt --- .github/actions/spell-check/expect.txt | 146 ++----------------------- 1 file changed, 7 insertions(+), 139 deletions(-) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 779411c1ceec..4fea75279366 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -53,8 +53,6 @@ AFFINETRANSFORM AFX AGGREGATABLE AHybrid -Akrotiri -Aktobe ALarger alekhyareddy ALLAPPS @@ -67,7 +65,6 @@ amd AModifier AMPROPERTY AMPROPSETID -Andreanof anges angularsen Animatable @@ -95,10 +92,8 @@ appref apps appwindow appwiz -appxpackage APSTUDIO AQS -Aqtobe ARCHITEW arcosh ARemapped @@ -117,7 +112,6 @@ ASingle ASSOCCHANGED ASYNCWINDOWPLACEMENT ASYNCWINDOWPOS -Atikokan atl atlbase atlcom @@ -125,7 +119,6 @@ atleast atlfile atlstr Attribs -Atyrau aumid Aut Authenticode @@ -136,18 +129,15 @@ AUTOMATIONPROPERTIES Autorun AUTOUPDATE AValid -Avanc awakeness awakeversion AYUV azcli -azor azman +azor backtracer BAF bak -Bashkortostan -Bayan BBE bbwe BCA @@ -165,7 +155,6 @@ BEB BEEAADF BEEC BEFA -Belarus betadele betsegaw BFC @@ -208,7 +197,6 @@ bricelam BRIGHTGREEN Browsable bsd -Bson bstr bthprops bti @@ -220,14 +208,11 @@ bugreport BUILDNUMBER buildtask buildtransitive -Burkina -Buryatia BUTTONUP BValue BYPOSITION bytearray -Cabo -Caiguna +CABD CALG callbackptr cameligo @@ -257,41 +242,37 @@ CEBD CECB CENTERALIGN ceq +certlm +certmgr CFAADB CFBBF CFEE CFFEE CFFF -certlm -certmgr cguid changecursor Changemove chdir CHILDACTIVATE CHILDWINDOW -Choibalsan chrdavis Chrzan CHT -Chukotka -Chuuk CIELAB CIEXYZ cim CImage cla clangformat -clayton CLASSDC CLASSNOTAVAILABLE +clayton clickable clickonce CLIENTEDGE clientid clientside CLIPCHILDREN -Clipperton CLIPSIBLINGS clrcall Cls @@ -310,7 +291,6 @@ cmpgt cmyk cne cnt -Cocklebiddy coclass CODENAME codeofconduct @@ -334,7 +314,6 @@ cominterop commandline COMMANDTITLE commctrl -Comoros compmgmt COMPOSITIONFULL comsupp @@ -356,7 +335,6 @@ CONTROLL CONTROLPARENT Controlz copiedcolorrepresentation -corewebview cortana cotaskmem COULDNOT @@ -386,7 +364,6 @@ CTRLALTDEL Ctrls Ctx CUI -Cunha currentculture CURRENTDIR CURSORINFO @@ -410,12 +387,10 @@ Dac dacl DAF damienleroy -Danmarkshavn DARKPURPLE DARKTEAL DARKYELLOW datareader -datatemplate Datavalue dataversion DATAW @@ -508,7 +483,6 @@ dllmain DNLEN Dns DONOTROUND -DONTRESOLVEDLLREFERENCES DONTVALIDATEPATH dotnet DPICHANGED @@ -599,7 +573,6 @@ endpointvolume endregion ENTERSIZEMOVE ENU -enumerationoptions EOAC epicgames epu @@ -613,10 +586,8 @@ ESettings esize esrp estructuredtext -Eswatini etl etw -Eucla EUQ eurochange eventlog @@ -657,7 +628,6 @@ fancyzones FANCYZONESDRAWLAYOUTTEST FANCYZONESEDITOR Farbraum -Faroe FARPROC FBB FBC @@ -724,7 +694,6 @@ FSCTL fsmgmt FTYPE Functiondiscoverykeys -Futuna fwlink FZE gabime @@ -742,8 +711,6 @@ gcode gdi gdiplus GDISCALED -getancestor -getasynckeystate GETDESKWALLPAPER GETDLGCODE GETDPISCALEDSIZE @@ -753,7 +720,6 @@ GETSTATE GETTEXT GETTEXTLENGTH GHND -globalassemblycache GMEM GNumber google @@ -772,7 +738,6 @@ gwl GWLP HACCEL handlekeyboardhookevent -handlerroutine hangeul Hankaku hanselman @@ -802,7 +767,6 @@ HEB Heiko Helpline helptext -Heure HGFE hglobal hhk @@ -841,7 +805,6 @@ hotkeycontrol hotkeys hotlight hotspot -Hovd HPAINTBUFFER HPALETTE HRAWINPUT @@ -865,7 +828,6 @@ HTTRANSPARENT HValue Hvci hwb -HWHEEL HWINEVENTHOOK hwnd HWNDFIRST @@ -923,7 +885,6 @@ Inlines inorder INPC inproc -inputdev INPUTHARDWARE INPUTKEYBOARD INPUTLANGCHANGED @@ -953,7 +914,6 @@ ipcmanager IPlugin IPower IPREVIEW -ipreviewhandler ipreviewhandlervisualssetfont IProperty IPublic @@ -968,11 +928,8 @@ iss ITask ith ITHUMBNAIL -Ittoqqortoormiit IUI IUnknown -ivirtualdesktopmanager -Ivoire IWbem IWIC iwr @@ -1010,21 +967,12 @@ keyremaps Keytool keyup Kfiles -Khakassia -Khanty -Khovd KILLFOCUS killrunner -Kitts Knownfolders kotlin -Krai KSPROPERTY -Kwango -Kwilu Kybd -Kyrgyzstan -Kyzylorda LAlt Lambson langword @@ -1044,8 +992,6 @@ LCONTROL LCtrl Ldone ldx -LEFTDOWN -LEFTUP LEFTSCROLLBAR lego len @@ -1072,7 +1018,6 @@ LMEM LMENU lnk LOADFROMFILE -LOADLIBRARYASDATAFILE LOBYTE LOCALAPPDATA LOCALDISPLAY @@ -1125,16 +1070,12 @@ lstrcmpi lstrlen LTRB LTRREADING -Luhansk luid lusrmgr LWA lwin LZero lzw -Maarten -Macquarie -Magadan Mainwindow majortype MAJORVERSION @@ -1142,10 +1083,7 @@ makecab MAKEINTRESOURCE MAKEINTRESOURCEW makepri -Mangere -Mangystau manifestdependency -Mansi MAPPEDTOSAMEKEY MAPTOSAMESHORTCUT MAPVK @@ -1153,10 +1091,8 @@ Markdig markdownpreviewhandler MARKDOWNPREVIEWHANDLERCPP Markovic -Marquesas martinchrzan martinmoene -Mato Maximizable MAXIMIZEBOX MAXSHORTCUTSIZE @@ -1168,8 +1104,6 @@ MBUTTON MBUTTONDBLCLK MBUTTONDOWN MBUTTONUP -MCDT -MCST MDICHILD MDL mdtext @@ -1180,7 +1114,6 @@ mediatype Melman MENUITEMINFO MENUITEMINFOW -menurc Metadatas metafile mfapi @@ -1194,8 +1127,6 @@ Mgmt mic microsoft Midl -MIDDLEDOWN -MIDDLEUP mii MIIM millis @@ -1209,7 +1140,6 @@ miniz minlevel MINORVERSION Miracast -Mishkeegogamang mjpg mkd mkdn @@ -1225,8 +1155,6 @@ mockapi MODECHANGE modernwpf MODESPRUNED -Moldova -Mongala MONITORINFO MONITORINFOEX MONITORINFOEXW @@ -1272,16 +1200,12 @@ MTND Mul MULTIPLEUSE multizone -Mundrabilla mvvm myfile MYICON mysql -MYTZ NAMECHANGE nameof -Navassa -navigatetostring NCACTIVATE ncc NCCALCSIZE @@ -1303,7 +1227,6 @@ NCRBUTTONDBLCLK NCRBUTTONDOWN NCRBUTTONUP NCRENDERING -Ndombe ndp NEEDDISPATCH Nemeth @@ -1332,7 +1255,6 @@ NOACTIVATE NOAGGREGATION NOASYNC NOCLOSEPROCESS -NOCOALESCE NOCOPYBITS nodeca nodiscard @@ -1347,7 +1269,6 @@ nonclient NONCONVERT NONELEVATED NONINFRINGEMENT -nonpackaged nonstd NOOWNERZORDER NOPARENTNOTIFY @@ -1360,7 +1281,6 @@ NOREPOSITION norestart NORMALDISPLAY NORMALUSER -Noronha NOSEARCH NOSENDCHANGING NOSIZE @@ -1385,8 +1305,6 @@ nullonfailure numberbox NUMLOCK NUMPAD -Nunavut -Nusa nwc Objbase OBJID @@ -1407,8 +1325,6 @@ oldtheme oleaut OLECHAR OLEDB -oledbcommand -oledbconnection OLIVEGREEN onebranch onenote @@ -1494,7 +1410,6 @@ PINDIR pinfo pinvoke pipename -Pitcairn PKBDLLHOOKSTRUCT PKEY plib @@ -1506,7 +1421,6 @@ plugins pluginsmodel PMSIHANDLE Pnp -Pohnpei Popups POPUPWINDOW posix @@ -1550,7 +1464,6 @@ PREVIOUSVERSIONSINSTALLED prevpane prgms pri -Primorsky PRINTCLIENT printmanagement prm @@ -1599,7 +1512,6 @@ QITAB QITABENT qps QUERYENDSESSION -queryfocus QUERYOPEN QUEUESYNC Quickime @@ -1630,7 +1542,7 @@ rectp rects redirectedfrom redis -redist +Redist redistributable reencode reencoded @@ -1644,7 +1556,6 @@ regfile REGFILTER REGFILTERPINS REGISTERCLASSFAILED -registerhotkey registrypath registryroot regkey @@ -1674,7 +1585,6 @@ resizers RESIZETOFIT resmimetype RESOURCEID -resourcemanager RESTORETOMAXIMIZED restrictedcapabilities restrictederrorinfo @@ -1690,8 +1600,6 @@ rgs rhs ricardosantos RIDEV -RIGHTDOWN -RIGHTUP RIGHTSCROLLBAR riid RKey @@ -1699,12 +1607,10 @@ RLO RMENU RNumber roadmap -Roamable robmensching Roboto rooler roslyn -Rothera roundf ROUNDSMALL Rpc @@ -1742,7 +1648,6 @@ SAMESHORTCUTPREVIOUSLYMAPPED SAVEFAILED scancode scanled -Schd schedtasks Scip scipbe @@ -1754,10 +1659,8 @@ sddl SDKDDK sdns searchterm -secauthz secpol Secur -securityoverview Segoe Sekan SENDCHANGE @@ -1793,7 +1696,6 @@ shellex SHELLEXECUTEINFO SHELLEXECUTEINFOW shellscalingapi -shemptyrecyclebina SHFILEINFO SHGFI Shl @@ -1857,13 +1759,12 @@ Soref SOURCECLIENTAREAONLY SOURCEHEADER sourcesdirectory -SPACEBAR spam spdisp spdlog spdo -specialfolder spec'ing +specialfolder spesi splitwstring spsi @@ -1873,7 +1774,6 @@ spsv SRCCOPY Srch sre -Srednekolymsk SResize srme srre @@ -1926,9 +1826,7 @@ subkey SUBLANG subquery subresource -Sul Superbar -Suri sut SVE SVGIn @@ -1948,7 +1846,6 @@ SYSCOMMAND SYSDEADCHAR sysdm SYSICONINDEX -sysinfo SYSKEY syskeydown SYSKEYUP @@ -1959,7 +1856,6 @@ SYSTEMTIME systemverilog sysvol Tadele -Tajikistan talynone TApp TApplication @@ -1988,7 +1884,6 @@ telem telephon Templated templatenamespace -Tenggara testapp testcase testhost @@ -2008,7 +1903,6 @@ timedate timediff timeunion timeutil -timezones Titlecase TLayout tlb @@ -2020,7 +1914,6 @@ toolkitconverters Toolset toolwindow TOPDOWNDIB -tostring TOUCHEVENTF TOUCHINPUT touchpad @@ -2028,16 +1921,12 @@ Towindow tracelogging traies transicc -Transnistria TRAYMOUSEMESSAGE triaging TRK trl TServer -Tshuapa TStr -Tuva -TValue TWF tymed typedef @@ -2050,24 +1939,19 @@ TYPESHORTCUT UAC UAL uap -uapmanifestschema uby udit Udk -Udmurtia Udp uefi UHash UIA -uiauto uid UIEx uipi UIs -Ulaanbaatar ULARGE ULONGLONG -UMsg unassign uncompilable UNCPRIORITY @@ -2088,13 +1972,11 @@ unmute UNORM unregistering unremapped -Unstub unsubscribe unvirtualized Updatelayout UPGRADINGPRODUCTCODE Uptool -Urville Usb USEDEFAULT USEFILEATTRIBUTES @@ -2107,7 +1989,6 @@ USRDLL Utc utf uuidof -Uvs uwp uxtheme UYVY @@ -2147,8 +2028,6 @@ VIDEOINFOHEADER viewbox viewmodel vih -VIRTUALDESK -virtualkey visiblecolorformats Visibletrue VKey @@ -2203,7 +2082,6 @@ wikipedia wildcards winapi winappdriver -winauto wincodec Wincodecsdk wincolor @@ -2237,7 +2115,6 @@ winkey WINL winmd winmm -winmsg WINNT winres winrt @@ -2248,7 +2125,6 @@ winternl WINTHRESHOLD winui winuiex -winuser winxamlmanager wistd withinrafael @@ -2302,11 +2178,9 @@ wtoi WTS wtsapi WTSAT -wtypes Wubi wuceffectsi WVC -WVk Wwan Wwanpp XAttribute @@ -2316,11 +2190,8 @@ XBUTTON XBUTTONDBLCLK XBUTTONDOWN XBUTTONUP -XControl xcopy XDocument -XDOWN -XUP XElement xfd XFile @@ -2333,7 +2204,6 @@ XResource xsi XStr XVIRTUALSCREEN -Yamalia YAxis YIncrement yinle @@ -2348,7 +2218,6 @@ YUYV YVIRTUALSCREEN YVU YVYU -Zabaykalsky ZEROINIT ZIndex zipfile @@ -2356,6 +2225,5 @@ zipfolder zonable zoneset Zoneszonabletester -Zonev Zykova zzz From 68b2f5784166d8398390529d4ccfc1242d153c81 Mon Sep 17 00:00:00 2001 From: Stefan Markovic Date: Tue, 7 Mar 2023 22:57:01 +0100 Subject: [PATCH 07/14] Revert "Update installer/PowerToysSetup/generateFileList.ps1" This reverts commit 34545dab9cec642eccf790f9daf99e522293fb1f. --- installer/PowerToysSetup/generateFileList.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/PowerToysSetup/generateFileList.ps1 b/installer/PowerToysSetup/generateFileList.ps1 index d4495282ec6d..1fe1b13a36f7 100644 --- a/installer/PowerToysSetup/generateFileList.ps1 +++ b/installer/PowerToysSetup/generateFileList.ps1 @@ -47,7 +47,7 @@ if ($isWinAppSdkProj -eq $True) { } } -$fileExclusionList = @("*Test*", "*.pdb", "*.lastcodeanalysissucceeded", "createdump.exe", "backup_restore_settings.json", $interopFilesList, $winAppSDKfilesList); +$fileExclusionList = @("*Test*", "*.pdb", "*.lastcodeanalysissucceeded", "createdump.exe", "backup_restore_settings.json") + $interopFilesList + $winAppSDKfilesList $fileInclusionList = @("*.dll", "*.exe", "*.json", "*.msix", "*png", "*gif", "*ico", "*cur", "*svg", "index.html", "reg.js", "monacoSpecialLanguages.js", "resources.pri") From 30af633657e70bf5592022a26f0ee2dcb7bc845c Mon Sep 17 00:00:00 2001 From: Stefan Markovic Date: Thu, 23 Feb 2023 10:17:09 +0100 Subject: [PATCH 08/14] Update release CI to build both installers --- .pipelines/ESRPSigning_installer.json | 4 +- .pipelines/installer-steps.yml | 141 +++++++++++++ .pipelines/release.yml | 185 ++++-------------- installer/PowerToysSetup/Resources.wxs | 2 +- .../PowerToysSetupCustomActions.vcxproj | 6 +- 5 files changed, 186 insertions(+), 152 deletions(-) create mode 100644 .pipelines/installer-steps.yml diff --git a/.pipelines/ESRPSigning_installer.json b/.pipelines/ESRPSigning_installer.json index dea4efc7f491..b20e2cdc82c3 100644 --- a/.pipelines/ESRPSigning_installer.json +++ b/.pipelines/ESRPSigning_installer.json @@ -5,8 +5,8 @@ { "MatchedPath": [ "PowerToysSetupCustomActions.dll", - "PowerToysSetup-*.exe", - "PowerToysSetup-*.msi" + "PowerToys*Setup-*.exe", + "PowerToys*Setup-*.msi" ], "SigningInfo": { "Operations": [ diff --git a/.pipelines/installer-steps.yml b/.pipelines/installer-steps.yml new file mode 100644 index 000000000000..6ab7e0100948 --- /dev/null +++ b/.pipelines/installer-steps.yml @@ -0,0 +1,141 @@ +parameters: + - name: versionNumber + type: string + default: "0.0.1" + - name: perUserArg + type: string + default: "false" + - name: buildSubDir + type: string + default: "MachineSetup" + - name: installerPrefix + type: string + default: "PowerToysSetup" + +steps: + - task: VSBuild@1 + displayName: Build PowerToysSetupCustomActions DLL # This dll needs to be build and signed before building the MSI. + inputs: + solution: "**/installer/PowerToysSetup.sln" + vsVersion: 17.0 + msbuildArgs: /p:CIBuild=true /bl:$(Build.SourcesDirectory)\msbuild.binlog /t:PowerToysSetupCustomActions /p:RunBuildEvents=true /p:PerUser=${{parameters.perUserArg}} + platform: $(BuildPlatform) + configuration: $(BuildConfiguration) + clean: true + maximumCpuCount: true + + - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 + displayName: Sign PowerToysSetupCustomActions DLL + inputs: + ConnectedServiceName: "Terminal/Console/WinAppDriver Team Code Signing Connection" + FolderPath: 'installer/PowerToysSetupCustomActions/$(BuildPlatform)\$(BuildConfiguration)\${{parameters.buildSubDir}}' + signType: batchSigning + batchSignPolicyFile: '$(build.sourcesdirectory)\.pipelines\ESRPSigning_installer.json' + ciPolicyFile: '$(build.sourcesdirectory)\.pipelines\CIPolicy.xml' + + ## INSTALLER START + #### MSI BUILDING AND SIGNING + - task: VSBuild@1 + displayName: Build MSI + inputs: + solution: "**/installer/PowerToysSetup.sln" + vsVersion: 17.0 + msbuildArgs: /p:CIBuild=true /target:PowerToysInstaller /bl:$(Build.SourcesDirectory)\msbuild.binlog /p:RunBuildEvents=false /p:PerUser=${{parameters.perUserArg}} + platform: $(BuildPlatform) + configuration: $(BuildConfiguration) + clean: false # don't undo our hard work above by deleting the CustomActions dll + maximumCpuCount: true + + - task: CmdLine@2 + displayName: "Extracting MSI to verify contents" + inputs: + script: | + "C:\Program Files (x86)\WiX Toolset v3.14\bin\dark.exe" -x $(build.sourcesdirectory)\extractedMsi installer\PowerToysSetup\$(BuildPlatform)\$(BuildConfiguration)\${{parameters.buildSubDir}}\${{parameters.installerPrefix}}-${{ parameters.versionNumber }}-$(BuildPlatform).msi + dir $(build.sourcesdirectory)\extractedMsi + + # Did we sign all files + - task: PowerShell@1 + displayName: Verifying entire build is signed and version set + inputs: + scriptName: .pipelines/versionAndSignCheck.ps1 + arguments: -targetDir '$(build.sourcesdirectory)\extractedMsi\File' + + - task: PowerShell@1 + displayName: Verifying MSI Custom Actions DLL is signed + inputs: + scriptName: .pipelines/versionAndSignCheck.ps1 + arguments: -targetDir '$(build.sourcesdirectory)\extractedMsi\Binary' + + - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 + displayName: Sign MSI + inputs: + ConnectedServiceName: "Terminal/Console/WinAppDriver Team Code Signing Connection" + FolderPath: 'installer/PowerToysSetup/$(BuildPlatform)\$(BuildConfiguration)\${{parameters.buildSubDir}}' + signType: batchSigning + batchSignPolicyFile: '$(build.sourcesdirectory)\.pipelines\ESRPSigning_installer.json' + ciPolicyFile: '$(build.sourcesdirectory)\.pipelines\CIPolicy.xml' + #### END MSI + #### BOOTSTRAP BUILDING AND SIGNING + + - task: VSBuild@1 + displayName: Build Bootstrapper + inputs: + solution: "**/installer/PowerToysSetup.sln" + vsVersion: 17.0 + msbuildArgs: /p:CIBuild=true /bl:$(Build.SourcesDirectory)\msbuild.binlog /t:PowerToysBootstrapper /p:PerUser=${{parameters.perUserArg}} + platform: $(BuildPlatform) + configuration: $(BuildConfiguration) + clean: false # don't undo our hard work above by deleting the MSI + maximumCpuCount: true + + - task: CmdLine@2 + displayName: "Insignia: Extract Engine from Bundle" + inputs: + script: '"C:\Program Files (x86)\WiX Toolset v3.14\bin\insignia.exe" -ib installer\PowerToysSetup\$(BuildPlatform)\$(BuildConfiguration)\${{parameters.buildSubDir}}\${{parameters.installerPrefix}}-${{ 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: '"C:\Program Files (x86)\WiX Toolset v3.14\bin\insignia.exe" -ab installer\engine.exe installer\PowerToysSetup\$(BuildPlatform)\$(BuildConfiguration)\${{parameters.buildSubDir}}\${{parameters.installerPrefix}}-${{ parameters.versionNumber }}-$(BuildPlatform).exe -o installer\PowerToysSetup\$(BuildPlatform)\$(BuildConfiguration)\${{parameters.buildSubDir}}\${{parameters.installerPrefix}}-${{ parameters.versionNumber }}-$(BuildPlatform).exe' + + - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 + displayName: Sign Bootstrapper + inputs: + ConnectedServiceName: "Terminal/Console/WinAppDriver Team Code Signing Connection" + FolderPath: 'installer/PowerToysSetup/$(BuildPlatform)\$(BuildConfiguration)\${{parameters.buildSubDir}}' + signType: batchSigning + batchSignPolicyFile: '$(build.sourcesdirectory)\.pipelines\ESRPSigning_installer.json' + ciPolicyFile: '$(build.sourcesdirectory)\.pipelines\CIPolicy.xml' + #### END BOOTSTRAP + ## END INSTALLER diff --git a/.pipelines/release.yml b/.pipelines/release.yml index 81da06f416a1..e2ff24492b6b 100644 --- a/.pipelines/release.yml +++ b/.pipelines/release.yml @@ -175,17 +175,6 @@ jobs: clean: true maximumCpuCount: true - - task: VSBuild@1 - displayName: Build PowerToysSetupCustomActions - inputs: - solution: '**/installer/PowerToysSetup.sln' - vsVersion: 17.0 - msbuildArgs: /target:PowerToysSetupCustomActions /p:CIBuild=true /bl:$(Build.SourcesDirectory)\msbuild.binlog - platform: $(BuildPlatform) - configuration: $(BuildConfiguration) - clean: true - maximumCpuCount: true - - task: VSBuild@1 displayName: Publish Settings for Packaging inputs: @@ -313,29 +302,10 @@ jobs: configuration: $(BuildConfiguration) maximumCpuCount: true - - task: VSBuild@1 - displayName: Build PowerToysSetupCustomActions DLL # This dll needs to be build and signed before building the MSI. - inputs: - solution: '**/installer/PowerToysSetup.sln' - vsVersion: 17.0 - msbuildArgs: /p:CIBuild=true /bl:$(Build.SourcesDirectory)\msbuild.binlog /t:PowerToysSetupCustomActions /p:RunBuildEvents=true - platform: $(BuildPlatform) - configuration: $(BuildConfiguration) - maximumCpuCount: true - #### MAIN SIGNING AREA # reference https://dev.azure.com/microsoft/Dart/_git/AppDriver?path=/ESRPSigning.json&version=GBarm64-netcore&_a=contents for winappdriver # https://dev.azure.com/microsoft/Dart/_git/AppDriver?path=/CIPolicy.xml&version=GBarm64-netcore&_a=contents - - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 - displayName: Sign PowerToysSetupCustomActions DLL - inputs: - ConnectedServiceName: 'Terminal/Console/WinAppDriver Team Code Signing Connection' - FolderPath: 'installer/PowerToysSetupCustomActions/$(BuildPlatform)\$(BuildConfiguration)' - signType: batchSigning - batchSignPolicyFile: '$(build.sourcesdirectory)\.pipelines\ESRPSigning_installer.json' - ciPolicyFile: '$(build.sourcesdirectory)\.pipelines\CIPolicy.xml' - - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 displayName: Sign Core PT inputs: @@ -356,114 +326,6 @@ jobs: #### END SIGNING ## END MAIN -## INSTALLER START -#### MSI BUILDING AND SIGNING - - task: VSBuild@1 - displayName: Build MSI - inputs: - solution: '**/installer/PowerToysSetup.sln' - vsVersion: 17.0 - msbuildArgs: /p:CIBuild=true /target:PowerToysInstaller /bl:$(Build.SourcesDirectory)\msbuild.binlog /p:RunBuildEvents=false - platform: $(BuildPlatform) - configuration: $(BuildConfiguration) - clean: false # don't undo our hard work above by deleting the CustomActions dll - maximumCpuCount: true - - - task: CmdLine@2 - displayName: 'Extracting MSI to verify contents' - inputs: - script: | - "C:\Program Files (x86)\WiX Toolset v3.14\bin\dark.exe" -x $(build.sourcesdirectory)\extractedMsi installer\PowerToysSetup\$(BuildPlatform)\$(BuildConfiguration)\PowerToysSetup-${{ parameters.versionNumber }}-$(BuildPlatform).msi - dir $(build.sourcesdirectory)\extractedMsi - -# Did we sign all files - - task: PowerShell@1 - displayName: Verifying entire build is signed and version set - inputs: - scriptName: .pipelines/versionAndSignCheck.ps1 - arguments: -targetDir '$(build.sourcesdirectory)\extractedMsi\File' - - - task: PowerShell@1 - displayName: Verifying MSI Custom Actions DLL is signed - inputs: - scriptName: .pipelines/versionAndSignCheck.ps1 - arguments: -targetDir '$(build.sourcesdirectory)\extractedMsi\Binary' - - - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 - displayName: Sign MSI - inputs: - ConnectedServiceName: 'Terminal/Console/WinAppDriver Team Code Signing Connection' - FolderPath: 'installer/PowerToysSetup/$(BuildPlatform)\$(BuildConfiguration)' - signType: batchSigning - batchSignPolicyFile: '$(build.sourcesdirectory)\.pipelines\ESRPSigning_installer.json' - ciPolicyFile: '$(build.sourcesdirectory)\.pipelines\CIPolicy.xml' -#### END MSI - -#### BOOTSTRAP BUILDING AND SIGNING - - task: VSBuild@1 - displayName: Build Bootstrapper - inputs: - solution: '**/installer/PowerToysSetup.sln' - vsVersion: 17.0 - msbuildArgs: /p:CIBuild=true /bl:$(Build.SourcesDirectory)\msbuild.binlog /t:PowerToysBootstrapper - platform: $(BuildPlatform) - configuration: $(BuildConfiguration) - clean: false # don't undo our hard work above by deleting the MSI - maximumCpuCount: true - - - task: CmdLine@2 - displayName: 'Insignia: Extract Engine from Bundle' - inputs: - script: '"C:\Program Files (x86)\WiX Toolset v3.14\bin\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: '"C:\Program Files (x86)\WiX Toolset v3.14\bin\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 Bootstrapper - inputs: - ConnectedServiceName: 'Terminal/Console/WinAppDriver Team Code Signing Connection' - FolderPath: 'installer/PowerToysSetup/$(BuildPlatform)\$(BuildConfiguration)' - signType: batchSigning - batchSignPolicyFile: '$(build.sourcesdirectory)\.pipelines\ESRPSigning_installer.json' - ciPolicyFile: '$(build.sourcesdirectory)\.pipelines\CIPolicy.xml' -#### END BOOTSTRAP -## END INSTALLER - - task: PublishBuildArtifacts@1 displayName: 'Publish Artifact: binlog' condition: failed() @@ -514,13 +376,6 @@ jobs: SourceFolder: $(Build.ArtifactStagingDirectory)/Symbols-$(BuildPlatform)/ RemoveSourceFolder: True - - task: CopyFiles@2 - displayName: Copying setup file over - inputs: - contents: '**/PowerToysSetup-*.exe' - flattenFolders: True - targetFolder: $(Build.ArtifactStagingDirectory) - - task: PowerShell@2 displayName: 'Calculating SHA256 hash' inputs: @@ -539,9 +394,45 @@ jobs: $hash | out-file -filepath $combinedPath pwsh: true - + + - template: installer-steps.yml + parameters: + versionNumber: ${{ parameters.versionNumber }} + perUserArg: "false" + buildSubDir: "MachineSetup" + installerPrefix: "PowerToysSetup" + + - task: PowerShell@2 + displayName: Clean installer dir before building per-user installer + inputs: + targetType: inline + script: git clean -xfd -e *exe -- .\installer\ + pwsh: true + + - task: NuGetCommand@2 + displayName: NuGet restore solutions dependencies + inputs: + command: restore + restoreSolution: 'installer/*.sln' + selectOrConfig: config + nugetConfigPath: .pipelines/release-nuget.config + + - template: installer-steps.yml + parameters: + versionNumber: ${{ parameters.versionNumber }} + perUserArg: "true" + buildSubDir: "UserSetup" + installerPrefix: "PowerToysUserSetup" + + - task: CopyFiles@2 + displayName: Copying setup file over + inputs: + contents: "**/PowerToys*Setup-*.exe" + flattenFolders: True + targetFolder: $(Build.ArtifactStagingDirectory) + - task: PublishBuildArtifacts@1 - displayName: 'Publish Artifact: PowerToySetup' + displayName: "Publish Artifact: PowerToySetup" inputs: PathtoPublish: $(System.ArtifactsDirectory) ArtifactName: setup-$(BuildPlatform) diff --git a/installer/PowerToysSetup/Resources.wxs b/installer/PowerToysSetup/Resources.wxs index 7364a83bdb87..351bd0539332 100644 --- a/installer/PowerToysSetup/Resources.wxs +++ b/installer/PowerToysSetup/Resources.wxs @@ -199,7 +199,7 @@ Id="PDFPreviewHandler_$(var.IdSafeLanguage)_Component" Directory="Resource$(var.IdSafeLanguage)FileExplorerPreviewInstallFolder" Guid="$(var.CompGUIDPrefix)06"> - + diff --git a/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj b/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj index f565b927f446..42e14658b441 100644 --- a/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj +++ b/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj @@ -33,8 +33,10 @@ - $(Platform)\$(Configuration)\ - $(SolutionDir)$(ProjectName)\$(Platform)\$(Configuration)\obj\ + $(Platform)\$(Configuration)\MachineSetup + $(Platform)\$(Configuration)\UserSetup + $(SolutionDir)$(ProjectName)\$(Platform)\$(Configuration)\MachineSetup\obj\ + $(SolutionDir)$(ProjectName)\$(Platform)\$(Configuration)\UserSetup\obj\ true From 8fc90145f157bd15da42b2e16fbb5bae494c5c30 Mon Sep 17 00:00:00 2001 From: Stefan Markovic Date: Tue, 14 Mar 2023 16:50:16 +0100 Subject: [PATCH 09/14] Revert bundle name change It messes up app ID for per-user installation which ends up breaking winget update of the per-user PT --- installer/PowerToysSetup/Common.wxi | 2 -- installer/PowerToysSetup/PowerToys.wxs | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/installer/PowerToysSetup/Common.wxi b/installer/PowerToysSetup/Common.wxi index d0cb93770dab..0006d17ab3f5 100644 --- a/installer/PowerToysSetup/Common.wxi +++ b/installer/PowerToysSetup/Common.wxi @@ -32,7 +32,6 @@ - @@ -42,7 +41,6 @@ - diff --git a/installer/PowerToysSetup/PowerToys.wxs b/installer/PowerToysSetup/PowerToys.wxs index c99e7a37c8f1..848efb8133bd 100644 --- a/installer/PowerToysSetup/PowerToys.wxs +++ b/installer/PowerToysSetup/PowerToys.wxs @@ -8,7 +8,7 @@ - Date: Tue, 21 Mar 2023 23:13:05 +0100 Subject: [PATCH 10/14] spellcheck --- .github/actions/spell-check/expect.txt | 195 ++++++++++++++++++++++--- 1 file changed, 176 insertions(+), 19 deletions(-) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 1a9d9a16a9a3..85a3dae04e94 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -1,14 +1,27 @@ aaaa +AAAAEF +AAB +AABAD +AACB +AACD +AAD +AADF +abap +ABE abgr abi ABlocked ABOUTBOX Abug +ACA accctrl Acceleratorkeys ACCEPTFILES ACCESSDENIED accessibilityinsights +ACDB +ACFC +ACFF Acl aclapi AColumn @@ -24,7 +37,18 @@ adml admx advapi advfirewall +AEAA +AEAD +AECC +AED +AEE +AEEB +AFAE +AFAEFC +AFDA +AFE AFeature +AFFE AFFINETRANSFORM AFX AGGREGATABLE @@ -49,6 +73,7 @@ ansicolor ANull AOC aocfnapldcnfbofgmbbllojgocaelgdd +AOT APARTMENTTHREADED APeriod APIENTRY @@ -62,7 +87,6 @@ Applets Applicationcan applicationconfiguration applicationframehost -Applist applog appmanifest appref @@ -109,13 +133,36 @@ AValid awakeness awakeversion AYUV +azcli azman +azor backtracer +BAF bak +BBE bbwe +BCA +BCB +BCCE +BCCEA bck +BDB +BDBAD +BDCC +BDDF +BDFB +BEAA +BEB +BEEAADF +BEEC +BEFA betadele betsegaw +BFC +BFDE +BFEB +BFF +BFFA BGR bgra bhid @@ -168,28 +215,46 @@ BUTTONUP BValue BYPOSITION bytearray +CABD CALG callbackptr +cameligo Cangjie CANRENAME CAPTUREBLT CAPTURECHANGED CAtl +CBA +CBB +CBF +CCCCDE cch CCHDEVICENAME -CCHDEVICENAME -CCHFORMNAME CCHFORMNAME CCom CContext +CDAC +CDBF +CDCE +CDD +CDE cdecl CDeclaration CDEF cdpx +CEAF +CEBAC +CEBD +CECB CENTERALIGN ceq certlm certmgr +CFAADB +CFBBF +CFEE +CFFEE +CFFF cguid changecursor Changemove @@ -198,7 +263,7 @@ CHILDACTIVATE CHILDWINDOW chrdavis Chrzan -cht +CHT CIELAB CIEXYZ cim @@ -288,6 +353,7 @@ cppruntime cppstd cppwinrt CProj +createdump CREATESCHEDULEDTASK CREATESTRUCT CREATEWINDOWFAILED @@ -302,7 +368,6 @@ CSRW CStyle CSY CTest -Ctl CTRLALTDEL Ctrls Ctx @@ -322,14 +387,15 @@ cxfksword CXSCREEN CXSMICON CXVIRTUALSCREEN -cxxopts cyberrex CYSCREEN CYSMICON CYVIRTUALSCREEN cziplib +DAA Dac dacl +DAF damienleroy DARKPURPLE DARKTEAL @@ -340,12 +406,21 @@ dataversion DATAW davidegiacometti Dayof +DBAE +DBB +DBBDA +DBDE Dbg Dbghelp DBLCLKS DBLEPSILON +DCAB DCapture DCBA +DCBC +DCCB +DCEFCB +DCF DCOM dcommon dcomp @@ -353,6 +428,8 @@ dcompi DComposition DCR DCs +DDCDD +DDCE DDevice ddf DDxgi @@ -361,6 +438,7 @@ debian debugbreak DECLAR declspec +DED Dedup DEFAULTBOOTSTRAPPERINSTALLFOLDER DEFAULTCOLOR @@ -387,16 +465,18 @@ DESKTOPABSOLUTEEDITING DESKTOPABSOLUTEPARSING desktopshorcutinstalled desktopwindowxamlsource -deu +DEU devblogs devdocs devenum devmgmt DEVMODEW -DEVMODEW DEVMON devpkey DEVSOURCE +DFAB +DFB +DFBEA DIIRFLAG dimm directshow @@ -461,13 +541,41 @@ dxgi dxgidebug dxgiformat dxguid +EAAFE +EABF +EAC +EADC +EAF +EBCF +EBD +EBE +ecl ecount EData +EDB +EDCCC +EDFAE Edid +edis EDITKEYBOARD editkeyboardwindow EDITSHORTCUTS editshortcutswindow +edshift +EEA +EEB +EEBBE +EEBD +EED +EEDA +EEEE +EEF +EEFA +EFB +EFC +EFDD +EFE +EFFEFC EFile ekus emmintrin @@ -478,7 +586,7 @@ ENABLEDPOPUP endpointvolume endregion ENTERSIZEMOVE -enu +ENU EOAC epicgames epu @@ -490,8 +598,8 @@ ERRORLEVEL ERRORTITLE ESettings esize -esn esrp +estructuredtext etl etw EUQ @@ -524,15 +632,46 @@ exstyle EXTENDEDKEY EXTENDEDVERBS eyetracker +FABC fabricbot +FAEDDA +FAF +FAFD fancymouse fancyzones FANCYZONESDRAWLAYOUTTEST FANCYZONESEDITOR Farbraum FARPROC +FBB +FBC +FBDE +FBF +FCAE +FCB +FCCFF +FCD +FCDB +FCDD +FCE +FDB +FDBF +FDC +FDCD +FDE +FDEF +FDF fdw +FECF +FEDF +FEEF feimage +FFB +FFBCF +FFBE +FFDDD +FFEB +FFEBEF fff fileapi FILEEXPLORER @@ -595,7 +734,6 @@ GETSTATE GETTEXT GETTEXTLENGTH GHND -Globbing GMEM GNumber google @@ -603,6 +741,7 @@ gpedit gpo GPT gpu +graphql GSM gtm gui @@ -775,6 +914,7 @@ INSTALLFOLDERTOPREVIOUSINSTALLFOLDER INSTALLLOCATION INSTALLMESSAGE INSTALLPROPERTY +installscopeperuser INSTALLSTARTMENUSHORTCUT INSTALLSTATE Inste @@ -815,10 +955,11 @@ jgeosdfsdsgmkedfgdfgdfgbkmhcgcflmi jjw jobject jpe -jpn +JPN jpnime Jsons jsonval +julia junja jxr jyuwono @@ -839,14 +980,17 @@ keynum keyremaps Keytool keyup +Kfiles KILLFOCUS killrunner Knownfolders +kotlin KSPROPERTY Kybd LAlt Lambson langword +lastcodeanalysissucceeded Lastdevice Laute laviusmotileng @@ -871,6 +1015,7 @@ LError Lessthan LEVELID LExit +lexon lhs lhwnd LIBID @@ -991,7 +1136,6 @@ Metadatas metafile mfapi mfc -mfcm mfidl mfobjects mfplat @@ -1055,6 +1199,7 @@ msc msclr mscorlib msdata +msdax msedge MSGFLT MSIFASTINSTALL @@ -1078,6 +1223,7 @@ multizone mvvm myfile MYICON +mysql NAMECHANGE nameof NCACTIVATE @@ -1123,6 +1269,7 @@ nielslaute NIF NLD nlog +nls NLSTEXT NOACTIVATE NOAGGREGATION @@ -1245,6 +1392,7 @@ PARENTRELATIVEPARSING PArgb parray PARTIALCONFIRMATIONDIALOGTITLE +pascaligo pasteplain PATCOPY pathcch @@ -1267,7 +1415,6 @@ pdw PDWORD pedrolamas Pels -Pels PERCEIVEDFLAG perfmon pesi @@ -1277,6 +1424,7 @@ pfn pfo pft pgp +pgsql pguid PHANDLE PHANDLER @@ -1305,10 +1453,12 @@ Pnp Popups POPUPWINDOW posix +postiats poweraccent powerlauncher POWEROCR powerpreview +powerquery powerrename POWERRENAMECONTEXTMENU powerrenameinput @@ -1316,6 +1466,7 @@ POWERRENAMETEST powertoy POWERTOYNAME powertoyssetup +powertoysusersetup Powrprof ppidl ppmt @@ -1418,8 +1569,8 @@ RECTDESTINATION RECTL rectp rects -recyclebin redirectedfrom +redis Redist redistributable reencode @@ -1435,8 +1586,10 @@ REGFILTER REGFILTERPINS REGISTERCLASSFAILED registrypath +registryroot regkey REGPINTYPES +regroot regsvr reinit REINSTALLMODE @@ -1446,6 +1599,7 @@ remappings REMAPSUCCESSFUL REMAPUNSUCCESSFUL Remotable +Removedir Removelnk renamable RENAMEONCOLLISION @@ -1508,12 +1662,11 @@ rungameid RUNLEVEL runsettings runtimeclass -runtimeconfig runtimedepsjsonpath runtimeobject runtimepack runtimes -rus +RUS Rutkas RValue rvm @@ -1580,7 +1733,6 @@ SHGFI Shl shldisp shlobj -Shlw shlwapi shmem shobjidl @@ -1686,6 +1838,7 @@ stdcpplatest STDMETHODCALLTYPE STDMETHODIMP stefan +stefansjfw Stereolithography STGM STGMEDIUM @@ -1736,6 +1889,7 @@ SYSMENU SYSTEMAPPS systemroot SYSTEMTIME +systemverilog sysvol Tadele talynone @@ -1755,6 +1909,7 @@ taskkill tasklist taskschd tchar +tcl Tcollab tcscpy TCustom @@ -1822,6 +1977,7 @@ TYPESHORTCUT UAC UAL uap +uby udit Udk Udp @@ -2078,6 +2234,7 @@ xcopy XDocument XDOWN XElement +xfd XFile XIncrement XLoc @@ -2095,7 +2252,7 @@ yinle yinwang yinyue YOffset -YResolution +ypescript YResolution YStr YUY From 7d983dbe02041c164514b3fce554f5c7a269a347 Mon Sep 17 00:00:00 2001 From: Stefan Markovic Date: Fri, 24 Mar 2023 23:45:36 +0100 Subject: [PATCH 11/14] Fix bad merge --- installer/PowerToysSetup/PowerRename.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/PowerToysSetup/PowerRename.wxs b/installer/PowerToysSetup/PowerRename.wxs index 9bec3cf37666..5b5f48f1e7d0 100644 --- a/installer/PowerToysSetup/PowerRename.wxs +++ b/installer/PowerToysSetup/PowerRename.wxs @@ -24,7 +24,7 @@ - + From 73572135eb72a797075ba7789f9a2a7a243fa00c Mon Sep 17 00:00:00 2001 From: Stefan Markovic Date: Mon, 27 Mar 2023 20:33:51 +0200 Subject: [PATCH 12/14] Add RegistryPreview --- .../PowerToysSetup/PowerToysInstaller.wixproj | 1 + installer/PowerToysSetup/RegistryPreview.wxs | 43 ++++++++----------- installer/PowerToysSetup/WinAppSDK.wxs | 4 ++ .../generateAllFileComponents.ps1 | 6 +++ .../PowerToysSetupCustomActions.vcxproj | 1 + 5 files changed, 30 insertions(+), 25 deletions(-) diff --git a/installer/PowerToysSetup/PowerToysInstaller.wixproj b/installer/PowerToysSetup/PowerToysInstaller.wixproj index b74fbef012ce..3e8a69344987 100644 --- a/installer/PowerToysSetup/PowerToysInstaller.wixproj +++ b/installer/PowerToysSetup/PowerToysInstaller.wixproj @@ -42,6 +42,7 @@ call "..\..\..\publish.cmd" arm64 call move /Y ..\..\..\PowerAccent.wxs.bk ..\..\..\PowerAccent.wxs call move /Y ..\..\..\PowerRename.wxs.bk ..\..\..\PowerRename.wxs call move /Y ..\..\..\Product.wxs.bk ..\..\..\Product.wxs + call move /Y ..\..\..\RegistryPreview.wxs.bk ..\..\..\RegistryPreview.wxs call move /Y ..\..\..\Resources.wxs.bk ..\..\..\Resources.wxs call move /Y ..\..\..\Run.wxs.bk ..\..\..\Run.wxs call move /Y ..\..\..\Settings.wxs.bk ..\..\..\Settings.wxs diff --git a/installer/PowerToysSetup/RegistryPreview.wxs b/installer/PowerToysSetup/RegistryPreview.wxs index 393ca839d25a..168ce0c3ffa9 100644 --- a/installer/PowerToysSetup/RegistryPreview.wxs +++ b/installer/PowerToysSetup/RegistryPreview.wxs @@ -4,40 +4,33 @@ - - - - + + - + + - - - - - - + + + - - - - - - + + + - - - - - - - - + + + + + + + + diff --git a/installer/PowerToysSetup/WinAppSDK.wxs b/installer/PowerToysSetup/WinAppSDK.wxs index 386eb689d076..cb20c8cfa924 100644 --- a/installer/PowerToysSetup/WinAppSDK.wxs +++ b/installer/PowerToysSetup/WinAppSDK.wxs @@ -368,6 +368,9 @@ Id="RegistryPreview_WinAppSDKLoc_$(var.IdSafeLanguage)_Component" Directory="WinAppSDKLoc$(var.IdSafeLanguage)RegistryPreviewInstallFolder" Guid="$(var.CompGUIDPrefix)06"> + + + @@ -500,6 +503,7 @@ + diff --git a/installer/PowerToysSetup/generateAllFileComponents.ps1 b/installer/PowerToysSetup/generateAllFileComponents.ps1 index 60b3ddffbaca..93b35f7684cc 100644 --- a/installer/PowerToysSetup/generateAllFileComponents.ps1 +++ b/installer/PowerToysSetup/generateAllFileComponents.ps1 @@ -86,6 +86,12 @@ Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """ Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""PowerRenameFiles"" -wxsFilePath $PSScriptRoot\PowerRename.wxs -regroot $registryroot" Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""PowerRenameAssetsFiles"" -wxsFilePath $PSScriptRoot\PowerRename.wxs -regroot $registryroot" +#RegistryPreview +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\RegistryPreview\PowerToys.RegistryPreview.deps.json"" -fileListName RegistryPreviewFiles -wxsFilePath $PSScriptRoot\RegistryPreview.wxs" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName RegistryPreviewAssetsFiles -wxsFilePath $PSScriptRoot\RegistryPreview.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\RegistryPreview\Assets\""" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""RegistryPreviewFiles"" -wxsFilePath $PSScriptRoot\RegistryPreview.wxs -regroot $registryroot" +Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""RegistryPreviewAssetsFiles"" -wxsFilePath $PSScriptRoot\RegistryPreview.wxs -regroot $registryroot" + #Run Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\PowerToys.PowerLauncher.deps.json"" -fileListName launcherFiles -wxsFilePath $PSScriptRoot\Run.wxs" Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName launcherImagesComponentFiles -wxsFilePath $PSScriptRoot\Run.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\modules\launcher\Images""" diff --git a/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj b/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj index 42e14658b441..f7370d499d02 100644 --- a/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj +++ b/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj @@ -64,6 +64,7 @@ call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\PowerAccent.wxs"" ""$(ProjectDir)..\PowerToysSetup\PowerAccent.wxs.bk"""" call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\PowerRename.wxs"" ""$(ProjectDir)..\PowerToysSetup\PowerRename.wxs.bk"""" call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Product.wxs"" ""$(ProjectDir)..\PowerToysSetup\Product.wxs.bk"""" + call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\RegistryPreview.wxs"" ""$(ProjectDir)..\PowerToysSetup\RegistryPreview.wxs.bk"""" call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Resources.wxs"" ""$(ProjectDir)..\PowerToysSetup\Resources.wxs.bk"""" call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Run.wxs"" ""$(ProjectDir)..\PowerToysSetup\Run.wxs.bk"""" call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Settings.wxs"" ""$(ProjectDir)..\PowerToysSetup\Settings.wxs.bk"""" From 29ce6246ab751b1ebbe9584512ea28302456a020 Mon Sep 17 00:00:00 2001 From: Stefan Markovic Date: Tue, 28 Mar 2023 00:05:37 +0200 Subject: [PATCH 13/14] Include backup_restore_settings.json --- installer/PowerToysSetup/generateFileList.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/PowerToysSetup/generateFileList.ps1 b/installer/PowerToysSetup/generateFileList.ps1 index 1fe1b13a36f7..5925ebedb203 100644 --- a/installer/PowerToysSetup/generateFileList.ps1 +++ b/installer/PowerToysSetup/generateFileList.ps1 @@ -47,7 +47,7 @@ if ($isWinAppSdkProj -eq $True) { } } -$fileExclusionList = @("*Test*", "*.pdb", "*.lastcodeanalysissucceeded", "createdump.exe", "backup_restore_settings.json") + $interopFilesList + $winAppSDKfilesList +$fileExclusionList = @("*Test*", "*.pdb", "*.lastcodeanalysissucceeded", "createdump.exe") + $interopFilesList + $winAppSDKfilesList $fileInclusionList = @("*.dll", "*.exe", "*.json", "*.msix", "*png", "*gif", "*ico", "*cur", "*svg", "index.html", "reg.js", "monacoSpecialLanguages.js", "resources.pri") From 01f83f4901d4969d691901653198273afcdac259 Mon Sep 17 00:00:00 2001 From: Stefan Markovic Date: Thu, 30 Mar 2023 22:57:30 +0200 Subject: [PATCH 14/14] Revert testing endpoint change --- src/common/updating/updating.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/updating/updating.cpp b/src/common/updating/updating.cpp index 800efd5d1feb..c0e194403bd2 100644 --- a/src/common/updating/updating.cpp +++ b/src/common/updating/updating.cpp @@ -14,8 +14,8 @@ using namespace registry::install_scope; namespace // Strings in this namespace should not be localized { - const wchar_t LATEST_RELEASE_ENDPOINT[] = L"https://api.github.com/repos/stefansjfw/PowerToys/releases/latest"; - const wchar_t ALL_RELEASES_ENDPOINT[] = L"https://api.github.com/repos/stefansjfw/PowerToys/releases"; + const wchar_t LATEST_RELEASE_ENDPOINT[] = L"https://api.github.com/repos/microsoft/PowerToys/releases/latest"; + const wchar_t ALL_RELEASES_ENDPOINT[] = L"https://api.github.com/repos/microsoft/PowerToys/releases"; const wchar_t LOCAL_BUILD_ERROR[] = L"Local build cannot be updated"; const wchar_t NETWORK_ERROR[] = L"Network error";