xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Levinson <Jonathan.Levin...@intersystems.com>
Subject RE: Why do you use .cmd rather than .bat?
Date Mon, 05 Dec 2011 19:49:01 GMT
Outlook mangled my script on send by removing what it thought were "extra line breaks."

I attach a zip of the script since our Exchange server won't let us send ".cmd" files directly.

Inside the zip is fop.cmd.  You'll note is more than a "call fop.bat" yet less than the entirety
of "fop.bat" - it has to do something to pass the arguments to fop.bat and also to determine
what directory fop.bat exists in.  I assume fop.bat and fop.cmd are in the same directory.

Best Regards,
Jonathan Levinson
Senior Software Developer
Object Group
InterSystems
+1 617-621-0600
jonathan.levinson@intersystems.com


> -----Original Message-----
> From: Jonathan Levinson
> Sent: Monday, December 05, 2011 2:39 PM
> To: fop-users@xmlgraphics.apache.org; fop-dev@xmlgraphics.apache.org
> Subject: RE: Why do you use .cmd rather than .bat?
> 
> Hi Simon,
> 
> I tested the following fop.cmd file on Windows 7 and it works.  It may lack
> support for some earlier Windows versions, such as Windows 98.  I copy fop-dev
> so my little command file can be subjected to contributor review:
> 
> Here are the contents of fop.cmd.  The Apache script had tests for
> %OS%=Windows_NT, which is true on Windows 7.  I don't have a non-NT
> Windows system on which to test the script, so I removed those tests, such as "
> if "%OS%"=="Windows_NT" set LOCAL_FOP_HOME=%~dp0".  I won't put in
> code I can't test.
> 
> ----- beginning of script fop.cmd --------------------- @ECHO OFF set
> LOCAL_FOP_HOME=%~dp0 set FOP_CMD_LINE_ARGS=%1 if ""%1""=="""" goto
> doneStart shift :setupArgs if ""%1""=="""" goto doneStart set
> FOP_CMD_LINE_ARGS=%FOP_CMD_LINE_ARGS% %1 shift goto setupArgs rem
> This label provides a place for the argument list loop to break out :doneStart
> 
> call %LOCAL_FOP_HOME%\fop.bat %FOP_CMD_LINE_ARGS%
> 
> ----------------- end of script ----
> 
> Best Regards,
> Jonathan Levinson
> Senior Software Developer
> Object Group
> InterSystems
> +1 617-621-0600
> jonathan.levinson@intersystems.com
> 
> 
> > -----Original Message-----
> > From: Simon Pepping [mailto:spepping@leverkruid.eu]
> > Sent: Monday, December 05, 2011 1:53 PM
> > To: fop-users@xmlgraphics.apache.org
> > Subject: Re: Why do you use .cmd rather than .bat?
> >
> > To avoid code duplication, is it possible to have fop.cmd say
> > something like 'call fop.bat'? Can you test that? I have no computer with
> Windows available.
> >
> > Or vice versa. Which is the canonical name, bat or cmd?
> >
> > Simon
> >
> > On Sun, Dec 04, 2011 at 04:17:37PM -0500, Jonathan Levinson wrote:
> > > A copy named fop.bat would be very useful to us.
> > >
> > > We currently have most sites deployed on fop 1.0, which names the
> > > command
> > script on Windows as fop.bat.  For Skynav fop, for our Middle Eastern
> > sites, we are contemplating (after suitable QA) replacing fop 1.0 with Skynav
> fop.
> > However, some of these sites will be on versions of our product which
> > do assume the name of the script on Windows is fop.bat.  While, we can
> > tell users to rename fop.cmd to fop.bat, it will simplify
> > configuration if fop ships with a fop.bat.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message