Skip to content
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

Update seticon executable to be Universal binary #87

Closed
wants to merge 1 commit into from

Conversation

jensenharris
Copy link

@jensenharris jensenharris commented Nov 10, 2023

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.

The previous version of seticon was from https://github.com/sveinbjornt/osxiconutils which has been abandoned for quite some time and is Intel-only. This adds a new Swift-based seticon with the same functionality that is Universal.
@sindresorhus
Copy link
Owner

Thanks. I had to compile it myself so I could properly codesign it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants