From efcf8a5eddf1ddb562a01b709a918493d5de0255 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Thu, 2 Sep 2021 09:33:59 -0700 Subject: [PATCH 1/7] Retarget DOTNETHOME when installing x64 on ARM64 --- .../packaging/windows/clisdk/bundle.wxs | 37 +++++++++++++++---- .../packaging/windows/clisdk/dotnet.wxs | 10 ++--- .../windows/clisdk/dotnethome_x64.wxs | 34 +++++++++++++++++ .../windows/clisdk/generatemanifestsmsi.ps1 | 2 + .../packaging/windows/clisdk/generatemsi.ps1 | 2 + .../windows/clisdk/generatetemplatesmsi.ps1 | 2 + .../packaging/windows/clisdk/manifests.wxs | 4 ++ .../packaging/windows/clisdk/registrykeys.wxs | 3 ++ .../packaging/windows/clisdk/templates.wxs | 4 ++ 9 files changed, 84 insertions(+), 14 deletions(-) create mode 100644 src/redist/targets/packaging/windows/clisdk/dotnethome_x64.wxs diff --git a/src/redist/targets/packaging/windows/clisdk/bundle.wxs b/src/redist/targets/packaging/windows/clisdk/bundle.wxs index b433f6444..a2dfa73ee 100644 --- a/src/redist/targets/packaging/windows/clisdk/bundle.wxs +++ b/src/redist/targets/packaging/windows/clisdk/bundle.wxs @@ -56,7 +56,7 @@ Variable="DOTNETHOME_X86" Path="[ProgramFilesFolder]dotnet"/> - + - - + + + + - + + + + + - - - diff --git a/src/redist/targets/packaging/windows/clisdk/dotnet.wxs b/src/redist/targets/packaging/windows/clisdk/dotnet.wxs index 4c4c9fcc8..257b00329 100644 --- a/src/redist/targets/packaging/windows/clisdk/dotnet.wxs +++ b/src/redist/targets/packaging/windows/clisdk/dotnet.wxs @@ -29,12 +29,6 @@ - - - - - - + + + + diff --git a/src/redist/targets/packaging/windows/clisdk/dotnethome_x64.wxs b/src/redist/targets/packaging/windows/clisdk/dotnethome_x64.wxs new file mode 100644 index 000000000..4cb6b5138 --- /dev/null +++ b/src/redist/targets/packaging/windows/clisdk/dotnethome_x64.wxs @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + NOT %PROCESSOR_ARCHITECTURE="$(var.InstallerArchitecture)" + + + + + + + + INSTALLING_IN_EMULATION AND NOT DOTNETHOME + + + + \ No newline at end of file diff --git a/src/redist/targets/packaging/windows/clisdk/generatemanifestsmsi.ps1 b/src/redist/targets/packaging/windows/clisdk/generatemanifestsmsi.ps1 index 4ef97e1dc..bef841dc2 100644 --- a/src/redist/targets/packaging/windows/clisdk/generatemanifestsmsi.ps1 +++ b/src/redist/targets/packaging/windows/clisdk/generatemanifestsmsi.ps1 @@ -65,6 +65,7 @@ function RunCandle -ext WixDependencyExtension.dll ` "$PSScriptRoot\manifests.wxs" ` "$PSScriptRoot\provider.wxs" ` + "$PSScriptRoot\dotnethome_x64.wxs" ` $InstallFileswsx Write-Information "Candle output: $candleOutput" @@ -91,6 +92,7 @@ function RunLight -cultures:en-us ` manifests.wixobj ` provider.wixobj ` + dotnethome_x64.wixobj ` $InstallFilesWixobj ` -b "$inputDir" ` -b "$PSScriptRoot" ` diff --git a/src/redist/targets/packaging/windows/clisdk/generatemsi.ps1 b/src/redist/targets/packaging/windows/clisdk/generatemsi.ps1 index bfddd68a8..c3c98a52f 100644 --- a/src/redist/targets/packaging/windows/clisdk/generatemsi.ps1 +++ b/src/redist/targets/packaging/windows/clisdk/generatemsi.ps1 @@ -71,6 +71,7 @@ function RunCandle -arch "$Architecture" ` -ext WixDependencyExtension.dll ` "$PSScriptRoot\dotnet.wxs" ` + "$PSScriptRoot\dotnethome_x64.wxs" ` "$PSScriptRoot\provider.wxs" ` "$PSScriptRoot\registrykeys.wxs" ` $InstallFileswsx @@ -98,6 +99,7 @@ function RunLight $lightOutput = .\light.exe -nologo -ext WixUIExtension -ext WixDependencyExtension -ext WixUtilExtension ` -cultures:en-us ` dotnet.wixobj ` + dotnethome_x64.wixobj ` provider.wixobj ` registrykeys.wixobj ` $InstallFilesWixobj ` diff --git a/src/redist/targets/packaging/windows/clisdk/generatetemplatesmsi.ps1 b/src/redist/targets/packaging/windows/clisdk/generatetemplatesmsi.ps1 index 151767c7e..ecbb68ba6 100644 --- a/src/redist/targets/packaging/windows/clisdk/generatetemplatesmsi.ps1 +++ b/src/redist/targets/packaging/windows/clisdk/generatetemplatesmsi.ps1 @@ -63,6 +63,7 @@ function RunCandle -dDependencyKeyName="$DependencyKeyName" ` -arch "$Architecture" ` -ext WixDependencyExtension.dll ` + "$PSScriptRoot\dotnethome_x64.wxs" ` "$PSScriptRoot\templates.wxs" ` "$PSScriptRoot\provider.wxs" ` $InstallFileswsx @@ -89,6 +90,7 @@ function RunLight $lightOutput = .\light.exe -nologo -ext WixUIExtension -ext WixDependencyExtension -ext WixUtilExtension ` -cultures:en-us ` + dotnethome_x64.wixobj ` templates.wixobj ` provider.wixobj ` $InstallFilesWixobj ` diff --git a/src/redist/targets/packaging/windows/clisdk/manifests.wxs b/src/redist/targets/packaging/windows/clisdk/manifests.wxs index a2ef49c4b..e2b89dd86 100644 --- a/src/redist/targets/packaging/windows/clisdk/manifests.wxs +++ b/src/redist/targets/packaging/windows/clisdk/manifests.wxs @@ -32,5 +32,9 @@ + + + + diff --git a/src/redist/targets/packaging/windows/clisdk/registrykeys.wxs b/src/redist/targets/packaging/windows/clisdk/registrykeys.wxs index a84391c81..2a189786f 100644 --- a/src/redist/targets/packaging/windows/clisdk/registrykeys.wxs +++ b/src/redist/targets/packaging/windows/clisdk/registrykeys.wxs @@ -15,6 +15,9 @@ + VersionNT64 AND DOTNETHOME_ARM64 diff --git a/src/redist/targets/packaging/windows/clisdk/templates.wxs b/src/redist/targets/packaging/windows/clisdk/templates.wxs index a2ef49c4b..e2b89dd86 100644 --- a/src/redist/targets/packaging/windows/clisdk/templates.wxs +++ b/src/redist/targets/packaging/windows/clisdk/templates.wxs @@ -32,5 +32,9 @@ + + + + From cf2914d14a967cece7b8259a26984ba7371a2917 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Thu, 2 Sep 2021 11:18:34 -0700 Subject: [PATCH 2/7] Ensure case insensitive comparisons against Platform --- .../targets/packaging/windows/clisdk/dotnethome_x64.wxs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/redist/targets/packaging/windows/clisdk/dotnethome_x64.wxs b/src/redist/targets/packaging/windows/clisdk/dotnethome_x64.wxs index 4cb6b5138..ab939cdc4 100644 --- a/src/redist/targets/packaging/windows/clisdk/dotnethome_x64.wxs +++ b/src/redist/targets/packaging/windows/clisdk/dotnethome_x64.wxs @@ -8,10 +8,10 @@ - + - - + + From 771924914b90546e39fb7086f49b889afced892a Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Thu, 2 Sep 2021 15:58:25 -0700 Subject: [PATCH 3/7] Make platform comparison case insensitive --- .../packaging/windows/clisdk/dotnethome_x64.wxs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/redist/targets/packaging/windows/clisdk/dotnethome_x64.wxs b/src/redist/targets/packaging/windows/clisdk/dotnethome_x64.wxs index ab939cdc4..ab3a6bab0 100644 --- a/src/redist/targets/packaging/windows/clisdk/dotnethome_x64.wxs +++ b/src/redist/targets/packaging/windows/clisdk/dotnethome_x64.wxs @@ -7,11 +7,11 @@ - - - - - + + + + + From 2fa338adf00ec285c20c05f1c804be0db3668913 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Fri, 3 Sep 2021 15:41:34 -0700 Subject: [PATCH 4/7] Address feedback --- .../packaging/windows/clisdk/bundle.wxs | 3 +++ .../packaging/windows/clisdk/dotnet.wxs | 4 +-- .../windows/clisdk/dotnethome_x64.wxs | 26 +++++++++++-------- .../packaging/windows/clisdk/manifests.wxs | 4 +-- .../packaging/windows/clisdk/templates.wxs | 4 +-- 5 files changed, 24 insertions(+), 17 deletions(-) diff --git a/src/redist/targets/packaging/windows/clisdk/bundle.wxs b/src/redist/targets/packaging/windows/clisdk/bundle.wxs index a2dfa73ee..ec6be155f 100644 --- a/src/redist/targets/packaging/windows/clisdk/bundle.wxs +++ b/src/redist/targets/packaging/windows/clisdk/bundle.wxs @@ -145,6 +145,9 @@ Example: dotnet-sdk-3.0.100-alpha1-009719-win-x64.exe /install DOTNETHOME_X64="D:\dotnet\x64" DOTNETHOME_X86="D:\dotnet\x86" /log "installation.log" /quiet /norestart --> + + + diff --git a/src/redist/targets/packaging/windows/clisdk/dotnet.wxs b/src/redist/targets/packaging/windows/clisdk/dotnet.wxs index 257b00329..d178b967b 100644 --- a/src/redist/targets/packaging/windows/clisdk/dotnet.wxs +++ b/src/redist/targets/packaging/windows/clisdk/dotnet.wxs @@ -54,8 +54,8 @@ - - + + diff --git a/src/redist/targets/packaging/windows/clisdk/dotnethome_x64.wxs b/src/redist/targets/packaging/windows/clisdk/dotnethome_x64.wxs index ab3a6bab0..5e30f9871 100644 --- a/src/redist/targets/packaging/windows/clisdk/dotnethome_x64.wxs +++ b/src/redist/targets/packaging/windows/clisdk/dotnethome_x64.wxs @@ -1,33 +1,37 @@ - - - + + + - + + + ? - + NOT %PROCESSOR_ARCHITECTURE="$(var.InstallerArchitecture)" - - + + - - - INSTALLING_IN_EMULATION AND NOT DOTNETHOME + + + NON_NATIVE_ARCHITECTURE AND NOT DOTNETHOME diff --git a/src/redist/targets/packaging/windows/clisdk/manifests.wxs b/src/redist/targets/packaging/windows/clisdk/manifests.wxs index e2b89dd86..27a3017d0 100644 --- a/src/redist/targets/packaging/windows/clisdk/manifests.wxs +++ b/src/redist/targets/packaging/windows/clisdk/manifests.wxs @@ -33,8 +33,8 @@ - - + + diff --git a/src/redist/targets/packaging/windows/clisdk/templates.wxs b/src/redist/targets/packaging/windows/clisdk/templates.wxs index e2b89dd86..27a3017d0 100644 --- a/src/redist/targets/packaging/windows/clisdk/templates.wxs +++ b/src/redist/targets/packaging/windows/clisdk/templates.wxs @@ -33,8 +33,8 @@ - - + + From 18e37593613cedbc7de447cc406454b989922d72 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Mon, 13 Sep 2021 15:26:02 -0700 Subject: [PATCH 5/7] Ensure Tag is installed DOTNETHOME may not always be set, be sure to install the tag to a predictable location. --- src/redist/targets/packaging/windows/clisdk/bundle.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redist/targets/packaging/windows/clisdk/bundle.wxs b/src/redist/targets/packaging/windows/clisdk/bundle.wxs index ec6be155f..9536b46ec 100644 --- a/src/redist/targets/packaging/windows/clisdk/bundle.wxs +++ b/src/redist/targets/packaging/windows/clisdk/bundle.wxs @@ -27,7 +27,7 @@ - + Date: Tue, 14 Sep 2021 12:08:43 -0700 Subject: [PATCH 6/7] Remove TODO --- src/redist/targets/packaging/windows/clisdk/registrykeys.wxs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/redist/targets/packaging/windows/clisdk/registrykeys.wxs b/src/redist/targets/packaging/windows/clisdk/registrykeys.wxs index 2a189786f..a84391c81 100644 --- a/src/redist/targets/packaging/windows/clisdk/registrykeys.wxs +++ b/src/redist/targets/packaging/windows/clisdk/registrykeys.wxs @@ -15,9 +15,6 @@ - VersionNT64 AND DOTNETHOME_ARM64 From 4ce025c05ce79832fb91011f8e0558904c4c3bbb Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Wed, 15 Sep 2021 14:19:41 -0700 Subject: [PATCH 7/7] Make CLISDK MSI set the InstallLocation when bundle does not We changed the bundle to not pass in default values for DOTNETHOME because it cannot calculate them in all cases: there is no way to conditionally set a path which does not exist. As a result, the MSI needs to calculate them so that it can write the appropriate defaults. --- .../packaging/windows/clisdk/bundle.wxs | 10 +++-- .../packaging/windows/clisdk/registrykeys.wxs | 42 +++++++++++++++++++ 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/src/redist/targets/packaging/windows/clisdk/bundle.wxs b/src/redist/targets/packaging/windows/clisdk/bundle.wxs index 9536b46ec..a8271d4e6 100644 --- a/src/redist/targets/packaging/windows/clisdk/bundle.wxs +++ b/src/redist/targets/packaging/windows/clisdk/bundle.wxs @@ -11,11 +11,16 @@ Compressed="yes"> - WixBundleInstalled OR ((NOT (DOTNETHOME_X64 ~= DOTNETHOME_X86)) OR DOTNETHOMESIMILARITYCHECKOVERRIDE) + WixBundleInstalled OR (NOT DOTNETHOME_X64 ~= DOTNETHOME_X86) OR DOTNETHOMESIMILARITYCHECKOVERRIDE - WixBundleInstalled OR ((NOT (DOTNETHOME_ARM64 ~= DOTNETHOME_X86)) OR DOTNETHOMESIMILARITYCHECKOVERRIDE) + WixBundleInstalled OR (NOT DOTNETHOME_ARM64 ~= DOTNETHOME_X86) OR DOTNETHOMESIMILARITYCHECKOVERRIDE + + + + + WixBundleInstalled OR (NOT DOTNETHOME_ARM64 ~= DOTNETHOME_X64) OR (NOT NativeProcessorArchitecture="ARM64") OR DOTNETHOMESIMILARITYCHECKOVERRIDE @@ -75,7 +80,6 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NOT DOTNETHOME_X86 AND DOTNETHOME_X86_SEARCH + + + NOT DOTNETHOME_X64 AND DOTNETHOME_X64_SEARCH AND %PROCESSOR_ARCHITECTURE="AMD64" + + + NOT DOTNETHOME_X64 AND DOTNETHOME_X64_ALT_SEARCH AND NOT %PROCESSOR_ARCHITECTURE="AMD64" + + + NOT DOTNETHOME_ARM64 AND DOTNETHOME_ARM64_SEARCH + +