Update seticon executable to be Universal binary #87
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.
The current version of seticon was from https://github.com/sveinbjornt/osxiconutils which has been abandoned for quite some time and is Intel-only.
The result is that create-dmg fails today if you run it on an Apple Silicon Mac without Rosetta 2 installed (since it can't run Intel binaries.) Apple has stated their plan to remove Rosetta 2 in an upcoming version of macOS, so this will move from an issue that affects some users to one that affects all users.
This PR replaces seticon with a new Swift-based seticon that has been compiled to be Universal 2, which runs on both Apple Silicon and Intel.
It is based on code here: create-dmg/create-dmg#132 (another repo with the same name, with code provided under MIT license).
It was compiled as such:
swiftc -target x86_64-apple-macosx10.10 -o seticon_x86_64 seticon.swift
swiftc -target arm64-apple-macosx11.0 -o seticon_arm64 seticon.swift
lipo -create -output seticon seticon_x86_64 seticon_arm64
With this change, create-dmg now works on Apple Silicon without Rosetta 2 installed as well as Intel.