mirror of
https://github.com/shadowfacts/jinput-arm64.git
synced 2025-12-06 08:01:59 +01:00
Build for arm64 macOS
This commit is contained in:
parent
447ec94f22
commit
47fda71672
|
|
@ -23,9 +23,9 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<!-- <plugin> -->
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<!-- <artifactId>maven-javadoc-plugin</artifactId> -->
|
||||||
</plugin>
|
<!-- </plugin> -->
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@
|
||||||
package net.java.games.input;
|
package net.java.games.input;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.security.AccessController;
|
|
||||||
import java.security.PrivilegedAction;
|
import java.security.PrivilegedAction;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
@ -158,4 +157,4 @@ public abstract class ControllerEnvironment {
|
||||||
public static ControllerEnvironment getDefaultEnvironment() {
|
public static ControllerEnvironment getDefaultEnvironment() {
|
||||||
return defaultEnvironment;
|
return defaultEnvironment;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<description>OSX JInput Native Plugin</description>
|
<description>OSX JInput Native Plugin</description>
|
||||||
|
|
||||||
<target name="init">
|
<target name="init">
|
||||||
<mkdir dir="target/natives/x86_64"/>
|
<mkdir dir="target/natives/arm64"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="compile">
|
<target name="compile">
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
<target name="link">
|
<target name="link">
|
||||||
<apply dir="${objdir}" parallel="true" executable="${linker}" os="Mac OS X" failonerror="true" skipemptyfilesets="true">
|
<apply dir="${objdir}" parallel="true" executable="${linker}" os="Mac OS X" failonerror="true" skipemptyfilesets="true">
|
||||||
<arg line="${linkerflags} -dynamiclib -o ${libname} -framework JavaVM -framework CoreFoundation -framework IOKit -framework CoreServices"/>
|
<arg line="${linkerflags} -dynamiclib -o ${libname} -framework CoreFoundation -framework IOKit -framework CoreServices -L/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/lib"/>
|
||||||
<fileset dir="${objdir}" includes="*.o"/>
|
<fileset dir="${objdir}" includes="*.o"/>
|
||||||
</apply>
|
</apply>
|
||||||
<apply dir="${objdir}" executable="strip" os="Mac OS X" failonerror="true">
|
<apply dir="${objdir}" executable="strip" os="Mac OS X" failonerror="true">
|
||||||
|
|
@ -27,26 +27,26 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="compileNativeJinputLib" depends="init">
|
<target name="compileNativeJinputLib" depends="init">
|
||||||
<property name="x86_64_sdkroot" location="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk"/>
|
<property name="arm64_sdkroot" location="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"/>
|
||||||
<property name="x86_64_flags" value="-isysroot ${x86_64_sdkroot} -arch x86_64 -mmacosx-version-min=10.5"/>
|
<property name="arm64_flags" value="-isysroot ${arm64_sdkroot} -arch arm64 -mmacosx-version-min=10.5 -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/include/ -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/include/darwin/"/>
|
||||||
<antcall target="compile">
|
<antcall target="compile">
|
||||||
<param name="dstdir" location="target/natives/x86_64"/>
|
<param name="dstdir" location="target/natives/arm64"/>
|
||||||
<param name="compiler" value="gcc"/>
|
<param name="compiler" value="gcc"/>
|
||||||
<param name="sdkroot" location="${x86_64_sdkroot}"/>
|
<param name="sdkroot" location="${arm64_sdkroot}"/>
|
||||||
<param name="cflags" value="${x86_64_flags}"/>
|
<param name="cflags" value="${arm64_flags}"/>
|
||||||
</antcall>
|
</antcall>
|
||||||
<antcall target="link">
|
<antcall target="link">
|
||||||
<param name="objdir" location="target/natives/x86_64"/>
|
<param name="objdir" location="target/natives/arm64"/>
|
||||||
<param name="libname" value="libjinput-osx-x86_64.jnilib"/>
|
<param name="libname" value="libjinput-osx-arm64.jnilib"/>
|
||||||
<param name="linker" value="gcc"/>
|
<param name="linker" value="gcc"/>
|
||||||
<param name="linkerflags" value="${x86_64_flags}"/>
|
<param name="linkerflags" value="${arm64_flags}"/>
|
||||||
</antcall>
|
</antcall>
|
||||||
<apply dir="target/natives" parallel="true" executable="lipo" os="Mac OS X" failonerror="true" skipemptyfilesets="true" >
|
<apply dir="target/natives" parallel="true" executable="lipo" os="Mac OS X" failonerror="true" skipemptyfilesets="true" >
|
||||||
<arg value="-create"/>
|
<arg value="-create"/>
|
||||||
<srcfile/>
|
<srcfile/>
|
||||||
<arg value="-output"/>
|
<arg value="-output"/>
|
||||||
<arg path="target/natives/libjinput-osx.jnilib"/>
|
<arg path="target/natives/libjinput-osx.jnilib"/>
|
||||||
<fileset file="target/natives/x86_64/libjinput-osx-x86_64.jnilib"/>
|
<fileset file="target/natives/arm64/libjinput-osx-arm64.jnilib"/>
|
||||||
</apply>
|
</apply>
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,9 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<!-- <plugin> -->
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<!-- <artifactId>maven-javadoc-plugin</artifactId> -->
|
||||||
</plugin>
|
<!-- </plugin> -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
@ -66,4 +66,4 @@
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,9 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<!-- <plugin> -->
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<!-- <artifactId>maven-javadoc-plugin</artifactId> -->
|
||||||
</plugin>
|
<!-- </plugin> -->
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
12
pom.xml
12
pom.xml
|
|
@ -56,10 +56,10 @@
|
||||||
<modules>
|
<modules>
|
||||||
<module>coreAPI</module>
|
<module>coreAPI</module>
|
||||||
<module>plugins</module>
|
<module>plugins</module>
|
||||||
<module>applet</module>
|
<!-- <module>applet</module> -->
|
||||||
<module>uberjar</module>
|
<!-- <module>uberjar</module> -->
|
||||||
<module>examples</module>
|
<!-- <module>examples</module> -->
|
||||||
<module>tests</module>
|
<!-- <module>tests</module> -->
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
@ -72,7 +72,7 @@
|
||||||
<showDeprecation>true</showDeprecation>
|
<showDeprecation>true</showDeprecation>
|
||||||
<showWarnings>true</showWarnings>
|
<showWarnings>true</showWarnings>
|
||||||
<compilerArgs>
|
<compilerArgs>
|
||||||
<arg>-Werror</arg>
|
<!-- <arg>-Werror</arg> -->
|
||||||
<arg>-Xlint:all,-options</arg>
|
<arg>-Xlint:all,-options</arg>
|
||||||
<arg>-h</arg>
|
<arg>-h</arg>
|
||||||
<arg>${project.build.directory}/generated-sources/natives</arg>
|
<arg>${project.build.directory}/generated-sources/natives</arg>
|
||||||
|
|
@ -190,4 +190,4 @@
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue