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

Feature: Build macOS build as a universal binary #8577

Merged
merged 1 commit into from Jan 15, 2021

Conversation

orudge
Copy link
Contributor

@orudge orudge commented Jan 15, 2021

Motivation / Problem

We can't easily detect whether the user is using an Intel or M1 Mac for our Downloads page at this time. (Both Firefox and Safari return "Intel" on Apple Silicon, I believe Chrome does too, despite these being native apps.) To avoid user confusion, and to make it easier for users to transfer OpenTTD between machines, I propose building the Mac application as a Universal binary.

Description

This involves building each version (x86_64, arm64) separately then using the lipo tool to glue the binaries together before packing and signing. Unfortunately this will roughly double the build time, and increase the resulting .dmg size by around 50%. The code is also not quite as elegant as what was there before.

I did consider building each version in separate build agents (in parallel) then glueing them together in a separate job, but as TrueBrain has found out, this is not as straightforward as we might like, and I think at this time isn't worth the effort trying to fix. Not to say it couldn't be changed in the future of course.

@orudge orudge requested a review from TrueBrain Jan 15, 2021
@orudge orudge force-pushed the universal-mac branch 3 times, most recently from 0e890f8 to e4d3975 Compare Jan 15, 2021
.github/workflows/release.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
@orudge orudge force-pushed the universal-mac branch 2 times, most recently from ea7d17b to 8a644fb Compare Jan 15, 2021
TrueBrain
TrueBrain previously approved these changes Jan 15, 2021
@orudge orudge force-pushed the universal-mac branch 2 times, most recently from c00eba8 to 63ad5d2 Compare Jan 15, 2021
@orudge
Copy link
Contributor Author

@orudge orudge commented Jan 15, 2021

@TrueBrain This is now building correctly on my account, should be good for merging.

@orudge orudge merged commit ce42e81 into OpenTTD:master Jan 15, 2021
8 checks passed
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