root/juggler/branches/2.2/modules/tweek/java/tweek-base.sh.in

Revision 20453, 3.1 kB (checked in by patrick, 1 year ago)

Reference the tweek-java package to get the list of Tweek JAR files.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 # ************** <auto-copyright.pl BEGIN do not edit this line> **************
2 #
3 # VR Juggler is (C) Copyright 1998-2007 by Iowa State University
4 #
5 # Original Authors:
6 #   Allen Bierbaum, Christopher Just,
7 #   Patrick Hartling, Kevin Meinert,
8 #   Carolina Cruz-Neira, Albert Baker
9 #
10 # This library is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU Library General Public
12 # License as published by the Free Software Foundation; either
13 # version 2 of the License, or (at your option) any later version.
14 #
15 # This library is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 # Library General Public License for more details.
19 #
20 # You should have received a copy of the GNU Library General Public
21 # License along with this library; if not, write to the
22 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 # Boston, MA 02111-1307, USA.
24 #
25 # *************** <auto-copyright.pl END do not edit this line> ***************
26 if test "x$TWEEK_BASE_DIR" = "x" ; then
27     echo "FATAL ERROR: TWEEK_BASE_DIR environment variable not set!"
28     exit 1
29 fi
30
31 # Make sure tweek-config is executable
32 #if test ! -x "$TWEEK_BASE_DIR/bin/tweek-config" ; then
33 #   echo "FATAL ERROR: Cannot execute tweek-config!"
34 #   exit 1
35 #fi
36
37 # If the environment variable JDK_HOME is not set, default it to /usr/java.
38 if test "x$JDK_HOME" = "x" ; then
39    echo "WARNING: Setting JDK_HOME environment variable to /usr/java"
40    JDK_HOME='/usr/java' ; export JDK_HOME
41 fi
42
43 # Make sure that $JDK_HOME/bin/java exists and is executable.  If it is not,
44 # exit with an error message and status 1.
45 if test ! -x "$JDK_HOME/bin/java" ; then
46    echo "ERROR: Could not find java executable $JDK_HOME/bin/java"
47    status=1
48 # Otherwise, start up Tweek and exit with status 0.
49 else
50
51    # Java classpath separator character.
52    JCPS="@JCPS@"
53
54    TWEEK_JARS=`flagpoll tweek-java --get-jars`
55    CLASSPATH="${TWEEK_JARS}${JCPS}${CLASSPATH}"
56    export CLASSPATH
57
58    # If using an ORB other than that distributed with the JDK, these must be
59    # defined appropriately.
60    ORB_CLASS_PROP=@ORB_CLASS_PROP@
61    ORB_SINGLETON_CLASS_PROP=@ORB_SINGLETON_CLASS_PROP@
62    
63    if test "x$ORB_CLASS_PROP" != "x"; then
64       ORBClass_PROP="-Dorg.omg.CORBA.ORBClass=$ORB_CLASS_PROP"
65    fi
66    if test "x$ORB_SINGLETON_CLASS_PROP" != "x"; then
67       ORBSingletonClass_PROP="-Dorg.omg.CORBA.ORBSingletonClass=$ORB_SINGLETON_CLASS_PROP"
68    fi
69
70    if test `uname` = "Darwin" ; then
71       : ${APP_NAME='Tweek'}
72       plaf="-Xdock:name=$APP_NAME -Dapple.laf.useScreenMenuBar=true"
73       plaf="$plaf -Dcom.apple.mrj.application.apple.menu.about.name=$APP_NAME"
74    fi
75
76    arch='@target_cpu@'
77    $JDK_HOME/bin/java $ORBClass_PROP $ORBSingletonClass_PROP -Djava.library.path="$TWEEK_BASE_DIR/@TWEEK_DATA_DIR@/java/$arch" -Djava.security.policy="$TWEEK_BASE_DIR/@TWEEK_DATA_DIR@/java/java.security.policy.txt" $plaf -DTWEEK_BASE_DIR="${TWEEK_BASE_DIR}" -DTWEEK_DATA_DIR=@TWEEK_DATA_DIR@ $EXTRA_JDK_ARGS org.vrjuggler.tweek.Tweek "$@"
78    status=0
79 fi
Note: See TracBrowser for help on using the browser.