Created
January 17, 2012 04:09
-
-
Save tysonmalchow/1624599 to your computer and use it in GitHub Desktop.
install jogamp's JOGL and GLUEGEN jars to a local maven repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#filename specified | |
if [ $# != 3 ]; then | |
echo "usage: $0 distroUrl maven_repo version" | |
exit | |
else | |
echo "Processing: $1" | |
fi | |
BASEURL=$1 | |
MVN_REPO=$2 | |
VERSION=$3 | |
TEMPFILE=./download/jogamp/$VERSION | |
mkdir -p "$TEMPFILE" | |
echo "using temp directory $TEMPFILE" | |
# base jogl class jar | |
echo "installing core jogl deps" | |
wget -nc $BASEURL/jar/jogl.all.jar.gz -O "$TEMPFILE/jogl.all.jar.gz" | |
gunzip "$TEMPFILE/jogl.all.jar.gz" | |
mvn install:install-file -Dversion=$VERSION -DlocalRepositoryPath="$MVN_REPO" -DgroupId=com.jogamp.jogl -DartifactId=jogl-all -Dpackaging=jar -Dfile="$TEMPFILE/jogl.all.jar" -DgeneratePom=true | |
echo "installing gluegen" | |
wget -nc $BASEURL/jar/gluegen-rt.jar -O "$TEMPFILE/gluegen-rt.jar" | |
mvn install:install-file -Dversion=$VERSION -DlocalRepositoryPath="$MVN_REPO" -DgroupId=com.jogamp.gluegen -DartifactId=gluegen-rt -Dpackaging=jar -Dfile="$TEMPFILE/gluegen-rt.jar" -DgeneratePom=true | |
# native jars | |
echo "installing native libs" | |
NATIVE_PLATFORMS="linux-amd64 linux-i586 macosx-universal solaris-amd64 solaris-i586 windows-amd64 windows-i586" | |
for platform in $NATIVE_PLATFORMS; do | |
echo " -> installing native lib for $platform" | |
wget -nc $BASEURL/jar/jogl-all-natives-$platform.jar -O "$TEMPFILE/jogl-all-natives-$platform.jar" | |
mvn install:install-file -DlocalRepositoryPath="$MVN_REPO" -Dclassifier="$platform" -Dversion=$VERSION -DgroupId=com.jogamp.jogl -DartifactId=jogl-natives -Dpackaging=jar -Dfile="$TEMPFILE/jogl-all-natives-$platform.jar" -DgeneratePom=true | |
wget -nc $BASEURL/jar/gluegen-rt-natives-$platform.jar -O "$TEMPFILE/gluegen-rt-natives-$platform.jar" | |
mvn install:install-file -DlocalRepositoryPath="$MVN_REPO" -Dclassifier="$platform" -Dversion=$VERSION -DgroupId=com.jogamp.gluegen -DartifactId=gluegen-natives -Dpackaging=jar -Dfile="$TEMPFILE/gluegen-rt-natives-$platform.jar" -DgeneratePom=true | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- note you'll probably want the OS-specific classifiers set using some maven magic to autodetect --> | |
<dependency> | |
<groupId>com.jogamp.jogl</groupId> | |
<artifactId>jogl-all</artifactId> | |
<version>2.0-rc5</version> | |
</dependency> | |
<dependency> | |
<groupId>com.jogamp.jogl</groupId> | |
<artifactId>jogl-natives</artifactId> | |
<version>2.0-rc5</version> | |
<classifier>windows-amd64</classifier> | |
</dependency> | |
<dependency> | |
<groupId>com.jogamp.gluegen</groupId> | |
<artifactId>gluegen-rt</artifactId> | |
<version>2.0-rc5</version> | |
</dependency> | |
<dependency> | |
<groupId>com.jogamp.gluegen</groupId> | |
<artifactId>gluegen-natives</artifactId> | |
<version>2.0-rc5</version> | |
<classifier>windows-amd64</classifier> | |
</dependency> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for posting this. Maven support has gotten better. You don't have to manually install the jogl and gluegen .jars any longer. The dependencies work to get all the native binaries too (I'm doing some WorldWind tutorials but you can leave those out if you're just using jogl.)
A problem with this is that all native .jars get included which you wouldn't want. For production use you would want to have platform specific build logic in maven (maybe a maven profile) to only include the correct native .jars for each platform.