-
Notifications
You must be signed in to change notification settings - Fork 437
Add x64 emulation support to pkg installers #11813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
sfoslund
merged 6 commits into
dotnet:release/6.0.1xx-rc2
from
sfoslund:MacInstallersChoice
Sep 20, 2021
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2ebbcc5
Add x64 emulation support to pkg installers
sfoslund e8ec98a
Update x64 machine detection script
sfoslund 2016fa8
Add comments to x64 machine detection script
sfoslund 41187bd
Fix typo in mac installer generation script
sfoslund f2da3b6
Account for translated pkg execution
sfoslund 94eb884
Add comment for translation check
sfoslund File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 101 additions & 0 deletions
101
src/redist/targets/packaging/osx/clisdk/Distribution-Template-x64
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| <?xml version="1.0" encoding="utf-8" standalone="no"?> | ||
| <installer-gui-script minSpecVersion="1"> | ||
| <title>{CLISdkBrandName} ({arch})</title> | ||
| <background file="dotnetbackground.png" mime-type="image/png"/> | ||
| <options customize="never" require-scripts="false" hostArchitectures="{hostArchitectures}" /> | ||
| <welcome file="welcome.html" mime-type="text/html" /> | ||
| <conclusion file="conclusion.html" mime-type="text/html" /> | ||
| <volume-check> | ||
| <allowed-os-versions> | ||
| <os-version min="{minOsVersion}" /> | ||
| </allowed-os-versions> | ||
| </volume-check> | ||
| <choices-outline> | ||
| <line choice="{NetCoreAppTargetingPackComponentId}.pkg.x64" /> | ||
| <line choice="{NetStandardTargetingPackComponentId}.pkg.x64" /> | ||
| <line choice="{NetCoreAppHostPackComponentId}.pkg.x64" /> | ||
| <line choice="{SharedFxComponentId}.pkg.x64" /> | ||
| <line choice="{HostFxrComponentId}.pkg.x64" /> | ||
| <line choice="{SharedHostComponentId}.pkg.x64" /> | ||
| <line choice="{CLISdkComponentId}.pkg.x64"/> | ||
| <line choice="{NetCoreAppTargetingPackComponentId}.pkg.arm64" /> | ||
| <line choice="{NetStandardTargetingPackComponentId}.pkg.arm64" /> | ||
| <line choice="{NetCoreAppHostPackComponentId}.pkg.arm64" /> | ||
| <line choice="{SharedFxComponentId}.pkg.arm64" /> | ||
| <line choice="{HostFxrComponentId}.pkg.arm64" /> | ||
| <line choice="{SharedHostComponentId}.pkg.arm64" /> | ||
| <line choice="{CLISdkComponentId}.pkg.arm64"/> | ||
| </choices-outline> | ||
| <choice id="{NetCoreAppTargetingPackComponentId}.pkg.x64" visible="true" selected="IsX64Machine()" title="{NetCoreAppTargetingPackBrandName} ({arch})" description="The .NET Targeting Pack"> | ||
| <pkg-ref id="{NetCoreAppTargetingPackComponentId}.pkg" /> | ||
| </choice> | ||
| <choice id="{NetStandardTargetingPackComponentId}.pkg.x64" visible="true" selected="IsX64Machine()" title="{NetStandardTargetingPackBrandName} ({arch})" description="The .NET Standard 2.1 Targeting Pack"> | ||
| <pkg-ref id="{NetStandardTargetingPackComponentId}.pkg" /> | ||
| </choice> | ||
| <choice id="{NetCoreAppHostPackComponentId}.pkg.x64" visible="true" selected="IsX64Machine()" title="{NetCoreAppHostPackBrandName} ({arch})" description="The .NET App Host Pack"> | ||
| <pkg-ref id="{NetCoreAppHostPackComponentId}.pkg" /> | ||
| </choice> | ||
| <choice id="{SharedFxComponentId}.pkg.x64" visible="true" selected="IsX64Machine()" title="{SharedFxBrandName} ({arch})" description="The .NET Shared Framework"> | ||
| <pkg-ref id="{SharedFxComponentId}.pkg" /> | ||
| </choice> | ||
| <choice id="{HostFxrComponentId}.pkg.x64" visible="true" selected="IsX64Machine()" title="{HostFxrBrandName} ({arch})" description="The .NET Host FX Resolver"> | ||
| <pkg-ref id="{HostFxrComponentId}.pkg" /> | ||
| </choice> | ||
| <choice id="{SharedHostComponentId}.pkg.x64" visible="true" selected="IsX64Machine()" title="{SharedHostBrandName} ({arch})" description="The .NET Shared Host."> | ||
| <pkg-ref id="{SharedHostComponentId}.pkg" /> | ||
| </choice> | ||
| <choice id="{CLISdkComponentId}.pkg.x64" visible="true" selected="IsX64Machine()" title="{CLISdkBrandName} ({arch})" description="The .NET SDK"> | ||
| <pkg-ref id="{CLISdkComponentId}.pkg"/> | ||
| </choice> | ||
| <choice id="{NetCoreAppTargetingPackComponentId}.pkg.arm64" visible="true" selected="!IsX64Machine()" customLocation="{x64EmulationPkgInstallDirectory}" title="{NetCoreAppTargetingPackBrandName} ({arch})" description="The .NET Targeting Pack"> | ||
| <pkg-ref id="{NetCoreAppTargetingPackComponentId}.pkg" /> | ||
| </choice> | ||
| <choice id="{NetStandardTargetingPackComponentId}.pkg.arm64" visible="true" selected="!IsX64Machine()" customLocation="{x64EmulationPkgInstallDirectory}" title="{NetStandardTargetingPackBrandName} ({arch})" description="The .NET Standard 2.1 Targeting Pack"> | ||
| <pkg-ref id="{NetStandardTargetingPackComponentId}.pkg" /> | ||
| </choice> | ||
| <choice id="{NetCoreAppHostPackComponentId}.pkg.arm64" visible="true" selected="!IsX64Machine()" customLocation="{x64EmulationPkgInstallDirectory}" title="{NetCoreAppHostPackBrandName} ({arch})" description="The .NET App Host Pack"> | ||
| <pkg-ref id="{NetCoreAppHostPackComponentId}.pkg" /> | ||
| </choice> | ||
| <choice id="{SharedFxComponentId}.pkg.arm64" visible="true" selected="!IsX64Machine()" customLocation="{x64EmulationPkgInstallDirectory}" title="{SharedFxBrandName} ({arch})" description="The .NET Shared Framework"> | ||
| <pkg-ref id="{SharedFxComponentId}.pkg" /> | ||
| </choice> | ||
| <choice id="{HostFxrComponentId}.pkg.arm64" visible="true" selected="!IsX64Machine()" customLocation="{x64EmulationPkgInstallDirectory}" title="{HostFxrBrandName} ({arch})" description="The .NET Host FX Resolver"> | ||
| <pkg-ref id="{HostFxrComponentId}.pkg" /> | ||
| </choice> | ||
| <choice id="{SharedHostComponentId}.pkg.arm64" visible="true" selected="!IsX64Machine()" customLocation="{x64EmulationPkgInstallDirectory}" title="{SharedHostBrandName} ({arch})" description="The .NET Shared Host."> | ||
| <pkg-ref id="{SharedHostComponentId}.pkg" /> | ||
| </choice> | ||
| <choice id="{CLISdkComponentId}.pkg.arm64" visible="true" selected="!IsX64Machine()" customLocation="{x64EmulationPkgInstallDirectory}" title="{CLISdkBrandName} ({arch})" description="The .NET SDK"> | ||
| <pkg-ref id="{CLISdkComponentId}.pkg"/> | ||
| </choice> | ||
| <pkg-ref id="{NetCoreAppTargetingPackComponentId}.pkg">{NetCoreAppTargetingPackComponentId}.pkg</pkg-ref> | ||
| <pkg-ref id="{NetStandardTargetingPackComponentId}.pkg">{NetStandardTargetingPackComponentId}.pkg</pkg-ref> | ||
| <pkg-ref id="{NetCoreAppHostPackComponentId}.pkg">{NetCoreAppHostPackComponentId}.pkg</pkg-ref> | ||
| <pkg-ref id="{SharedFxComponentId}.pkg">{SharedFxComponentId}.pkg</pkg-ref> | ||
| <pkg-ref id="{HostFxrComponentId}.pkg">{HostFxrComponentId}.pkg</pkg-ref> | ||
| <pkg-ref id="{SharedHostComponentId}.pkg">{SharedHostComponentId}.pkg</pkg-ref> | ||
| <pkg-ref id="{CLISdkComponentId}.pkg">{CLISdkComponentId}.pkg</pkg-ref> | ||
| <script> | ||
| <![CDATA[ | ||
| function IsX64Machine() { | ||
| 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"); | ||
sfoslund marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| system.log("IsX64Machine: " + result); | ||
| return result; | ||
| } | ||
| ]]> | ||
| </script> | ||
| </installer-gui-script> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.