Index: other-projects/expeditee-release-kits/kits/rke/ant-scripts/compile.xml
===================================================================
--- other-projects/expeditee-release-kits/kits/rke/ant-scripts/compile.xml	(revision 28720)
+++ other-projects/expeditee-release-kits/kits/rke/ant-scripts/compile.xml	(revision 28721)
@@ -21,14 +21,21 @@
 		</move>
 
-
+		<!-- copy search4j -->
 		<if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
 			<exec dir="${rk.home}/shared/core/search4j" executable="./configure" failonerror="true"/>
 			<exec dir="${rk.home}/shared/core/search4j" executable="make" failonerror="true"/>
-			<copy file="${rk.home}/shared/core/search4j/search4j" todir="${basedir}/compiled" />
+			<copy file="${rk.home}/shared/core/search4j/search4j" todir="${basedir}/compiled/bin" />
 		</if>
 		<if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
 			<exec dir="${rk.home}/shared/core/search4j" executable="nmake"><arg value="/f"/><arg value="win32.mak"/></exec>
-			<copy file="${rk.home}/shared/core/search4j/search4j.exe" todir="${basedir}/compiled" />
+			<copy file="${rk.home}/shared/core/search4j/search4j.exe" todir="${basedir}/compiled/bin" />
 		</if>
+
+		<!-- copy run scripts -->
+		<copy todir="${basedir}/compiled">
+			<fileset dir="${rk.home}/scripts">
+				<include name="**" />
+			</fileset>
+		</copy>
 	</target>
 
Index: other-projects/expeditee-release-kits/kits/rke/installer/build.xml
===================================================================
--- other-projects/expeditee-release-kits/kits/rke/installer/build.xml	(revision 28720)
+++ other-projects/expeditee-release-kits/kits/rke/installer/build.xml	(revision 28721)
@@ -94,4 +94,5 @@
 		<echo>Setting Binaries to Executable</echo>
 		<chmod dir="${installDir}" includes="*.sh,*.bash" perm="775"/>
+		<chmod dir="${installDir}/bin" includes="*" perm="755"/>
 		<!-- <chmod dir="${installDir}/bin" includes="*" perm="775"/> 
 		<chmod dir="${installDir}/cgi-bin/${shell.name}" includes="*" perm="775"/>
