From 31c54c9609dc36a5bf9b0cc1901aa524f7a8afbb Mon Sep 17 00:00:00 2001 From: Andrey Nekrasov Date: Thu, 21 Apr 2022 17:55:02 +0300 Subject: [PATCH] [ARM64] Add support for .msi assembly (#17861) # Conflicts: # installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj --- installer/PowerToysSetup.sln | 45 ++- .../PowerToysSetup/PowerToysInstaller.wixproj | 48 +-- installer/PowerToysSetup/Product.wxs | 321 +++++++++--------- installer/PowerToysSetup/publish.cmd | 9 +- .../PowerToysSetupCustomActions.vcxproj | 76 +++-- src/common/logger/logger.vcxproj | 27 ++ src/logging/logging.vcxproj | 33 +- 7 files changed, 346 insertions(+), 213 deletions(-) diff --git a/installer/PowerToysSetup.sln b/installer/PowerToysSetup.sln index ba0eda70a3..e2b5229b08 100644 --- a/installer/PowerToysSetup.sln +++ b/installer/PowerToysSetup.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29215.179 +# Visual Studio Version 17 +VisualStudioVersion = 17.1.32414.318 MinimumVisualStudioVersion = 10.0.40219.1 Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "PowerToysInstaller", "PowerToysSetup\PowerToysInstaller.wixproj", "{022A9D30-7C4F-416D-A9DF-5FF2661CC0AD}" EndProject @@ -15,28 +15,69 @@ Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "PowerToysBootstrapper", "Po EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM64 = Debug|ARM64 + Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 + Release|ARM64 = Release|ARM64 + Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {022A9D30-7C4F-416D-A9DF-5FF2661CC0AD}.Debug|ARM64.ActiveCfg = Debug|x86 + {022A9D30-7C4F-416D-A9DF-5FF2661CC0AD}.Debug|ARM64.Build.0 = Debug|x86 + {022A9D30-7C4F-416D-A9DF-5FF2661CC0AD}.Debug|Win32.ActiveCfg = Debug|x64 + {022A9D30-7C4F-416D-A9DF-5FF2661CC0AD}.Debug|Win32.Build.0 = Debug|x64 {022A9D30-7C4F-416D-A9DF-5FF2661CC0AD}.Debug|x64.ActiveCfg = Debug|x64 {022A9D30-7C4F-416D-A9DF-5FF2661CC0AD}.Debug|x64.Build.0 = Debug|x64 + {022A9D30-7C4F-416D-A9DF-5FF2661CC0AD}.Release|ARM64.ActiveCfg = Release|x86 + {022A9D30-7C4F-416D-A9DF-5FF2661CC0AD}.Release|ARM64.Build.0 = Release|x86 + {022A9D30-7C4F-416D-A9DF-5FF2661CC0AD}.Release|Win32.ActiveCfg = Release|x64 + {022A9D30-7C4F-416D-A9DF-5FF2661CC0AD}.Release|Win32.Build.0 = Release|x64 {022A9D30-7C4F-416D-A9DF-5FF2661CC0AD}.Release|x64.ActiveCfg = Release|x64 {022A9D30-7C4F-416D-A9DF-5FF2661CC0AD}.Release|x64.Build.0 = Release|x64 + {32F3882B-F2D6-4586-B5ED-11E39E522BD3}.Debug|ARM64.ActiveCfg = Debug|Win32 + {32F3882B-F2D6-4586-B5ED-11E39E522BD3}.Debug|Win32.ActiveCfg = Debug|Win32 + {32F3882B-F2D6-4586-B5ED-11E39E522BD3}.Debug|Win32.Build.0 = Debug|Win32 {32F3882B-F2D6-4586-B5ED-11E39E522BD3}.Debug|x64.ActiveCfg = Debug|x64 {32F3882B-F2D6-4586-B5ED-11E39E522BD3}.Debug|x64.Build.0 = Debug|x64 + {32F3882B-F2D6-4586-B5ED-11E39E522BD3}.Release|ARM64.ActiveCfg = Release|Win32 + {32F3882B-F2D6-4586-B5ED-11E39E522BD3}.Release|ARM64.Build.0 = Release|Win32 + {32F3882B-F2D6-4586-B5ED-11E39E522BD3}.Release|Win32.ActiveCfg = Release|x64 + {32F3882B-F2D6-4586-B5ED-11E39E522BD3}.Release|Win32.Build.0 = Release|x64 {32F3882B-F2D6-4586-B5ED-11E39E522BD3}.Release|x64.ActiveCfg = Release|x64 {32F3882B-F2D6-4586-B5ED-11E39E522BD3}.Release|x64.Build.0 = Release|x64 + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|ARM64.ActiveCfg = Debug|Win32 + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|Win32.ActiveCfg = Debug|Win32 + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|Win32.Build.0 = Debug|Win32 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|x64.ActiveCfg = Debug|x64 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|x64.Build.0 = Debug|x64 + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|ARM64.ActiveCfg = Release|Win32 + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|ARM64.Build.0 = Release|Win32 + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|Win32.ActiveCfg = Release|Win32 + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|Win32.Build.0 = Release|Win32 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|x64.ActiveCfg = Release|x64 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|x64.Build.0 = Release|x64 + {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|ARM64.ActiveCfg = Debug|Win32 + {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|Win32.ActiveCfg = Debug|Win32 + {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|Win32.Build.0 = Debug|Win32 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|x64.ActiveCfg = Debug|x64 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|x64.Build.0 = Debug|x64 + {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|ARM64.ActiveCfg = Release|Win32 + {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|ARM64.Build.0 = Release|Win32 + {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|Win32.ActiveCfg = Release|Win32 + {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|Win32.Build.0 = Release|Win32 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|x64.ActiveCfg = Release|x64 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|x64.Build.0 = Release|x64 + {31D72625-43C1-41B1-B784-BCE4A8DC5543}.Debug|ARM64.ActiveCfg = Debug|x64 + {31D72625-43C1-41B1-B784-BCE4A8DC5543}.Debug|ARM64.Build.0 = Debug|x64 + {31D72625-43C1-41B1-B784-BCE4A8DC5543}.Debug|Win32.ActiveCfg = Debug|x64 + {31D72625-43C1-41B1-B784-BCE4A8DC5543}.Debug|Win32.Build.0 = Debug|x64 {31D72625-43C1-41B1-B784-BCE4A8DC5543}.Debug|x64.ActiveCfg = Debug|x64 {31D72625-43C1-41B1-B784-BCE4A8DC5543}.Debug|x64.Build.0 = Debug|x64 + {31D72625-43C1-41B1-B784-BCE4A8DC5543}.Release|ARM64.ActiveCfg = Release|x64 + {31D72625-43C1-41B1-B784-BCE4A8DC5543}.Release|ARM64.Build.0 = Release|x64 + {31D72625-43C1-41B1-B784-BCE4A8DC5543}.Release|Win32.ActiveCfg = Release|x64 + {31D72625-43C1-41B1-B784-BCE4A8DC5543}.Release|Win32.Build.0 = Release|x64 {31D72625-43C1-41B1-B784-BCE4A8DC5543}.Release|x64.ActiveCfg = Release|x64 {31D72625-43C1-41B1-B784-BCE4A8DC5543}.Release|x64.Build.0 = Release|x64 EndGlobalSection diff --git a/installer/PowerToysSetup/PowerToysInstaller.wixproj b/installer/PowerToysSetup/PowerToysInstaller.wixproj index caab631c45..e3209d6282 100644 --- a/installer/PowerToysSetup/PowerToysInstaller.wixproj +++ b/installer/PowerToysSetup/PowerToysInstaller.wixproj @@ -2,13 +2,36 @@ - + + Version=$(Version);MonacoSRCHarvestPath=$(ProjectDir)..\..\x64\$(Configuration)\modules\FileExplorerPreview\monacoSRC + + IF NOT DEFINED IsPipeline ( +call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -winsdk=10.0.18362.0 +SET PTRoot=..\..\..\.. +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.18362.0 +SET PTRoot=..\..\..\.. +call "..\..\publish.cmd" arm64 +) + + + PowerToysInstaller - Release - x64 + + Release + $(Platform) 3.10 022a9d30-7c4f-416d-a9df-5ff2661cc0ad 2.0 @@ -18,18 +41,12 @@ - + $(Platform)\$(Configuration)\ obj\$(Platform)\$(Configuration)\ ICE91 True - - $(Platform)\$(Configuration)\ - obj\$(Platform)\$(Configuration)\ - True - ICE91 - @@ -78,17 +95,6 @@ - - - IF NOT DEFINED IsPipeline ( -call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -winsdk=10.0.18362.0 -SET PTRoot=..\..\..\.. -call "..\..\publish.cmd" -) - - + - + - + - + - + @@ -628,10 +632,10 @@ - + - + @@ -715,10 +719,10 @@ - + - + @@ -739,23 +743,23 @@ - + - - + + - + - + - + - + @@ -766,31 +770,36 @@ - + WINDOWSBUILDNUMBER >= 18362 - + - + + + + + + - + WINDOWSBUILDNUMBER >= 18362 - - - - - - - - - - - - + + + + + + + + + + + + @@ -801,144 +810,144 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -1184,151 +1193,151 @@ Id="Launcher_$(var.IdSafeLanguage)_Component" Directory="Resource$(var.IdSafeLanguage)LauncherInstallFolder" Guid="$(var.CompGUIDPrefix)00"> - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -1348,11 +1357,11 @@ - - - + + + - + @@ -1360,231 +1369,231 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/installer/PowerToysSetup/publish.cmd b/installer/PowerToysSetup/publish.cmd index 586bd66771..4c254ead52 100644 --- a/installer/PowerToysSetup/publish.cmd +++ b/installer/PowerToysSetup/publish.cmd @@ -2,8 +2,11 @@ setlocal enableDelayedExpansion IF NOT DEFINED PTRoot (SET PTRoot=..\..) -rem In case of Release we should not use Debug CRT in VCRT forwarders -msbuild !PTRoot!\src\settings-ui\Settings.UI\PowerToys.Settings.csproj -t:Publish -p:Configuration="Release" -p:Platform="x64" -p:PowerToysRoot=!PTRoot! -p:AppxBundle=Never -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml +SET PlatformArg=%1 +IF NOT DEFINED PlatformArg (SET PlatformArg=x64) rem In case of Release we should not use Debug CRT in VCRT forwarders -msbuild !PTRoot!\src\modules\launcher\PowerLauncher\PowerLauncher.csproj -t:Publish -p:Configuration="Release" -p:Platform="x64" -p:AppxBundle=Never -p:PowerToysRoot=!PTRoot! -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml +msbuild !PTRoot!\src\settings-ui\Settings.UI\PowerToys.Settings.csproj -t:Publish -p:Configuration="Release" -p:Platform="!PlatformArg!" -p:PowerToysRoot=!PTRoot! -p:AppxBundle=Never -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml + +rem In case of Release we should not use Debug CRT in VCRT forwarders +msbuild !PTRoot!\src\modules\launcher\PowerLauncher\PowerLauncher.csproj -t:Publish -p:Configuration="Release" -p:Platform="!PlatformArg!" -p:AppxBundle=Never -p:PowerToysRoot=!PTRoot! -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml diff --git a/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj b/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj index b77e94a53c..b44a0f75fa 100644 --- a/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj +++ b/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj @@ -2,10 +2,18 @@ + + Debug + Win32 + Debug x64 + + Release + Win32 + Release x64 @@ -19,12 +27,12 @@ PowerToysSetupCustomActions - + DynamicLibrary Unicode v143 - + DynamicLibrary Unicode true @@ -34,67 +42,81 @@ - + - + - - true + $(Platform)\$(Configuration)\ $(SolutionDir)$(ProjectName)\$(Platform)\$(Configuration)\obj\ - + + true + + false - $(Platform)\$(Configuration)\ - $(SolutionDir)$(ProjectName)\$(Platform)\$(Configuration)\obj\ ..\..\src\common\Telemetry;$(IncludePath) + inc;..\..\src\;..\..\src\common\Telemetry;telemetry;$(WIX)sdk\$(WixPlatformToolset)\inc;$(SolutionDir)\packages\WiX.3.11.2\tools\sdk\inc;%(AdditionalIncludeDirectories) /await /Zc:twoPhase- /Wv:18 %(AdditionalOptions) - - - $(WIX)sdk\$(WixPlatformToolset)\lib\x64;$(SolutionDir)\packages\WiX.3.11.2\tools\sdk\vs2017\lib\x64;%(AdditionalLibraryDirectories) - WindowsApp.lib;Newdev.lib;Crypt32.lib;msi.lib;wcautil.lib;Psapi.lib;Pathcch.lib;comsupp.lib;taskschd.lib;Secur32.lib;msi.lib;dutil.lib;wcautil.lib;Version.lib;Shlwapi.lib;%(AdditionalDependencies) - - - - - Disabled - WIN64;_DEBUG;_WINDOWS;_USRDLL;CUSTOMACTIONTEST_EXPORTS;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug Level4 ProgramDatabase + WindowsApp.lib;Newdev.lib;Crypt32.lib;msi.lib;wcautil.lib;Psapi.lib;Pathcch.lib;comsupp.lib;taskschd.lib;Secur32.lib;msi.lib;dutil.lib;wcautil.lib;Version.lib;Shlwapi.lib;%(AdditionalDependencies) CustomAction.def + + + + + + WIN64;%(PreprocessorDefinitions) + + + MachineX64 + $(WIX)sdk\$(WixPlatformToolset)\lib\x64;$(SolutionDir)\packages\WiX.3.11.2\tools\sdk\vs2017\lib\x64;%(AdditionalLibraryDirectories) + + + + + + MachineX86 + $(WIX)sdk\$(WixPlatformToolset)\lib\x86;$(SolutionDir)\packages\WiX.3.11.2\tools\sdk\vs2017\lib\x86;%(AdditionalLibraryDirectories) + + + + + + Disabled + _DEBUG;_WINDOWS;_USRDLL;CUSTOMACTIONTEST_EXPORTS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + true Windows HighestAvailable - + MaxSpeed true - WIN64;NDEBUG;_WINDOWS;_USRDLL;CUSTOMACTIONTEST_EXPORTS;%(PreprocessorDefinitions) + NDEBUG;_WINDOWS;_USRDLL;CUSTOMACTIONTEST_EXPORTS;%(PreprocessorDefinitions) MultiThreaded true - Level4 - ProgramDatabase - CustomAction.def true Windows true true - MachineX64 HighestAvailable diff --git a/src/common/logger/logger.vcxproj b/src/common/logger/logger.vcxproj index 6c5e9b80c7..7d92b81b45 100644 --- a/src/common/logger/logger.vcxproj +++ b/src/common/logger/logger.vcxproj @@ -1,6 +1,32 @@ + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Debug + ARM64 + + + Release + ARM64 + + 16.0 Win32Proj @@ -11,6 +37,7 @@ StaticLibrary v143 + $(SolutionDir)$(Platform)\$(Configuration)\ diff --git a/src/logging/logging.vcxproj b/src/logging/logging.vcxproj index 0844f9e953..6f10fa2a2c 100644 --- a/src/logging/logging.vcxproj +++ b/src/logging/logging.vcxproj @@ -1,12 +1,36 @@  - - x64 - + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Debug + ARM64 + + + Release + ARM64 + + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F} Win32Proj spdlog + 10.0.18362.0 @@ -14,6 +38,7 @@ StaticLibrary MultiByte v143 + $(SolutionDir)$(Platform)\$(Configuration)\ @@ -37,7 +62,7 @@ true - %(AdditionalOptions) /machine:$(Platform) + %(AdditionalOptions)