[install] Update default values in bin/exports.sh

We also clean up exports.sh a bit so it's easy to tell what needs
customizing for new environments vs. what is supposed to work as-is.
These are hopefully more up-to-date and reasonable defaults for a
developer on OS X, and for developers not on OS X, hopefully the cleanup
helps clarify what likely needs customization.

One of the changes to default values is to use the scala-library.jar
within the given installation of Scala, not the repo's
scala-library.jar.  I don't know much about Scala, but it seems like a
better default to make SCALA, SCALA_HOME, and SCALA_LIBRARY_JAR all
match instead of SCALA_LIBRARY_JAR being a special snowflake that's
checked into the repo.
This commit is contained in:
Christopher Lin
2015-08-19 15:40:17 -07:00
parent 5f80c0009b
commit f024292eea
2 changed files with 16 additions and 21 deletions

View File

@@ -2,7 +2,10 @@ INSTALLATION INSTRUCTIONS
INSTALLING ON POSIX COMPATIBLE SYSTEMS
* Install the dependencies: Scala 2.11, Sun Java JDK 7, mysql
* Install the dependencies:
* Sun Java JDK 7
* Scala 2.11: On OS X, it's easiest to install via [Homebrew](http://brew.sh/): `brew install scala`
* MySQL: Again, easiest to install via Homebrew: `brew install mysql`
* Edit the file bin/exports.sh (and optionally
etherpad/bin/etherpad.default) and change the paths to

View File

@@ -21,23 +21,21 @@
#
################################################################################
## Change the following lines to fit your development environment.
# These lines assume you installed Scala via Homebrew.
export SCALA_HOME="/usr/local/Cellar/scala/2.11.7"
export SCALA="$SCALA_HOME/bin/scala"
export SCALA_LIBRARY_JAR="$SCALA_HOME/libexec/lib/scala-library.jar"
#####
# You have to change following lines to your requirements:
#
[ -e "/usr/lib/jvm/java-6-openjdk" ] && export JAVA_HOME="/usr/lib/jvm/java-6-openjdk"
[ -e "/usr/lib/jvm/java-6-sun" ] && export JAVA_HOME="/usr/lib/jvm/java-6-sun"
[ -e "/opt/java/64/jre1.6.0_31" ] && export JAVA_HOME="/opt/java/64/jre1.6.0_31"
export SCALA_HOME="/usr/share/java"
export SCALA_LIBRARY_JAR="$PWD/lib/scala-library.jar"
export MYSQL_CONNECTOR_JAR="$PWD/lib/mysql-connector-java-5.1.34-bin.jar"
[ -e "/usr/lib/jvm/java-6-openjdk" ] && export JAVA_OPTS="-Xbootclasspath/p:../infrastructure/lib/rhino-js-1.7r3.jar:/usr/share/java/scala-library.jar"
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home"
export JAVA="/usr/bin/java"
export SCALA="/usr/bin/scala"
export PATH="$JAVA_HOME/bin:$PATH"
## The following lines should not need changing.
export JAVA_OPTS="-Xbootclasspath/p:../infrastructure/lib/rhino-js-1.7r3.jar:$SCALA_LIBRARY_JAR"
export MYSQL_CONNECTOR_JAR="$PWD/lib/mysql-connector-java-5.1.34-bin.jar"
export PATH="$JAVA_HOME/bin:$SCALA_HOME/bin:$PATH"
if ! [ -e "$MYSQL_CONNECTOR_JAR" ]; then
echo "MySql Connector jar '$MYSQL_CONNECTOR_JAR' not found - Download it here: http://dev.mysql.com/downloads/connector/j/3.1.html"
@@ -53,9 +51,3 @@ if ! [ -e "$JAVA" ]; then
echo "Java cannot be found '$JAVA' not found - Download it here: http://openjdk.java.net/"
exit 1
fi
#if ! [ -e "$SCALA" ]; then
# echo "Java cannot be found '$SCALA' not found - Download it here: http://www.scala-lang.org/"
# exit 1
#fi