move JOGL libraries to platform-specific subfolders

This commit is contained in:
Ben Fry
2022-01-22 18:34:02 -05:00
parent c1a668362d
commit be38429ef5
4 changed files with 84 additions and 21 deletions

View File

@@ -25,13 +25,19 @@
</target>
<!-- Base URL for the current version of JOGL. -->
<!--
<property name="jogl.url"
value="https://jogamp.org/deployment/archive/rc/v2.4.0-rc-20210111/jar" />
-->
<!-- This is for posterity, and is not used at present. When updating
the release, also make a copy of the files on download.processing.org
so that they can be retrieved even after the original link goes dead. -->
<!--
<property name="jogl.url.backup"
value="https://download.processing.org/jogl/v2.4.0-rc-20210111" />
-->
<property name="jogl.url"
value="https://download.processing.org/jogl/v2.4.0-rc-20210111x" />
<available file="library/jogl-all.jar" property="jogl.present" />
@@ -42,17 +48,77 @@
<target name="download-jogl" unless="jogl.present">
<get dest="library" usetimestamp="true" ignoreerrors="${jogl.ignorable}">
<!--
<url url="${jogl.url}/gluegen-rt-natives-linux-aarch64.jar" />
<url url="${jogl.url}/gluegen-rt-natives-linux-amd64.jar" />
<url url="${jogl.url}/gluegen-rt-natives-linux-armv6hf.jar" />
<url url="${jogl.url}/gluegen-rt-natives-macosx-universal.jar" />
<url url="${jogl.url}/gluegen-rt-natives-linux-arm.jar" />
<url url="${jogl.url}/gluegen-rt-natives-macos-aarch64.jar" />
<url url="${jogl.url}/gluegen-rt-natives-macos-x86_64.jar" />
<url url="${jogl.url}/gluegen-rt-natives-windows-amd64.jar" />
-->
<url url="${jogl.url}/gluegen-rt.jar" />
<!--
<url url="${jogl.url}/jogl-all-natives-linux-aarch64.jar" />
<url url="${jogl.url}/jogl-all-natives-linux-amd64.jar" />
<url url="${jogl.url}/jogl-all-natives-linux-armv6hf.jar" />
<url url="${jogl.url}/jogl-all-natives-macosx-universal.jar" />
<url url="${jogl.url}/jogl-all-natives-linux-arm.jar" />
<url url="${jogl.url}/jogl-all-natives-macos-aarch64.jar" />
<url url="${jogl.url}/jogl-all-natives-macos-x86_64.jar" />
<url url="${jogl.url}/jogl-all-natives-windows-amd64.jar" />
-->
<url url="${jogl.url}/jogl-all.jar" />
</get>
<antcall target="retrieve-variant">
<param name="variant" value="linux-aarch64" />
</antcall>
<antcall target="retrieve-variant">
<param name="variant" value="linux-arm" />
</antcall>
<antcall target="retrieve-variant">
<param name="variant" value="linux-amd64" />
</antcall>
<antcall target="retrieve-variant">
<param name="variant" value="macos-aarch64" />
</antcall>
<antcall target="retrieve-variant">
<param name="variant" value="macos-x86_64" />
</antcall>
<antcall target="retrieve-variant">
<param name="variant" value="windows-amd64" />
</antcall>
</target>
<target name="retrieve-variant">
<get src="${jogl.url}/gluegen-rt-natives-${variant}.jar"
dest="temp-gluegen.jar"
ignoreerrors="${jogl.ignorable}"
usetimestamp="true" />
<get src="${jogl.url}/jogl-all-natives-${variant}.jar"
dest="temp-jogl.jar"
ignoreerrors="${jogl.ignorable}"
usetimestamp="true" />
<mkdir dir="library/${variant}" />
<unzip dest="library/${variant}" src="temp-gluegen.jar" overwrite="true">
<patternset>
<include name="**/*.dll" />
<include name="**/*.dylib" />
<include name="**/*.so" />
</patternset>
<mapper type="flatten" />
</unzip>
<unzip dest="library/${variant}" src="temp-jogl.jar" overwrite="true">
<patternset>
<include name="**/*.dll" />
<include name="**/*.dylib" />
<include name="**/*.so" />
</patternset>
<mapper type="flatten" />
</unzip>
<delete file="temp-gluegen.jar" />
<delete file="temp-jogl.jar" />
</target>
<path id="classpath.base">

View File

@@ -1,3 +1,10 @@
core.jar
jogl-all-src.jar
/macos-aarch64
/linux-arm
/linux-aarch64
/macos-x86_64
/linux-amd64
/windows-amd64

View File

@@ -1,10 +0,0 @@
# If you want to support more platforms, visit jogamp.org to get the
# natives libraries for the platform in question (i.e. Solaris).
name = Core
application.macosx=core.jar,jogl-all.jar,gluegen-rt.jar,jogl-all-natives-macosx-universal.jar,gluegen-rt-natives-macosx-universal.jar
application.windows64=core.jar,gluegen-rt-natives-windows-amd64.jar,gluegen-rt.jar,javafx.base.jar,javafx.controls.jar,javafx.fxml.jar,javafx.graphics.jar,javafx.media.jar,javafx.swing.jar,jogl-all-natives-windows-amd64.jar,jogl-all.jar
application.linux64=core.jar,jogl-all.jar,gluegen-rt.jar,jogl-all-natives-linux-amd64.jar,gluegen-rt-natives-linux-amd64.jar

View File

@@ -1,4 +1,11 @@
1279 (4.0b4)
X put opengl libs for core into platform-specific subfolders
X get us ready for other platforms (M1 in particular)
_ fixes Windows antivirus slowdowns
_ https://github.com/processing/processing/issues/4783#issuecomment-269328168
_ https://github.com/processing/processing/issues/4239
_ https://jogamp.org/bugzilla/show_bug.cgi?id=1301
_ https://stackoverflow.com/a/51100411
api changes (in previous releases)
X static versions of selectInput/selectOutput/selectFolder removed from PApplet
@@ -37,16 +44,9 @@ _ could implement this for the default, but also, SansSerif sucks
_ https://stackoverflow.com/a/9482676
_ in addition, it would need to be implemented for textWidth()
_ put opengl libs for core into platform-specific subfolders?
_ should fix Windows antivirus slowdowns
_ https://github.com/processing/processing/issues/4783#issuecomment-269328168
_ https://github.com/processing/processing/issues/4239
_ https://jogamp.org/bugzilla/show_bug.cgi?id=1301
_ https://stackoverflow.com/a/51100411
_ would really be nice to pull out the OpenGL stuff
_ though would require just a single PShader class in .opengl package
_ way too messy, just need to stick with our base platforms
_ also move the libs to their own folders? (instead of unpacking from jar)
_ Better solution for frame/surface methods
_ should it be requestSize() because the change is not immediate?