|
|
@ -1,7 +1,7 @@ |
|
|
|
<condition property="android-adb-name" value="${file.separator}platform-tools${file.separator}adb.exe" else="${file.separator}platform-tools${file.separator}adb"> |
|
|
|
<condition property="android-adb-name" value="${file.separator}platform-tools${file.separator}adb.exe" else="${file.separator}platform-tools${file.separator}adb"> |
|
|
|
<os family="windows" /> |
|
|
|
<os family="windows" /> |
|
|
|
</condition> |
|
|
|
</condition> |
|
|
|
|
|
|
|
|
|
|
|
<target name="run-android" depends="-flag-no-android, jar, -test-android-enabled, -copy-android-libs" if="is.android.enabled"> |
|
|
|
<target name="run-android" depends="-flag-no-android, jar, -test-android-enabled, -copy-android-libs" if="is.android.enabled"> |
|
|
|
<echo>Building debug android application version.</echo> |
|
|
|
<echo>Building debug android application version.</echo> |
|
|
|
<ant dir="mobile" target="debug" inheritall="false"/> |
|
|
|
<ant dir="mobile" target="debug" inheritall="false"/> |
|
|
@ -9,11 +9,11 @@ |
|
|
|
<ant dir="mobile" target="installd" inheritall="false"/> |
|
|
|
<ant dir="mobile" target="installd" inheritall="false"/> |
|
|
|
<antcall target="-run-android-device"/> |
|
|
|
<antcall target="-run-android-device"/> |
|
|
|
</target> |
|
|
|
</target> |
|
|
|
|
|
|
|
|
|
|
|
<target name="clean-android"> |
|
|
|
<target name="clean-android"> |
|
|
|
<ant dir="mobile" target="clean" inheritall="false"/> |
|
|
|
<ant dir="mobile" target="clean" inheritall="false"/> |
|
|
|
</target> |
|
|
|
</target> |
|
|
|
|
|
|
|
|
|
|
|
<target name="-mobile-deployment" depends="-test-android-enabled, -copy-android-libs" if="is.android.enabled" unless="no.android.build"> |
|
|
|
<target name="-mobile-deployment" depends="-test-android-enabled, -copy-android-libs" if="is.android.enabled" unless="no.android.build"> |
|
|
|
<ant dir="mobile" target="release" inheritall="false"/> |
|
|
|
<ant dir="mobile" target="release" inheritall="false"/> |
|
|
|
<copy todir="dist" verbose="false" flatten="true"> |
|
|
|
<copy todir="dist" verbose="false" flatten="true"> |
|
|
@ -29,6 +29,7 @@ |
|
|
|
<mkdir dir="mobile/libs"/> |
|
|
|
<mkdir dir="mobile/libs"/> |
|
|
|
<copy todir="mobile/libs" verbose="false" flatten="true"> |
|
|
|
<copy todir="mobile/libs" verbose="false" flatten="true"> |
|
|
|
<fileset dir="dist/lib/"> |
|
|
|
<fileset dir="dist/lib/"> |
|
|
|
|
|
|
|
<exclude name="${assets.jar.name}"/> |
|
|
|
<exclude name="jME3-desktop.jar"/> |
|
|
|
<exclude name="jME3-desktop.jar"/> |
|
|
|
<exclude name="jME3-blender.jar"/> |
|
|
|
<exclude name="jME3-blender.jar"/> |
|
|
|
<exclude name="jME3-lwjgl.jar"/> |
|
|
|
<exclude name="jME3-lwjgl.jar"/> |
|
|
@ -51,21 +52,30 @@ |
|
|
|
</path> |
|
|
|
</path> |
|
|
|
</copy> |
|
|
|
</copy> |
|
|
|
<antcall target="-unzip-bullet-libs"/> |
|
|
|
<antcall target="-unzip-bullet-libs"/> |
|
|
|
|
|
|
|
<antcall target="-unzip-assets"/> |
|
|
|
<copy file="${dist.jar}" todir="mobile/libs/" verbose="false"/> |
|
|
|
<copy file="${dist.jar}" todir="mobile/libs/" verbose="false"/> |
|
|
|
</target> |
|
|
|
</target> |
|
|
|
|
|
|
|
|
|
|
|
<target name="-unzip-bullet-libs" depends="-delete-bullet-libs" if="bulletIsIncluded"> |
|
|
|
<target name="-unzip-bullet-libs" depends="-delete-bullet-libs" if="bulletIsIncluded"> |
|
|
|
<echo>Replacing bullet library with android native version.</echo> |
|
|
|
<echo>Replacing bullet library with android native version.</echo> |
|
|
|
<unzip src="mobile/libs/jME3-bullet-natives-android.jar" dest="mobile/libs"/> |
|
|
|
<unzip src="mobile/libs/jME3-bullet-natives-android.jar" dest="mobile/libs"/> |
|
|
|
<delete file="mobile/libs/jME3-bullet-natives-android.jar"/> |
|
|
|
<delete file="mobile/libs/jME3-bullet-natives-android.jar"/> |
|
|
|
<delete dir="mobile/libs/x86"/> |
|
|
|
<delete dir="mobile/libs/x86"/> |
|
|
|
</target> |
|
|
|
</target> |
|
|
|
|
|
|
|
|
|
|
|
<target name="-delete-bullet-libs" depends="-test-bullet-included" unless="bulletIsIncluded"> |
|
|
|
<target name="-delete-bullet-libs" depends="-test-bullet-included" unless="bulletIsIncluded"> |
|
|
|
<delete file="mobile/libs/jME3-bullet.jar"/> |
|
|
|
<delete file="mobile/libs/jME3-bullet.jar"/> |
|
|
|
<delete file="mobile/libs/jME3-bullet-natives-android.jar"/> |
|
|
|
<delete file="mobile/libs/jME3-bullet-natives-android.jar"/> |
|
|
|
</target> |
|
|
|
</target> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<target name="-unzip-assets"> |
|
|
|
|
|
|
|
<echo>Unzipping Assets to Android Directories</echo> |
|
|
|
|
|
|
|
<delete dir="mobile/assets" failonerror="false"/> |
|
|
|
|
|
|
|
<mkdir dir="mobile/assets"/> |
|
|
|
|
|
|
|
<unzip src="dist/lib/${assets.jar.name}" dest="mobile/assets"/> |
|
|
|
|
|
|
|
<delete file="mobile/libs/${assets.jar.name}" failonerror="true"/> |
|
|
|
|
|
|
|
</target> |
|
|
|
|
|
|
|
|
|
|
|
<target name="-test-bullet-included"> |
|
|
|
<target name="-test-bullet-included"> |
|
|
|
<condition property="bulletIsIncluded"> |
|
|
|
<condition property="bulletIsIncluded"> |
|
|
|
<contains string="${javac.classpath}" substring="bullet.jar"/> |
|
|
|
<contains string="${javac.classpath}" substring="bullet.jar"/> |
|
|
@ -82,7 +92,7 @@ |
|
|
|
<arg value="wait-for-device"/> |
|
|
|
<arg value="wait-for-device"/> |
|
|
|
</exec> |
|
|
|
</exec> |
|
|
|
</target> |
|
|
|
</target> |
|
|
|
|
|
|
|
|
|
|
|
<target name="-run-android-device"> |
|
|
|
<target name="-run-android-device"> |
|
|
|
<property file="mobile/local.properties"/> |
|
|
|
<property file="mobile/local.properties"/> |
|
|
|
<exec executable="${sdk.dir}${android-adb-name}" failonerror="true"> |
|
|
|
<exec executable="${sdk.dir}${android-adb-name}" failonerror="true"> |
|
|
@ -102,13 +112,13 @@ |
|
|
|
<arg value="NSLog:*"/> |
|
|
|
<arg value="NSLog:*"/> |
|
|
|
</exec> |
|
|
|
</exec> |
|
|
|
</target> |
|
|
|
</target> |
|
|
|
|
|
|
|
|
|
|
|
<target name="-test-android-enabled"> |
|
|
|
<target name="-test-android-enabled"> |
|
|
|
<condition property="is.android.enabled"> |
|
|
|
<condition property="is.android.enabled"> |
|
|
|
<istrue value="${mobile.android.enabled}"/> |
|
|
|
<istrue value="${mobile.android.enabled}"/> |
|
|
|
</condition> |
|
|
|
</condition> |
|
|
|
</target> |
|
|
|
</target> |
|
|
|
|
|
|
|
|
|
|
|
<target name="-flag-no-android"> |
|
|
|
<target name="-flag-no-android"> |
|
|
|
<property name="no.android.build" value="true"/> |
|
|
|
<property name="no.android.build" value="true"/> |
|
|
|
</target> |
|
|
|
</target> |
|
|
|