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

Backwards compatibility with older versions of macOS #64

Open
thebigh2014 opened this issue Sep 24, 2020 · 12 comments
Open

Backwards compatibility with older versions of macOS #64

thebigh2014 opened this issue Sep 24, 2020 · 12 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@thebigh2014
Copy link

I'm not sure if this is possible but having the ESLauncher2 be compatible with older versions of macOS (I'm running 10.11) would be much appreciated. My computer does meet all the other requirements so unless there's something in the code or dependencies that precludes my system I don't see this being a problem.

Or maybe at least if I had the ability to easily build it myself that would be helpful as no Xcode project is provided for a macOS build (so I'm not even sure how you build it).

@MCOfficer
Copy link
Member

The restriction is the github CI that builds all packages, it can only run on catalina. We already set a flag to build for versions as old as 10.14, but i'm not sure if we can go older:

MACOSX_DEPLOYMENT_TARGET: 10.14

In the meantime, you can always compile ESL2 from source:

  • Install the toolchain via rustup (default settings should suffice)
  • in the ESL2 directory, run these commands:
    cargo build --verbose --release
    chmod 755 target/release/eslauncher2
    ls -al target/release
    - name: Package binary
    run: |
    cargo install cargo-bundle
    cargo bundle --release
    ls -al target/release/bundle/osx/ESLauncher2.app/Contents/MacOS
    - name: Strip binary and mark as executable
    run: |
    strip target/release/bundle/osx/ESLauncher2.app/Contents/MacOS/eslauncher2
    chmod 755 target/release/bundle/osx/ESLauncher2.app/Contents/MacOS/eslauncher2
    ls -al target/release/bundle/osx/ESLauncher2.app/Contents/MacOS
  • find ESL2 in target/release/bundle/osx

@tehhowch
Copy link

The catalina ci issue will probably affect your ability to use the launcher to play the continuous build as well.

I'm curious if we can implement a custom workflow for the macOS build to produce a data-only artifact and several different binaries, for target macOS versions, and then in this launcher, combine the data with the binary appropriate to the host system.

This would likely require experimentation on @thebigh2014 's part to see if we can change the XCode project target version and have the CI output respect that.

@thebigh2014
Copy link
Author

thebigh2014 commented Sep 24, 2020

@MCOfficer Generally speaking, Xcode allows targeting several OS versions back along with current and the next version (doubt the CI would have different rules/capabilities). For example in Xcode 8.2.1, the last version for 10.11 and what I'm running, deployment targets range from 10.6 up to 10.12 If the same range is available for Xcode 11.x in 10.15, then supported deployment targets should be from 10.10 up to 11.

Anyway, thanks for giving me build instructions so I can try building it myself.

@tehhowch I would think the same applies to Endless Sky as well.

PS - Most software I use still has compatibility back to 10.11 so that might be the oldest available for Xcode 11.x (12 dropped not long ago so that might change soon).

@tehhowch
Copy link

tehhowch commented Sep 25, 2020

@thebigh2014 to test this myself would require a Mac. Short of being gifted one for development, that won't ever happen, so if changes to the XCode project to support older versions of macOS are possible, someone else will need to be the one who makes those changes.

@thebigh2014
Copy link
Author

@tehhowch The Xcode project file (project.pbxproj inside EndlessSky.xcodeproj) is a text file that can be easily edited. The deployment targets are specified on lines 1125 (debug) and 1155 (release). I could submit a PR with the changes if you'd like.

@tehhowch
Copy link

tehhowch commented Sep 25, 2020

I could submit a PR with the changes if you'd like.

That is part of what I was suggesting above. I'm well aware of how to change what the ci does, but I cannot test that the changes have their intended effect:

This would likely require experimentation on @thebigh2014 's part to see if we can change the XCode project target version and have the CI output respect that.

So in your fork of ES, you would make those changes and then verify that the artifact produced by the GitHub CI is playable on your machine. If it is, then we need to work with MCO to make ES Launcher capable of detecting (or told) which OSX binary to use on a per-user basis. Then we can update the main repo to build several macOS target versions, including one which works on your machine. Only at this last stage would a PR to the endless-sky repo be warranted

@thebigh2014
Copy link
Author

Right, makes sense. And the line numbers I quoted were from my local version, which was modified by my uses of Xcode. I will see about trying to make the change in my fork with the GitHub CI.

@MCOfficer
Copy link
Member

MCOfficer commented Sep 25, 2020

I'm starting to understand why game developers don't want to support niche OSes - So much work for such a small subset of users!

Just to give you a statement: ESL2 will not support MacOS versions that ES itself doesn't support. So in order to advance this issue, the continuous build needs to be more backwards compatible. Not sure if this issue is the correct place to discuss that.

@tehhowch
Copy link

Also fair. @thebigh2014 you'd still do local testing on your fork to see if the CI can produce a binary you are able to use, and then we would move to the PR stage and ask Mac users of ES Launcher to test that PR instance.

We should move future conversation to endless-sky/endless-sky#5013

(That issue also highlights that the XCode target macOS version is not the only obstacle to be overcome.)

@thebigh2014
Copy link
Author

@MCOfficer Hence why I merely asked if it was possible and why I am willing to volunteer my time to see if it can be done or not. And I agree that ESL2 should only support macOS versions that ES supports as well.

@tehhowch Right, that would be the issue to continue this discussion at. Btw., just to let you know, I have not had any success thus far. I even tried using Xcode 10.3, which is available on the Github CI, but no luck as of yet. There are some things left to try but in the end it may be up to individuals, like me, to manually create and upload unofficial builds for older OSes.

Oh and the error I'm getting is the same as before (as @MCOfficer mentioned in endless-sky/endless-sky#5013 (comment) )

@MCOfficer
Copy link
Member

I meant no offense, just wanted to clarify. I just updated endless-sky/endless-sky#5013 because apparently i'd forgotten it.

@thebigh2014
Copy link
Author

thebigh2014 commented Sep 25, 2020

No offense was taken. I totally understand your point of view as I'm a software developer dealing with backwards compatibility and new breaking changes with web applications myself.

@MCOfficer MCOfficer added enhancement New feature or request help wanted Extra attention is needed labels Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants