diff options
Diffstat (limited to 'src/exec/nscala-tool.win.tmpl')
-rw-r--r-- | src/exec/nscala-tool.win.tmpl | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/exec/nscala-tool.win.tmpl b/src/exec/nscala-tool.win.tmpl new file mode 100644 index 0000000000..ff9f7475c5 --- /dev/null +++ b/src/exec/nscala-tool.win.tmpl @@ -0,0 +1,47 @@ +@echo off + +rem ########################################################################## +rem # Copyright @COPYRIGHT@ +rem # +rem # This is free software; see the distribution for copying conditions. +rem # There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A +rem # PARTICULAR PURPOSE. +rem ########################################################################## + +if "%OS%"=="Windows_NT" @setlocal +if "%OS%"=="Windows_NT" @set SCALA_HOME=%~dp0 + +if "%SCALA_HOME%" == "" goto error1 +if not exist "%SCALA_HOME%\VERSION-@VERSION@" goto error2 + +set _ARGS= +:loop +if '%1' == '' goto exec +set _ARGS=%_ARGS% %1 +shift +goto loop + +:exec +set _JAVACMD=java +set _PROPS=-Dscala.product=@PRODUCT@ -Dscala.version=@VERSION@ +set _MAIN=@MAIN@ +set _TOOLS_CPATH=@TOOLS_CPATH@ +set _LIB_CPATH=@LIB_CPATH@ + +rem echo %_JAVACMD% %_PROPS% -cp %_CPATH% %_MAIN% %_ARGS% +%_JAVACMD% %_PROPS% -cp %_TOOLS_CPATH% %_MAIN% -sourcepath %_LIB_CPATH% %_ARGS% +goto end + +rem ########################################################################## +rem # errors + +:error1 +echo ERROR: environment variable SCALA_HOME is undefined. It should point to the directory containing the file "VERSION-@VERSION@". +goto end + +:error2 +echo ERROR: environment variable SCALA_HOME points to the wrong directory "%SCALA_HOME%". It should point to the directory containing the file "VERSION-@VERSION@". +goto end + +:end +if "%OS%"=="Windows_NT" @endlocal |