Permalink
Browse files

fixed up ant build to exclude monotouch, some simplifications

  • Loading branch information...
1 parent a111596 commit 2786be678a53a3d6b6c6acc09086643f7f1b508c @badlogic badlogic committed Oct 5, 2013
View
@@ -1,45 +1,13 @@
<project name="gdx-ios-build" default="all" basedir=".">
- <!-- compile the distribution so we have all jars we need, do not compile natives -->
- <target name="compile-jars">
- <ant antfile="build.xml" dir=".">
- <property name="compile-natives" value="false"/>
- </ant>
- </target>
-
- <target name="ios-java-only">
- <ant antfile="build.xml" target="gdx-backend-iosmonotouch" dir=".">
- <property name="compile-natives" value="false"/>
- </ant>
- <ant antfile="convert-ikvm.xml" dir=".">
- <property name="IN" value="-srcpath:gdx/src/ dist/gdx.jar"/>
- <property name="OUT" value="gdx/libs/ios32/gdx.dll"/>
- </ant>
- <ant antfile="convert-ikvm.xml" dir=".">
- <property name="IN" value="-r:gdx/libs/ios32/gdx.dll -srcpath:backends/gdx-backend-iosmonotouch/src/ dist/gdx-backend-iosmonotouch.jar"/>
- <property name="OUT" value="backends/gdx-backend-iosmonotouch/libs/ios32/gdx-backend-ios.dll"/>
- </ant>
- </target>
- <target name="core" depends="compile-jars">
+ <target name="core">
<ant antfile="build-macosx32.xml" dir="gdx/jni">
<target name="clean"/>
<target name="postcompile"/>
</ant>
-
<ant antfile="build-ios32.xml" dir="gdx/jni"/>
- <ant antfile="convert-ikvm.xml" dir=".">
- <property name="IN" value="-srcpath:gdx/src/ dist/gdx.jar"/>
- <property name="OUT" value="gdx/libs/ios32/gdx.dll"/>
- </ant>
</target>
- <target name="backend-iosmonotouch" depends="core">
- <ant antfile="convert-ikvm.xml" dir=".">
- <property name="IN" value="-r:gdx/libs/ios32/gdx.dll -srcpath:backends/gdx-backend-iosmonotouch/src/ dist/gdx-backend-iosmonotouch.jar"/>
- <property name="OUT" value="backends/gdx-backend-iosmonotouch/libs/ios32/gdx-backend-ios.dll"/>
- </ant>
- </target>
-
<target name="backend-robovm" depends="core">
<exec dir="backends/gdx-backend-robovm" executable="/bin/bash">
<arg value="build-objectal.sh"/>
@@ -52,10 +20,6 @@
<target name="postcompile"/>
</ant>
<ant antfile="build-ios32.xml" dir="extensions/gdx-freetype/jni"/>
- <ant antfile="convert-ikvm.xml" dir=".">
- <property name="IN" value="-r:gdx/libs/ios32/gdx.dll -srcpath:extensions/gdx-freetype/src/ dist/extensions/gdx-freetype/gdx-freetype.jar"/>
- <property name="OUT" value="extensions/gdx-freetype/libs/ios32/gdx-freetype.dll"/>
- </ant>
</target>
<target name="bullet" depends="core">
@@ -64,10 +28,6 @@
<target name="postcompile"/>
</ant>
<ant antfile="build-ios32.xml" dir="extensions/gdx-bullet/jni"/>
- <ant antfile="convert-ikvm.xml" dir=".">
- <property name="IN" value="-r:gdx/libs/ios32/gdx.dll -srcpath:extensions/gdx-bullet/src/ dist/extensions/gdx-bullet/gdx-bullet.jar"/>
- <property name="OUT" value="extensions/gdx-bullet/libs/ios32/gdx-bullet.dll"/>
- </ant>
</target>
<target name="controllers" depends="core">
@@ -91,6 +51,6 @@
</ant>
</target>
- <target name="all" depends="core,backend-iosmonotouch,backend-robovm,freetype,bullet,audio,image,controllers">
+ <target name="all" depends="core,backend-robovm,freetype,bullet,audio,image,controllers">
</target>
</project>
View
@@ -86,22 +86,6 @@ zipfileset id="jarfiles" -> the jar files to be merged with the project's classe
<echo message="compiling natives code"/>
<ant antfile="build.xml" target="clean" dir="${jni}"/>
<ant antfile="build.xml" target="all" dir="${jni}"/>
- <!-- copy shared libs for android -->
- <copy failonerror="false" todir="${distDir}/armeabi">
- <fileset dir="${libs}/armeabi">
- <include name="**/*.so"/>
- </fileset>
- </copy>
- <copy failonerror="false" todir="${distDir}/armeabi-v7a">
- <fileset dir="${libs}/armeabi-v7a">
- <include name="**/*.so"/>
- </fileset>
- </copy>
- <copy failonerror="false" todir="${distDir}/x86">
- <fileset dir="${libs}/x86">
- <include name="**/*.so"/>
- </fileset>
- </copy>
</target>
<!-- create source and class jar -->
@@ -120,7 +104,7 @@ zipfileset id="jarfiles" -> the jar files to be merged with the project's classe
</fileset>
</copy>
- <!-- copy shared libs for android -->
+ <!-- copy shared libs for android & ios -->
<copy failonerror="false" todir="${distDir}/armeabi">
<fileset dir="${libs}/armeabi">
<include name="**/*.so"/>
@@ -136,6 +120,11 @@ zipfileset id="jarfiles" -> the jar files to be merged with the project's classe
<include name="**/*.so"/>
</fileset>
</copy>
+ <copy failonerror="false" todir="${distDir}/ios">
+ <fileset dir="${libs}/ios32">
+ <include name="**/*.a"/>
+ </fileset>
+ </copy>
<!-- class jar -->
<jar destfile="${distDir}/${jar}.jar">
View
@@ -2,9 +2,6 @@
<description>libgdx distribution build file</description>
<property environment="env" />
- <!-- ndk directory -->
- <property name="env.NDK_HOME" value="/home/mzechner/android-ndk-r5"/>
-
<!-- library version -->
<property name="version" value="0.9.9-SNAPSHOT"/>
@@ -129,24 +126,6 @@
</ant>
</target>
- <!-- gdx ios-monotouch backend -->
- <target name="gdx-backend-iosmonotouch" depends="gdx-core">
- <path id="classpath">
- <pathelement location="${distDir}/gdx.jar"/>
- <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/monotouch-5.4.0.jar"/>
- <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/mscorlib-4.0.jar"/>
- <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/opentk-5.4.0.jar"/>
- <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/system-2.1.jar"/>
- <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/system-core-2.1.jar"/>
- <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/system-data-2.1.jar"/>
- <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/objectal/libObjectAL.jar"/>
- </path>
- <ant antfile="../../build-template.xml" dir="backends/gdx-backend-iosmonotouch">
- <property name="jar" value="gdx-backend-iosmonotouch"/>
- <reference refid="classpath"/>
- </ant>
- </target>
-
<!-- build the extensions -->
<!-- gdx tools -->
<target name="gdx-tools" depends="gdx-core,gdx-backend-lwjgl,gdx-backend-lwjgl">
@@ -327,62 +306,17 @@
<fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplet.java"/>
<fileset dir="backends" includes="gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidApplication.java"/>
<fileset dir="backends" includes="gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidApplicationConfiguration.java"/>
- <fileset dir="backends" includes="gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSApplication.java"/>
- <fileset dir="backends" includes="gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSApplicationConfiguration.java"/>
<fileset dir="backends" includes="gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtApplication.java"/>
<fileset dir="backends" includes="gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtApplicationConfiguration.java"/>
+ <fileset dir="backends" includes="gdx-backend-robovm/src/com/badlogic/gdx/backends/iosrobovm/IOSApplication.java"/>
+ <fileset dir="backends" includes="gdx-backend-robovm/src/com/badlogic/gdx/backends/iosrobovm/IOSApplicationConfiguration.java"/>
</javadoc>
</target>
- <!-- assumes that all the .dll and .a files have been compiled on a Mac and copied on top
- of the current libgdx folder -->
- <target name="copy-iosfiles">
- <!-- copy dll and .a files as well as IKVM, monotouch and ObjectAL binaries to ios folder-->
- <copy todir="${distDir}/ios" flatten="true" failonerror="false">
- <fileset dir="gdx/libs/ios32/">
- <include name="*.a"/>
- <include name="*.dll"/>
- <include name="*.dll.mdb"/>
- </fileset>
- <fileset dir="backends/gdx-backend-iosmonotouch/libs/ios32">
- <include name="*.dll"/>
- <include name="*.dll.mdb"/>
- <include name="*.a"/>
- </fileset>
- </copy>
- <copy todir="${distDir}/ios/ikvm" failonerror="false">
- <fileset dir="backends/gdx-backend-iosmonotouch/libs/ikvm"/>
- </copy>
- <copy todir="${distDir}/ios/monotouch-jars" failonerror="false">
- <fileset dir="backends/gdx-backend-iosmonotouch/libs/monotouch-jars"/>
- </copy>
- <copy todir="${distDir}/ios/objectal" failonerror="false">
- <fileset dir="backends/gdx-backend-iosmonotouch/libs/objectal"/>
- </copy>
-
- <!-- copy freetype extension dll and .a files -->
- <copy todir="${distDir}/extensions/gdx-freetype/ios" failonerror="false">
- <fileset dir="extensions/gdx-freetype/libs/ios32">
- <include name="*.a"/>
- <include name="*.dll"/>
- <include name="*.dll.mdb"/>
- </fileset>
- </copy>
-
- <!-- copy bullet extension dll and .a files -->
- <copy todir="${distDir}/extensions/gdx-bullet/ios" failonerror="false">
- <fileset dir="extensions/gdx-bullet/libs/ios32">
- <include name="*.a"/>
- <include name="*.dll"/>
- <include name="*.dll.mdb"/>
- </fileset>
- </copy>
- </target>
-
<target name="jars"
-depends="clean,gdx-setup-ui,gdx-core,gdx-openal,gdx-backend-lwjgl,gdx-backend-jglfw,gdx-backend-android,gdx-backend-gwt,gdx-backend-robovm,gdx-backend-iosmonotouch,gdx-tools,gdx-controllers,gdx-controllers-desktop,gdx-controllers-android,gdx-controllers-gwt,gdx-image,gdx-audio,gdx-freetype,gdx-bullet,gdx-tiled-preprocessor"/>
+depends="clean,gdx-setup-ui,gdx-core,gdx-openal,gdx-backend-lwjgl,gdx-backend-jglfw,gdx-backend-android,gdx-backend-gwt,gdx-backend-robovm,gdx-tools,gdx-controllers,gdx-controllers-desktop,gdx-controllers-android,gdx-controllers-gwt,gdx-image,gdx-audio,gdx-freetype,gdx-bullet,gdx-tiled-preprocessor"/>
- <target name="all" depends="jars,docs,copy-iosfiles">
+ <target name="all" depends="jars,docs">
<!-- copy distribution files (licences etc.) -->
<copy tofile="${distDir}/README" file="README.md"/>
<copy tofile="${distDir}/LICENSE" file="LICENSE"/>
@@ -12,35 +12,35 @@
<!-- the compilerPrefix for the C & C++ compilers -->
<property name="compilerPrefix" value=""/>
<property name="iphoneos-platform" value="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin"/>
- <property name="iphoneos-sdk" value="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/"/>
+ <property name="iphoneos-sdk" value="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/"/>
<property name="iphonesimulator-platform" value="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin"/>
- <property name="iphonesimulator-sdk" value="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/"/>
+ <property name="iphonesimulator-sdk" value="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk"/>
<!-- define gcc compiler, options and files to compile -->
- <property name="gcc" value="${compilerPrefix}gcc"/>
+ <property name="gcc" value="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"/>
<property name="gcc-opts" value="-c -Wall -O2 -miphoneos-version-min=5.1"/>
<fileset id="gcc-files" dir="./">
<exclude name="target/"/>
- <include name="memcpy_wrap.c"/>
- <include name="**/*.c"/>
+ <include name="memcpy_wrap.c"/>
+ <include name="**/*.c"/>
- <exclude name="src/bullet/BulletMultiThreaded/GpuSoftBodySolvers/**"/>
+ <exclude name="src/bullet/BulletMultiThreaded/GpuSoftBodySolvers/**"/>
</fileset>
<!-- define g++ compiler, options and files to compile -->
- <property name="g++" value="${compilerPrefix}g++"/>
+ <property name="g++" value="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++"/>
<property name="g++-opts" value="-c -Wall -O2 -miphoneos-version-min=5.1 -fno-strict-aliasing -fno-rtti -DBT_NO_PROFILE"/>
<fileset id="g++-files" dir="./">
<exclude name="target/"/>
- <include name="**/*.cpp"/>
+ <include name="**/*.cpp"/>
- <exclude name="src/bullet/BulletMultiThreaded/GpuSoftBodySolvers/**"/>
+ <exclude name="src/bullet/BulletMultiThreaded/GpuSoftBodySolvers/**"/>
</fileset>
<!-- define linker and options -->
- <property name="linker" value="${compilerPrefix}ar"/>
+ <property name="linker" value="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar"/>
<property name="linker-opts" value="rcs"/>
<property name="libraries" value=""/>
@@ -77,14 +77,14 @@
<!-- compiles all C and C++ files to object files in the build directory, for 386 builds-->
<target name="compile-386" depends="clean,create-build-dir">
<mkdir dir="${buildDir}"/>
- <apply failonerror="true" executable="${iphonesimulator-platform}/${g++}" dest="${buildDir}" verbose="true">
+ <apply failonerror="true" executable="${g++}" dest="${buildDir}" verbose="true">
<arg line="-isysroot ${iphonesimulator-sdk} -arch i386 ${g++-opts}"/>
<arg value="-Ijni-headers"/>
<arg value="-Ijni-headers/${jniPlatform}"/>
<arg value="-I."/>
- <arg value="-Isrc/bullet/"/>
- <arg value="-Isrc/custom/"/>
- <arg value="-Isrc/extras/Serialize/"/>
+ <arg value="-Isrc/bullet/"/>
+ <arg value="-Isrc/custom/"/>
+ <arg value="-Isrc/extras/Serialize/"/>
<srcfile/>
<arg value="-o"/>
@@ -95,14 +95,14 @@
<mapper type="glob" from="*.mm" to="*.o"/>
</compositemapper>
</apply>
- <apply failonerror="true" executable="${iphonesimulator-platform}/${gcc}" dest="${buildDir}" verbose="true">
+ <apply failonerror="true" executable="${gcc}" dest="${buildDir}" verbose="true">
<arg line="-isysroot ${iphonesimulator-sdk} -arch i386 ${gcc-opts}"/>
<arg value="-Ijni-headers"/>
<arg value="-Ijni-headers/${jniPlatform}"/>
<arg value="-I."/>
- <arg value="-Isrc/bullet/"/>
- <arg value="-Isrc/custom/"/>
- <arg value="-Isrc/extras/Serialize/"/>
+ <arg value="-Isrc/bullet/"/>
+ <arg value="-Isrc/custom/"/>
+ <arg value="-Isrc/extras/Serialize/"/>
<srcfile/>
<arg value="-o"/>
@@ -123,7 +123,7 @@
</fileset>
<pathconvert pathsep=" " property="objFiles" refid="objFileSet" />
<mkdir dir="${libsDir}" />
- <exec executable="${iphonesimulator-platform}/${linker}" failonerror="true" dir="${buildDir}">
+ <exec executable="${linker}" failonerror="true" dir="${buildDir}">
<arg line="${linker-opts}" />
<arg path="${libsDir}/${libName}.386" />
<arg line="${objFiles}"/>
@@ -134,14 +134,14 @@
<!-- compiles all C and C++ files to object files in the build directory, for 386 builds-->
<target name="compile-arm" depends="create-build-dir,clean-objfiles">
<mkdir dir="${buildDir}"/>
- <apply failonerror="true" executable="${iphoneos-platform}/${g++}" dest="${buildDir}" verbose="true">
+ <apply failonerror="true" executable="${g++}" dest="${buildDir}" verbose="true">
<arg line="-isysroot ${iphoneos-sdk} -arch armv7 ${g++-opts}"/>
<arg value="-Ijni-headers"/>
<arg value="-Ijni-headers/${jniPlatform}"/>
<arg value="-I."/>
- <arg value="-Isrc/bullet/"/>
- <arg value="-Isrc/custom/"/>
- <arg value="-Isrc/extras/Serialize/"/>
+ <arg value="-Isrc/bullet/"/>
+ <arg value="-Isrc/custom/"/>
+ <arg value="-Isrc/extras/Serialize/"/>
<srcfile/>
<arg value="-o"/>
@@ -152,14 +152,14 @@
<mapper type="glob" from="*.mm" to="*.o"/>
</compositemapper>
</apply>
- <apply failonerror="true" executable="${iphoneos-platform}/${gcc}" dest="${buildDir}" verbose="true">
+ <apply failonerror="true" executable="${gcc}" dest="${buildDir}" verbose="true">
<arg line="-isysroot ${iphoneos-sdk} -arch armv7 ${gcc-opts}"/>
<arg value="-Ijni-headers"/>
<arg value="-Ijni-headers/${jniPlatform}"/>
<arg value="-I."/>
- <arg value="-Isrc/bullet/"/>
- <arg value="-Isrc/custom/"/>
- <arg value="-Isrc/extras/Serialize/"/>
+ <arg value="-Isrc/bullet/"/>
+ <arg value="-Isrc/custom/"/>
+ <arg value="-Isrc/extras/Serialize/"/>
<srcfile/>
<arg value="-o"/>
@@ -180,7 +180,7 @@
</fileset>
<pathconvert pathsep=" " property="objFiles" refid="objFileSet" />
<mkdir dir="${libsDir}" />
- <exec executable="${iphoneos-platform}/${linker}" failonerror="true" dir="${buildDir}">
+ <exec executable="${linker}" failonerror="true" dir="${buildDir}">
<arg line="${linker-opts}" />
<arg path="${libsDir}/${libName}.armv7" />
<arg line="${objFiles}"/>
Oops, something went wrong.

0 comments on commit 2786be6

Please sign in to comment.