-
Notifications
You must be signed in to change notification settings - Fork 326
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 iOS build support #743
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this!
Here are my small suggestions.
Co-authored-by: José Cadete <[email protected]>
use snprintf instead of strncpy for safety Co-authored-by: José Cadete <[email protected]>
I'm also thinking: instead of adding the sources to That way the directory convention would be consistent in all builds. |
We could! For iOS I'm building SDL and mixer from source, and I wasn't sure if the other platforms using |
What we usually do is use Things get a bit messy if you're trying to configure for different platforms from the same base directory, but with some effort it works and, more importantly, it works just fine for github actions. Speaking of which, the test build is failing. I think it's an include in Also: do you think you can add a github actions workflow to automate ios builds? If not, can you at least provide command line instructions here for building the app so we later create the workflow ourselves? Thanks! |
Ok. for iOS I'm adding the SDL2 and SDL2_mixer CMake projects with Automated iOS builds for distribution would require putting a signing certificate and provisioning profile on GitHub, which I'm not prepared to do myself, but if you just want to check that it builds correctly, or run tests in a simulator I guess that's doable. A warning: GitHub actions running on macOS cost 10x the price of GitHub actions on Linux, and in my experience builds on GitHub take ages. (that was a few years ago, maybe it has gotten better?) |
Yeah for now we just want to check that it builds. The macOS action is free, our mac build is done using it. I think we use a self signing certificate. |
Ignore previous stuff about the ext/SDL/... location, I've taken a look at /.ci_scripts/ and am adding an |
- use cmake built-in ios toolchain - disable MOD support in sdl mixer to avoid missing library error - add asset catalog for app icon and launch screen - use iOS-specific Info.plist - replace hardcoded 'julius' where SHORT_NAME references would be better.
I thought I had everything working, but apparently I was using old build artifacts. Clean builds currently fail when building SDL2. Error: |
Did you try deleting the SDL2 folder (and adding it brand new) and all intermediate build caches on your PC? Android studio also has a lot of problems rebuilding, and deleting everything to start fully clean usually fixes them. |
Aha. looks like I had multiple copies of SDL2 and SDL2_mixer in All seems to be working now, and I've added the necessary |
…en't generating it anymore
Please let me know if anything else is needed for this to be considered ready to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good in general 👍 I mainly have some small questions due to not being familiar with the inner workings of iOS.
res/ios/Assets.xcassets/ColorMap.textureset/Universal.mipmapset/ColorMap.png
Outdated
Show resolved
Hide resolved
The Visual Studio build is failing with this error:
Maybe only include Or, instead of |
- show alert message when there's an error importing files - show alert message if user cancels the game-data document picker - show the document picker again if game data import was unsuccessful
iOS 14 is required for the document picker methods used.
Ah, yes, it should indeed be |
Once again ready for consideration. |
Ah nice, the builds are working on all platforms now. Thinking a bit ahead, you're still planning to add support for augustus, right? In that case, is it okay if, when this is merged to Julius, I then merge the latest Julius changes to augustus and you work from there? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, let's merge 👍
This adds support for running on (and cross-compiling to) iOS devices, as described in #643 (comment)
See
ios/README.md
for build instructions.