updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / ivory-mahjongg-bin / ivory-mahjongg
blob3d2b574c88ed17e403a5be06e7f5bb45213c3ba5
1 #!/bin/sh
2 # Created for Arch package, based on original launcher
4 SHARE="/opt/games/ivory-mahjongg" # Hardcoded, we are in package
5 JAVA="java" # Both openjdk6 and sun-jre ensures
6 # that PATH is set correctly
8 # Prepare CLASSPATH
9 CLASSPATH="/usr/share/java/*"
10 LIBRARY_PATH="."
11 # java3d package is little broken right now...
12 if [ -e /opt/opt/java/jre/lib/ext/j3dcore.jar ] ; then
13 CLASSPATH=${CLASSPATH}:"/opt/opt/java/jre/lib/ext/*"
14 [ -e /opt/opt/java/jre/lib/amd64/libj3dcore-ogl.so ] && LIBRARY_PATH="/opt/opt/java/jre/lib/amd64/":${LIBRARY_PATH}
15 [ -e /opt/opt/java/jre/lib/i586/libj3dcore-ogl.so ] && LIBRARY_PATH="/opt/opt/java/jre/lib/i568/":${LIBRARY_PATH}
16 else
17 CLASSPATH=${CLASSPATH}:"/opt/java/jre/lib/ext/*"
20 # If pulseaudio is running, this game needs padsp to launch correctly
21 if [ $(ps x|grep pulseaudio|grep -v grep|wc -l ) -gt 0 ] ; then
22 JAVA="padsp $JAVA"
25 cd ${SHARE}
26 for i in $( find . -name \*.jar ); do
27 CLASSPATH=${CLASSPATH}:${i}
28 done
30 # Launch the application.
31 ${JAVA} -Djava.library.path=${LIBRARY_PATH} -classpath ${CLASSPATH} com.ivorymahjongg.mahjongg.Main