aboutsummaryrefslogtreecommitdiff
path: root/tools/distrib
diff options
context:
space:
mode:
Diffstat (limited to 'tools/distrib')
-rwxr-xr-xtools/distrib/linux32/compile.sh10
-rwxr-xr-xtools/distrib/linux32/run.sh17
-rwxr-xr-xtools/distrib/linux64/compile.sh10
-rwxr-xr-xtools/distrib/linux64/run.sh17
4 files changed, 36 insertions, 18 deletions
diff --git a/tools/distrib/linux32/compile.sh b/tools/distrib/linux32/compile.sh
index c073b1b..6bee820 100755
--- a/tools/distrib/linux32/compile.sh
+++ b/tools/distrib/linux32/compile.sh
@@ -3,10 +3,12 @@
# reserved. Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file.
+# Determine the absolute path to the current directory.
+DIR="$( cd "$( dirname "$0" )" && pwd )"
+BIN_DIR="${DIR}/bin"
+
# Compile the test program.
-javac -cp "./bin:./bin/*" ./bin/tests/detailed/*.java ./bin/tests/detailed/dialog/*.java ./bin/tests/detailed/handler/*.java ./bin/tests/detailed/ui/*.java ./bin/tests/simple/*.java
+javac -cp "${BIN_DIR}:${BIN_DIR}/*" "${BIN_DIR}"/tests/detailed/*.java "${BIN_DIR}"/tests/detailed/dialog/*.java "${BIN_DIR}"/tests/detailed/handler/*.java "${BIN_DIR}"/tests/detailed/ui/*.java "${BIN_DIR}"/tests/simple/*.java
# Create the test JAR file.
-cd bin
-jar -cf jcef-tests.jar tests/detailed/*.class tests/detailed/dialog/*.class tests/detailed/handler/*.class tests/detailed/ui/*.class tests/simple/*.java
-cd .. \ No newline at end of file
+jar -cf "${BIN_DIR}"/jcef-tests.jar -C "${BIN_DIR}" tests
diff --git a/tools/distrib/linux32/run.sh b/tools/distrib/linux32/run.sh
index 67cfe42..93f7482 100755
--- a/tools/distrib/linux32/run.sh
+++ b/tools/distrib/linux32/run.sh
@@ -3,16 +3,23 @@
# reserved. Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file.
-# Determine the absolute path to the library directory.
-export LIB_PATH=$(readlink -f "./bin/lib/linux32")
+# Determine the absolute path to the current directory.
+DIR="$( cd "$( dirname "$0" )" && pwd )"
+LIB_PATH="$DIR/bin/lib/linux32"
+
+if [ -z "$1" ]; then
+ EXAMPLE="detailed"
+else
+ EXAMPLE="$1"
+fi
# Necessary for jcef_helper to find libcef.so.
if [ -n "$LD_LIBRARY_PATH" ]; then
- LD_LIBRARY_PATH=$LIB_PATH:${LD_LIBRARY_PATH}
+ LD_LIBRARY_PATH="$LIB_PATH:${LD_LIBRARY_PATH}"
else
- LD_LIBRARY_PATH=$LIB_PATH
+ LD_LIBRARY_PATH="$LIB_PATH"
fi
export LD_LIBRARY_PATH
# Preload libcef.so to avoid crashes.
-LD_PRELOAD=$LIB_PATH/libcef.so java -cp "./bin:./bin/*" -Djava.library.path=$LIB_PATH tests.detailed.MainFrame "$@"
+LD_PRELOAD=libcef.so java -cp "${DIR}/bin:${DIR}/bin/*" -Djava.library.path="$LIB_PATH" tests.${EXAMPLE}.MainFrame "$@"
diff --git a/tools/distrib/linux64/compile.sh b/tools/distrib/linux64/compile.sh
index c073b1b..6bee820 100755
--- a/tools/distrib/linux64/compile.sh
+++ b/tools/distrib/linux64/compile.sh
@@ -3,10 +3,12 @@
# reserved. Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file.
+# Determine the absolute path to the current directory.
+DIR="$( cd "$( dirname "$0" )" && pwd )"
+BIN_DIR="${DIR}/bin"
+
# Compile the test program.
-javac -cp "./bin:./bin/*" ./bin/tests/detailed/*.java ./bin/tests/detailed/dialog/*.java ./bin/tests/detailed/handler/*.java ./bin/tests/detailed/ui/*.java ./bin/tests/simple/*.java
+javac -cp "${BIN_DIR}:${BIN_DIR}/*" "${BIN_DIR}"/tests/detailed/*.java "${BIN_DIR}"/tests/detailed/dialog/*.java "${BIN_DIR}"/tests/detailed/handler/*.java "${BIN_DIR}"/tests/detailed/ui/*.java "${BIN_DIR}"/tests/simple/*.java
# Create the test JAR file.
-cd bin
-jar -cf jcef-tests.jar tests/detailed/*.class tests/detailed/dialog/*.class tests/detailed/handler/*.class tests/detailed/ui/*.class tests/simple/*.java
-cd .. \ No newline at end of file
+jar -cf "${BIN_DIR}"/jcef-tests.jar -C "${BIN_DIR}" tests
diff --git a/tools/distrib/linux64/run.sh b/tools/distrib/linux64/run.sh
index 2eabf9c..cbb4fd4 100755
--- a/tools/distrib/linux64/run.sh
+++ b/tools/distrib/linux64/run.sh
@@ -3,16 +3,23 @@
# reserved. Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file.
-# Determine the absolute path to the library directory.
-export LIB_PATH=$(readlink -f "./bin/lib/linux64")
+# Determine the absolute path to the current directory.
+DIR="$( cd "$( dirname "$0" )" && pwd )"
+LIB_PATH="$DIR/bin/lib/linux64"
+
+if [ -z "$1" ]; then
+ EXAMPLE="detailed"
+else
+ EXAMPLE="$1"
+fi
# Necessary for jcef_helper to find libcef.so.
if [ -n "$LD_LIBRARY_PATH" ]; then
- LD_LIBRARY_PATH=$LIB_PATH:${LD_LIBRARY_PATH}
+ LD_LIBRARY_PATH="$LIB_PATH:${LD_LIBRARY_PATH}"
else
- LD_LIBRARY_PATH=$LIB_PATH
+ LD_LIBRARY_PATH="$LIB_PATH"
fi
export LD_LIBRARY_PATH
# Preload libcef.so to avoid crashes.
-LD_PRELOAD=$LIB_PATH/libcef.so java -cp "./bin:./bin/*" -Djava.library.path=$LIB_PATH tests.detailed.MainFrame "$@"
+LD_PRELOAD=libcef.so java -cp "${DIR}/bin:${DIR}/bin/*" -Djava.library.path="$LIB_PATH" tests.${EXAMPLE}.MainFrame "$@"