void-packages/srcpkgs/SweetHome3D/files/sweethome3d

36 lines
1.4 KiB
Bash

#!/bin/sh
APP_CLASSPATH=""
JAVA_EXEC=""
JAVA_OPTS="${JAVA_OPTS} -Xmx1024m"
if [ -n "${JAVA_HOME}" ]
then
if [ -x "${JAVA_HOME}/bin/java" ]
then
JAVA_EXEC="${JAVA_HOME}/bin/java"
fi
else
JAVA_EXEC="$(which java)"
fi
# Build classpath
APP_CLASSPATH="SweetHome3D.jar:Furniture.jar:Textures.jar:Examples.jar:Help.jar:iText-2.1.7.jar:freehep-vectorgraphics-svg-2.1.1b.jar:sunflow-0.07.3i.jar:jmf.jar:batik-svgpathparser-1.7.jar:jeksparser-calculator.jar:jnlp.jar"
if [ "${SWEETHOME3D_JAVA3D}" = "1.5" ]
then
JAVA_OPTS="${JAVA_OPTS} -Djava.library.path=/usr/lib/SweetHome3D/java3d-1.5"
APP_CLASSPATH="${APP_CLASSPATH}:/usr/lib/SweetHome3D/java3d-1.5/j3dcore.jar:/usr/lib/SweetHome3D/java3d-1.5/j3dutils.jar:/usr/lib/SweetHome3D/java3d-1.5/vecmath.jar"
else
JAVA_OPTS="${JAVA_OPTS} -Djava.library.path=/usr/lib/SweetHome3D/java3d-1.6 -Djogamp.gluegen.UseTempJarCache=false"
APP_CLASSPATH="${APP_CLASSPATH}:/usr/lib/SweetHome3D/java3d-1.6/j3dcore.jar:/usr/lib/SweetHome3D/java3d-1.6/j3dutils.jar:/usr/lib/SweetHome3D/java3d-1.6/vecmath.jar:/usr/lib/SweetHome3D/java3d-1.6/gluegen-rt.jar:/usr/lib/SweetHome3D/java3d-1.6/jogl-all.jar"
fi
cd "/usr/share/SweetHome3D"
exec "${JAVA_EXEC}" \
-classpath "${APP_CLASSPATH}" \
${JAVA_OPTS} \
-Dcom.eteks.sweethome3d.applicationId=SweetHome3D#Installer \
com.eteks.sweethome3d.SweetHome3D \
-open "$1"