OSDN Git Service

added ios support for jnigen, creates a fat static library
authorMario Zechner <contact@badlogicgames.com>
Sun, 3 Feb 2013 15:33:32 +0000 (16:33 +0100)
committerMario Zechner <contact@badlogicgames.com>
Sun, 3 Feb 2013 15:33:32 +0000 (16:33 +0100)
extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/AntScriptGenerator.java
extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/BuildTarget.java
extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/resources/scripts/build-ios.xml.template [new file with mode: 0755]
gdx/jni/build-ios32.xml [new file with mode: 0755]
gdx/jni/build.xml
gdx/jni/com.badlogic.gdx.physics.box2d.ChainShape.cpp
gdx/src/com/badlogic/gdx/utils/GdxBuild.java

index 7a50007..6be4ada 100644 (file)
@@ -98,9 +98,9 @@ public class AntScriptGenerator {
                                + config.jniDir.child(buildFileName) + "'");\r
 \r
                        if (!target.excludeFromMasterBuildFile) {\r
-                               if (target.os != TargetOs.MacOsX) {\r
+                               if (target.os != TargetOs.MacOsX && target.os != TargetOs.IOS) {\r
                                        buildFiles.add(buildFileName);\r
-                               }\r
+                               } \r
                                sharedLibFiles.add(getSharedLibFilename(target.os, target.is64Bit, config.sharedLibName));\r
                                libsDirs.add("../" + libsDir.path().replace('\\', '/'));\r
                        }\r
@@ -158,6 +158,10 @@ public class AntScriptGenerator {
                        libPrefix = "lib";\r
                        libSuffix = ".dylib";\r
                }\r
+               if (os == TargetOs.IOS) {\r
+                       libPrefix = "lib";\r
+                       libSuffix = ".a";\r
+               }\r
                return libPrefix + sharedLibName + libSuffix;\r
        }\r
 \r
@@ -184,8 +188,14 @@ public class AntScriptGenerator {
                }\r
 \r
                // read template file from resources\r
-               String template = new FileDescriptor("com/badlogic/gdx/jnigen/resources/scripts/build-target.xml.template",\r
+               String template = null;\r
+               if(target.os == TargetOs.IOS) {\r
+                       template = new FileDescriptor("com/badlogic/gdx/jnigen/resources/scripts/build-ios.xml.template",\r
                        FileType.Classpath).readString();\r
+               } else {\r
+                       template = new FileDescriptor("com/badlogic/gdx/jnigen/resources/scripts/build-target.xml.template",\r
+                               FileType.Classpath).readString();\r
+               }\r
 \r
                // generate shared lib filename and jni platform headers directory name\r
                String libName = getSharedLibFilename(target.os, target.is64Bit, config.sharedLibName);\r
index 10d9624..2e844f4 100644 (file)
@@ -21,7 +21,7 @@ package com.badlogic.gdx.jnigen;
 public class BuildTarget {\r
        /** The target operating system of a build target. */\r
        public enum TargetOs {\r
-               Windows, Linux, MacOsX, Android\r
+               Windows, Linux, MacOsX, Android, IOS\r
        }\r
 \r
        /** the target operating system **/\r
@@ -133,6 +133,16 @@ public class BuildTarget {
                                "-lm");\r
                        return android;\r
                }\r
+               \r
+               if(type == TargetOs.IOS) {\r
+                       // iOS, 386 simulator and armv7a, compiled to fat static lib\r
+                       BuildTarget ios = new BuildTarget(TargetOs.IOS, false, new String[] {"**/*.c"}, new String[0],\r
+                               new String[] {"**/*.cpp"}, new String[0], new String[0], "",\r
+                               "-c -Wall -O2",\r
+                               "-c -Wall -O2",\r
+                               "rcs");\r
+                       return ios;\r
+               }\r
 \r
                throw new RuntimeException("Unknown target type");\r
        }\r
