- add change to android build script to unpack assets to android assets folder (thanks @iwgeric)

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9868 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 12 years ago
parent 4bff5fd829
commit 8430864ce6
  1. 2
      sdk/jme3-android/src/com/jme3/gde/android/MobileCompositeProvider.java
  2. 30
      sdk/jme3-android/src/com/jme3/gde/android/mobile-targets.xml

@ -57,7 +57,7 @@ public class MobileCompositeProvider implements ProjectCustomizer.CompositeCateg
private class SavePropsListener implements ActionListener {
private String extensionName = "mobile";
private String extensionVersion = "v0.18";
private String extensionVersion = "v0.19";
private String[] extensionDependencies = new String[]{"jar", "-mobile-deployment"};
private ProjectExtensionManager manager = new ProjectExtensionManager(extensionName, extensionVersion, extensionDependencies);
private ProjectExtensionProperties properties;

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

Loading…
Cancel
Save