Browse Source

SDK: Update mobile-impl.xml in user projects for jME 3.1 libraries

iwgeric 10 years ago
parent
commit
095539b998
1 changed files with 30 additions and 48 deletions
  1. 30 48
      jme3-android/src/com/jme3/gde/android/mobile-targets.xml

+ 30 - 48
jme3-android/src/com/jme3/gde/android/mobile-targets.xml

@@ -29,58 +29,56 @@
         <mkdir dir="mobile/libs"/>
         <mkdir dir="mobile/libs"/>
         <antcall target="-copy-project-libs"/>
         <antcall target="-copy-project-libs"/>
         <antcall target="-add-android-lib"/>
         <antcall target="-add-android-lib"/>
-        <antcall target="-unzip-bullet-libs"/>
+        <antcall target="-add-bullet-libs"/>
         <antcall target="-unzip-assets"/>
         <antcall target="-unzip-assets"/>
         <copy file="${dist.jar}" todir="mobile/libs/" verbose="false" preservelastmodified="true"/>
         <copy file="${dist.jar}" todir="mobile/libs/" verbose="false" preservelastmodified="true"/>
-        <antcall target="-unzip-openal-soft-libs"/>
     </target>
     </target>
 
 
-    <target description="create mobile/libs directory and copy project libraries" name="-copy-project-libs">
+    <target name="-copy-project-libs" description="create mobile/libs directory and copy project libraries">
         <copy todir="mobile/libs" flatten="true" verbose="false" preservelastmodified="true">
         <copy todir="mobile/libs" flatten="true" verbose="false" preservelastmodified="true">
             <path>
             <path>
                 <pathelement path="${run.classpath.without.build.classes.dir}"/>
                 <pathelement path="${run.classpath.without.build.classes.dir}"/>
             </path>
             </path>
         </copy>
         </copy>
-        <delete file="mobile/libs/${assets.jar.name}"/>
-        <delete file="mobile/libs/jME3-desktop.jar"/>
-        <delete file="mobile/libs/jME3-blender.jar"/>
-        <delete file="mobile/libs/jME3-lwjgl.jar"/>
-        <delete file="mobile/libs/jME3-lwjgl-natives.jar"/>
-        <delete file="mobile/libs/jME3-bullet-natives.jar"/>
-        <delete file="mobile/libs/jME3-jbullet.jar"/>
-        <delete file="mobile/libs/jME3-bullet.jar"/>
-        <delete file="mobile/libs/jbullet.jar"/>
-        <delete file="mobile/libs/stack-alloc.jar"/>
-        <delete file="mobile/libs/vecmath.jar"/>
-        <delete file="mobile/libs/lwjgl.jar"/>
-        <delete file="mobile/libs/jinput.jar"/>
+        <delete>
+            <fileset dir="mobile/libs">
+                <include name="${assets.jar.name}"/>
+                <include name="android.jar"/>
+                <include name="jme3-desktop*.jar"/>
+                <include name="jme3-blender*.jar"/>
+                <include name="jme3-bullet*.jar"/>
+                <include name="jme3-jbullet*.jar"/>
+                <include name="jbullet*.jar"/>
+                <include name="*stack-alloc*.jar"/>
+                <include name="*vecmath*.jar"/>
+                <include name="jme3-ios*.jar"/>
+                <include name="*jinput*.jar"/>
+                <include name="*lwjgl*.jar"/>
+                <include name="*jutils*.jar"/>
+                <include name="xpp3*.jar"/>
+            </fileset>
+        </delete>
     </target>
     </target>
 
 
     <target name="-add-android-lib">
     <target name="-add-android-lib">
         <echo>Adding libraries for android.</echo>
         <echo>Adding libraries for android.</echo>
         <copy todir="mobile/libs" flatten="true" preservelastmodified="true">
         <copy todir="mobile/libs" flatten="true" preservelastmodified="true">
             <path>
             <path>
-                <pathelement path="${libs.android-base.classpath}"/>
+                <pathelement path="${libs.jme3-android.classpath}"/>
+                <pathelement path="${libs.jme3-android-native.classpath}"/>
             </path>
             </path>
         </copy>
         </copy>
     </target>
     </target>
 
 
-    <target name="-unzip-bullet-libs" depends="-delete-bullet-libs" if="bulletIsIncluded">
-        <echo>Replacing bullet library with android native version.</echo>
-
-        <!-- use copy with zipfileset to enable preserving the last modified date to avoid pre-dexing -->
-        <copy todir="mobile/libs" preservelastmodified="true">
-          <zipfileset src="mobile/libs/jME3-bullet-natives-android.jar">
-          </zipfileset>
+    <target name="-add-bullet-libs" depends="-test-bullet-included" if="bulletIsIncluded">
+        <echo>Replacing android native bullet library.</echo>
+        <copy todir="mobile/libs" flatten="true" preservelastmodified="true">
+            <path>
+                <pathelement path="${libs.jme3-bullet.classpath}"/>
+                <pathelement path="${libs.jme3-bullet-native-android.classpath}"/>
+            </path>
         </copy>
         </copy>
 
 
-        <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>
 
 
     <target name="-unzip-assets">
     <target name="-unzip-assets">
@@ -91,25 +89,9 @@
         <delete file="mobile/libs/${assets.jar.name}" failonerror="true"/>
         <delete file="mobile/libs/${assets.jar.name}" failonerror="true"/>
     </target>
     </target>
 
 
-    <target name="-unzip-openal-soft-libs" depends="-test-openalsoft-included" if="openalsoftIsIncluded">
-        <echo>Adding OpenAL Soft</echo>
-        <!-- use copy with zipfileset to enable preserving the last modified date to avoid pre-dexing -->
-        <copy todir="mobile/libs" preservelastmodified="true">
-          <zipfileset src="mobile/libs/jME3-openal-soft-natives-android.jar">
-          </zipfileset>
-        </copy>
-        <delete file="mobile/libs/jME3-openal-soft-natives-android.jar"/>
-    </target>
-
-    <target name="-test-openalsoft-included">
-        <condition property="openalsoftIsIncluded">
-            <contains string="${javac.classpath}" substring="jME3-openal-soft-natives-android.jar"/>
-        </condition>
-    </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"/>
         </condition>
         </condition>
     </target>
     </target>