OSDN Git Service

Add x86 build
authorncornette <nicolas.cornette@gmail.com>
Thu, 3 Oct 2013 22:09:50 +0000 (00:09 +0200)
committerncornette <nicolas.cornette@gmail.com>
Thu, 3 Oct 2013 23:14:16 +0000 (01:14 +0200)
It allows to execute application at near native performance on Android emulator
when using x86 system image, KVM enabled and GPU Acceleration.

don't forget to add this dependency in your project's pom.xml :

        <dependency>
            <groupId>com.badlogicgames.gdx</groupId>
            <artifactId>gdx-platform</artifactId>
            <version>${gdx.version}</version>
            <classifier>natives-x86</classifier>
            <scope>provided</scope>
        </dependency>

gdx/jni/maven/pom.xml
gdx/jni/maven/x86.xml [new file with mode: 0644]

index a5f3988..0348b9b 100644 (file)
                     
 
                     <execution>
+                        <id>x86-gdx</id>
+                        <phase>process-resources</phase>
+                        <goals><goal>wget</goal></goals>
+                        <configuration>
+                            <cacheDirectory>${project.build.directory}/download-cache/x86</cacheDirectory>
+                            <url>${base.url}/x86/libgdx.so</url>
+                            <outputDirectory>${project.build.directory}/x86</outputDirectory>
+                        </configuration>
+                    </execution>
+
+                    <execution>
                         <id>armeabi-gdx</id>
                         <phase>process-resources</phase>
                         <goals><goal>wget</goal></goals>
                 <configuration>
                     <descriptors>
                         <descriptor>desktop.xml</descriptor>
+                        <descriptor>x86.xml</descriptor>
                         <descriptor>armeabi.xml</descriptor>
                         <descriptor>armeabi-v7a.xml</descriptor>
                         <descriptor>ios.xml</descriptor>
diff --git a/gdx/jni/maven/x86.xml b/gdx/jni/maven/x86.xml
new file mode 100644 (file)
index 0000000..b636b03
--- /dev/null
@@ -0,0 +1,18 @@
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+  <id>natives-x86</id>
+  <formats>
+    <format>jar</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+  <fileSets>
+    <fileSet>
+      <directory>${project.build.directory}/x86</directory>
+      <outputDirectory>/</outputDirectory>
+      <includes>
+        <include>**</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+</assembly>