#!/bin/bash

exedir=`dirname $0`
sopath="-Djava.library.path=$exedir/lib"
cpath="-cp $exedir:$exedir/lib"
exe="-jar $exedir/ProjectX.jar"

#set to 1 when debugging JNI's
debug=0

if [ debug == 1 ]; then
	if [ "$1" == "-t" ]; then
		shift
		javargs="$sopath $cpath $exe"
	else
		javargs="$cpath $exe"
	fi
else
	javargs="$sopath $cpath $exe"
fi

if [ -f $exedir/ProjectX.jar ]; then
	echo java  $javargs -ini $exedir/X.ini -tom2p -gui $*
	java  $javargs -ini $exedir/X.ini -tom2p -gui $*
else
	echo Install ProjectX correctly!!!
fi

