SDL2 app on ios/osx

Hi

does anyone here has a working example of a simple SDL2 based app
(preferable cmake based) that generates a signed ipa or dmg.

I’m stuck at creating ios and osx packages. Compilation is not a problem
with my cmake based system for osx and ios - but the packaging. I don’t
know where to put the assets and so on. Currently I’m generating an
xcarchive and then try to assemble the ipa with this small script:


(and osx:
https://github.com/mgerhardy/caveexpress/blob/master/contrib/scripts/osx.sh)

But I’m lost… there is an xcarchive generated that is later detected as
invalid by the export command.

Thanks a lot
Martin–
http://www.caveproductions.org

It is a mac only build, but ios and mac application bundles should be quite similar so you should be able to adapt it…

You can checkout this file:

around line 38 is where the cmake commands for generating application bundles is located.

there are several other CMakeLists.txt files in that project that may contain some other helpful bits for you. The nice thing about this example is it uses lots of different asset types including plugins and custom types so it should have most everything you need for your build too.

Hope you find it helpful.

Thanks a lot for your examples. I will give it a try.On Mon, Nov 9, 2015 at 6:54 PM, brada wrote:

It is a mac only build, but ios and mac application bundles should be
quite similar so you should be able to adapt it…

You can checkout this file:
https://github.com/gemrb/gemrb/blob/master/gemrb/CMakeLists.txt

around line 38 is where the cmake commands for generating application
bundles is located.

there are several other CMakeLists.txt files in that project that may
contain some other helpful bits for you. The nice thing about this example
is it uses lots of different asset types including plugins and custom types
so it should have most everything you need for your build too.

Hope you find it helpful.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://www.caveproductions.org

I “think” I managed to adopt my cmake scripts to let it work, but how can I
assemble the dmg/ipa from commandline? It looks that my posted ios.sh and
osx.sh scripts are still missing something.

Thanks a lot for your help.On Mon, Nov 9, 2015 at 7:23 PM, M. Gerhardy <@Martin_Gerhardy> wrote:

Thanks a lot for your examples. I will give it a try.

On Mon, Nov 9, 2015 at 6:54 PM, brada wrote:

It is a mac only build, but ios and mac application bundles should be
quite similar so you should be able to adapt it…

You can checkout this file:
https://github.com/gemrb/gemrb/blob/master/gemrb/CMakeLists.txt

around line 38 is where the cmake commands for generating application
bundles is located.

there are several other CMakeLists.txt files in that project that may
contain some other helpful bits for you. The nice thing about this example
is it uses lots of different asset types including plugins and custom types
so it should have most everything you need for your build too.

Hope you find it helpful.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://www.caveproductions.org


http://www.caveproductions.org

I imagine there is a better way here in 2015, but all I am doing to create the IPA for that project is running a bash script to create a zip archive in the IPA format. If you want code signing then i imagine you will need to add codesign commands prior to zipping.

Code:

cp -r “$BUILT_PRODUCTS_DIR”-iphoneos/GemRB.app ios/Payload/GemRB.app
cd ios
zip -r GemRB-ios-$VERSION.ipa iTunesArtWork iTunesMetadata.plist Payload

the script also has some plistbuddy commands to populate the Artork/iTunesMetadata.plist files. If you checkout the xcode project from the GemRB project i linked earlier you can see it in the various “run scripts” build phases of the iOS target and the “ReleasePackage” target. As I said tho, there is probably a much better way now, this was setup years ago back in Xcode 5 days… still this should work[/code]