From 69108ceeabe93706622eeacb64caafa2c231a77b Mon Sep 17 00:00:00 2001 From: John Luo Date: Wed, 3 Mar 2021 10:06:36 -0800 Subject: [PATCH] Enable ARM64 installers build. (#25579) (#30463) * Enable ARM64 installers build. (#25579) Changes WiX toolset used to 3.14 to support ARM64 Generates targeting pack from the x86/x64 leg, as it gets produced using a zip that gets generated there. The ARM64 leg now produces all the necessary msi's, exe, and wixlib needed for the installer to generate a bundle. * Build tageting pack installers * Set TP version to 3.1.10 --- .azure/pipelines/ci.yml | 55 ++++++++++++++----- Directory.Build.props | 3 +- Directory.Build.targets | 3 +- eng/Build.props | 17 +++++- eng/Versions.props | 2 +- .../Windows/SharedFramework/Product.wxs | 4 +- .../SharedFramework/SharedFramework.wixproj | 4 ++ .../Windows/SharedFrameworkBundle/Bundle.wxs | 2 + .../SharedFrameworkBundle.wixproj | 43 ++++++++++----- .../Windows/SharedFrameworkLib/Library.wxs | 3 + .../Windows/TargetingPack/Product.wxs | 4 +- .../TargetingPack/TargetingPack.wixproj | 4 +- src/Installers/Windows/Wix.targets | 8 ++- 13 files changed, 115 insertions(+), 37 deletions(-) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index cadffb606473..775a76339919 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -255,21 +255,39 @@ stages: jobName: Windows_64_build jobDisplayName: "Build: Windows ARM64" agentOs: Windows - buildArgs: - -arch arm64 - -sign - -pack - -noBuildNodeJS - -noBuildJava - /bl:artifacts/log/build.win-arm64.binlog - /p:DotNetSignType=$(_SignType) - /p:OnlyPackPlatformSpecificPackages=true - /p:AssetManifestFileName=aspnetcore-win-arm64.xml - $(_BuildArgs) - $(_PublishArgs) - $(_InternalRuntimeDownloadArgs) installNodeJs: false installJdk: false + steps: + - script: ./build.cmd + -ci + -arch arm64 + -sign + -pack + -noBuildJava + -noBuildNative + /p:DotNetSignType=$(_SignType) + /p:OnlyPackPlatformSpecificPackages=true + $(_BuildArgs) + $(_InternalRuntimeDownloadArgs) + /bl:artifacts/log/Release/Build.arm64.binlog + displayName: Build ARM64 + + # Windows installers bundle for arm64 + - script: ./build.cmd + -ci + -noBuildRepoTasks + -arch arm64 + -sign + -buildInstallers + -noBuildNative + /p:DotNetSignType=$(_SignType) + /p:AssetManifestFileName=aspnetcore-win-arm64.xml + $(_BuildArgs) + $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) + /bl:artifacts/log/Release/Build.Installers.Arm64.binlog + displayName: Build Arm64 Installers + artifacts: - name: Windows_arm64_Logs path: artifacts/log/ @@ -280,6 +298,17 @@ stages: - name: Windows_arm64_Installers path: artifacts/installers/ + # A few files must also go to the VS package feed. + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - task: NuGetCommand@2 + displayName: Push Visual Studio packages + inputs: + command: push + packagesToPush: 'artifacts/packages/**/VS.Redist.Common.AspNetCore.*.nupkg' + nuGetFeedType: external + publishFeedCredentials: 'DevDiv - VS package feed' + + # Build MacOS - template: jobs/default-build.yml parameters: diff --git a/Directory.Build.props b/Directory.Build.props index e28025096295..7d0e04d1625b 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -84,7 +84,8 @@ aspnetcore-runtime aspnetcore-targeting-pack - + + true false false diff --git a/Directory.Build.targets b/Directory.Build.targets index ade53fc51d60..417057a3090f 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -57,7 +57,8 @@ - false + + false diff --git a/eng/Build.props b/eng/Build.props index 576ca818a798..2f86a7090c62 100644 --- a/eng/Build.props +++ b/eng/Build.props @@ -60,7 +60,7 @@ - + @@ -74,6 +74,10 @@ + + @@ -87,6 +91,17 @@ + + + + + + + + + + diff --git a/eng/Versions.props b/eng/Versions.props index 99d20fb2aa7c..b24cf893501b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -10,7 +10,7 @@ 1 14 false - + 0 3 2 diff --git a/src/Installers/Windows/SharedFramework/Product.wxs b/src/Installers/Windows/SharedFramework/Product.wxs index 2a71da323a2a..3375094918c0 100644 --- a/src/Installers/Windows/SharedFramework/Product.wxs +++ b/src/Installers/Windows/SharedFramework/Product.wxs @@ -2,7 +2,7 @@ - + @@ -21,7 +21,7 @@ - + diff --git a/src/Installers/Windows/SharedFramework/SharedFramework.wixproj b/src/Installers/Windows/SharedFramework/SharedFramework.wixproj index 1b64c2cbb834..1574f5794ff4 100644 --- a/src/Installers/Windows/SharedFramework/SharedFramework.wixproj +++ b/src/Installers/Windows/SharedFramework/SharedFramework.wixproj @@ -61,12 +61,16 @@ + $(InstallersOutputPath) $(InstallersOutputPath) $(InstallersOutputPath) + $(SharedFrameworkArm64HarvestRootPath)aspnetcore-runtime-internal-$(PackageVersion)-win-arm64.zip $(SharedFrameworkX64HarvestRootPath)aspnetcore-runtime-internal-$(PackageVersion)-win-x64.zip $(SharedFrameworkX86HarvestRootPath)aspnetcore-runtime-internal-$(PackageVersion)-win-x86.zip + + + diff --git a/src/Installers/Windows/SharedFrameworkBundle/SharedFrameworkBundle.wixproj b/src/Installers/Windows/SharedFrameworkBundle/SharedFrameworkBundle.wixproj index 7aa16e58ec00..f9f285c87394 100644 --- a/src/Installers/Windows/SharedFrameworkBundle/SharedFrameworkBundle.wixproj +++ b/src/Installers/Windows/SharedFrameworkBundle/SharedFrameworkBundle.wixproj @@ -29,20 +29,35 @@ - - - SharedFrameworkLib - {5244BC49-2568-4701-80A6-EAB8950AB5FA} - True - True - - - SharedFrameworkLib - {5244BC49-2568-4701-80A6-EAB8950AB5FA} - True - True - - + + + + + SharedFrameworkLib + {5244BC49-2568-4701-80A6-EAB8950AB5FA} + True + True + + + + + + + SharedFrameworkLib + {5244BC49-2568-4701-80A6-EAB8950AB5FA} + True + True + + + SharedFrameworkLib + {5244BC49-2568-4701-80A6-EAB8950AB5FA} + True + True + + + + + diff --git a/src/Installers/Windows/SharedFrameworkLib/Library.wxs b/src/Installers/Windows/SharedFrameworkLib/Library.wxs index dde16acbd7ff..c30f743d0bb3 100644 --- a/src/Installers/Windows/SharedFrameworkLib/Library.wxs +++ b/src/Installers/Windows/SharedFrameworkLib/Library.wxs @@ -16,6 +16,9 @@ + + + - + @@ -21,7 +21,7 @@ - + diff --git a/src/Installers/Windows/TargetingPack/TargetingPack.wixproj b/src/Installers/Windows/TargetingPack/TargetingPack.wixproj index b673cf415236..81e32c53ee42 100644 --- a/src/Installers/Windows/TargetingPack/TargetingPack.wixproj +++ b/src/Installers/Windows/TargetingPack/TargetingPack.wixproj @@ -21,6 +21,8 @@ DDBB771F-963F-47D3-8510-9ABD04DBE1D1 2.0 $(RepoRoot)\src\Installers\Windows\TargetingPack\TargetingPackPackage.nuspec + $(TargetingPackVersionPrefix) + $(TargetingPackVersionPrefix) @@ -61,7 +63,7 @@ $(InstallersOutputPath) - $(TargetingPackHarvestRoot)aspnetcore-targeting-pack-$(PackageVersion).zip + $(TargetingPackHarvestRoot)aspnetcore-targeting-pack-$(TargetingPackVersionPrefix).zip diff --git a/src/Installers/Windows/Wix.targets b/src/Installers/Windows/Wix.targets index dacb9e790439..bb079c09eb32 100644 --- a/src/Installers/Windows/Wix.targets +++ b/src/Installers/Windows/Wix.targets @@ -4,10 +4,16 @@ <_FileRevisionVersion>$(VersionSuffixDateStamp) <_FileRevisionVersion Condition=" '$(_FileRevisionVersion)' == '' ">42424 - $(AspNetCoreMajorMinorVersion).$(AspNetCorePatchVersion).$(_FileRevisionVersion) + $(BundleVersion).$(_FileRevisionVersion) + $(AspNetCoreMajorMinorVersion).$(AspNetCorePatchVersion).$(_FileRevisionVersion) $(BundleVersion) + + + $(DefineConstants);InstallerVersion=500 + $(DefineConstants);InstallerVersion=200 + $(DefineConstants);MajorVersion=$(AspNetCoreMajorVersion) $(DefineConstants);MinorVersion=$(AspNetCoreMinorVersion) $(DefineConstants);Version=$(Version)