[sikuli] 177/385: adapted the run scripts

Gilles Filippini pini at moszumanska.debian.org
Sun Jun 29 19:26:07 UTC 2014


This is an automated email from the git hooks/post-receive script.

pini pushed a commit to tag upstream/1.1.0_beta1
in repository sikuli.

commit f4a960a1082481f876a7ac9ee774ae61a95bdc14
Author: Raimund Hocke <info at its-me-raiman.de>
Date:   Wed Jan 29 12:57:29 2014 +0100

    adapted the run scripts
---
 .../src/main/resources/Commands/linux/runsikulix   | 13 +++++++++----
 .../main/resources/Commands/windows/runsikulix.cmd | 22 +++++++++++++++++-----
 2 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/Basics/src/main/resources/Commands/linux/runsikulix b/Basics/src/main/resources/Commands/linux/runsikulix
index 9e03bc7..3fce045 100644
--- a/Basics/src/main/resources/Commands/linux/runsikulix
+++ b/Basics/src/main/resources/Commands/linux/runsikulix
@@ -2,6 +2,7 @@
 JAVA=X
 JAVABIN=java
 PROPS='-Xmx512M -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine'
+sjar=sikulix
 
 if [ "$JAVA_HOME" != "" ]; then
   JAVABIN=$JAVA_HOME/bin/java
@@ -14,8 +15,12 @@ else
   shome=`dirname $0`
 fi
 
-export SIKULI_COMMAND=$*
-echo "running SikuliX: $PROPS"
-echo "-jar $shome/sikulix.jar $SIKULI_COMMAND"
-"$JAVABIN" $PROPS -jar "$shome/sikulix.jar" $SIKULI_COMMAND
+if [ -e "$shome/$sjar.jar" ]; then
+	export SIKULI_COMMAND=$*
+	echo "running SikuliX: $PROPS"
+	echo "-jar $shome/$sjar.jar $SIKULI_COMMAND"
+	"$JAVABIN" $PROPS -jar "$shome/$sjar.jar" $SIKULI_COMMAND
+else
+  echo "Error: terminating: $sjar.jar not found at: "$shome
+fi
 
diff --git a/Basics/src/main/resources/Commands/windows/runsikulix.cmd b/Basics/src/main/resources/Commands/windows/runsikulix.cmd
index 66164c9..5e4e303 100644
--- a/Basics/src/main/resources/Commands/windows/runsikulix.cmd
+++ b/Basics/src/main/resources/Commands/windows/runsikulix.cmd
@@ -1,7 +1,19 @@
 @echo off
 SETLOCAL ENABLEEXTENSIONS
+set SJAR=sikulix
 
+if not defined SIKULIX_HOME goto NOHOME
+if EXIST "%SIKULIX_HOME%%SJAR%.jar" goto YESHOME
+if not EXIST "%SIKULIX_HOME%\%SJAR%.jar" goto BADHOME
+set SJAR=\sikulix
+
+:BADHOME
+echo +++ SIKULIX_HOME specified but not useable %SIKULIX_HOME%
+
+:NOHOME
 set SIKULIX_HOME=%~dp0
+
+:YESHOME
 set PARMS=-Xms64M -Xmx512M -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine
 
 if not defined JAVA_HOME goto CHECKJAVA
@@ -39,16 +51,16 @@ echo +++ Java not found in standard places %PROGRAMS% or %PROGRAMS32%
 echo +++ JAVA_HOME not specified
 goto STOPIT
 
-:JAVA_OK 
+:JAVA_OK
 echo +++ running this Java
 set SIKULI_COMMAND=%*
 "%JAVA_HOME%\bin\java.exe" -version
 PATH=%SIKULIX_HOME%libs;%PATH%
-echo +++ trying to run SikuliX 
-echo +++ using: %PARMS% -jar %SIKULIX_HOME%sikulix.jar %SIKULI_COMMAND%
-"%JAVA_HOME%\bin\java.exe" %PARMS% -jar "%SIKULIX_HOME%sikulix.jar" %SIKULI_COMMAND%
-
+echo +++ trying to run SikuliX
+echo +++ using: %PARMS% -jar %SIKULIX_HOME%%SJAR%.jar %SIKULI_COMMAND%
+"%JAVA_HOME%\bin\java.exe" %PARMS% -jar "%SIKULIX_HOME%%SJAR%.jar" %SIKULI_COMMAND%
 GOTO FINALLY
+
 :STOPIT
 echo.+++ ended with some errors
 :FINALLY

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/sikuli.git



More information about the pkg-java-commits mailing list