-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Let macOS installer run without Rosetta on Apple Silicon #16742
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
Let macOS installer run without Rosetta on Apple Silicon #16742
Conversation
TravisEz13
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any blocking issues.
tools/packaging/packaging.psm1
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any package type that doesn't have an explicit statement? If not, we can replace default with a throw that this type is unknown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if there are any other package types, as I have no much experience on this code base. I'm going to let the default case throw an error that this type is unknown if you (or any other maintainers) ask!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TravisEz13 anything you want @dahlia to change? If not, I will merge the PR as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it was a question for MSFT team about release process :-)
|
@dahlia Please rebase to fix CI-static. |
The solution was inspired by fish's fix commit: fish-shell/fish-shell@c1a1b70 Fixes PowerShell#16571
e048de6 to
2b9ab91
Compare
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
|
@iSazonov Rebased! |
|
Would there be more I need to adjust? |
|
Chatted with @TravisEz13 offline and there is no blocker to merge this PR. |
|
🎉 Handy links: |
PR Summary
Let the macOS installer can run without Rosetta on Apple Silicon.
PR Context
This patch makes the macOS installer (powershell-*-osx-arm64.pkg) able to run without Rosetta on Apple Silicon (e.g., M1, M1 Pro, M1 Max). Although the executable binary (pwsh) in itself already natively runs on Apple Silicon, the installer for it still requires Rosetta (as of 7.3.0-preview.1):
I fixed it by specifying the proper
hostArchitecturesto theinstaller-gui-scriptconfiguration. (In PowerShell's packaging script, the template for it is placed in tools/packaging/packaging.strings.psd1.) The solution was inspired by fish's fix commit: fish-shell/fish-shell@c1a1b70.Fixes #16571.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).