Index: other-projects/expeditee-release-kits/scripts/bin/findjava.bat
===================================================================
--- other-projects/expeditee-release-kits/scripts/bin/findjava.bat	(revision 28721)
+++ other-projects/expeditee-release-kits/scripts/bin/findjava.bat	(revision 28721)
@@ -0,0 +1,72 @@
+@echo off
+
+setlocal enabledelayedexpansion
+
+:: Environment Variables passed in: EXP_LANG
+:: As a result of executing this script, the JAVA_EXECUTABLE and EXP_JAVA_HOME
+:: environment variables will be set, but only if Perl was found.
+
+:findJava
+
+:: We should already be in the folder containing a compiled-up search4j.exe
+:: if this Expeditee is part of an installation.
+:: If search4j.exe is not there, then it means this is an SVN checkout. 
+:: In such a case, it's up to the user checking things out to ensure JAVA_HOME
+:: is set and moreover points to the correct version of the Java.
+
+set DISPLAY_MIN_VERSION=1.8
+set MIN_VERSION=1.8.0_00
+set SEARCH4J_EXECUTABLE=search4j.exe
+if exist %SEARCH4J_EXECUTABLE% goto setJexec
+set SEARCH4J_EXECUTABLE=!EXPEDITEE_HOME!\bin\search4j.exe
+set HINT=!EXPEDITEE_HOME!\packages\jre
+if not exist "%SEARCH4J_EXECUTABLE%" goto tryJava
+
+:: JAVA_EXECUTABLE is the value returned by running search4j -e -m MIN_VERSION -p HINT
+:: for /f "tokens=*" %%G in ('"%SEARCH4J_EXECUTABLE% -e -m %MIN_VERSION% -p %HINT%"') do set JAVA_EXECUTABLE=%%G
+:setJexec
+    for /f "tokens=* usebackq" %%G in (`"%SEARCH4J_EXECUTABLE%" -e -m '%MIN_VERSION%' -p '%HINT%'`) do set JAVA_EXECUTABLE=%%G
+    if "%JAVA_EXECUTABLE%" == "" goto noJava
+    echo Java:
+    echo %JAVA_EXECUTABLE%
+    echo.
+
+    :: we know that works, so we can set the local javahome (for Expeditee) as well
+    for /f "tokens=* usebackq" %%G in (`"%SEARCH4J_EXECUTABLE%" -m '%MIN_VERSION%' -p '%HINT%'`) do set EXP_JAVA_HOME=%%G
+
+:: found java, JAVA_EXECUTABLE and EXP_JAVA_HOME env vars set, can exit this script
+    goto exit
+
+:tryJava
+if "%JAVA_HOME%" == "" goto noJava
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJava
+	if "%GLILANG%" == "en" (
+		echo.
+		echo ***************************************************************************
+    		echo WARNING: 
+		echo Java Runtime not bundled with this %PROGNAME% installation.
+		echo Using JAVA_HOME: !JAVA_HOME!
+		echo ^(NOTE: this needs to be %DISPLAY_MIN_VERSION% or higher.^)
+		echo ***************************************************************************
+		echo.
+	)
+	:: Try to use this version
+	set JAVA_EXECUTABLE=%JAVA_HOME%\bin\java
+	set EXP_JAVA_HOME=%JAVA_HOME%
+	goto exit
+
+:noJava
+    echo.
+    if "%EXP_LANG%" == "en" (
+		echo Failed to locate an appropriate version of Java. You must install a
+    		echo Java Runtime Environment ^(version %DISPLAY_MIN_VERSION% or greater^) before running the
+    		echo %PROGNAME%.
+	)
+    goto exit
+
+:exit
+set SEARCH4J_EXECUTABLE=
+set MIN_VERSION=
+set DISPLAY_MIN_VERSION=
+
+endlocal & set JAVA_EXECUTABLE=%JAVA_EXECUTABLE%& set EXP_JAVA_HOME=%EXP_JAVA_HOME%
Index: other-projects/expeditee-release-kits/scripts/bin/findjava.sh
===================================================================
--- other-projects/expeditee-release-kits/scripts/bin/findjava.sh	(revision 28721)
+++ other-projects/expeditee-release-kits/scripts/bin/findjava.sh	(revision 28721)
@@ -0,0 +1,126 @@
+# Need to be in the folder containing a compiled-up search4j
+# If a search4j executable is not there, then it means this is an SVN checkout. 
+# In such a case, it's up to the user checking things out to ensure JAVA_HOME
+# is set and that it moreover points to the correct version of the Java.
+
+# Function to check if any JAVA_HOME is set and if so, try using that
+function try_java {
+    MIN_DISPLAY_VERSION=${1};
+
+    if [ "x$JAVA_HOME" = "x" -o ! -f "$JAVA_HOME/bin/java" ]; then
+	no_java "$MIN_DISPLAY_VERSION"
+	return $?
+    else
+	# There is a JAVA_HOME already set, we're going to try using that
+	javapath="$JAVA_HOME/bin/java"
+	javahome="$JAVA_HOME"
+	# Print a warning that we're going to use whatever JAVA_HOME is set (fingers crossed)
+	if [ "x$exp_lang" = "x" -o "$exp_lang" = "en" ]; then
+	    echo
+	    echo "***************************************************************************"
+	    echo "WARNING: "
+	    echo "Java Runtime not bundled with this $PROGNAME installation."
+	    echo "Using JAVA_HOME: $JAVA_HOME"
+	    echo "(NOTE: this needs to be $MIN_DISPLAY_VERSION or higher.)"
+	    echo "***************************************************************************"
+	    echo
+	fi
+	echo "Java:"
+	echo $javapath
+	echo
+	return 0
+    fi
+}
+
+function no_java {
+    MIN_DISPLAY_VERSION=${1};
+
+    echo
+    if [ "x$exp_lang" = "x" -o "$exp_lang" = "en" ]; then
+	echo "Failed to locate an appropriate version of Java. You must install a"
+	echo "Java Runtime Environment (version $MIN_DISPLAY_VERSION or greater) before running the"
+	echo "$PROGNAME."
+	echo "If you have Java installed on your machine please set the environment variable JAVA_HOME."
+    fi
+    return 1
+}
+
+function set_java_exec {	
+    SEARCH4J_EXECUTABLE=${1};
+    MINIMUM_JAVA_VERSION=${2};
+    MIN_DISPLAY_VERSION=${3};
+
+    # Give search4j a hint to find Java depending on the platform
+    if [ "$EXPEDITEE_OS" = "linux" ]; then
+	HINT=`cd "$EXPEDITEE_HOME";pwd`/packages/jre
+    elif [ "$EXPEDITEE_OS" = "darwin" ]; then
+	HINT=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
+        #/System/Library/Frameworks/JavaVM.framework/Home
+    fi	
+    
+    javapath="`"$SEARCH4J_EXECUTABLE" -e -p "$HINT" -m $MINIMUM_JAVA_VERSION`"
+    javahome="`"$SEARCH4J_EXECUTABLE" -p "$HINT" -m $MINIMUM_JAVA_VERSION`"
+
+    if [ "$?" != "0" ]; then
+	
+        OLDVER="`"$SEARCH4J_EXECUTABLE" -v -p "$HINT"`"
+	
+        if [ "$?" = "0" ]; then
+	    
+            if [ "x$exp_lang" = "x" -o "$exp_lang" = "en" ]; then
+                echo "The version of the Java Runtime Environment you have installed ($OLDVER)"
+                echo "is too old to run the $PROGNAME. Please install a new"
+                echo "version of the JRE (version $MIN_DISPLAY_VERSION or newer) and rerun this script."
+            fi
+            return 1
+	    
+        else
+	    no_java "$MIN_DISPLAY_VERSION"
+	    return $?
+        fi
+	
+    fi
+    echo "Java:"
+    echo $javapath
+    echo
+    return 0
+}
+
+
+## ---- Check Java ----
+# Some users may set this line manually
+javahome=
+exp_lang=$1
+PROGNAME=$2
+MINIMUM_JAVA_VERSION=1.8.0_00
+MIN_DISPLAY_VERSION=1.8
+if [ "x$javahome" != "x" ]; then
+    JAVA_HOME=$javahome;
+    try_java "$MIN_DISPLAY_VERSION"
+    retval=$?
+    return $retval
+fi
+
+# sus out search4j
+# first look for compiled search4j executable inside the current folder
+if [ -x "search4j" ]; then
+    SEARCH4J_EXECUTABLE="./search4j"
+elif [ -x "$EXPEDITEE_HOME/bin/search4j" ]; then
+    SEARCH4J_EXECUTABLE="$EXPEDITEE_HOME/bin/search4j"
+else
+    echo "Couldn't determine the location of the search4j executable"
+    echo "If you are running Expeditee"
+    echo "   * check EXPEDITEE_HOME is set"
+    echo "   * check bin/search4j exists"
+    echo "   * check bin/search4j is executable"
+fi
+
+# Now run set_java_exec with search4j if we found one, else try javahome
+if [ "x$SEARCH4J_EXECUTABLE" != "x" ]; then
+    set_java_exec "$SEARCH4J_EXECUTABLE" "$MINIMUM_JAVA_VERSION" "$MIN_DISPLAY_VERSION"
+    retval=$?
+else
+    try_java "$MIN_DISPLAY_VERSION"
+    retval=$?
+fi
+return $retval
Index: other-projects/expeditee-release-kits/scripts/run.bat
===================================================================
--- other-projects/expeditee-release-kits/scripts/run.bat	(revision 28721)
+++ other-projects/expeditee-release-kits/scripts/run.bat	(revision 28721)
@@ -0,0 +1,39 @@
+@echo off
+SETLOCAL enabledelayedexpansion
+
+if "%EXP_LANG%" == "" set EXP_LANG=en
+set PROGNAME=Expeditee
+set EXPEDITEE_OS=windows
+
+:: go into the folder where this script lives and run expeditee from there
+pushd "%CD%"
+CD /D "%~dp0"
+set EXPEDITEE_HOME=%CD%
+
+::  -------- Run Expeditee --------
+
+:: JRE_HOME or JAVA_HOME must be set correctly to run Expeditee
+
+set java_min_version=1.8.0_00
+bin\windows\search4j -m %java_min_version% > nul
+echo.
+if not %ERRORLEVEL% equ 0 goto :exit
+
+:: ---- Check Java ----
+:chkjava
+:: call the findjava script so that we have the variables JAVA_EXECUTABLE and EXP_JAVA_HOME that it sets
+set exit_status=0
+:: Need to find Java. If found, JAVA_EXECUTABLE will be set
+:: call findjava.bat %EXP_LANG% %PROGNAME%
+call "%EXPEDITEE_HOME%\findjava.bat"
+if "%JAVA_EXECUTABLE%" == "" echo **** No Java executable found& goto exit
+set PATH=%EXP_JAVA_HOME%\bin;%PATH%
+
+::echo port: %port%& echo conf: %conf%& echo.& echo.
+:: Do not remove the quotes around %* !!! It's what helps Server2.jar deal with spaces in configfile path
+"%JAVA_EXECUTABLE%" -jar Expeditee.jar %*
+
+
+:exit
+popd
+ENDLOCAL
Index: other-projects/expeditee-release-kits/scripts/run.sh
===================================================================
--- other-projects/expeditee-release-kits/scripts/run.sh	(revision 28721)
+++ other-projects/expeditee-release-kits/scripts/run.sh	(revision 28721)
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+# Need to run this script from its own directory instead of whichever directory it may be called from
+#currentdir=$(cd `dirname "$0"` && pwd)
+thisdir="`dirname \"$0\"`"
+thisdir="`cd \"$thisdir\" && pwd`"
+cd "$thisdir"
+EXPEDITEE_HOME=$thisdir
+export EXPEDITEE_HOME
+
+if test "x$EXPEDITEE_OS" = "x" ; then
+    EXPEDITEE_OS=`uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+    # check for running bash under cygwin
+    if test "`echo $EXPEDITEE_OS | sed 's/cygwin//'`" != "$EXPEDITEE_OS" ;
+    then
+	EXPEDITEE_OS=windows
+    fi
+fi
+export EXPEDITEE_OS
+
+
+if [ -z "$exp_lang" ]; then
+    exp_lang=en
+fi
+
+PROGNAME="Expeditee"
+PROGFULLNAME=$PROGNAME
+
+
+##  ---- Determine JAVA_HOME ----
+# JRE_HOME or JAVA_HOME must be set correctly to run this program
+java_min_version=1.8.0_00
+bin/search4j -m $java_min_version &> /dev/null
+# for some reason, Mac requires an echo after the above
+echo
+if [ "$?" == "0" ]; then
+
+    #CLASSPATH
+    # if setting classpath, see gs2-server.sh, then export it
+
+    ## ---- Check Java ----
+    # call the script with source, so that we have the variables it sets ($javapath)
+    exit_status=0
+    source bin/findjava.sh "$exp_lang" "$PROGNAME"
+    exit_status=$?
+    if [ "$exit_status" -eq 1 ]; then
+        exit 1;
+    fi
+    export PATH=$javahome/bin:$PATH
+
+    # -Xdock:name      To set the name of the app in the MacOS Dock bar
+    # -Xdock:icon      Path to the MacOS Doc icon (not necessary for GS)    
+    custom_vm_args=""
+    if [ "$EXPEDITEE_OS" = "darwin" ]; then
+    	custom_vm_args="-Xdock:name=$PROGFULLNAME"
+    fi
+
+    #-Xmx128M -classpath <classpath>...
+
+    "$javapath" $custom_vm_args -jar Expeditee.jar $*
+
+    # silent mode: when launched in the background (with & at end), need to 
+    # redirect any STDERR (STDOUT) output to /dev/null first, else output will hog the x-term.
+    #"$javapath" $custom_vm_args org.greenstone.server.Server2 "$GSDLHOME" "$GSDLOS$GSDLARCH" "$serverlang" $* > /dev/null &
+fi
