[Mono-bugs] [Bug 58746][Nor] Changed - equals sign is considered to be argument separator by Mono batch files

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 23 May 2004 02:59:13 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by gert.driesen@pandora.be.

http://bugzilla.ximian.com/show_bug.cgi?id=58746

--- shadow/58746	2004-05-21 05:08:14.000000000 -0400
+++ shadow/58746.tmp.16320	2004-05-23 02:59:13.000000000 -0400
@@ -85,6 +85,41 @@
 ------- Additional Comments From gonzalo@ximian.com  2004-05-21 05:08 -------
 It seems so. I tried to fix it by quoting %1 in the loop, but that
 breaks if you pass a quoted file name with spaces in it. So i guess
 this is a WONTFIX or at least a IDONTKNOWHOWTODOTHIS ;-).
 
 I tried googling for a while and couldn't figure out how to fix it.
+
+------- Additional Comments From gert.driesen@pandora.be  2004-05-23 02:59 -------
+Gonzalo,
+
+I asked Nicko Cadell (log4net admin) for a solution to this issue, 
+and he came up with the following :
+
+"Looking at the mono batch file all they seems to be doing is to 
+collect up the command line arguments and pass them to the real 
+application. In fact it looks like it should work if it just takes 
+the entire command line. 
+
+There is a separate variable for this %* which includes all of the 
+command line starting from the first argument.
+
+I updated my mono.bat to the following:
+
+@ECHO OFF
+SETLOCAL
+SET PATH=C:\Program Files\Mono-0.91\bin;C:\Program
+Files\Mono-0.91\lib;%PATH%
+SET MONO_PATH=C:\Program Files\Mono-0.91\lib;%MONO_PATH%
+SET MONO_CFG_DIR=C:\Program Files\Mono-0.91\etc
+"C:\Program Files\Mono-0.91\bin\mono.exe" %*
+ENDLOCAL
+
+This worked for the simple set of tests that I could come up with. I 
+don't know if %* is supported on Windows 9x but it is certainly 
+supported on 2000/XP/2003. I don't even know if mono is supported on 
+Windows 9x."
+
+What do you think ? Can you change the batch files to use this 
+environment variable, and remove the loop ?   
+
+Its working fine here.