Build tool, iOS, Android great improvements!

Posted on

DSC_0248
DSC_0235
DSC_0236
DSC_0237
DSC_0238
DSC_0245
DSC_0246
DSC_0247

First of all, I’m proudly attaching a few images of various games using Castle Game Engine running on a real iPhone:)

Our build tool got some significant improvements lately. I hinted about some of them in the recent “Easy compilation for iOS” announcement, but actually there’s more, and some of them benefit all platforms šŸ™‚ Here are the details:

  1. Using the "castle-engine-output" directory for compilation temporary files (.ppu, .o), and for Android and iOS projects. The advantages:

    • The compilation files are kept per OS/CPU, so they can be reused more (no need to recompile everything just because you switch platforms).
    • The Android project is in a predictable location (not in some /tmp/castle-engine-), which is useful to run ‘ndk-gdb’.
    • The iOS project is in a predictable location, which is useful to run XCode.
  2. Project files (lpr) for Android, iOS (and soon — for others too) can be auto-created. So you really don’t have to write anything to recompile your project for a new platform. You only need to provide game_units in CastleEngineManifest.xml, and make sure your units initialize Application.MainWindow . Make sure you define game_units in CastleEngineManifest.xml.

  3. Android packaging process fixes and updates.

    • CGE code fix for using (exact) FPC 3.0.2 to cross-compile to Android.
    • The build tool no longer requires so many things (from Android SDK and NDK) on $PATH. It can guess everything’s location now from ANDROID_HOME (your SDK location).
    • Much improved wiki page about installing Android dependencies. In particular, it contains now screenshots how to use the “SDK Manager”, that is integrated in “Android Studio” and replaces the old “android” GUI tool from previous SDK versions.
  4. iOS-specific improvements:

    • The iOS wiki page was much improved and updated, to describe the process of compiling to iOS.
    • The src/library/compile-iOS.sh script was reworked and updated. Many changes, but in principle it should generate exactly the same thing:)
    • The "castle-engine compile --target=ios" is available, and generates a ready libxxx.a to be inserted into an XCode project.
    • CastleWindow “library” interface (used for iOS in a library) simplified.
    • Package any game for iOS! Just run "castle-engine package --target=ios" and you get an XCode project, that compiles out-of-the-box in XCode, and can be tested and published from XCode. You can add --mode=debug if you like.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.