diff --git a/extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/resources/scripts/build-ios.xml.template b/extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/resources/scripts/build-ios.xml.template
new file mode 100755 (executable)
index 0000000..6b3baf6
--- /dev/null
@@ -0,0 +1,183 @@
+<project name="%projectName%" basedir="." default="postcompile">\r
+       <!-- include the environment -->\r
+       <property environment="env"/>   \r
+       <!-- output directory for temporary object files -->\r
+       <property name="buildDir" value="%buildDir%" />\r
+       <!-- output directory for the shared library -->\r
+       <property name="libsDir" value="%libsDir%" />\r
+       <!-- the name of the shared library -->\r
+       <property name="libName" value="%libName%"/>\r
+       <!-- the jni header jniPlatform to use -->\r
+       <property name="jniPlatform" value="mac"/>\r
+       <!-- the compilerPrefix for the C & C++ compilers -->\r
+       <property name="compilerPrefix" value="%compilerPrefix%"/>      \r
+       <property name="iphoneos-platform" value="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin"/>\r
+       <property name="iphoneos-sdk" value="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/"/>\r
+       <property name="iphonesimulator-platform" value="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin"/>\r
+       <property name="iphonesimulator-sdk" value="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/"/>\r
+       \r
+       <!-- define gcc compiler, options and files to compile -->\r
+       <property name="gcc" value="${compilerPrefix}gcc"/>     \r
+       <property name="gcc-opts" value="%cFlags%"/>\r
+       <fileset id="gcc-files" dir="./">\r
+               <exclude name="target/"/>               \r
+               %cIncludes%\r
+               %cExcludes%\r
+       </fileset>\r
+       \r
+       <!-- define g++ compiler, options and files to compile -->\r
+       <property name="g++" value="${compilerPrefix}g++"/>\r
+       <property name="g++-opts" value="%cppFlags%"/>\r
+       <fileset id="g++-files" dir="./">\r
+               <exclude name="target/"/>\r
+               %cppIncludes%\r
+               %cppExcludes%\r
+       </fileset>\r
+\r
+       <!-- define linker and options -->\r
+       <property name="linker" value="${compilerPrefix}ar"/>\r
+       <property name="linker-opts" value="%linkerFlags%"/>\r
+       <property name="libraries" value="%libraries%"/>\r
+       \r
+       <!-- cleans the build directory, removes all object files and shared libs -->\r
+       <target name="clean">\r
+               <delete includeemptydirs="true" quiet="true">\r
+                       <fileset dir="${buildDir}"/>\r
+                       <fileset dir="${libsDir}" includes="**/*" excludes="**/.svn"/>\r
+               </delete>\r
+       </target>\r
+       \r
+       <target name="clean-objfiles">\r
+               <delete>\r
+                       <fileset dir="${buildDir}">\r
+                               <include name="**/*.o"/>\r
+                       </fileset>\r
+               </delete>\r
+       </target>\r
+       \r
+       <target name="create-build-dir">\r
+               <!-- FIXME this is pretty nasty :/ -->\r
+               <copy todir="${buildDir}">\r
+                       <fileset refid="g++-files"/>\r
+                       <fileset refid="gcc-files"/>\r
+               </copy>\r
+               <delete>\r
+                       <fileset dir="${buildDir}">\r
+                               <include name="*"/>\r
+                               <exclude name="*.o"/>\r
+                       </fileset>\r
+               </delete>\r
+       </target>\r
+\r
+       <!-- compiles all C and C++ files to object files in the build directory, for 386 builds-->\r
+       <target name="compile-386" depends="clean,create-build-dir">\r
+               <mkdir dir="${buildDir}"/>\r
+               <apply failonerror="true" executable="${iphonesimulator-platform}/${g++}" dest="${buildDir}" verbose="true">\r
+                       <arg line="-isysroot ${iphonesimulator-sdk} -arch i386 ${g++-opts}"/>\r
+                       <arg value="-Ijni-headers"/>\r
+                       <arg value="-Ijni-headers/${jniPlatform}"/>\r
+                       <arg value="-I."/>\r
+                       %headerDirs%\r
+                       <srcfile/>\r
+                       <arg value="-o"/>\r
+                       <targetfile/>\r
+                       <fileset refid="g++-files"/>\r
+                       <compositemapper>\r
+                               <mapper type="glob" from="*.cpp" to="*.o"/>\r
+                               <mapper type="glob" from="*.mm" to="*.o"/>\r
+                       </compositemapper>\r
+               </apply>\r
+               <apply failonerror="true" executable="${iphonesimulator-platform}/${gcc}" dest="${buildDir}" verbose="true">\r
+                       <arg line="-isysroot ${iphonesimulator-sdk} -arch i386 ${gcc-opts}"/>\r
+                       <arg value="-Ijni-headers"/>\r
+                       <arg value="-Ijni-headers/${jniPlatform}"/>\r
+                       <arg value="-I."/>\r
+                       %headerDirs%\r
+                       <srcfile/>\r
+                       <arg value="-o"/>\r
+                       <targetfile/>\r
+                       <fileset refid="gcc-files"/>\r
+                       <compositemapper>\r
+                               <mapper type="glob" from="*.c" to="*.o"/>\r
+                       </compositemapper>\r
+               </apply>\r
+       </target>       \r
+\r
+       <!-- links the shared library based on the previously compiled object files -->\r
+       <target name="link-386" depends="compile-386">\r
+               <fileset dir="${buildDir}" id="objFileSet">\r
+                       <patternset>\r
+                               <include name="**/*.o" />\r
+                       </patternset>\r
+               </fileset>\r
+               <pathconvert pathsep=" " property="objFiles" refid="objFileSet" />\r
+               <mkdir dir="${libsDir}" />\r
+               <exec executable="${iphonesimulator-platform}/${linker}" failonerror="true" dir="${buildDir}">\r
+                       <arg line="${linker-opts}" />\r
+                       <arg path="${libsDir}/${libName}.386" />\r
+                       <arg line="${objFiles}"/>\r
+                       <arg line="${libraries}" />\r
+               </exec>\r
+       </target>\r
+       \r
+       <!-- compiles all C and C++ files to object files in the build directory, for 386 builds-->\r
+       <target name="compile-arm" depends="create-build-dir,clean-objfiles">\r
+               <mkdir dir="${buildDir}"/>\r
+               <apply failonerror="true" executable="${iphoneos-platform}/${g++}" dest="${buildDir}" verbose="true">\r
+                       <arg line="-isysroot ${iphoneos-sdk} -arch armv7 ${g++-opts}"/>\r
+                       <arg value="-Ijni-headers"/>\r
+                       <arg value="-Ijni-headers/${jniPlatform}"/>\r
+                       <arg value="-I."/>\r
+                       %headerDirs%\r
+                       <srcfile/>\r
+                       <arg value="-o"/>\r
+                       <targetfile/>\r
+                       <fileset refid="g++-files"/>\r
+                       <compositemapper>\r
+                               <mapper type="glob" from="*.cpp" to="*.o"/>\r
+                               <mapper type="glob" from="*.mm" to="*.o"/>\r
+                       </compositemapper>\r
+               </apply>\r
+               <apply failonerror="true" executable="${iphoneos-platform}/${gcc}" dest="${buildDir}" verbose="true">\r
+                       <arg line="-isysroot ${iphoneos-sdk} -arch armv7 ${gcc-opts}"/>\r
+                       <arg value="-Ijni-headers"/>\r
+                       <arg value="-Ijni-headers/${jniPlatform}"/>\r
+                       <arg value="-I."/>\r
+                       %headerDirs%\r
+                       <srcfile/>\r
+                       <arg value="-o"/>\r
+                       <targetfile/>\r
+                       <fileset refid="gcc-files"/>\r
+                       <compositemapper>\r
+                               <mapper type="glob" from="*.c" to="*.o"/>\r
+                       </compositemapper>\r
+               </apply>\r
+       </target>       \r
+\r
+       <!-- links the shared library based on the previously compiled object files -->\r
+       <target name="link-arm" depends="compile-arm">\r
+               <fileset dir="${buildDir}" id="objFileSet">\r
+                       <patternset>\r
+                               <include name="**/*.o" />\r
+                       </patternset>\r
+               </fileset>\r
+               <pathconvert pathsep=" " property="objFiles" refid="objFileSet" />\r
+               <mkdir dir="${libsDir}" />\r
+               <exec executable="${iphoneos-platform}/${linker}" failonerror="true" dir="${buildDir}">\r
+                       <arg line="${linker-opts}" />\r
+                       <arg path="${libsDir}/${libName}.armv7" />\r
+                       <arg line="${objFiles}"/>\r
+                       <arg line="${libraries}" />\r
+               </exec>\r
+       </target>\r
+\r
+       <target name="link-fat">\r
+               <exec executable="lipo" failonerror="true" dir="${libsDir}">\r
+                       <arg line="-create -output ${libName} ${libName}.386 ${libName}.armv7"/>\r
+               </exec>\r
+       </target>\r
+\r
+       <target name="postcompile" depends="link-386,link-arm,link-fat">\r
+               %postcompile%\r
+       </target>\r
+</project>\r
diff --git a/gdx/jni/build-ios32.xml b/gdx/jni/build-ios32.xml
new file mode 100755 (executable)
index 0000000..54d559c
--- /dev/null
@@ -0,0 +1,186 @@
+<project name="gdx-IOS-32" basedir="." default="postcompile">\r
+       <!-- include the environment -->\r
+       <property environment="env"/>   \r
+       <!-- output directory for temporary object files -->\r
+       <property name="buildDir" value="../target/native/ios32" />\r
+       <!-- output directory for the shared library -->\r
+       <property name="libsDir" value="../libs/ios32" />\r
+       <!-- the name of the shared library -->\r
+       <property name="libName" value="libgdx.a"/>\r
+       <!-- the jni header jniPlatform to use -->\r
+       <property name="jniPlatform" value="mac"/>\r
+       <!-- the compilerPrefix for the C & C++ compilers -->\r
+       <property name="compilerPrefix" value=""/>      \r
+       <property name="iphoneos-platform" value="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin"/>\r
+       <property name="iphoneos-sdk" value="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/"/>\r
+       <property name="iphonesimulator-platform" value="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin"/>\r
+       <property name="iphonesimulator-sdk" value="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/"/>\r
+       \r
+       <!-- define gcc compiler, options and files to compile -->\r
+       <property name="gcc" value="${compilerPrefix}gcc"/>     \r
+       <property name="gcc-opts" value="-c -Wall -O2"/>\r
+       <fileset id="gcc-files" dir="./">\r
+               <exclude name="target/"/>               \r
+                               <include name="memcpy_wrap.c"/>
+               <include name="**/*.c"/>
+\r
+               \r
+       </fileset>\r
+       \r
+       <!-- define g++ compiler, options and files to compile -->\r
+       <property name="g++" value="${compilerPrefix}g++"/>\r
+       <property name="g++-opts" value="-c -Wall -O2"/>\r
+       <fileset id="g++-files" dir="./">\r
+               <exclude name="target/"/>\r
+                               <include name="**/*.cpp"/>
+\r
+               \r
+       </fileset>\r
+\r
+       <!-- define linker and options -->\r
+       <property name="linker" value="${compilerPrefix}ar"/>\r
+       <property name="linker-opts" value="rcs"/>\r
+       <property name="libraries" value=""/>\r
+       \r
+       <!-- cleans the build directory, removes all object files and shared libs -->\r
+       <target name="clean">\r
+               <delete includeemptydirs="true" quiet="true">\r
+                       <fileset dir="${buildDir}"/>\r
+                       <fileset dir="${libsDir}" includes="**/*" excludes="**/.svn"/>\r
+               </delete>\r
+       </target>\r
+       \r
+       <target name="clean-objfiles">\r
+               <delete>\r
+                       <fileset dir="${buildDir}">\r
+                               <include name="**/*.o"/>\r
+                       </fileset>\r
+               </delete>\r
+       </target>\r
+       \r
+       <target name="create-build-dir">\r
+               <!-- FIXME this is pretty nasty :/ -->\r
+               <copy todir="${buildDir}">\r
+                       <fileset refid="g++-files"/>\r
+                       <fileset refid="gcc-files"/>\r
+               </copy>\r
+               <delete>\r
+                       <fileset dir="${buildDir}">\r
+                               <include name="*"/>\r
+                               <exclude name="*.o"/>\r
+                       </fileset>\r
+               </delete>\r
+       </target>\r
+\r
+       <!-- compiles all C and C++ files to object files in the build directory, for 386 builds-->\r
+       <target name="compile-386" depends="clean,create-build-dir">\r
+               <mkdir dir="${buildDir}"/>\r
+               <apply failonerror="true" executable="${iphonesimulator-platform}/${g++}" dest="${buildDir}" verbose="true">\r
+                       <arg line="-isysroot ${iphonesimulator-sdk} -arch i386 ${g++-opts}"/>\r
+                       <arg value="-Ijni-headers"/>\r
+                       <arg value="-Ijni-headers/${jniPlatform}"/>\r
+                       <arg value="-I."/>\r
+                       \r
+                       <srcfile/>\r
+                       <arg value="-o"/>\r
+                       <targetfile/>\r
+                       <fileset refid="g++-files"/>\r
+                       <compositemapper>\r
+                               <mapper type="glob" from="*.cpp" to="*.o"/>\r
+                               <mapper type="glob" from="*.mm" to="*.o"/>\r
+                       </compositemapper>\r
+               </apply>\r
+               <apply failonerror="true" executable="${iphonesimulator-platform}/${gcc}" dest="${buildDir}" verbose="true">\r
+                       <arg line="-isysroot ${iphonesimulator-sdk} -arch i386 ${gcc-opts}"/>\r
+                       <arg value="-Ijni-headers"/>\r
+                       <arg value="-Ijni-headers/${jniPlatform}"/>\r
+                       <arg value="-I."/>\r
+                       \r
+                       <srcfile/>\r
+                       <arg value="-o"/>\r
+                       <targetfile/>\r
+                       <fileset refid="gcc-files"/>\r
+                       <compositemapper>\r
+                               <mapper type="glob" from="*.c" to="*.o"/>\r
+                       </compositemapper>\r
+               </apply>\r
+       </target>       \r
+\r
+       <!-- links the shared library based on the previously compiled object files -->\r
+       <target name="link-386" depends="compile-386">\r
+               <fileset dir="${buildDir}" id="objFileSet">\r
+                       <patternset>\r
+                               <include name="**/*.o" />\r
+                       </patternset>\r
+               </fileset>\r
+               <pathconvert pathsep=" " property="objFiles" refid="objFileSet" />\r
+               <mkdir dir="${libsDir}" />\r
+               <exec executable="${iphonesimulator-platform}/${linker}" failonerror="true" dir="${buildDir}">\r
+                       <arg line="${linker-opts}" />\r
+                       <arg path="${libsDir}/${libName}.386" />\r
+                       <arg line="${objFiles}"/>\r
+                       <arg line="${libraries}" />\r
+               </exec>\r
+       </target>\r
+       \r
+       <!-- compiles all C and C++ files to object files in the build directory, for 386 builds-->\r
+       <target name="compile-arm" depends="create-build-dir,clean-objfiles">\r
+               <mkdir dir="${buildDir}"/>\r
+               <apply failonerror="true" executable="${iphoneos-platform}/${g++}" dest="${buildDir}" verbose="true">\r
+                       <arg line="-isysroot ${iphoneos-sdk} -arch armv7 ${g++-opts}"/>\r
+                       <arg value="-Ijni-headers"/>\r
+                       <arg value="-Ijni-headers/${jniPlatform}"/>\r
+                       <arg value="-I."/>\r
+                       \r
+                       <srcfile/>\r
+                       <arg value="-o"/>\r
+                       <targetfile/>\r
+                       <fileset refid="g++-files"/>\r
+                       <compositemapper>\r
+                               <mapper type="glob" from="*.cpp" to="*.o"/>\r
+                               <mapper type="glob" from="*.mm" to="*.o"/>\r
+                       </compositemapper>\r
+               </apply>\r
+               <apply failonerror="true" executable="${iphoneos-platform}/${gcc}" dest="${buildDir}" verbose="true">\r
+                       <arg line="-isysroot ${iphoneos-sdk} -arch armv7 ${gcc-opts}"/>\r
+                       <arg value="-Ijni-headers"/>\r
+                       <arg value="-Ijni-headers/${jniPlatform}"/>\r
+                       <arg value="-I."/>\r
+                       \r
+                       <srcfile/>\r
+                       <arg value="-o"/>\r
+                       <targetfile/>\r
+                       <fileset refid="gcc-files"/>\r
+                       <compositemapper>\r
+                               <mapper type="glob" from="*.c" to="*.o"/>\r
+                       </compositemapper>\r
+               </apply>\r
+       </target>       \r
+\r
+       <!-- links the shared library based on the previously compiled object files -->\r
+       <target name="link-arm" depends="compile-arm">\r
+               <fileset dir="${buildDir}" id="objFileSet">\r
+                       <patternset>\r
+                               <include name="**/*.o" />\r
+                       </patternset>\r
+               </fileset>\r
+               <pathconvert pathsep=" " property="objFiles" refid="objFileSet" />\r
+               <mkdir dir="${libsDir}" />\r
+               <exec executable="${iphoneos-platform}/${linker}" failonerror="true" dir="${buildDir}">\r
+                       <arg line="${linker-opts}" />\r
+                       <arg path="${libsDir}/${libName}.armv7" />\r
+                       <arg line="${objFiles}"/>\r
+                       <arg line="${libraries}" />\r
+               </exec>\r
+       </target>\r
+\r
+       <target name="link-fat">\r
+               <exec executable="lipo" failonerror="true" dir="${libsDir}">\r
+                       <arg line="-create -output ${libName} ${libName}.386 ${libName}.armv7"/>\r
+               </exec>\r
+       </target>\r
+\r
+       <target name="postcompile" depends="link-386,link-arm,link-fat">\r
+               \r
+       </target>\r
+</project>\r
index 43dbc5e..077eade 100644 (file)
@@ -25,6 +25,7 @@
                        <fileset dir="../libs/linux32" includes="libgdx.so"/>
                        <fileset dir="../libs/linux64" includes="libgdx64.so"/>
                        <fileset dir="../libs/android32" includes="libgdx.so"/>
