summaryrefslogtreecommitdiffstats
path: root/etc/profile.jogl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-02-03 05:23:57 +0100
committerSven Gothel <[email protected]>2011-02-03 05:23:57 +0100
commit0bc0f0219a7443ac721d15ad38508ecb4a50f26d (patch)
treea0ba1eff8edc3d96c697cc784e4eb8bf9fa610d4 /etc/profile.jogl
parent7274b21b07bab263ad6df558b206dd4fa42f7472 (diff)
Expose provided SWT jars to SWT_CLASSPATH for test scripts
Diffstat (limited to 'etc/profile.jogl')
-rwxr-xr-xetc/profile.jogl27
1 files changed, 27 insertions, 0 deletions
diff --git a/etc/profile.jogl b/etc/profile.jogl
index c3d719954..ecf4fe35d 100755
--- a/etc/profile.jogl
+++ b/etc/profile.jogl
@@ -23,8 +23,12 @@ function concat_jogl_list()
echo $JOGL_LIST
}
+ARCH=`uname -m`
+KERNEL=`uname -s | awk ' { printf "%s",tolower($0) ; } '`
+
uname -a | grep -i LINUX && OSS=x11
uname -a | grep -i Darwin && OSS=osx
+uname -a | grep -i CYGWIN && OSS=win
JOGL_AWT="jogl.awt.jar jogl.util.awt.jar newt.awt.jar nativewindow.awt.jar"
@@ -139,6 +143,29 @@ if [ ! -z "$JOGL_PROFILE" ] ; then
export JOGL_CLASSPATH
fi
+if [ "$KERNEL" = "linux" ] ; then
+ SWT_SUB="gtk"
+elif [ "$KERNEL" = "darwin" ] ; then
+ SWT_SUB="cocoa"
+fi
+SWT_CLASSPATH_0=$JOGL_BUILD_DIR/../make/lib/swt/$SWT_SUB-$KERNEL-$ARCH/swt-debug.jar
+SWT_CLASSPATH_1=$HOME/.java/swt.jar
+if [ ! -e "$SWT_CLASSPATH_0" ] ; then
+ echo Info: NO JOGL SWT $SWT_CLASSPATH_0
+ if [ ! -e "$SWT_CLASSPATH_1" ] ; then
+ echo Info: NO Users SWT $SWT_CLASSPATH_1
+ else
+ export SWT_CLASSPATH=$SWT_CLASSPATH_1
+ echo Info: Using Users SWT $SWT_CLASSPATH
+ fi
+else
+ export SWT_CLASSPATH=$SWT_CLASSPATH_0
+ echo Info: Using JOGL SWT $SWT_CLASSPATH
+fi
+if [ ! -z "$SWT_CLASSPATH" ] ; then
+ export SWT_CLASSPATH
+fi
+
if [ -z "$JOGL_CLASSPATH" ] ; then
print_usage
fi