Put build architecture into Info.plist on mac #4
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.
I have an Apple Silicon mac, but I do not have Rosetta installed, and need to avoid doing so for work reasons.
By default, macOS alerts me I need Rosetta with camp, which I understand to be because the executable identified in the bundle is a shell script, and macOS can not detect the platform type for that, so assumes x86.
This PR adds an extra key to the bundle, LSArchitecturePriority, at build time to insert the platform of the build architecture, on the assumption that therse match - it doesn't look. to me that the Makefile would build a fat binary and inspecting camp.exe it seems to be just built for the host platform type.
Unfortunately I do not have access to an Intel mac to verify this works for the other platform, however I asked on the fediverse what
uname -mreturns on Intel macs and I can cofirm that it matches what is specified on that documentation for LSArchitecturePriority. So in theory, we should be good, but I can't confirm that in practice. I can just say it works now on my Apple Silicon mac sans Rosetta!