Browse Source

SDK: Automatically unzip OpenAL Soft libraries in mobile/libs if included in the classpath

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10624 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
iwg..om 12 năm trước cách đây
mục cha
commit
66c2820c61
1 tập tin đã thay đổi với 17 bổ sung0 xóa
  1. 17 0
      jme3-android/src/com/jme3/gde/android/mobile-targets.xml

+ 17 - 0
jme3-android/src/com/jme3/gde/android/mobile-targets.xml

@@ -32,6 +32,7 @@
         <antcall target="-unzip-bullet-libs"/>
         <antcall target="-unzip-assets"/>
         <copy file="${dist.jar}" todir="mobile/libs/" verbose="false" preservelastmodified="true"/>
+        <antcall target="-unzip-openal-soft-libs"/>
     </target>
 
     <target description="create mobile/libs directory and copy project libraries" name="-copy-project-libs">
@@ -90,6 +91,22 @@
         <delete file="mobile/libs/${assets.jar.name}" failonerror="true"/>
     </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">
         <condition property="bulletIsIncluded">
             <contains string="${javac.classpath}" substring="bullet.jar"/>