[vlma-devel] commit: Startup script for Windows. (Adrien Grand )
git version control
git at videolan.org
Sun Jul 13 12:26:48 CEST 2008
vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Sun Jul 13 11:34:19 2008 +0200| [2e3309664379cc7dcc32410f6899bc9ea386f8bb]
Startup script for Windows.
> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=2e3309664379cc7dcc32410f6899bc9ea386f8bb
---
vlma-distribution/src/bin/build_cp.cmd | 2 +
vlma-distribution/src/bin/cp_append.cmd | 1 +
vlma-distribution/src/bin/vlmad.bat | 76 +++++++++++++++++++++++++++++++
3 files changed, 79 insertions(+), 0 deletions(-)
diff --git a/vlma-distribution/src/bin/build_cp.cmd b/vlma-distribution/src/bin/build_cp.cmd
new file mode 100644
index 0000000..4e2579f
--- /dev/null
+++ b/vlma-distribution/src/bin/build_cp.cmd
@@ -0,0 +1,2 @@
+set VLMA_CLASSPATH=%CLASSPATH%
+for %%i in ( %1\*.jar ) do call bin\cp_append.cmd %%~fsi
diff --git a/vlma-distribution/src/bin/cp_append.cmd b/vlma-distribution/src/bin/cp_append.cmd
new file mode 100644
index 0000000..7b6e661
--- /dev/null
+++ b/vlma-distribution/src/bin/cp_append.cmd
@@ -0,0 +1 @@
+set VLMA_CLASSPATH=%VLMA_CLASSPATH%;%1
diff --git a/vlma-distribution/src/bin/vlmad.bat b/vlma-distribution/src/bin/vlmad.bat
new file mode 100644
index 0000000..7331117
--- /dev/null
+++ b/vlma-distribution/src/bin/vlmad.bat
@@ -0,0 +1,76 @@
+ at echo OFF
+rem VLMad startup script
+
+set command=
+if "%1" == "start" set command=start
+if "%1" == "stop" set command=stop
+if "%1" == "reload" set command=reload
+if "%command%" == "" goto usage
+
+rem Detect JAVA installation
+if not "%JRE_HOME%" == "" goto gotJreHome
+if not "%JAVA_HOME%" == "" goto gotJdkHome
+echo [ERROR] Neither JAVA_HOME nor JRE_HOME is defined.
+goto end
+
+:gotJavaHome
+set JRE_HOME=%JAVA_HOME%
+
+:gotJreHome
+set JAVA=%JRE_HOME%\bin\java.exe
+if exist "%JAVA%" goto gotJava
+echo [ERROR] Cannot find the JAVA executable.
+echo [ERROR] Please verify the value of JAVA_HOME and/or JRE_HOME.
+goto end
+
+:gotJava
+rem Set VLMA_HOME
+if not "%VLMA_HOME%" == "" goto gotHome
+cd /d %~dp0%
+cd ..
+set VLMA_HOME=%cd%
+
+:gotHome
+echo [INFO] Using VLMA_HOME: %VLMA_HOME%
+cd %VLMA_HOME%
+
+if not "%VLMA_CONF%" == "" goto gotConf
+set VLMA_CONF=%VLMA_HOME%\conf
+:gotConf
+echo [INFO] Using VLMA_CONF: %VLMA_CONF%
+
+if not "%VLMA_DATA%" == "" goto gotData
+set VLMA_DATA=%VLMA_HOME%\data
+:gotData
+echo [INFO] Using VLMA_DATA: %VLMA_DATA%
+
+if not "%VLMA_LIBS%" == "" goto gotLibs
+set VLMA_LIBS=%VLMA_HOME%\lib
+:gotLibs
+echo [INFO] Using VLMA_LIBS: %VLMA_LIBS%
+
+if not "%VLMA_LOGS%" == "" goto gotLogs
+set VLMA_LOGS=%VLMA_HOME%\logs
+:gotLogs
+echo [INFO] Using VLMA_LOGS: %VLMA_LOGS%
+
+if not "%VLMA_WORK%" == "" goto gotWork
+set VLMA_WORK=%VLMA_HOME%\work
+:gotWork
+echo [INFO] Using VLMA_WORK: %VLMA_WORK%
+
+call bin\build_cp.cmd "%VLMA_LIBS%"
+
+set VLMA_OPTS=%VLMA_OPTS% -Dvlma.home="%VLMA_HOME%" -Dvlma.conf="%VLMA_CONF%" -Dvlma.data="%VLMA_DATA%" -Dvlma.logs="%VLMA_LOGS%" -Dvlma.work="%VLMA_WORK%" -Dlog4j.configuration="file:%VLMA_CONF%\logging.properties" -classpath %VLMA_CLASSPATH%
+
+set OPTS=%VLMA_OPTS% %JAVA_OPTS% org.videolan.vlma.daemon.VLMad %command%
+echo [INFO] Launching %JAVA% %OPTS%
+
+rem Run VLMad
+"%JAVA%" %OPTS%
+
+goto end
+:usage
+echo usage: vlmad.bat (start^|stop^|reload)
+
+:end
More information about the vlma-devel
mailing list