Skip to content

Commit

Permalink
[ARM64] Use system-wide WiX toolset instead of a nuget package
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyoyuppe committed May 26, 2022
1 parent 4781084 commit 332bbb6
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 97 deletions.
56 changes: 17 additions & 39 deletions installer/PowerToysSetup.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,68 +16,46 @@ 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|ARM64.ActiveCfg = Debug|ARM64
{022A9D30-7C4F-416D-A9DF-5FF2661CC0AD}.Debug|ARM64.Build.0 = Debug|ARM64
{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|ARM64.ActiveCfg = Release|ARM64
{022A9D30-7C4F-416D-A9DF-5FF2661CC0AD}.Release|ARM64.Build.0 = Release|ARM64
{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|ARM64.ActiveCfg = Debug|ARM64
{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|ARM64.ActiveCfg = Release|ARM64
{32F3882B-F2D6-4586-B5ED-11E39E522BD3}.Release|ARM64.Build.0 = Release|ARM64
{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|ARM64.ActiveCfg = Debug|ARM64
{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|ARM64.ActiveCfg = Release|ARM64
{7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|ARM64.Build.0 = Release|ARM64
{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|ARM64.ActiveCfg = Debug|ARM64
{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|ARM64.ActiveCfg = Release|ARM64
{D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|ARM64.Build.0 = Release|ARM64
{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|x86
{31D72625-43C1-41B1-B784-BCE4A8DC5543}.Debug|ARM64.Build.0 = Debug|x86
{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|ARM64.ActiveCfg = Debug|ARM64
{31D72625-43C1-41B1-B784-BCE4A8DC5543}.Debug|ARM64.Build.0 = Debug|ARM64
{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|x86
{31D72625-43C1-41B1-B784-BCE4A8DC5543}.Release|ARM64.Build.0 = Release|x86
{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|ARM64.ActiveCfg = Release|ARM64
{31D72625-43C1-41B1-B784-BCE4A8DC5543}.Release|ARM64.Build.0 = Release|ARM64
{31D72625-43C1-41B1-B784-BCE4A8DC5543}.Release|x64.ActiveCfg = Release|x64
{31D72625-43C1-41B1-B784-BCE4A8DC5543}.Release|x64.Build.0 = Release|x64
EndGlobalSection
Expand Down
17 changes: 7 additions & 10 deletions installer/PowerToysSetup/PowerToysBootstrapper.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
DefaultTargets="Build"
InitialTargets="EnsureNuGetPackageBuildImports"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\WiX.3.11.2\build\wix.props"
Condition="Exists('..\packages\WiX.3.11.2\build\wix.props')" />
<Import Project="..\wix.props"
Condition="Exists('..\wix.props')" />
<Import Project="..\..\src\Version.props" />
<PropertyGroup>
<DefineConstants>Version=$(Version)</DefineConstants>
Expand All @@ -14,17 +14,14 @@
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform Condition="'$(Platform)'=='x64'">x64</Platform>
<Platform Condition="'$(Platform)'!='x64'">x86</Platform>
<Platform Condition="'$(Platform)'!='x64'">arm64</Platform>
<ProductVersion>3.10</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>PowerToysSetup-$(Version)-$(Platform)</OutputName>
<OutputType>Bundle</OutputType>
<SuppressAclReset>True</SuppressAclReset>
<!-- TODO: Remove hacks for arm64 after we adopt a Wix version that supports it -->
<OutputName Condition="'$(Platform)'=='x86'">PowerToysSetup-$(Version)-arm64</OutputName>
<OutputName Condition="'$(Platform)'!='x86'">PowerToysSetup-$(Version)-$(Platform)</OutputName>
<OutputPath Condition="'$(Platform)'=='x86'">arm64\$(Configuration)\</OutputPath>
<OutputPath Condition="'$(Platform)'!='x86'">$(Platform)\$(Configuration)\</OutputPath>
<OutputName>PowerToysSetup-$(Version)-$(Platform)</OutputName>
<OutputPath>$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
<NuGetPackageImportStamp />
</PropertyGroup>
Expand Down Expand Up @@ -68,7 +65,7 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\WiX.3.11.2\build\wix.props')"
Text="$([System.String]::Format('$(ErrorText)', '..\packages\WiX.3.11.2\build\wix.props'))" />
<Error Condition="!Exists('..\wix.props')"
Text="$([System.String]::Format('$(ErrorText)', '..\wix.props'))" />
</Target>
</Project>
11 changes: 4 additions & 7 deletions installer/PowerToysSetup/PowerToysInstaller.wixproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureNuGetPackageBuildImports" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\WiX.3.11.2\build\wix.props" Condition="Exists('..\packages\WiX.3.11.2\build\wix.props')" />
<Import Project="..\wix.props" Condition="Exists('..\wix.props')" />
<Import Project="..\..\src\Version.props" />

<PropertyGroup Condition="'$(Platform)' == 'x64'">
Expand Down Expand Up @@ -35,17 +35,14 @@ call "..\..\publish.cmd" arm64
<ProductVersion>3.10</ProductVersion>
<ProjectGuid>022a9d30-7c4f-416d-a9df-5ff2661cc0ad</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<!-- TODO: Remove hacks for arm64 after we adopt a Wix version that supports it -->
<OutputName Condition="'$(Platform)'=='x86'">PowerToysSetup-$(Version)-arm64</OutputName>
<OutputName Condition="'$(Platform)'!='x86'">PowerToysSetup-$(Version)-$(Platform)</OutputName>
<OutputName>PowerToysSetup-$(Version)-$(Platform)</OutputName>
<OutputType>Package</OutputType>
<SuppressAclReset>True</SuppressAclReset>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup>
<OutputPath Condition="'$(Platform)'=='x86'">arm64\$(Configuration)\</OutputPath>
<OutputPath Condition="'$(Platform)'!='x86'">$(Platform)\$(Configuration)\</OutputPath>
<OutputPath>$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
<SuppressIces>ICE91</SuppressIces>
<SuppressValidation>True</SuppressValidation>
Expand Down Expand Up @@ -96,7 +93,7 @@ call "..\..\publish.cmd" arm64
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\WiX.3.11.2\build\wix.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\WiX.3.11.2\build\wix.props'))" />
<Error Condition="!Exists('..\wix.props')" Text="$([System.String]::Format('$(ErrorText)', '..\wix.props'))" />
</Target>
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
4 changes: 3 additions & 1 deletion installer/PowerToysSetup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@

<?define RepoDir="$(var.ProjectDir)..\..\" ?>
<?if $(var.Platform) = x64?>
<?define PlatformLK="x64" ?>
<?define BinDir="$(var.RepoDir)x64\$(var.Configuration)\" ?>
<?else?>
<?define PlatformLK="arm64" ?>
<?define BinDir="$(var.RepoDir)ARM64\$(var.Configuration)\" ?>
<?endif?>
<?define BinX32Dir="$(var.RepoDir)x86\$(var.Configuration)\" ?>
Expand Down Expand Up @@ -111,7 +113,7 @@
Manufacturer="Microsoft Corporation"
UpgradeCode="42B84BF7-5FBF-473B-9C8B-049DC16F7708">

<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" InstallPrivileges="elevated" Platform="$(var.Platform)" />
<Package InstallerVersion="500" Compressed="yes" InstallScope="perMachine" InstallPrivileges="elevated" Platform="$(var.PlatformLK)" />

<MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed." />

Expand Down
1 change: 0 additions & 1 deletion installer/PowerToysSetup/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="WiX" version="3.11.2" />
</packages>
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" InitialTargets="EnsureNuGetPackageBuildImports" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\WiX.3.11.2\build\wix.props" Condition="Exists('..\packages\WiX.3.11.2\build\wix.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\wix.props"
Condition="Exists('..\wix.props')" />
<PropertyGroup Label="Globals">
<ProjectGuid>{32f3882b-f2d6-4586-b5ed-11e39e522bd3}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
Expand Down Expand Up @@ -63,7 +46,7 @@

<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>inc;..\..\src\;..\..\src\common\Telemetry;telemetry;$(WIX)sdk\$(WixPlatformToolset)\inc;$(SolutionDir)\packages\WiX.3.11.2\tools\sdk\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>inc;..\..\src\;..\..\src\common\Telemetry;telemetry;$(WixSdkPath)VS2017\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/await /Zc:twoPhase- /Wv:18 %(AdditionalOptions)</AdditionalOptions>
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
Expand All @@ -73,24 +56,16 @@
<ModuleDefinitionFile>CustomAction.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)'=='x64'">

<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<TargetMachine>MachineX64</TargetMachine>
<AdditionalLibraryDirectories>$(WIX)sdk\$(WixPlatformToolset)\lib\x64;$(SolutionDir)\packages\WiX.3.11.2\tools\sdk\vs2017\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(WixSdkPath)VS2017\lib\$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>

<ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
<Link>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalLibraryDirectories>$(WIX)sdk\$(WixPlatformToolset)\lib\x86;$(SolutionDir)\packages\WiX.3.11.2\tools\sdk\vs2017\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>

<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<Optimization>Disabled</Optimization>
Expand Down Expand Up @@ -153,10 +128,4 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\WiX.3.11.2\build\wix.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\WiX.3.11.2\build\wix.props'))" />
</Target>
</Project>
1 change: 0 additions & 1 deletion installer/PowerToysSetupCustomActions/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="WiX" version="3.11.2" targetFramework="native" />
</packages>
14 changes: 14 additions & 0 deletions installer/wix.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WixInstallPath>C:\Program Files (x86)\WiX Toolset v3.14\bin\</WixInstallPath>
<WixExtDir>$(WixInstallPath)\</WixExtDir>

<WixTargetsPath>$(WixInstallPath)\..\wix.targets</WixTargetsPath>
<LuxTargetsPath>$(WixInstallPath)\..\lux.targets</LuxTargetsPath>

<WixTasksPath>$(WixInstallPath)\WixTasks.dll</WixTasksPath>
<WixSdkPath>$(WixInstallPath)\..\sdk\</WixSdkPath>
<WixCATargetsPath>$(WixSdkPath)\..\wix.ca.targets</WixCATargetsPath>
</PropertyGroup>
</Project>

0 comments on commit 332bbb6

Please sign in to comment.