Skip to content

Commit

Permalink
Getting run script to work and setting up to support native libs also…
Browse files Browse the repository at this point in the history
… for OpenGL, etc...
  • Loading branch information
rosejn committed Jan 22, 2010
1 parent 7fabe06 commit 4484908
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
7 changes: 5 additions & 2 deletions script/java-cp → script/java-env
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
DEPS=lib
SUBMODULES=src/lib

CLASSPATH=".:./src:./src/lib:./test:./session"
SCRIPT_DIR=`dirname $0`
CLASSPATH="$SCRIPT_DIR/..:./src:./src/lib:./test:./session"

# Add jar files
for f in "$DEPS"/*.jar; do
Expand All @@ -19,4 +20,6 @@ if [[ "$OSTYPE" == 'cygwin' ]]; then
CLASSPATH=`cygpath -wp "$CLASSPATH"`
fi

echo "$CLASSPATH"
DEFINES=-Djava.library.path=lib/native

echo "-cp $CLASSPATH $DEFINES"
4 changes: 2 additions & 2 deletions script/ng-server
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
pkill -9 java

SCRIPT_DIR=`dirname $0`
CLASSPATH=`$SCRIPT_DIR/java-cp`
JAVA_ENV=`$SCRIPT_DIR/java-env`

exec java -cp $CLASSPATH com.martiansoftware.nailgun.NGServer 127.0.0.1
exec java $JAVA_ENV com.martiansoftware.nailgun.NGServer 127.0.0.1
9 changes: 2 additions & 7 deletions script/repl
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#!/bin/bash

# A simple script to start a repl with the project jar files (in the lib
# directory) on the classpath.

SCRIPT_DIR=`dirname $0`
CLASSPATH=`$SCRIPT_DIR/java-cp`

#DEFINITIONS=-Djava.library.path=lib/opengl
JAVA_ENV=`$SCRIPT_DIR/java-env`

java -cp $CLASSPATH jline.ConsoleRunner clojure.main $@
exec java $JAVA_ENV jline.ConsoleRunner clojure.main $@
6 changes: 2 additions & 4 deletions script/run
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Run main with the classpath setup correctly

SCRIPT_DIR=`dirname $0`
CLASSPATH=`$SCRIPT_DIR/java-cp`
JAVA_ENV=`$SCRIPT_DIR/java-env`

#DEFINITIONS=-Djava.library.path=lib/opengl

java -cp $CLASSPATH overtone.app/main $@
exec java $JAVA_ENV clojure.main -e "(use 'overtone.app.main) (-main $@)"

0 comments on commit 4484908

Please sign in to comment.