|
| 1 | +From a2e9089dca596cacf235242fbfb3189d3f037b68 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Viktor Hofer < [email protected]> |
| 3 | +Date: Wed, 27 Nov 2024 10:32:11 +0100 |
| 4 | +Subject: [PATCH] Set target platform for wixproj and vcxproj correctly |
| 5 | + |
| 6 | +wixprojs allow x86, x64 and arm64 (idetical to the TargetArchitecture platform) |
| 7 | +vcxprojs allow Win32, x64 and ARM64 |
| 8 | + |
| 9 | +Backport: https://github.com/dotnet/aspnetcore/pull/59194 |
| 10 | + |
| 11 | +--- |
| 12 | + eng/Build.props | 19 ++++++++++--------- |
| 13 | + .../SharedFrameworkBundle.wixproj | 2 +- |
| 14 | + 2 files changed, 11 insertions(+), 10 deletions(-) |
| 15 | + |
| 16 | +diff --git a/eng/Build.props b/eng/Build.props |
| 17 | +index b3ead4d694..7828cca441 100644 |
| 18 | +--- a/eng/Build.props |
| 19 | ++++ b/eng/Build.props |
| 20 | +@@ -218,9 +218,10 @@ |
| 21 | + <!-- BuildInstallers --> |
| 22 | + <PropertyGroup> |
| 23 | + <_BuildWindowsInstallers Condition="'$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64' OR '$(TargetArchitecture)' == 'arm64') ">true</_BuildWindowsInstallers> |
| 24 | +- <_WixTargetPlatform Condition="'$(TargetArchitecture)' == 'x86' ">Win32</_WixTargetPlatform> |
| 25 | +- <_WixTargetPlatform Condition="'$(TargetArchitecture)' == 'x64' ">x64</_WixTargetPlatform> |
| 26 | +- <_WixTargetPlatform Condition="'$(TargetArchitecture)' == 'arm64' ">ARM64</_WixTargetPlatform> |
| 27 | ++ |
| 28 | ++ <_VcxTargetPlatform Condition="'$(TargetArchitecture)' == 'x86'">Win32</_VcxTargetPlatform> |
| 29 | ++ <_VcxTargetPlatform Condition="'$(TargetArchitecture)' == 'x64'">x64</_VcxTargetPlatform> |
| 30 | ++ <_VcxTargetPlatform Condition="'$(TargetArchitecture)' == 'arm64'">ARM64</_VcxTargetPlatform> |
| 31 | + </PropertyGroup> |
| 32 | + |
| 33 | + <ItemGroup Condition="'$(DotNetBuild)' != 'true' and '$(_BuildWindowsInstallers)' == 'true' "> |
| 34 | +@@ -262,16 +263,16 @@ |
| 35 | + <!-- In a vertical build, only build the MSIs for the current vertical in the first pass and build the hosting bundle in the second pass --> |
| 36 | + <ItemGroup Condition="'$(DotNetBuild)' == 'true' and ('$(DotNetBuildPass)' == '' or '$(DotNetBuildPass)' == '1') and '$(_BuildWindowsInstallers)' == 'true'"> |
| 37 | + <!-- Build the ANCM custom action --> |
| 38 | +- <InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" /> |
| 39 | ++ <InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=$(_VcxTargetPlatform)" /> |
| 40 | + <!-- Build the ANCM msis --> |
| 41 | +- <InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" /> |
| 42 | +- <InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMV2\ANCMV2.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" /> |
| 43 | ++ <InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj" AdditionalProperties="Platform=$(TargetArchitecture)" /> |
| 44 | ++ <InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMV2\ANCMV2.wixproj" AdditionalProperties="Platform=$(TargetArchitecture)" /> |
| 45 | + <!-- Build the targeting pack installers --> |
| 46 | +- <InstallerProject Include="$(RepoRoot)src\Installers\Windows\TargetingPack\TargetingPack.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" /> |
| 47 | ++ <InstallerProject Include="$(RepoRoot)src\Installers\Windows\TargetingPack\TargetingPack.wixproj" AdditionalProperties="Platform=$(TargetArchitecture)" /> |
| 48 | + <!-- Build the SharedFramework installers --> |
| 49 | +- <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" /> |
| 50 | ++ <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=$(TargetArchitecture)" /> |
| 51 | + <!-- Build the SharedFramework wixlib --> |
| 52 | +- <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkLib\SharedFrameworkLib.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" /> |
| 53 | ++ <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkLib\SharedFrameworkLib.wixproj" AdditionalProperties="Platform=$(TargetArchitecture)" /> |
| 54 | + </ItemGroup> |
| 55 | + |
| 56 | + <ItemGroup Condition="'$(DotNetBuild)' == 'true' and ('$(DotNetBuildPass)' == '2') and '$(TargetOsName)' == 'win' and '$(TargetArchitecture)' == 'x64'"> |
| 57 | +diff --git a/src/Installers/Windows/SharedFrameworkBundle/SharedFrameworkBundle.wixproj b/src/Installers/Windows/SharedFrameworkBundle/SharedFrameworkBundle.wixproj |
| 58 | +index c308442b3f..a0782dea75 100644 |
| 59 | +--- a/src/Installers/Windows/SharedFrameworkBundle/SharedFrameworkBundle.wixproj |
| 60 | ++++ b/src/Installers/Windows/SharedFrameworkBundle/SharedFrameworkBundle.wixproj |
| 61 | +@@ -48,7 +48,7 @@ |
| 62 | + <ItemGroup> |
| 63 | + <ProjectReference Include="..\SharedFrameworkLib\SharedFrameworkLib.wixproj" |
| 64 | + SetPlatform="Platform=x86" |
| 65 | +- Condition="'$(DotNetBuild)' != 'true' or '$(Platform)' == 'Win32'"> |
| 66 | ++ Condition="'$(DotNetBuild)' != 'true' or '$(Platform)' == 'x86'"> |
| 67 | + <Name>SharedFrameworkLib</Name> |
| 68 | + <Project>{5244BC49-2568-4701-80A6-EAB8950AB5FA}</Project> |
| 69 | + <Private>True</Private> |
0 commit comments