summaryrefslogtreecommitdiff
path: root/src/exec/scala-tool.win.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'src/exec/scala-tool.win.tmpl')
-rw-r--r--src/exec/scala-tool.win.tmpl42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/exec/scala-tool.win.tmpl b/src/exec/scala-tool.win.tmpl
new file mode 100644
index 0000000000..2f8cfd79ae
--- /dev/null
+++ b/src/exec/scala-tool.win.tmpl
@@ -0,0 +1,42 @@
+@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
+
+set _ARGS=
+:loop
+if '%1' == '' goto exec
+set _ARGS=%_ARGS% %1
+shift
+goto loop
+
+:exec
+set _JAVACMD=java
+set _PROPS=-Dscala.version=@version@ -Dscala.home=%SCALA_HOME%
+set _MAIN=@tool.class@
+set _TOOLS_CPATH=@fjbg.jar@;@msil.jar@;@comp.path@;@lib.path@
+set _LIB_CPATH=@lib.path@
+
+rem echo %_JAVACMD% %_PROPS% -cp %_CPATH% %_MAIN% %_ARGS%
+%_JAVACMD% %_PROPS% -cp %_TOOLS_CPATH% %_MAIN% -bootclasspath %_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
+
+:end
+if "%OS%"=="Windows_NT" @endlocal