summaryrefslogtreecommitdiffstats
path: root/make/scripts/test-fat-jars.sh
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-08-14 00:29:36 +0200
committerSven Gothel <[email protected]>2023-08-14 00:29:36 +0200
commitb4d60749244a7b34cd3facfd1499fc6df1896c69 (patch)
treea3441c7a847cfac7278f1a6604495e6350cf96c5 /make/scripts/test-fat-jars.sh
parent5688f22d01e10efd97fb4bf280bbefa591dc6789 (diff)
Add make/scripts/test-fat-jars.sh for a quick bringup-test
Diffstat (limited to 'make/scripts/test-fat-jars.sh')
-rwxr-xr-xmake/scripts/test-fat-jars.sh71
1 files changed, 71 insertions, 0 deletions
diff --git a/make/scripts/test-fat-jars.sh b/make/scripts/test-fat-jars.sh
new file mode 100755
index 000000000..09f52f3c6
--- /dev/null
+++ b/make/scripts/test-fat-jars.sh
@@ -0,0 +1,71 @@
+#!/bin/bash
+
+#type=archive/rc
+#version=v2.5.0-rc-20230813
+#folder=${type}/${version}
+version=jogamp-next
+folder=${version}
+
+MOSX=0
+uname -a | grep -i Darwin && MOSX=1
+
+MODULE_ARGS="--add-opens java.desktop/sun.awt=ALL-UNNAMED --add-opens java.desktop/sun.java2d=ALL-UNNAMED"
+# D_ARGS="-Djogl.debug.GLMediaPlayer"
+
+USE_CLASSPATH=jogamp-fat.jar:jogl-demos.jar
+
+TEST_CLASS=com.jogamp.opengl.demos.graph.ui.UISceneDemo20
+# TEST_CLASS=com.jogamp.opengl.demos.graph.ui.UISceneDemo03b
+# TEST_CLASS=com.jogamp.opengl.demos.es2.GearsES2
+# TEST_CLASS=com.jogamp.opengl.demos.es2.LandscapeES2
+
+fetchjars() {
+ curl --silent --output jogamp-fat.jar https://jogamp.org/deployment/${folder}/fat/jogamp-fat.jar
+ curl --silent --output jogl-demos.jar https://jogamp.org/deployment/${folder}/fat/jogl-demos.jar
+ curl --silent --output jogl-fonts-p0.jar https://jogamp.org/deployment/${folder}/fat/jogl-fonts-p0.jar
+
+ echo "Fetched from ${folder} to ${version}"
+}
+
+doit() {
+ if [ $MOSX -eq 1 ] ; then
+ # MacOS: Include FFmpeg via Homebrew ...
+ if [ -e /opt/homebrew/Cellar/ffmpeg/6.0/lib ] ; then
+ export DYLD_LIBRARY_PATH=/opt/homebrew/Cellar/ffmpeg/6.0/lib:$DYLD_LIBRARY_PATH
+ elif [ -e /usr/local/Cellar/ffmpeg/6.0/lib ] ; then
+ export DYLD_LIBRARY_PATH=/usr/local/Cellar/ffmpeg/6.0/lib:$DYLD_LIBRARY_PATH
+ else
+ echo "No homebrew FFmpeg for MacOS found"
+ fi
+
+ # MacOS: Select JVM path to allow DYLD_LIBRARY_PATH (FIXME?)
+ JAVA_HOME=`/usr/libexec/java_home -version 17`
+ PATH=$JAVA_HOME/bin:$PATH
+ export JAVA_HOME PATH
+ fi
+
+ if [ ! -e ${version} ] ; then
+ mkdir ${version}
+ cd ${version}
+ fetchjars
+ else
+ cd ${version}
+ fi
+
+ echo "Using ${version}"
+
+ echo "Java exe post setup"
+ which java
+
+ echo
+ echo
+ echo "JOGL Default OpenGL-Info via NEWT"
+ java $MODULE_ARGS $D_ARGS -jar jogamp-fat.jar
+
+ echo
+ echo
+ echo "JOGL Demp ..."
+ java $MODULE_ARGS -cp $USE_CLASSPATH $D_ARGS $TEST_CLASS $*
+}
+
+doit $* 2>&1 | tee ${version}.log