We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2302 - Script to build SDL libs on IOS
Summary: Script to build SDL libs on IOS
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: HG 2.1
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-13 11:16 UTC by Sylvain
Modified: 2020-08-23 19:57 UTC (History)
2 users (show)

See Also:


Attachments
script : ios build libs (2.81 KB, text/plain)
2013-12-13 11:16 UTC, Sylvain
Details
script to build SDL libs for IOS (3.38 KB, text/x-sh)
2015-09-21 12:56 UTC, Sylvain
Details
script to build SDL libs for OSTV (3.55 KB, text/x-sh)
2015-09-21 12:59 UTC, Sylvain
Details
script to build SDL libs for IOS (3.87 KB, text/x-sh)
2015-10-23 16:17 UTC, Sylvain
Details
2269: script to build SDL libs for OSTV (3.87 KB, text/x-sh)
2015-10-23 16:18 UTC, Sylvain
Details
script to build SDL libs for IOS (3.86 KB, application/x-shellscript)
2018-01-08 08:30 UTC, Sylvain
Details
script to build SDL libs for IOS (3.95 KB, application/x-shellscript)
2020-08-23 19:57 UTC, Sylvain
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvain 2013-12-13 11:16:27 UTC
Created attachment 1496 [details]
script : ios build libs

Hello,

Here is a basic script to automatically build the SDL library and the satellite libs for IOS, configuration Debug/Release of Device/Simulator.

It expects the directory SDL/SDL_image/ttf/mixer in $HOME/release/Release_SDL_IOS  
and install the libs in $HOME/release/Release_SDL_IOS/SDL/{Debug,Release}-iphone{os,simulator}/

It saves me one hour each time I want to update to latest SDL version !
Comment 1 Sylvain 2015-09-21 12:56:11 UTC
Created attachment 2268 [details]
script to build SDL libs for IOS

This is an update of the previous script, so that it builds for arm64 and armv7 which are the architectures needed to publish on the AppStore.
Comment 2 Sylvain 2015-09-21 12:59:34 UTC
Created attachment 2269 [details]
script to build SDL libs for OSTV

Then, here's the same kind of script to build SDL libs for AppleTV / OSTV.

But, currently: 
- you need Xcode-beta 7.1 (installed in /Applications/Xcode-beta)
- SDL does not compile ... (no CoreMotion framework, some define are forbidden compared to IOS, ...)
Comment 3 Sylvain 2015-10-23 16:17:44 UTC
Created attachment 2289 [details]
script to build SDL libs for IOS

Update for xcode 7.1
Comment 4 Sylvain 2015-10-23 16:18:32 UTC
Created attachment 2290 [details]
2269: script to build SDL libs for OSTV

Update for xcode 7.1
Comment 5 Sylvain 2015-10-23 16:19:57 UTC
I have added an option "-fembed-bitcode" which is now required to publish on App Store. That is to to embed bitcode.
Comment 6 philhassey 2016-12-02 21:53:57 UTC
This was very helpful.

I found that I had to add "i386 x86_64" to SDL > Build Settings > Valid Architectures > to make proper simulator compatible builds for Xcode 8.1.

I added this line

lipo -create ./Release-iphoneos/libSDL2.a ./Release-iphonesimulator/libSDL2.a -output ./libSDL2.a

To create a universal (device and simulator) library.
Comment 7 Sylvain 2018-01-08 08:30:21 UTC
Created attachment 3125 [details]
script to build SDL libs for IOS

Updating the script
Comment 8 Sylvain 2020-08-23 19:57:06 UTC
Created attachment 4444 [details]
script to build SDL libs for IOS

Updating the script