Compiling Wesnoth for iOS

Get help with compiling or installing the game, and discuss announcements of new official releases.

Moderators: Forum Moderators, Developers

Post Reply
rgwesnoth
Posts: 10
Joined: May 2nd, 2020, 10:34 pm

Compiling Wesnoth for iOS

Post by rgwesnoth »

Hi, I was just wondering if there are any instructions for compiling Wesnoth for iOS. I have managed to compile Wesnoth for macOS using XCode, but I have not found any instructions for compiling into iOS. I do some iOS development, so I was looking to see if I could help fix some bugs and things.
User avatar
singalen
iOS Port Maintainer
Posts: 296
Joined: January 3rd, 2007, 10:18 am
Location: bay

Re: Compiling Wesnoth for iOS

Post by singalen »

Not that there's a formal instruction, but here is a summary.
* iOS fork, the most recent branch is here: https://github.com/singalen/wesnoth/tree/tinygui_1_4_11
* one also needs iOS project and its libraries, available here: https://github.com/singalen/wesnoth_ios. Put it into projectfiles/Xcode inside Wesnoth source. Note that is has submodules.
* Some things are a pain to compile, like glib. wesnoth_ios has them in a pre-compiled form.
* IIRC, you also need https://github.com/singalen/glib-ios and maybe https://github.com/singalen/ofxiOSBoost.

You're welcome to ask questions and criticize the state of affairs :)
rgwesnoth
Posts: 10
Joined: May 2nd, 2020, 10:34 pm

Re: Compiling Wesnoth for iOS

Post by rgwesnoth »

Hello, thank you for those notes. I downloaded iOS fork, wesnoth_ios, I used submodule update to download ofxiOSBoost, and checked out the latest branches on all of the git repositories. However, I am facing an issue where Xcode claims it only supports iOS 8.0+, and the wesnoth project claims that it is in iOS 7.0. I tried installing an older version of Xcode (Xcode 5) but it was too old to be supported by my macOS (Mojave). Also, just to confirm, is the battleforwesnoth-iPad Xcode project supposed to work on iPhone as well?

Edit: Perhaps the issue is that I can't figure out how to use your glib-ios script. I tried running it but it fails with "You must have either have gettext support in your C library, or use the GNU gettext library".
Attachments
Screen Shot 2020-05-05 at 5.39.42 PM.png
Screen Shot 2020-05-05 at 5.39.36 PM.png
rgwesnoth
Posts: 10
Joined: May 2nd, 2020, 10:34 pm

Re: Compiling Wesnoth for iOS

Post by rgwesnoth »

Actually ignore the above. I figured it all out and managed to compile it onto both the iOS simulator and my own iPhone. I will take a look at the codebase over the next few days. Thanks for the help.
Post Reply