Re: Why do you use .cmd rather than .bat?

2011-12-06 Thread Pascal Sancho
Hi Jonathan,

With recent Windows (Vista), IIUC there is no difference between .cmd
and .bat; the engine remains the same in both cases: cmd.exe

In the past, Win 9x family (and before) used only .bat, witch was
threated with command.com

The engine cmd.exe was introduced with NT family.

On XP machines, it seems that both cmd.exe and command.com coexist, and
invoking the former or the latter depends on ext. So there are some
differences of available commands and behaviors between .cmd and .bat on
such machines

HTH,

Le 05/12/2011 20:49, Jonathan Levinson a écrit :
 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.levin...@intersystems.com
 
 
 -Original Message-
 From: Jonathan Levinson
 Sent: Monday, December 05, 2011 2:39 PM
 To: fop-users@xmlgraphics.apache.org; fop-...@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.levin...@intersystems.com


 -Original Message-
 From: Simon Pepping [mailto:spepp...@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.
-- 
Pascal

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Why do you use .cmd rather than .bat?

2011-12-05 Thread Simon Pepping
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-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



RE: Why do you use .cmd rather than .bat?

2011-12-05 Thread Jonathan Levinson
I will test.

.bat is used more often that .cmd and unless one changes one's settings the 
default is that if you have two files in a directory foobar.bat and foobar.cmd, 
and you execute foobar in that directory then foobar.bat will be executed not 
foobar.cmd.

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


 -Original Message-
 From: Simon Pepping [mailto:spepp...@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-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



RE: Why do you use .cmd rather than .bat?

2011-12-05 Thread Jonathan Levinson
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.levin...@intersystems.com


 -Original Message-
 From: Simon Pepping [mailto:spepp...@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-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Why do you use .cmd rather than .bat?

2011-12-04 Thread Simon Pepping
On Sat, Dec 03, 2011 at 06:02:29PM -0500, Jonathan Levinson wrote:
 Hi Glenn,
 
 I have a question for you about skynav FOP.  Why on Windows do you use .cmd 
 as the extension of the fop command file - fop.cmd, rather than fop.bat?
 
 We are going to be deploying skynav FOP at many sites and it would be great 
 if we could rename the .cmd file to a .bat file since it would require 
 fewer changes to our interface code.
 
 Doing some research it seems that on Windows 7, Vista, and XP there is little 
 difference between .cmd and .bat files, and differences only become 
 significant on Windows 98.  Am I wrong?  Did I misread an article on the Web?
 
 Thanks for the excellent work you have done!  Our Middle Eastern team tested 
 your code and found nothing wrong with it in the context of our reporting 
 tool, which calls FOP to do rendering.

Would renaming cause problems for users who depend on the name
fop.cmd? Should we maintain a copy named fop.bat?

Simon

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



RE: Why do you use .cmd rather than .bat?

2011-12-04 Thread Jonathan Levinson
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.

We thank the FOP community for a superlative technology, which allows us and 
our customers to do report writing at many sites around the world in a 
cost-effective way.  Thank you to everyone who contributes to the FOP 
community!  It is truly a noble effort!

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

 -Original Message-
 From: Simon Pepping [mailto:spepp...@leverkruid.eu]
 Sent: Sunday, December 04, 2011 4:07 AM
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: Why do you use .cmd rather than .bat?
 
 On Sat, Dec 03, 2011 at 06:02:29PM -0500, Jonathan Levinson wrote:
  Hi Glenn,
 
  I have a question for you about skynav FOP.  Why on Windows do you use
 .cmd as the extension of the fop command file - fop.cmd, rather than 
 fop.bat?
 
  We are going to be deploying skynav FOP at many sites and it would be great 
  if
 we could rename the .cmd file to a .bat file since it would require fewer
 changes to our interface code.
 
  Doing some research it seems that on Windows 7, Vista, and XP there is 
  little
 difference between .cmd and .bat files, and differences only become
 significant on Windows 98.  Am I wrong?  Did I misread an article on the Web?
 
  Thanks for the excellent work you have done!  Our Middle Eastern team tested
 your code and found nothing wrong with it in the context of our reporting 
 tool,
 which calls FOP to do rendering.
 
 Would renaming cause problems for users who depend on the name fop.cmd?
 Should we maintain a copy named fop.bat?
 
 Simon
 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Why do you use .cmd rather than .bat?

2011-12-03 Thread Glenn Adams
That's a good question. That is how it is named in the FOP trunk, and has
been for a long time apparently. I agree that fop.bat would be preferable
for Win platforms. I'll suggest this be changed in trunk, in which case I
can merge into my dev repo.

I never use fop.cmd myself for my development work. Furthermore, I only run
FOP on MacOSX, where I use ant to invoke it directly from the java task.

Thanks for testing out the Bidi and Middle Eastern support. I have recently
added fixes for fo:leader and a few other issues related to Bidi contexts.
See Patch 6 milestone under [1].

[1] https://skynav.trac.cvsdude.com/fop/report/6

Also, FYI, I recently moved the Skynav FOP repository to a (slightly)
different URL on GITHUB [2].

[2] http://github.com/skynav/fop

Best,
Glenn

On Sat, Dec 3, 2011 at 4:02 PM, Jonathan Levinson 
jonathan.levin...@intersystems.com wrote:

 Hi Glenn,

 ** **

 I have a question for you about skynav FOP.  Why on Windows do you use
 “.cmd” as the extension of the fop command file – fop.cmd, rather than
 fop.bat?

 ** **

 We are going to be deploying skynav FOP at many sites and it would be
 great if we could rename the “.cmd” file to a “.bat” file since it would
 require fewer changes to our interface code.

 ** **

 Doing some research it seems that on Windows 7, Vista, and XP there is
 little difference between “.cmd” and “.bat” files, and differences only
 become significant on Windows 98.  Am I wrong?  Did I misread an article on
 the Web?

 ** **

 Thanks for the excellent work you have done!  Our Middle Eastern team
 tested your code and found nothing wrong with it in the context of our
 reporting tool, which calls FOP to do rendering.

 ** **

 Best Regards,

 Jonathan Levinson

 Senior Software Developer

 Object Group

 InterSystems

 +1 617-621-0600

 jonathan.levin...@intersystems.com

 ** **