+                       <fileset dir="../libs/ios32" includes="libgdx.a"/>
 
                </jar>
        </target>
index f2f43c2..ba87534 100644 (file)
@@ -6,7 +6,7 @@
         JNIEXPORT jlong JNICALL Java_com_badlogic_gdx_physics_box2d_ChainShape_newChainShape(JNIEnv* env, jobject object) {
 
 
-//@line:31
+//@line:32
 \r
                return (jlong)(new b2ChainShape());\r
        
@@ -17,7 +17,7 @@ JNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_ChainShape_jniCreateL
        float* verts = (float*)env->GetPrimitiveArrayCritical(obj_verts, 0);
 
 
-//@line:55
+//@line:57
 \r
                b2ChainShape* chain = (b2ChainShape*)addr;\r
                b2Vec2* verticesOut = new b2Vec2[numVertices];\r
@@ -34,7 +34,7 @@ JNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_ChainShape_jniCreateC
        float* verts = (float*)env->GetPrimitiveArrayCritical(obj_verts, 0);
 
 
-//@line:75
+//@line:78
 \r
                b2ChainShape* chain = (b2ChainShape*)addr;\r
                b2Vec2* verticesOut = new b2Vec2[numVertices];\r
@@ -50,7 +50,7 @@ JNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_ChainShape_jniCreateC
 JNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_ChainShape_jniSetPrevVertex(JNIEnv* env, jobject object, jlong addr, jfloat x, jfloat y) {
 
 
-//@line:94
+//@line:97
 \r
                b2ChainShape* chain = (b2ChainShape*)addr;\r
                chain->SetPrevVertex(b2Vec2(x, y));\r
@@ -61,7 +61,7 @@ JNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_ChainShape_jniSetPrev
 JNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_ChainShape_jniSetNextVertex(JNIEnv* env, jobject object, jlong addr, jfloat x, jfloat y) {
 
 
-//@line:109
+//@line:112
 \r
                b2ChainShape* chain = (b2ChainShape*)addr;\r
                chain->SetNextVertex(b2Vec2(x, y));\r
@@ -72,7 +72,7 @@ JNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_ChainShape_jniSetNext
 JNIEXPORT jint JNICALL Java_com_badlogic_gdx_physics_box2d_ChainShape_jniGetVertexCount(JNIEnv* env, jobject object, jlong addr) {
 
 
-//@line:119
+//@line:122
 \r
                b2ChainShape* chain = (b2ChainShape*)addr;\r
                return chain->GetVertexCount();\r
@@ -84,7 +84,7 @@ JNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_ChainShape_jniGetVert
        float* verts = (float*)env->GetPrimitiveArrayCritical(obj_verts, 0);
 
 
-//@line:135
+//@line:138
 \r
                b2ChainShape* chain = (b2ChainShape*)addr;\r
                const b2Vec2 v = chain->GetVertex( index );\r
index d7a81a6..3aab4b9 100644 (file)
@@ -45,8 +45,9 @@ public class GdxBuild {
                BuildTarget lin64 = BuildTarget.newDefaultTarget(TargetOs.Linux, true);\r
                BuildTarget android = BuildTarget.newDefaultTarget(TargetOs.Android, false);\r
                BuildTarget mac = BuildTarget.newDefaultTarget(TargetOs.MacOsX, false);\r
+               BuildTarget ios = BuildTarget.newDefaultTarget(TargetOs.IOS, false);\r
                new AntScriptGenerator().generate(new BuildConfig("gdx", "../target/native", LIBS_DIR, JNI_DIR), mac, win32home, win32,\r
-                       win64, lin32, lin64, android);\r
+                       win64, lin32, lin64, android, ios);\r
 \r
                // build natives\r
                // BuildExecutor.executeAnt("jni/build-windows32home.xml", "-v");\r