summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-11-13 01:55:22 +0000
committerPaul Phillips <paulp@improving.org>2011-11-13 01:55:22 +0000
commitd917d7c8a176739f286b1453363606d890de2fc0 (patch)
tree46f074e15ffe355caaf4e1a242713a23d7a41e92 /src
parentbac7d17ab106d2e42119347a3259b55a21609b88 (diff)
downloadscala-d917d7c8a176739f286b1453363606d890de2fc0.tar.gz
scala-d917d7c8a176739f286b1453363606d890de2fc0.tar.bz2
scala-d917d7c8a176739f286b1453363606d890de2fc0.zip
Makes -toolcp available on windows.
Contributed by Matthew Farwell. Closes SI-5062.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/ant/templates/tool-windows.tmpl20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl
index e88a9730e8..27717100b6 100644
--- a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl
+++ b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl
@@ -8,6 +8,24 @@ rem # There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
rem # PARTICULAR PURPOSE.
rem ##########################################################################
+set _LINE_TOOLCP=
+
+:another_param
+
+if "%1%"=="-toolcp" (
+ set _LINE_TOOLCP=%2%
+ shift
+ shift
+ goto another_param
+)
+
+set _LINE_PARAMS=%1
+:param_loop
+shift
+if [%1]==[] goto param_afterloop
+set _LINE_PARAMS=%_LINE_PARAMS% %1
+goto param_loop
+:param_afterloop
if "%OS%" NEQ "Windows_NT" (
echo "Sorry, your version of Windows is too old to run Scala."
goto :eof
@@ -37,6 +55,8 @@ if "%_TOOL_CLASSPATH%"=="" (
for /d %%f in ("%_SCALA_HOME%\lib\*") do call :add_cpath "%%f"
)
+if not "%_LINE_TOOLCP%"=="" call :add_cpath "%_LINE_TOOLCP%"
+
set _PROPS=-Dscala.home="%_SCALA_HOME%" -Denv.emacs="%EMACS%" -Dscala.usejavacp=true @properties@
rem echo "%_JAVACMD%" %_JAVA_OPTS% %_PROPS% -cp "%_TOOL_CLASSPATH%" @class@ @toolflags@ %*