mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Merge pull request #3522 from gohai/arm-3.0-for-ben2
Assortment of patches from my arm-3.0 branch (v2)
This commit is contained in:
@@ -70,6 +70,7 @@ public class Library extends LocalContribution {
|
||||
if (name.equals("linux")) return false;
|
||||
if (name.equals("linux32")) return false;
|
||||
if (name.equals("linux64")) return false;
|
||||
if (name.equals("linux-armv6hf")) return false;
|
||||
if (name.equals("android")) return false;
|
||||
}
|
||||
return true;
|
||||
@@ -156,6 +157,14 @@ public class Library extends LocalContribution {
|
||||
nativeLibraryFolder = hostLibrary;
|
||||
}
|
||||
// System.out.println("3 native lib folder now " + nativeLibraryFolder);
|
||||
|
||||
if (hostPlatform.equals("linux") && System.getProperty("os.arch").equals("arm")) {
|
||||
hostLibrary = new File(libraryFolder, "linux-armv6hf");
|
||||
if (hostLibrary.exists()) {
|
||||
nativeLibraryFolder = hostLibrary;
|
||||
}
|
||||
}
|
||||
|
||||
// save that folder for later use
|
||||
nativeLibraryPath = nativeLibraryFolder.getAbsolutePath();
|
||||
|
||||
|
||||
+48
-25
@@ -24,6 +24,21 @@
|
||||
<echo message="The tools.jar file is not required to build Processing." />
|
||||
</target>
|
||||
|
||||
<!-- detetect Raspberry Pi and friends -->
|
||||
<condition property="linux-arm32" value="linux-arm32">
|
||||
<and>
|
||||
<equals arg1="${platform}" arg2="linux" />
|
||||
<equals arg1="${os.arch}" arg2="arm" />
|
||||
<equals arg1="${sun.arch.data.model}" arg2="32" />
|
||||
</and>
|
||||
</condition>
|
||||
|
||||
<target name="check-linux-arm32" if="linux-arm32">
|
||||
<!-- there is currently no JRE available -->
|
||||
<property name="jre.download.jdk" value="true" />
|
||||
<property name="jre.downloader" value="linux-arm-vfp-hflt.tar.gz" />
|
||||
</target>
|
||||
|
||||
<!-- Require Java 8 everywhere. -->
|
||||
<fail message="Unsupported Java version: ${java.version}. To build, make sure that Java 8 (aka Java 1.8) is installed.">
|
||||
<condition>
|
||||
@@ -46,7 +61,7 @@
|
||||
<property name="jdk.update" value="72" />
|
||||
<property name="jdk.build" value="14" />
|
||||
-->
|
||||
<!-- Switching to 8 because updates for 7 end April 2015 -->
|
||||
<!-- Switching to 8 because updates for 7 ended April 2015 -->
|
||||
<property name="jdk.version" value="8" />
|
||||
<property name="jdk.update" value="51" />
|
||||
<property name="jdk.build" value="16" />
|
||||
@@ -54,6 +69,7 @@
|
||||
<property name="jdk.esoteric" value="1.${jdk.version}.0_${jdk.update}" />
|
||||
|
||||
<!-- Figure out the JRE download location for Linux and Windows. -->
|
||||
<!--
|
||||
<condition property="jre.file"
|
||||
value="jre-${jdk.short}-${platform}-i586.tar.gz">
|
||||
<equals arg1="${sun.arch.data.model}" arg2="32" />
|
||||
@@ -62,26 +78,7 @@
|
||||
value="jre-${jdk.short}-${platform}-x64.tar.gz">
|
||||
<equals arg1="${sun.arch.data.model}" arg2="64" />
|
||||
</condition>
|
||||
|
||||
<!-- for the full name from processing.org/downloads -->
|
||||
<condition property="jre.download"
|
||||
value="${jdk.short}-${platform}-i586.tar.gz">
|
||||
<equals arg1="${sun.arch.data.model}" arg2="32" />
|
||||
</condition>
|
||||
<condition property="jre.download"
|
||||
value="${jdk.short}-${platform}-x64.tar.gz">
|
||||
<equals arg1="${sun.arch.data.model}" arg2="64" />
|
||||
</condition>
|
||||
|
||||
<!-- for use with the Ant Task -->
|
||||
<condition property="jre.downloader"
|
||||
value="${platform}-i586.tar.gz">
|
||||
<equals arg1="${sun.arch.data.model}" arg2="32" />
|
||||
</condition>
|
||||
<condition property="jre.downloader"
|
||||
value="${platform}-x64.tar.gz">
|
||||
<equals arg1="${sun.arch.data.model}" arg2="64" />
|
||||
</condition>
|
||||
-->
|
||||
|
||||
<!-- JDK location for Mac OS X -->
|
||||
<!--
|
||||
@@ -219,10 +216,22 @@
|
||||
|
||||
<target name="jre-download" depends="jre-check, downloader-setup"
|
||||
unless="jre.tgz.downloaded">
|
||||
<!-- we normally download a JRE, except on arm -->
|
||||
<property name="jre.download.jdk" value="false" />
|
||||
|
||||
<condition property="jre.downloader"
|
||||
value="${platform}-i586.tar.gz">
|
||||
<equals arg1="${sun.arch.data.model}" arg2="32" />
|
||||
</condition>
|
||||
<condition property="jre.downloader"
|
||||
value="${platform}-x64.tar.gz">
|
||||
<equals arg1="${sun.arch.data.model}" arg2="64" />
|
||||
</condition>
|
||||
|
||||
<downloader version="${jdk.version}"
|
||||
update="${jdk.update}"
|
||||
build="${jdk.build}"
|
||||
jdk="false"
|
||||
jdk="${jre.download.jdk}"
|
||||
flavor="${jre.downloader}"
|
||||
path="${jre.tgz.path}" />
|
||||
</target>
|
||||
@@ -719,7 +728,7 @@
|
||||
<fail message="wrong platform (${os.name})" />
|
||||
</target>
|
||||
|
||||
<target name="linux-build" depends="ignore-tools, revision-check, linux-check-os, jre-download, subprojects-build" description="Build Linux version">
|
||||
<target name="linux-build" depends="ignore-tools, check-linux-arm32, revision-check, linux-check-os, jre-download, subprojects-build" description="Build Linux version">
|
||||
<mkdir dir="linux/work" />
|
||||
|
||||
<copy todir="linux/work">
|
||||
@@ -796,13 +805,27 @@
|
||||
We only want to move when the folder didn't exist before
|
||||
<move file="linux/jre1.7.0_40" tofile="linux/work/java" />
|
||||
-->
|
||||
|
||||
<!-- use the jre subfolder when having downloaded a JDK file -->
|
||||
<condition property="jre.dir" value="jdk${jdk.esoteric}/jre/">
|
||||
<!-- property might not be set, but it is for arm -->
|
||||
<equals arg1="${jre.download.jdk}" arg2="true" />
|
||||
</condition>
|
||||
<condition property="jre.dir" value="jre${jdk.esoteric}/">
|
||||
<not>
|
||||
<equals arg1="${jre.download.jdk}" arg2="true" />
|
||||
</not>
|
||||
</condition>
|
||||
|
||||
<exec executable="rsync" dir="linux">
|
||||
<arg value="-a" />
|
||||
<arg value="--delete" />
|
||||
<arg value="jre${jdk.esoteric}/" />
|
||||
<arg value="${jre.dir}" />
|
||||
<arg value="work/java" />
|
||||
</exec>
|
||||
<delete dir="linux/jre${jdk.esoteric}" />
|
||||
|
||||
<delete dir="linux/jre${jdk.esoteric}" failonerror="false" />
|
||||
<delete dir="linux/jdk${jdk.esoteric}" failonerror="false" />
|
||||
|
||||
<!-- Remove unused JRE bloat. -->
|
||||
<delete failonerror="true">
|
||||
|
||||
@@ -6,5 +6,5 @@ Exec=processing %F
|
||||
Icon=/opt/processing/lib/icons/pde-256.png
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=AudioVideo;Video;Graphics;Developer;
|
||||
Categories=Development;AudioVideo;Video;Graphics;Developer;
|
||||
StartupWMClass=Processing
|
||||
|
||||
+9
-1
@@ -32,6 +32,11 @@
|
||||
</condition>
|
||||
<!--<echo message="compiler is ${build.compiler}" />-->
|
||||
|
||||
<!-- JavaFX got removed from the Oracle's JDK for arm -->
|
||||
<condition property="fx.unavailable" value="true">
|
||||
<equals arg1="${os.arch}" arg2="arm" />
|
||||
</condition>
|
||||
|
||||
<!-- link against apple.jar for the ThinkDifferent class -->
|
||||
<mkdir dir="bin" />
|
||||
<javac source="1.7"
|
||||
@@ -39,13 +44,16 @@
|
||||
encoding="UTF-8"
|
||||
includeAntRuntime="false"
|
||||
debug="true"
|
||||
srcdir="src" destdir="bin"
|
||||
destdir="bin"
|
||||
classpath="apple.jar;
|
||||
library/jogl-all.jar;
|
||||
library/gluegen-rt.jar"
|
||||
nowarn="true">
|
||||
<!-- kinda gross, but if not using the JDT, this just ignored anyway -->
|
||||
<compilerclasspath path="${jdt.jar}; ../java/mode/jdtCompilerAdapter.jar" />
|
||||
<src path="src" />
|
||||
<include name="processing/**" />
|
||||
<exclude name="processing/javafx/**" if="fx.unavailable" />
|
||||
</javac>
|
||||
|
||||
<!-- Copy the jnilib to the bin folder so it's included. -->
|
||||
|
||||
Reference in New Issue
Block a user