From 86e0e122a475dfd4f627fc95a9458e7527d72a00 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Wed, 10 Sep 2014 22:59:32 +0200 Subject: Initial commit --- ios/Info.plist.xml | 59 ++++++++++++++++++++++++ ios/build.gradle | 65 +++++++++++++++++++++++++++ ios/data/Default-568h@2x.png | Bin 0 -> 84382 bytes ios/data/Default.png | Bin 0 -> 29751 bytes ios/data/Default@2x.png | Bin 0 -> 85109 bytes ios/data/Default@2x~ipad.png | Bin 0 -> 97633 bytes ios/data/Default~ipad.png | Bin 0 -> 34134 bytes ios/data/Icon-72.png | Bin 0 -> 4439 bytes ios/data/Icon-72@2x.png | Bin 0 -> 6231 bytes ios/data/Icon.png | Bin 0 -> 4028 bytes ios/data/Icon@2x.png | Bin 0 -> 5679 bytes ios/robovm.properties | 6 +++ ios/robovm.xml | 46 +++++++++++++++++++ ios/src/ch/asynk/tankontank/IOSLauncher.java | 22 +++++++++ 14 files changed, 198 insertions(+) create mode 100644 ios/Info.plist.xml create mode 100644 ios/build.gradle create mode 100644 ios/data/Default-568h@2x.png create mode 100644 ios/data/Default.png create mode 100644 ios/data/Default@2x.png create mode 100644 ios/data/Default@2x~ipad.png create mode 100644 ios/data/Default~ipad.png create mode 100644 ios/data/Icon-72.png create mode 100644 ios/data/Icon-72@2x.png create mode 100644 ios/data/Icon.png create mode 100644 ios/data/Icon@2x.png create mode 100644 ios/robovm.properties create mode 100644 ios/robovm.xml create mode 100644 ios/src/ch/asynk/tankontank/IOSLauncher.java (limited to 'ios') diff --git a/ios/Info.plist.xml b/ios/Info.plist.xml new file mode 100644 index 00000000..407bec75 --- /dev/null +++ b/ios/Info.plist.xml @@ -0,0 +1,59 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${app.name} + CFBundleExecutable + ${app.executable} + CFBundleIdentifier + ${app.id} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${app.name} + CFBundlePackageType + APPL + CFBundleShortVersionString + ${app.version} + CFBundleSignature + ???? + CFBundleVersion + ${app.build} + LSRequiresIPhoneOS + + UIViewControllerBasedStatusBarAppearance + + UIStatusBarHidden + + UIDeviceFamily + + 1 + 2 + + UIRequiredDeviceCapabilities + + armv7 + opengles-2 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CFBundleIcons + + CFBundlePrimaryIcon + + CFBundleIconFiles + + Icon + Icon-72 + + + + + diff --git a/ios/build.gradle b/ios/build.gradle new file mode 100644 index 00000000..4bbbefe6 --- /dev/null +++ b/ios/build.gradle @@ -0,0 +1,65 @@ +sourceSets.main.java.srcDirs = [ "src/" ] + +sourceCompatibility = '1.7' +[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' + +ext { + mainClassName = "ch.asynk.tankontank.IOSLauncher" +} + +// Extracts native libs (*.a) from the native-ios.jar and places them +// under build/libs/ios/. +task copyNatives << { + file("build/libs/ios/").mkdirs(); + configurations.natives.files.each { jar -> + def outputDir = null + if (jar.name.endsWith("natives-ios.jar")) outputDir = file("build/libs/ios") + if (outputDir != null) { + copy { + from zipTree(jar) + into outputDir + include "*.a" + } + } + } +} + +// Updates a robovm.xml file. +task updateRoboVMXML << { + def xml = file('robovm.xml') + + if (!xml.exists()) { + return + } + + // Find all native (*.a) libraries beneath libs + def libtree = fileTree(dir: 'build/libs', include: '**/*.a') + + def config = new groovy.util.XmlParser().parse(xml) + config.libs.each {libs -> + libs.children().clear() + libtree.each { File file -> + libs.appendNode('lib', 'build/libs/ios/' + file.getName()) + } + } + + def writer = new FileWriter(xml) + def printer = new XmlNodePrinter(new PrintWriter(writer)) + printer.setPreserveWhitespace true + printer.print(config) +} + +updateRoboVMXML.dependsOn copyNatives +build.dependsOn updateRoboVMXML +tasks.eclipse.dependsOn updateRoboVMXML + +launchIPhoneSimulator.dependsOn build +launchIPadSimulator.dependsOn build +launchIOSDevice.dependsOn build +createIPA.dependsOn build + + +eclipse.project { + name = appName + "-ios" + natures 'org.robovm.eclipse.RoboVMNature' +} \ No newline at end of file diff --git a/ios/data/Default-568h@2x.png b/ios/data/Default-568h@2x.png new file mode 100644 index 00000000..101752fe Binary files /dev/null and b/ios/data/Default-568h@2x.png differ diff --git a/ios/data/Default.png b/ios/data/Default.png new file mode 100644 index 00000000..f1a5582a Binary files /dev/null and b/ios/data/Default.png differ diff --git a/ios/data/Default@2x.png b/ios/data/Default@2x.png new file mode 100644 index 00000000..ca32f62f Binary files /dev/null and b/ios/data/Default@2x.png differ diff --git a/ios/data/Default@2x~ipad.png b/ios/data/Default@2x~ipad.png new file mode 100644 index 00000000..bb77ef07 Binary files /dev/null and b/ios/data/Default@2x~ipad.png differ diff --git a/ios/data/Default~ipad.png b/ios/data/Default~ipad.png new file mode 100644 index 00000000..855e4f2a Binary files /dev/null and b/ios/data/Default~ipad.png differ diff --git a/ios/data/Icon-72.png b/ios/data/Icon-72.png new file mode 100644 index 00000000..8cc57591 Binary files /dev/null and b/ios/data/Icon-72.png differ diff --git a/ios/data/Icon-72@2x.png b/ios/data/Icon-72@2x.png new file mode 100644 index 00000000..ec5e3803 Binary files /dev/null and b/ios/data/Icon-72@2x.png differ diff --git a/ios/data/Icon.png b/ios/data/Icon.png new file mode 100644 index 00000000..7f4bf363 Binary files /dev/null and b/ios/data/Icon.png differ diff --git a/ios/data/Icon@2x.png b/ios/data/Icon@2x.png new file mode 100644 index 00000000..eddc17c5 Binary files /dev/null and b/ios/data/Icon@2x.png differ diff --git a/ios/robovm.properties b/ios/robovm.properties new file mode 100644 index 00000000..12ffe957 --- /dev/null +++ b/ios/robovm.properties @@ -0,0 +1,6 @@ +app.version=1.0 +app.id=ch.asynk.tankontank.IOSLauncher +app.mainclass=ch.asynk.tankontank.IOSLauncher +app.executable=IOSLauncher +app.build=1 +app.name=TankOnTank diff --git a/ios/robovm.xml b/ios/robovm.xml new file mode 100644 index 00000000..df09d9d0 --- /dev/null +++ b/ios/robovm.xml @@ -0,0 +1,46 @@ + + ${app.executable} + ${app.mainclass} + ios + thumbv7 + ios + Info.plist.xml + + + ../android/assets + + ** + + true + + + data + + + + com.badlogic.gdx.scenes.scene2d.ui.* + com.badlogic.gdx.physics.bullet.** + com.android.okhttp.HttpHandler + com.android.okhttp.HttpsHandler + com.android.org.conscrypt.** + com.android.org.bouncycastle.jce.provider.BouncyCastleProvider + com.android.org.bouncycastle.jcajce.provider.keystore.BC$Mappings + com.android.org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi + com.android.org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi$Std + com.android.org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi + com.android.org.bouncycastle.crypto.digests.AndroidDigestFactoryOpenSSL + org.apache.harmony.security.provider.cert.DRLCertFactory + org.apache.harmony.security.provider.crypto.CryptoProvider + + + + + UIKit + OpenGLES + QuartzCore + CoreGraphics + OpenAL + AudioToolbox + AVFoundation + + diff --git a/ios/src/ch/asynk/tankontank/IOSLauncher.java b/ios/src/ch/asynk/tankontank/IOSLauncher.java new file mode 100644 index 00000000..e9636d91 --- /dev/null +++ b/ios/src/ch/asynk/tankontank/IOSLauncher.java @@ -0,0 +1,22 @@ +package ch.asynk.tankontank; + +import org.robovm.apple.foundation.NSAutoreleasePool; +import org.robovm.apple.uikit.UIApplication; + +import com.badlogic.gdx.backends.iosrobovm.IOSApplication; +import com.badlogic.gdx.backends.iosrobovm.IOSApplicationConfiguration; +import ch.asynk.tankontank.TankOnTank; + +public class IOSLauncher extends IOSApplication.Delegate { + @Override + protected IOSApplication createApplication() { + IOSApplicationConfiguration config = new IOSApplicationConfiguration(); + return new IOSApplication(new TankOnTank(), config); + } + + public static void main(String[] argv) { + NSAutoreleasePool pool = new NSAutoreleasePool(); + UIApplication.main(argv, null, IOSLauncher.class); + pool.close(); + } +} \ No newline at end of file -- cgit v1.2.3