From 32b6a2ce770626ddb4e0901db3ee4ef0069d2c94 Mon Sep 17 00:00:00 2001 From: Jack Boyce Date: Mon, 13 Jul 2020 13:46:22 -0700 Subject: [PATCH] updates for Linux --- bin/JugglingLab.sh | 4 ++-- bin/README_linux_optimizer.txt | 38 ++++++++++++++++++++++++++++++++++ bin/jlab | 4 ++-- 3 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 bin/README_linux_optimizer.txt diff --git a/bin/JugglingLab.sh b/bin/JugglingLab.sh index 50990a7..7b9689f 100755 --- a/bin/JugglingLab.sh +++ b/bin/JugglingLab.sh @@ -35,8 +35,8 @@ fi JL_JAR="${DIR}/JugglingLab.jar" if [ -a "${JL_JAR}" ]; then - "$_java" -cp "${JL_JAR}:${DIR}/commons-math3-3.6.1.jar" jugglinglab.JugglingLab + "$_java" -cp "${JL_JAR}:ortools-lib/protobuf.jar:ortools-lib/com.google.ortools.jar" -Xss2048k -Djava.library.path=ortools-lib jugglinglab.JugglingLab else echo >&2 "\"JugglingLab.jar\" not found in same directory as this script." exit 1 -fi \ No newline at end of file +fi diff --git a/bin/README_linux_optimizer.txt b/bin/README_linux_optimizer.txt new file mode 100644 index 0000000..1f5e053 --- /dev/null +++ b/bin/README_linux_optimizer.txt @@ -0,0 +1,38 @@ + +Optimizer how-to on Linux +------------------------- + +Beginning with Juggling Lab version 1.3, there is a feature called the +optimizer that requires some additional components to work. + +This optimizer feature is optional, and if the additional components aren't +present then Juggling Lab functions fine with that feature turned off. + + +Here are steps to install the needed components for your Linux distro: + +1. Obtain a binary image of Google's OR-Tools for Java: + + a. navigate to https://developers.google.com/optimization/install/java + b. select "Binary installation on Linux" + c. download the correct distribution for your system (it is NOT + necessary to download the FlatZinc version) + (If your system isn't present then you could attempt to build OR-Tools + from source. Not for the faint of heart.) + d. extract the download archive into any convenient location + +2. Validate your installation as described at the bottom of the download page + +3. Copy the /lib directory inside OR-Tools into the Juggling Lab directory, + next to JugglingLab.jar, and rename it /ortools-lib + (The rest of the OR-Tools installation can be deleted.) + +4. There should now be a directory /ortools-lib in the same location as + JugglingLab.jar + +5. Start Juggling Lab with the provided `JugglingLab.sh` script. + +---> + +If the OR-Tools are installed correctly, the File-->Optimize menu option +should become available on all pattern windows. diff --git a/bin/jlab b/bin/jlab index 71b9229..11a05e3 100755 --- a/bin/jlab +++ b/bin/jlab @@ -52,10 +52,10 @@ else if [ -a "${JL_JAR}" ]; then if [[ $# -ne 0 ]]; then - "$_java" -cp "${JL_JAR}:${DIR}/commons-math3-3.6.1.jar" jugglinglab.JugglingLab $* + "$_java" -cp "${JL_JAR}:ortools-lib/protobuf.jar:ortools-lib/com.google.ortools.jar" -Xss2048k -Djava.library.path=ortools-lib jugglinglab.JugglingLab $* else # print a help message if no command line args - "$_java" -cp "${JL_JAR}:${DIR}/commons-math3-3.6.1.jar" jugglinglab.JugglingLab help + "$_java" -cp "${JL_JAR}" jugglinglab.JugglingLab help fi else echo >&2 "\"JugglingLab.jar\" not found in same directory as this script."