ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Monsees" <>
Subject RE: HelpStudioAnt (was: "AW: failure notice")
Date Tue, 24 Oct 2006 15:15:32 GMT

>>>> 3)
>>>> One remaining problem is that command line arguments are
>>>> automatically escaped via " if they contain spaces. Now it is
>>>> possible that a to be compiled booklet has a space in it so the
>>>>   appropriate command line would look like this: helpstudio2.exe
>>>> /bk="just a test" projectfile.hsp Unfortunately, when I pass the
>>>> option as /bk=just a test it gets converted to "/bk=just a test"
>>>> or /bk="just a test" gets converted to '/bk="just a test"' and
>>>> HelpStudio doesn´t recognize these. 
>>> Who is escaping? Or is it just inside the debug log?
> Hello to the wacky world of command line args in windows.
> There are four levels of processing.
> 1) WIN32:CreateProcess this take in one string as a command line and
>    splits into an executable and a list of command line arguments. -
>    so it needs to handle " and ' to allow directories with spaces to
>    be seen as one arg.
> 2)  java.lang.ProcessImpl this "normalizes" an array of arguments
>     a single string, if an argument contains a space, the argument
> quoted with
>     a " (unless it is already "quoted").
> 3) - this is
>     only called on <arg line="a b c"/>, I think

I use it in this way:

   lArgs.add(HS_OPT_BOOKLET + booklet);

   // Create command-line
   Commandline cmd = new Commandline();
   cmd.setExecutable(path + HS_CMD_LINE);
   cmd.addArguments((String[]) lArgs.toArray(new

   // Create Execute object from command-line
   Execute exe = new Execute(new LogStreamHandler(this,

>>>> 5)
>>>> Most of the variables are declared as protected because this is
>>>> what I´ve seen in nsisant. Is this preferred over private
>>>> variables? 
>>> Not sure about an Ant philosophy here, but protected variables
>>> support subclassing ...
> Mmm, Ant "philosophy" is to have *ALL* variables as private.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message