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

Add: Specify minimum version for macOS #9689

merged 1 commit into from Nov 11, 2021


Copy link

@orudge orudge commented Nov 11, 2021

Motivation / Problem

OpenTTD will open on macOS versions earlier than 10.14, but will crash.

Fixes #9688.


This adds a minimum version to the Info.plist so the Finder will not allow the application to launch. It will display a minimum version warning instead.


Tested on macOS 10.11 on my ancient MacBook Pro; with this patch it was greyed out and displayed a warning, without the patch it opened and crashed.

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR touches english.txt or translations? Check the guidelines
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, gs_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')

Copy link

@LordAro LordAro commented Nov 11, 2021

Is 10.14 our actual minimum version, or just the minimum version of our builds?

Copy link
Contributor Author

@orudge orudge commented Nov 11, 2021

Let me try to build on my ancient Mac and find out...

Copy link
Contributor Author

@orudge orudge commented Nov 11, 2021

Let me try to build on my ancient Mac and find out...

My ancient Mac isn't able to compile modern OpenTTD, even attempting various newer versions of gcc and clang from MacPorts. I don't have a system with 10.12 or 10.13 on, so couldn't tell you if either of those would work. I'd personally be inclined to accept the patch and if anybody complains, we can change it. Alternatively, I can change it so that it's only applied for the builds that we do if preferred.

Copy link

@nielsmh nielsmh commented Nov 11, 2021

Patching the Plist during the CI build sounds a little more reasonable to me, if it's theoretically possible to still build with a toolchain that can target older macOS versions.

Copy link

@TrueBrain TrueBrain commented Nov 11, 2021

We use std::variant, and as mentioned in the PRs introducing that, it means you need at least 10.14. Due to how MacOS works this is not really related to a compiler but with the libstdc++ that is shipped with MacOS. It is missing std::bad_variant_access, and that is not fixable by the average user.

We were under the impression our framework bump to 10.14 would already fix it, but clearly this is not the case. So yeah, this is the right solution :)

I am not aware of any theoretical solution @nielsmh ; if you have anything on that I would love to know. But from our investigation a few months ago, this really is not solvable by any toolchain :(

@michicc michicc merged commit 2f72eb0 into OpenTTD:master Nov 11, 2021
15 checks passed
@michicc michicc added the backport requested label Jan 1, 2022
TrueBrain pushed a commit to TrueBrain/OpenTTD that referenced this issue Jan 3, 2022
@TrueBrain TrueBrain added backported and removed backport requested labels Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

5 participants