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
9 CLASSPATH
="/usr/share/java/*"
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}
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
26 for i
in $
( find .
-name \
*.jar
); do
27 CLASSPATH
=${CLASSPATH}:${i}
30 # Launch the application.
31 ${JAVA} -Djava.library.path=${LIBRARY_PATH} -classpath ${CLASSPATH} com.ivorymahjongg.mahjongg.Main