From b6f7fcc730d306504b5da28b7924ccf48f7e8b91 Mon Sep 17 00:00:00 2001 From: michelou Date: Tue, 25 Apr 2006 16:24:00 +0000 Subject: updated batch files to work on older Windows sy... updated batch files to work on older Windows systems (variable %~dsp0) --- src/compiler/scala/tools/ant/templates/generic-windows.tmpl | 6 +++++- src/compiler/scala/tools/ant/templates/tool-windows.tmpl | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/compiler/scala/tools/ant/templates/generic-windows.tmpl b/src/compiler/scala/tools/ant/templates/generic-windows.tmpl index bea794a41a..a23422a7e4 100644 --- a/src/compiler/scala/tools/ant/templates/generic-windows.tmpl +++ b/src/compiler/scala/tools/ant/templates/generic-windows.tmpl @@ -14,7 +14,11 @@ rem - Local batch variables start with an underscore ('_') if "%OS%"=="Windows_NT" ( @@setlocal - set _SCALA_HOME=%~dps0.. + set _BIN_DIR= + for %%i in (%~sf0) do set _BIN_DIR=%_BIN_DIR%%%~dpsi + set _SCALA_HOME=%_BIN_DIR%.. + rem The following works on WinXP SP2 or newer (http://support.microsoft.com/?kbid=833431) + rem set _SCALA_HOME=%~dsp0.. ) else ( set _SCALA_HOME=%SCALA_HOME% if "%_SCALA_HOME%"=="" goto error1 diff --git a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl index 92e8d9826d..8fcafb50a2 100644 --- a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl +++ b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl @@ -14,7 +14,11 @@ rem - Local batch variables start with an underscore ('_') if "%OS%"=="Windows_NT" ( @@setlocal - set _SCALA_HOME=%~dps0.. + set _BIN_DIR= + for %%i in (%~sf0) do set _BIN_DIR=%_BIN_DIR%%%~dpsi + set _SCALA_HOME=%_BIN_DIR%.. + rem The following works on WinXP SP2 or newer (http://support.microsoft.com/?kbid=833431) + rem set _SCALA_HOME=%~dsp0.. ) else ( set _SCALA_HOME=%SCALA_HOME% if "%_SCALA_HOME%"=="" goto error1 -- cgit v1.2.3