diff options
author | dotnet-bot <dotnet-bot@microsoft.com> | 2021-10-22 23:16:24 +0300 |
---|---|---|
committer | dotnet-bot <dotnet-bot@microsoft.com> | 2021-10-22 23:16:24 +0300 |
commit | 7211aa01b34bb55ca67bdddd6e80ce23ee201bd2 (patch) | |
tree | f02d0e11ff46947fc9c507ef16cb06121b194850 | |
parent | 88faabc95006b38298b6377380a18b6661a9a2f1 (diff) | |
parent | 65fdc453d54fd172d60e4b7f1aa30f2ee9df8a44 (diff) |
Merge in 'release/5.0' changesv5.0.12
-rw-r--r-- | src/installer/corehost/cli/hostmisc/pal.windows.cpp | 3 | ||||
-rw-r--r-- | src/installer/pkg/packaging/osx/sharedframework/shared-framework-distribution-template.xml | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/installer/corehost/cli/hostmisc/pal.windows.cpp b/src/installer/corehost/cli/hostmisc/pal.windows.cpp index 951700d85a6..666b31b4c95 100644 --- a/src/installer/corehost/cli/hostmisc/pal.windows.cpp +++ b/src/installer/corehost/cli/hostmisc/pal.windows.cpp @@ -407,11 +407,14 @@ bool pal::get_global_dotnet_dirs(std::vector<pal::string_t>* dirs) bool dir_found = false; if (pal::get_dotnet_self_registered_dir(&custom_dir)) { + remove_trailing_dir_seperator(&custom_dir); dirs->push_back(custom_dir); dir_found = true; } if (get_default_installation_dir(&default_dir)) { + remove_trailing_dir_seperator(&default_dir); + // Avoid duplicate global dirs. if (!dir_found || !are_paths_equal_with_normalized_casing(custom_dir, default_dir)) { diff --git a/src/installer/pkg/packaging/osx/sharedframework/shared-framework-distribution-template.xml b/src/installer/pkg/packaging/osx/sharedframework/shared-framework-distribution-template.xml index 74f140436a8..611da4515df 100644 --- a/src/installer/pkg/packaging/osx/sharedframework/shared-framework-distribution-template.xml +++ b/src/installer/pkg/packaging/osx/sharedframework/shared-framework-distribution-template.xml @@ -43,14 +43,18 @@ var machine = system.sysctl("hw.machine"); var cputype = system.sysctl("hw.cputype"); var cpu64 = system.sysctl("hw.cpu64bit_capable"); + var translated = system.sysctl("sysctl.proc_translated"); system.log("Machine type: " + machine); system.log("Cpu type: " + cputype); system.log("64-bit: " + cpu64); + system.log("Translated: " + translated); // From machine.h // CPU_TYPE_X86_64 = CPU_TYPE_X86 | CPU_ARCH_ABI64 = 0x010000007 = 16777223 // CPU_TYPE_X86 = 7 var result = machine == "amd64" || machine == "x86_64" || cputype == "16777223" || (cputype == "7" && cpu64 == "1"); + // We may be running under translation (Rosetta) that makes it seem like system is x64, if so assume machine is not actually x64 + result = result && (translated != "1"); system.log("IsX64Machine: " + result); return result; }]]></script> |