From 65df14036cd8c0c71dd3d08b2baac03fd4288d02 Mon Sep 17 00:00:00 2001 From: Jaime Bernardo Date: Tue, 7 Jun 2022 09:58:32 +0100 Subject: [PATCH] [Installer]Ship Windows App SDK runtime self contained (#18644) * [Installer]Ship Windows App SDK as self-contained * Include windows app sdk localization files * fix spellcheck * Upgrade Win3.14 version * Add RunWixToolsOutOfProc to try fixing wix hang * fix spellcheck * Try to get more information from wix build * Remove unneeded flags * Fix spellchecker * Add version check exception for dll with 1.0.0.0 --- .github/actions/spell-check/expect.txt | 9 + .pipelines/installWiX.ps1 | 8 +- .pipelines/versionAndSignCheck.ps1 | 3 +- installer/PowerToysSetup/PowerToys.wxs | 22 -- .../PowerToysSetup/PowerToysInstaller.wixproj | 8 +- installer/PowerToysSetup/Product.wxs | 357 +++++++++++++++++- .../PowerRenameUILib/PowerRenameUI.vcxproj | 1 + .../Settings.UI/GlobalSuppressions.cs | 4 + .../Settings.UI/PowerToys.Settings.csproj | 1 + 9 files changed, 382 insertions(+), 31 deletions(-) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 200b0b0272d..2524059bda6 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -366,6 +366,7 @@ CXSMICON CXVIRTUALSCREEN cxxopts cyberrex +Cyrl CYSMICON CYVIRTUALSCREEN cziplib @@ -386,6 +387,7 @@ DBLCLKS DBLEPSILON DCOM dcomp +dcompi DComposition ddf DDLM @@ -431,6 +433,7 @@ devblogs devdocs devenum DEVMON +devops devpkey DEVSOURCE dhcp @@ -488,6 +491,7 @@ DVTARGETDEVICE DWINRT dwm dwmapi +dwmcorei DWMCOLORIZATIONCOLORCHANGED DWMCOMPOSITIONCHANGED DWMNCRENDERINGCHANGED @@ -1043,6 +1047,7 @@ Lambson lamotile langword Lastdevice +Latn Laute laviusmotileng LAYOUTRTL @@ -1252,6 +1257,7 @@ MOVESIZESTART MOVEWINDOWS mozilla mpmc +MRM mru msbuild msc @@ -1732,6 +1738,7 @@ Rsp rst Rstrtmgr RTB +RTCS RTLREADING ruleset RUNACTIVEXCTLS @@ -2091,6 +2098,7 @@ UAC UAL uap udit +Udk Udmurtia Udp uefi @@ -2345,6 +2353,7 @@ WTS wtsapi WTSAT Wubi +wuceffectsi WVC Wwan Wwanpp diff --git a/.pipelines/installWiX.ps1 b/.pipelines/installWiX.ps1 index 5147cbb8ce4..ab770b8bf57 100644 --- a/.pipelines/installWiX.ps1 +++ b/.pipelines/installWiX.ps1 @@ -1,19 +1,19 @@ $ProgressPreference = 'SilentlyContinue' -$WixDownloadUrl = "https://wixtoolset.org/downloads/v3.14.0.5722/wix314.exe" -$WixBinariesDownloadUrl = "https://wixtoolset.org/downloads/v3.14.0.5722/wix314-binaries.zip" +$WixDownloadUrl = "https://wixtoolset.org/downloads/v3.14.0.6526/wix314.exe" +$WixBinariesDownloadUrl = "https://wixtoolset.org/downloads/v3.14.0.6526/wix314-binaries.zip" # Download WiX binaries and verify their hash sums Invoke-WebRequest -Uri $WixDownloadUrl -OutFile "$($ENV:Temp)\wix314.exe" $Hash = (Get-FileHash -Algorithm SHA256 "$($ENV:Temp)\wix314.exe").Hash -if ($Hash -ne 'B74ED29F1377AA759E764EDEF43B1E4C4312A7A4CED77108D2446F7117EF5D3B') +if ($Hash -ne 'FADEB00B1FCCD9BB2FDD6CE28D4C3ECDA339C8906A72586515C14A93CEADB6FE') { Write-Error "$WixHash" throw "wix314.exe has unexpected SHA256 hash: $Hash" } Invoke-WebRequest -Uri $WixBinariesDownloadUrl -OutFile "$($ENV:Temp)\wix314-binaries.zip" $Hash = (Get-FileHash -Algorithm SHA256 "$($ENV:Temp)\wix314-binaries.zip").Hash -if($Hash -ne 'FCBE136AB3D616B983C5BE19B46521745F842B7327BF2BC7011FD26DBE277F93') +if($Hash -ne '4C89898DF3BCAB13E12F7CA54399C35AD273475AD2CB6284611D00AE2D063C2C') { throw "wix314-binaries.zip has unexpected SHA256 hash: $Hash" } diff --git a/.pipelines/versionAndSignCheck.ps1 b/.pipelines/versionAndSignCheck.ps1 index 4c26b005264..4ebd06dad1f 100644 --- a/.pipelines/versionAndSignCheck.ps1 +++ b/.pipelines/versionAndSignCheck.ps1 @@ -36,7 +36,8 @@ $items | ForEach-Object { (-not $_.Name.EndsWith("Microsoft.Windows.System.Power.Projection.dll")) -and (-not $_.Name.EndsWith("Microsoft.WindowsAppRuntime.Bootstrap.Net.dll")) -and (-not $_.Name.EndsWith("Microsoft.Xaml.Interactions.dll")) -and - (-not $_.Name.EndsWith("Microsoft.Xaml.Interactivity.dll")) + (-not $_.Name.EndsWith("Microsoft.Xaml.Interactivity.dll")) -and + (-not $_.Name.EndsWith("Microsoft.WindowsAppRuntime.Release.Net.dll")) ) { Write-Host "Version not set: " + $_.FullName diff --git a/installer/PowerToysSetup/PowerToys.wxs b/installer/PowerToysSetup/PowerToys.wxs index 0182c26c15f..3522e36a228 100644 --- a/installer/PowerToysSetup/PowerToys.wxs +++ b/installer/PowerToysSetup/PowerToys.wxs @@ -10,9 +10,6 @@ - - - @@ -27,9 +24,6 @@ - - - @@ -109,22 +103,6 @@ PerMachine="yes" UninstallCommand="/silent /uninstall"> - - - - $(Platform)\$(Configuration)\ obj\$(Platform)\$(Configuration)\ - ICE91 - True + ICE40 + + + + + -v -sh -sw1108 diff --git a/installer/PowerToysSetup/Product.wxs b/installer/PowerToysSetup/Product.wxs index 7681ac09b78..781ec3e5c48 100644 --- a/installer/PowerToysSetup/Product.wxs +++ b/installer/PowerToysSetup/Product.wxs @@ -46,13 +46,15 @@ - + + + @@ -104,7 +106,9 @@ - + + + + @@ -387,6 +392,9 @@ + + + @@ -510,6 +518,9 @@ + + + @@ -724,6 +735,14 @@ + + + + + + + + @@ -927,6 +946,13 @@ + + + + + + + @@ -975,6 +1001,9 @@ + + + @@ -1017,6 +1046,9 @@ + + + @@ -1319,6 +1351,327 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj b/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj index 5e3406a80a8..e9dd1a5cde7 100644 --- a/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj +++ b/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj @@ -25,6 +25,7 @@ 10.0.18362.0 10.0.17763.0 true + true true diff --git a/src/settings-ui/Settings.UI/GlobalSuppressions.cs b/src/settings-ui/Settings.UI/GlobalSuppressions.cs index e1bb2c75961..e81d778d605 100644 --- a/src/settings-ui/Settings.UI/GlobalSuppressions.cs +++ b/src/settings-ui/Settings.UI/GlobalSuppressions.cs @@ -78,3 +78,7 @@ [assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1403:File may only contain a single namespace", Justification = "Not part of the project. WindowsAppSDK file.", Scope = "namespaceanddescendants", Target = "Microsoft.WindowsAppSDK.Runtime.Packages.DDLM")] [assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:File may only contain a single type", Justification = "Not part of the project. WindowsAppSDK file.", Scope = "namespaceanddescendants", Target = "Microsoft.WindowsAppSDK.Runtime.Packages.DDLM")] [assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1636:File header copyright text should match", Justification = "Not part of the project. WindowsAppSDK file.", Scope = "module")] +[assembly: SuppressMessage("Performance", "CA1806:Do not ignore method results", Justification = "", Scope = "member", Target = "~M:Microsoft.Windows.Foundation.UndockedRegFreeWinRTCS.AutoInitialize.AccessWindowsAppSDK")] +[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:File name should match first type name", Justification = "", Scope = "type", Target = "~T:Microsoft.Windows.Foundation.UndockedRegFreeWinRTCS.NativeMethods")] +[assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1400:Access modifier should be declared", Justification = "", Scope = "type", Target = "~T:Microsoft.Windows.Foundation.UndockedRegFreeWinRTCS.AutoInitialize")] +[assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:File may only contain a single type", Justification = "", Scope = "type", Target = "~T:Microsoft.Windows.Foundation.UndockedRegFreeWinRTCS.AutoInitialize")] diff --git a/src/settings-ui/Settings.UI/PowerToys.Settings.csproj b/src/settings-ui/Settings.UI/PowerToys.Settings.csproj index 94631ee13c5..848f75bbcfc 100644 --- a/src/settings-ui/Settings.UI/PowerToys.Settings.csproj +++ b/src/settings-ui/Settings.UI/PowerToys.Settings.csproj @@ -13,6 +13,7 @@ false false icon.ico + true ..\..\..\$(Platform)\$(Configuration)\Settings