Index: /trunk/expeditee-devel.sh
===================================================================
--- /trunk/expeditee-devel.sh	(revision 551)
+++ /trunk/expeditee-devel.sh	(revision 551)
@@ -0,0 +1,36 @@
+
+
+which javac  >/dev/null 2>&1
+
+if [ $? != 0 ] ; then
+  export JAVA_HOME="/cygdrive/c/Program Files/Java/jdk1.7.0_45"
+  export PATH=$JAVA_HOME/bin/:$PATH
+
+  echo "+ Set JAVA_HOME to $JAVA_HOME and updated path"
+
+  cygpath 2>/dev/null
+  if [ $? != 0 ] ; then
+    echo "Detected runing in Cygwin environment => Changing JAVA_HOME to Windows native format"
+    export JAVA_HOME=`cygpath -w "$JAVA_HOME"`
+  fi
+
+fi
+
+
+expeditee_home=`pwd`;
+export ANT_HOME="$expeditee_home/dev/packages/apache-ant-1.9.2"
+export PATH="$ANT_HOME/bin/:$PATH"
+
+echo "+ Set ANT_HOME to $ANT_HOME and updated path"
+
+
+echo "-----"
+echo "To create an Expeditee distribution, type:"
+echo ""
+echo "  ant fresh_dist_exp"
+echo ""
+echo "or:"
+echo "  ant fresh_dist_apollo"
+
+echo ""
+
Index: /trunk/expeditee-setup.bat
===================================================================
--- /trunk/expeditee-setup.bat	(revision 551)
+++ /trunk/expeditee-setup.bat	(revision 551)
@@ -0,0 +1,128 @@
+@echo off
+
+setlocal enabledelayedexpansion
+
+pushd "%CD%"
+CD /D "%~dp0"
+set EXPLANG=en
+
+:: ASCII art generated at:
+::   http://patorjk.com/software/taag/
+:: Font = Epic
+::
+echo  ______           ______  ______  ______  __________________ ______  ______
+echo (  ___ \^|\     /^|(  ___ )(  ___ \(  __  \ \__   __/\__   __/(  ___ \(  ___ \
+echo ^| (   \/( \   / )^| (   )^|^| (   \/^| (  \  )   ) (      ) (   ^| (   \/^| (   \/
+echo ^| (__    \ (_) / ^| (___)^|^| (_    ^| ^|   ) ^|   ^| ^|      ^| ^|   ^| (__   ^| (__   
+echo ^|  __)    ) _ (  ^|  ____)^|  __)  ^| ^|   ^| ^|   ^| ^|      ^| ^|   ^|  __)  ^|  __)  
+echo ^| (      / ( ) \ ^| (     ^| (     ^| ^|   ) ^|   ^| ^|      ^| ^|   ^| (     ^| (     
+echo ^| (___/\( /   \ )^| )     ^| (___/\^| (__/  )___) (___   ^| ^|   ^| (___/\^| (___/\
+echo (______/^|/     \^|^|/      (______/(______/ \_______/   )_(   (______/(______/
+echo.
+echo (C) 2013, University of Waikato, New Zealand
+echo.
+echo.
+echo.
+
+if "!EXPEDITEE_HOME!" == "" goto start
+if "!EXPEDITEE_HOME!" == "!CD!" if not "!EXPOS!" == "" (
+	echo Your environment is already set up for Expeditee
+	goto done
+)
+
+:start
+if "!OS!" == "Windows_NT" goto WinNT
+if "!OS!" == "" goto Win95
+if "!EXPLANG!" == "en" echo Setup failed - your PATH has not been set
+if "!EXPLANG!" == "es" echo No se pudo realizar la configuraci¢n - no se ha establecido la RUTA.
+if "!EXPLANG!" == "fr" echo Echc de l'installation - votre variable PATH n'a pas t ajuste
+if "!EXPLANG!" == "ru" echo áâ ­®¢ª  ­¥ ã¤ « áì -  ­¥ ¡ë« ãáâ ­®¢«¥­
+goto End
+
+:WinNT
+set EXPEDITEE_HOME=%CD%
+set EXPOS=windows
+
+set PATH=!EXPEDITEE_HOME!\windows;!EXPEDITEE_HOME!\script;!PATH!
+
+set EXP_CP_SET=yes
+goto Success
+
+:Win95
+if "%1" == "SetEnv" goto Win95Env
+REM We'll invoke a second copy of the command processor to make
+REM sure there's enough environment space
+COMMAND /E:2048 /K %0 SetEnv
+goto End
+
+:Win95Env
+set EXPEDITEE_HOME=%CD%
+set EXPOS=windows
+
+set PATH=!EXPEDITEE_HOME!\windows;!EXPEDITEE_HOME!\script;!PATH!
+
+set EXP_CP_SET=yes
+goto Success
+
+
+:Success
+if "!EXPLANG!" == "en" echo.
+if "!EXPLANG!" == "en" echo Your environment has successfully been set up to run Expeditee.
+if "!EXPLANG!" == "en" echo Note that these settings will only have effect within this MS-DOS
+if "!EXPLANG!" == "en" echo session. You will therefore need to rerun expeditee-setup.bat if you want
+if "!EXPLANG!" == "en" echo to run Expeditee programs from a different MS-DOS session.
+if "!EXPLANG!" == "en" echo.
+
+if "!EXPLANG!" == "es" echo.
+if "!EXPLANG!" == "es" echo Su ambiente ha sido configurado para correr los programas Expeditee.
+if "!EXPLANG!" == "es" echo Recuerde que estos ajustes £nicamente tendr n efecto dentro de esta sesi¢n
+if "!EXPLANG!" == "es" echo MS-DOS. Por lo tanto deber  ejecutar nuevamente expeditee-setup.bat si desea
+if "!EXPLANG!" == "es" echo correr los programas de Expeditee desde una sesi¢n MS-DOS diferente.
+if "!EXPLANG!" == "es" echo.
+
+if "!EXPLANG!" == "fr" echo.
+if "!EXPLANG!" == "fr" echo Votre environnement a t configure avec succs pour excuter Expeditee
+if "!EXPLANG!" == "fr" echo Notez que ces paramtrages n'auront d'effet que dans cette session MS-DOS.
+if "!EXPLANG!" == "fr" echo Vous devrez par consquent rexcuter expeditee-setup.bat si vous voulez faire
+if "!EXPLANG!" == "fr" echo lancer des programmes Expeditee dans une autre session MS-DOS.
+if "!EXPLANG!" == "fr" echo.
+
+if "!EXPLANG!" == "ru" echo.
+if "!EXPLANG!" == "ru" echo  è¥ ®ªàã¦¥­¨¥ ¡ë«® ãá¯¥è­® ­ áâà®¥­®, çâ®¡ë ãáâ ­®¢¨âì Expeditee ¡à â¨â¥
+if "!EXPLANG!" == "ru" echo ¢­¨¬ ­¨¥, çâ® íâ¨ ­ §­ ç¥­¨ï ¡ã¤ãâ â®«ìª® ¨¬¥âì íää¥ªâ ¢ ¯à¥¤¥« å íâ®£® MS DOS
+if "!EXPLANG!" == "ru" echo á¥áá¨ï. ë ¡ã¤¥â¥ ¯®íâ®¬ã ¤®«¦­ë ¯®¢â®à­® ã¯à ¢«ïâì expeditee-setup.bat, ¥á«¨ ë å®â¨â¥
+if "!EXPLANG!" == "ru" echo ã¯à ¢«ïâì ¯à®£à ¬¬ ¬¨ ¥«ñ­ëå ¨§¢¥à¦¥­­ëå ¯®à®¤ ®â à §«¨ç­®© á¥áá¨¨ MS DOS.
+if "!EXPLANG!" == "ru" echo.
+
+:End
+endlocal & set PATH=%PATH%& set EXPEDITEE_HOME=%EXPEDITEE_HOME%& set EXPOS=%EXPOS%
+
+setlocal enabledelayedexpansion
+
+if exist "%EXPEDITEE_HOME%\local" (
+  if exist "!EXPEDITEE_HOME!\local\setup.bat" (
+    echo.
+    echo Running !EXPEDITEE_HOME!\local\setup.bat
+    cd "!EXPEDITEE_HOME!\local"
+    call setup.bat 
+    cd "!EXPEDITEE_HOME!"
+  )
+)
+
+:: Consider the equivlent converted to DOS syntax??
+:: which >/dev/null java 2>&1 
+
+
+
+:done
+popd
+endlocal & set PATH=%PATH%& set EXPEDITEE_HOME=%EXPEDITEE_HOME%& set EXPOS=%EXPOS%
+
+:: if [ $? != 0 ] ; then
+::   echo "Unable to find a Java runtime" >2
+:: else 
+::  echo "-----"
+::  echo "To run the Expeditee Browser, type:"
+::  echo "  expeditee"
+::  echo ""
+::fi
Index: /trunk/expeditee-setup.sh
===================================================================
--- /trunk/expeditee-setup.sh	(revision 550)
+++ /trunk/expeditee-setup.sh	(revision 551)
@@ -1,26 +1,265 @@
 
-
-which >/dev/null java 2>&1 
-
-if [ $? != 0 ] ; then
-  echo "Unable to find a Java runtime"
-fi
-
-expeditee_home=`pwd`;
-
-if [ -z "$EXPEDITEE_HOME" ] ; then
-  export EXPEDITEE_HOME="$expeditee_home"
-  echo "Setting EXPEDITEE_HOME: "
-  echo "  $EXPEDITEE_HOME"
-
-  export PATH="$EXPEDITEE_HOME/script:$PATH"
-  echo "Updating PATH to include Expeditee executables"
-fi
-
-
-echo "-----"
-echo "To run the Expeditee Browser, type:"
-echo "  expeditee"
-
-echo ""
-
+# Script written to be compatible with a variety of 'sh' derived shells: 
+#   ash, bash, dash ...
+
+explang=""
+# encoding inputs and outputs
+exptoenc=""
+expfromenc=""
+
+# see if the shell has any language environment variables set
+# see locale(7) manpage for this ordering.
+if test ! -z "$LC_ALL" ; then
+  explang="$LC_ALL"
+elif test ! -z "$LANG"; then
+  explang="$LANG"
+fi
+
+
+# note... all our output strings have the charset hard-coded, but
+# people may be using a different encoding in their terminal. LANG
+# strings look like "en_NZ.UTF-8".
+
+# Determine the requested output encoding
+case $explang in
+  *.*)
+    exptoenc=`echo $explang | sed 's/.*\.//'`
+    ;;
+esac
+
+# Our French and Spanish strings are in 'iso-8859-1' (Latin 1) encoding; 
+# Russian is the Cyrillic alphabet encoding, 'KOI8-R'
+case $explang in
+  fr*|FR*)
+    explang=fr
+    expfromenc="iso-8859-1"
+  ;;
+  es*|ES*)
+    explang=es
+    expfromenc="iso-8859-1"
+  ;;
+  ru*|RU*)
+    explang=ru
+    expfromenc="koi8r"
+  ;;
+  *) # default
+    explang=en
+    expfromenc="iso-8859-1"
+  ;;
+esac  
+
+# "iconv" is the program for converting text between encodings.
+expiconv=`which iconv 2>/dev/null`
+if test $? -ne 0 || test ! -x "$expiconv" || test -z "$expfromenc" || test -z "$exptoenc"; then
+# we can't convert encodings from some reason
+  expiconv="cat"
+else
+# add the encodings
+  expiconv="$expiconv -f $expfromenc -t $exptoenc"
+fi
+
+
+# ASCII art generated at:
+#   http://patorjk.com/software/taag/
+# Font = Epic
+#
+echo " ______           ______  ______  ______  __________________ ______  ______ "
+echo "(  ___ \|\     /|(  ___ )(  ___ \(  __  \ \__   __/\__   __/(  ___ \(  ___ \"
+echo "| (   \/( \   / )| (   )|| (   \/| (  \  )   ) (      ) (   | (   \/| (   \/"
+echo "| (_     \ (_) / | (___)|| (_    | |   ) |   | |      | |   | (_    | (_    "
+echo "|  __)    ) _ (  |  ____)|  __)  | |   | |   | |      | |   |  __)  |  __)  "
+echo "| (      / ( ) \ | (     | (     | |   ) |   | |      | |   | (     | (     "
+echo "| (___/\( /   \ )| )     | (___/\| (__/  )___) (___   | |   | (___/\| (___/\"
+echo "(______/|/     \||/      (______/(______/ \_______/   )_(   (______/(______/"
+echo
+echo (C) 2013, University of Waikato, New Zealand
+echo
+echo
+echo
+
+# make sure we are sourced, and not run
+
+if test "$0" != "`echo $0 | sed s/expeditee-setup\.sh//`" ; then
+# if $0 contains "expeditee-setup.sh" we've been run... $0 is shellname if sourced.
+# One exception is zsh has an option to set it temporarily to the script name
+  if test -z "$ZSH_NAME" ; then
+  # we aren't using zsh
+  expeditee_not_sourced=true
+  fi
+fi
+
+if test -n "$expeditee_not_sourced" ; then
+  case "$explang" in
+ "es")
+eval $expiconv <<EOF
+      Error: Asegúrese de compilar este guión, no de ejecutarlo. P. ej.:
+         $ source expeditee-setup.sh
+      o
+         $ . ./expeditee-setup.sh
+      no
+         $ ./expeditee-setup.sh
+EOF
+  ;;
+  "fr")
+eval $expiconv <<EOF
+      Erreur: Assurez-vous de "sourcer" le script, plutôt que de l'exécuter. Ex:
+         $ source expeditee-setup.sh
+      ou
+         $ . ./expeditee-setup.sh
+      pas
+         $ ./expeditee-setup.sh
+EOF
+  ;;
+  "ru")
+eval $expiconv <<EOF
+      ïÛÉÂËÁ: õÄÏÓÔÏ×ÅÒØÔÅÓØ × ÉÓÔÏÞÎÉËÅ ÜÔÏÇÏ ÓËÒÉÐÔÁ. îÅ ÉÓÐÏÌÎÑÊÔÅ ÅÇÏ.
+      îÁÐÒÉÍÅÒ:
+         $ source expeditee-setup.sh
+      ÉÌÉ
+         $ . ./expeditee-setup.sh
+      ÎÅÔ
+         $ ./expeditee-setup.sh
+EOF
+  ;;
+  *)
+eval $expiconv <<EOF
+	Error: Make sure you source this script, not execute it. Eg:
+		$ source expeditee-setup.sh
+	or
+		$ . ./expeditee-setup.sh
+	not
+		$ ./expeditee-setup.sh
+EOF
+  ;;
+  esac
+elif test -n "$EXPEDITEE_HOME" ; then
+  case "$explang" in
+  "es")
+    echo '¡Su ambiente ya está listo para Expeditee!' | eval $expiconv
+  ;;
+  "fr")
+    echo 'Votre environnement est déjà préparé pour Expeditee!' | eval $expiconv
+ ;;
+  "ru")
+    echo '÷ÁÛÅ ÏËÒÕÖÅÎÉÅ ÕÖÅ ÎÁÓÔÒÏÅÎÏ ÄÌÑ Expeditee!' | eval $expiconv
+  ;;
+  *)
+    echo 'Your environment is already set up for Expeditee!'
+  ;;
+  esac
+elif test ! -f expeditee-setup.sh ; then
+  case "$explang" in
+    "es")
+      echo 'Usted debe compilar el guión desde el interior del directorio de inicio' | eval $expiconv
+  ;;
+    "fr")
+      echo 'Vous devez trouver la source du script dans le répertoire de base de Expeditee' | eval $expiconv
+  ;;
+    "ru")
+      echo '÷ÁÍ ÎÅÏÂÈÏÄÉÍ ÉÓÔÏÞÎÉË ÓËÒÉÐÔÁ ÉÚ ÂÁÚÏ×ÏÊ ÄÉÒÅËÔÏÒÉÉ Expeditee' | eval $expiconv
+  ;;
+   *)
+      echo 'You must source the script from within the Expeditee home directory'
+  ;;
+  esac
+else
+  EXPEDITEE_HOME=`pwd`
+  export EXPEDITEE_HOME
+
+  if test "x$EXPOS" = "x" ; then
+    EXPOS=`uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+    # check for running sh/bash under cygwin
+    if test "`echo $EXPOS | sed 's/cygwin//'`" != "$EXPOS" ;
+    then
+      EXPOS=windows
+    fi
+  fi
+  export EXPOS
+
+  # check for running sh/bash under mingw
+  if test "`echo $EXPOS | sed 's/mingw//'`" != "$EXPOS" ;
+  then
+    EXPOS=windows
+  fi
+  export EXPOS
+
+  # Establish cpu architecture
+  # 32-bit or 64-bit?
+  UNAME_HW_MACH=`uname -m`
+
+  # Following test came from VirtualBox's Guest Additions autostart.sh
+  # (adapted for use in Expeditee)
+  case "$UNAME_HW_MACH" in
+    i[3456789]86|x86|i86pc)
+      EXPARCH='32bit'
+      ;;
+    x86_64|amd64|AMD64)
+      EXPARCH='64bit'
+      ;;
+    *)
+      echo "Unknown architecture: $UNAME_HW_MACH"
+      ;;
+  esac
+
+  # Only want non-trival EXPARCH value set if there is evidence of
+  # the installed bin (lib, ...) directories using linux32, linux64
+  # (otherwise probably looking at an SVN compiled up version for single OS)
+  if test ! -d "$EXPEDITEE_HOME/$EXPOS/$EXPARCH" ;
+  then 
+    EXPARCH=""
+  fi
+
+  export EXPARCH
+
+  PATH=$EXPEDITEE_HOME/script:$EXPEDITEE_HOME/$EXPOS/$EXPARCH:$PATH
+  export PATH
+  
+#  if test "$EXPOS" = "linux" ; then
+#      LD_LIBRARY_PATH="$EXPEDITEE_HOME/lib/$EXPOS$EXPARCH:$LD_LIBRARY_PATH"
+#	  export LD_LIBRARY_PATH
+#  elif test "$EXPOS" = "darwin" ; then
+#      DYLD_LIBRARY_PATH="$EXPEDITEE_HOME/lib/$EXPOS$EXPARCH:$DYLD_LIBRARY_PATH"
+#      export DYLD_LIBRARY_PATH
+#  fi
+ 
+#  MANPATH=$MANPATH:$EXPEDITEE_HOME/man
+#  export MANPATH
+
+  case "$explang" in
+    "es")
+      echo 'Su ambiente ha sido configurado para correr los programas Expeditee.' | eval $expiconv
+    ;;
+    "fr")
+      echo 'Votre environnement a été configuére avec succès pour exécuter Expeditee' | eval $expiconv
+    ;;
+    "ru")
+      echo '÷ÁÛÅ ÏËÒÕÖÅÎÉÅ ÂÙÌÏ ÕÓÐÅÛÎÏ ÎÁÓÔÒÏÅÎÏ, ÞÔÏÂÙ ÕÓÔÁÎÏ×ÉÔØ Expeditee' | eval $expiconv
+    ;;
+    *)
+      echo 'Your environment has successfully been set up to run Expeditee'
+    ;;
+  esac
+fi
+unset expeditee_not_sourced
+unset expiconv
+unset expfromenc
+unset exptoenc
+
+if test -e local ; then
+  if test -e local/setup.sh ; then 
+    echo "Sourcing local/setup.sh"
+    cd local ; . ./setup.sh ; cd ..
+  fi
+fi
+
+#which >/dev/null java 2>&1 
+#
+#if [ $? != 0 ] ; then
+#  echo "Unable to find a Java runtime" >2
+#else 
+#  echo "-----"
+#  echo "To run the Expeditee Browser, type:"
+#  echo "  expeditee"
+#  echo ""
+#fi
+
