ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Allers" <...@advancedreality.com>
Subject RE: Spaces in a command line arg
Date Tue, 25 Feb 2003 22:17:50 GMT
I have a custom task which invokes InstallShield Multiplatform 4.53
builds. It does what has been suggested before which is use <arg
value="" /> instead of <arg line="" />. I hope you find it helpful.

Example usage:
    	<installshield installscript="install/product.xml"
buildconfiguration="0"
            installshielddir="C:\Program Files\InstallShield\MP45">
		<!-- optional classpath, appends this classpath to the
expected installshield classpath -->
    		<classpath refid="custombeans.path" />
		<!-- optional alias -->
    		<alias name="ALIAS_1" dir="install" />
    	</installshield>

The 'installshield' task can also have attributes 'xsl' (XSL file),
'save' (whether or not to save the modification in the project), and
'saveas' (file to save the modified script to).

-----Original Message-----
From: David Clements [mailto:dclements@merc-int.com] 
Sent: Tuesday, February 25, 2003 3:35 PM
To: 'Ant Users List'
Subject: RE: Spaces in a command line arg


I am using the exec task to launch InstallShiels Multiplatform.  The
path in question ${productImportDirectory} has a space in it.  Neither
single or double quotes worked.  However if I use a combinatio of both
single and double quotes things are working great.
 
TASK:
<exec executable="${ISMPDirectory}\ismpc.exe" dir="${ISMPDirectory}" >
            <arg line='"${ISMPFile}"'/>
            <arg line ='-alias IS_PRD=${productImportDirectory}'/>
            <arg line ='-alias IS_INSTALLFILES="C:\vgdev\testing
tmp\current\NEWINSTALL\installer\defaultInstallFiles"'/>
            <arg line="-xsl"/>
            <arg
line='"${basedir}\..\ismp\omitInactiveComponents.xsl"'/>
            <arg line="-build"/>
  </exec>

ERROR:
 [exec] Initializing InstallShield MultiPlatform 4.5...
 [exec] Searching for Java(tm) Virtual Machine...
 [exec] Verifying Jview 1.1.4 by Microsoft
 [exec] .
 [exec] Verifying Jview 1.1.4 by Microsoft
 [exec] ........Setting alias IS_PRD to C:\vgdev\testing
 [exec] illegal command line argument :
tmp\current\NEWINSTALL\SiteScope\19\


 [exec] Running InstallShield MultiPlatform 4.5...

 [exec] Result: -3

Hope this helps,

Dave

> -----Original Message-----
> From: Conor MacNeill [mailto:conor@cortexebusiness.com.au]
> Sent: Saturday, February 22, 2003 1:12 AM
> To: Ant Users List
> Subject: Re: Spaces in a command line arg
> 
> 
> David Clements wrote:
> > Is there a way to get ant to escape possible space in an
> <arg> to and
> > <exec> call?
> > 
> > 
> 
> If you use the <arg value=""> approach with an entry per
> argument, rather 
> than all arguments in the <arg line=""> style, it should 
> quote arguments 
> with spaces. If this doesn't work for you, please give us 
> more detils on how 
> it fails.
> 
> Conor
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message