OSDN Git Service

merged nate's stuff...
[mikumikustudio/libgdx-mikumikustudio.git] / build-template.xml
index 0a7607f..c0089e9 100644 (file)
@@ -19,9 +19,11 @@ zipfileset id="jarfiles" -> the jar files to be merged with the project's classe
        <property name="target" value="target" />\r
        <property name="libs" value="libs" />\r
        <zipfileset id="jarfiles" dir="." excludes="**"/>\r
+       <fileset id="resourcefiles" dir="." excludes="**"/>\r
        \r
-       <!-- clean output directories -->       \r
+       <!-- clean output directories, create libs directory -->        \r
        <target name="clean">           \r
+               <mkdir dir="${libs}" />\r
                <delete dir="${target}" />\r
        </target>\r
 \r
@@ -29,9 +31,6 @@ zipfileset id="jarfiles" -> the jar files to be merged with the project's classe
        <target name="init" depends="clean">            \r
                <mkdir dir="${target}" />\r
                <mkdir dir="${target}/java" />\r
-               <!-- need to copy the internal font to target if compiling the gdx core :/ -->\r
-               <copy failonerror="false" tofile="${target}/java/com/badlogic/gdx/utils/arial-15.png" file="src/com/badlogic/gdx/utils/arial-15.png" />\r
-               <copy failonerror="false" tofile="${target}/java/com/badlogic/gdx/utils/arial-15.fnt" file="src/com/badlogic/gdx/utils/arial-15.fnt" />\r
                <!-- need to copy jni headers for gdx-jnigen -->\r
                <copy failonerror="false" todir="${target}/java">\r
                        <fileset dir="src">\r
@@ -48,7 +47,7 @@ zipfileset id="jarfiles" -> the jar files to be merged with the project's classe
 \r
        <!-- compiles the java code -->\r
        <target name="compile" depends="init">\r
-               <javac debug="on" encoding="utf-8" source="1.6" target="1.6" destdir="${target}/java">\r
+               <javac debug="on" encoding="utf-8" source="1.6" target="1.6" destdir="${target}/java" includeantruntime="false">\r
                        <src>\r
                                <path refid="src"/>\r
                        </src>\r
@@ -77,6 +76,7 @@ zipfileset id="jarfiles" -> the jar files to be merged with the project's classe
                <mkdir dir="${libs}/android32" />\r
                <mkdir dir="${libs}/armeabi" />\r
                <mkdir dir="${libs}/armeabi-v7a" />\r
+        <mkdir dir="${libs}/x86" />\r
                <mkdir dir="${libs}/linux32" />\r
                <mkdir dir="${libs}/linux64" />\r
                <mkdir dir="${libs}/macosx32" />\r
@@ -86,17 +86,6 @@ zipfileset id="jarfiles" -> the jar files to be merged with the project's classe
                <echo message="compiling natives code"/>\r
                <ant antfile="build.xml" target="clean" dir="${jni}"/>\r
                <ant antfile="build.xml" target="all" dir="${jni}"/>\r
-               <!-- copy shared libs for android -->\r
-               <copy failonerror="false" todir="${distDir}/armeabi">\r
-                       <fileset dir="${libs}/armeabi">\r
-                               <include name="**/*.so"/>\r
-                       </fileset>\r
-               </copy>\r
-               <copy failonerror="false" todir="${distDir}/armeabi-v7a">\r
-                       <fileset dir="${libs}/armeabi-v7a">\r
-                               <include name="**/*.so"/>\r
-                       </fileset>\r
-               </copy>\r
        </target>\r
        \r
        <!-- create source and class jar -->\r
@@ -115,7 +104,7 @@ zipfileset id="jarfiles" -> the jar files to be merged with the project's classe
                        </fileset>\r
                </copy>\r
                \r
-               <!-- copy shared libs for android -->\r
+               <!-- copy shared libs for android & ios -->\r
                <copy failonerror="false" todir="${distDir}/armeabi">\r
                        <fileset dir="${libs}/armeabi">\r
                                <include name="**/*.so"/>\r
@@ -126,15 +115,27 @@ zipfileset id="jarfiles" -> the jar files to be merged with the project's classe
                                <include name="**/*.so"/>\r
                        </fileset>\r
                </copy>\r
+        <copy failonerror="false" todir="${distDir}/x86">\r
+                       <fileset dir="${libs}/x86">\r
+                               <include name="**/*.so"/>\r
+                       </fileset>\r
+               </copy>\r
+        <copy failonerror="false" todir="${distDir}/ios">\r
+                       <fileset dir="${libs}/ios32">\r
+                               <include name="**/*.a"/>\r
+                       </fileset>\r
+               </copy>\r
                \r
                <!-- class jar -->\r
                <jar destfile="${distDir}/${jar}.jar">\r
                        <fileset dir="${target}/java"/>\r
+                       <fileset refid="resourcefiles"/>\r
                        <!-- merge dependencies found in libs/ folder, exclude native, debug and android/gwt jars -->\r
                        <zipgroupfileset file="${libs}/*.jar">\r
                                <exclude name="*-natives.jar"/>\r
                                <exclude name="*-debug.jar"/>\r
                                <exclude name="android-*.jar"/>\r
+                <exclude name="robovm-*.jar"/>\r
                                <exclude name="gwt*.jar"/>\r
                        </zipgroupfileset>\r
                        <!-- merge dependencies specified in parent build.xml -->\r