Re: windows scripts: cd $(dirname $0) equivalent for .BAT?

2003-09-19 Thread Jan Nieuwenhuizen
Fodor Bertalan writes: >> I'm afraid there is .bat solution for this probelm in non-NT > I mean no .bat solution. Ok, thanks to all! We'll generate the .bat for now. Jan. -- Jan Nieuwenhuizen <[EMAIL PROTECTED]> | GNU LilyPond - The music typesetter http://www.xs4all.nl/~jantien | http

RE: windows scripts: cd $(dirname $0) equivalent for .BAT?

2003-09-19 Thread Fodor Bertalan
> | cd /d %~dp0% That but works only on WinNT 4-->, no Win95-98. :-( I'm afraid there is .bat solution for this probelm in non-NT windowses. There is a reference here: http://www.acmesoffware.com/acme/Reference_BatchFile.asp Bert ___ Lilypond-devel m

RE: windows scripts: cd $(dirname $0) equivalent for .BAT?

2003-09-19 Thread Fodor Bertalan
> I'm afraid there is .bat solution for this probelm in non-NT I mean no .bat solution. ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel

Re: windows scripts: cd $(dirname $0) equivalent for .BAT?

2003-09-19 Thread Norbert Koch
Jan Nieuwenhuizen <[EMAIL PROTECTED]> writes: > into .BAT: > @echo off > cd ... %0% > > If not, we'll have to generate the bat script in postinstall. Maybe ,[ f.bat ] | @echo off | cd /d %~dp0% ` does what you need. norbert. ___ Lilypon

Re: Windows Scripts

2003-09-19 Thread Jan Nieuwenhuizen
Chris Jackson writes: >> Yes, sort of. Tex cannot handle file names with spaces. > > Ouch, I didn't realise that! But it can run inside *directories* with > spaces, which seem to be the source of more problems. I now realise that there are several unrelated problems wrt spaces. As long as users

Re: Windows Scripts

2003-09-19 Thread Chris Jackson
Jan Nieuwenhuizen wrote: > Chris Jackson writes: > >> Is this restriction to files and directories without spaces really an >> insurmountable problem? > > Yes, sort of. Tex cannot handle file names with spaces. Ouch, I didn't realise that! But it can run inside *directories* with spaces, which s

windows scripts: cd $(dirname $0) equivalent for .BAT?

2003-09-19 Thread Jan Nieuwenhuizen
Anyone knows how to do/where to find documention to translate #!/bin/sh cd $(dirname $0) into .BAT: @echo off cd ... %0% If not, we'll have to generate the bat script in postinstall. Jan. -- Jan Nieuwenhuizen <[EMAIL PROTECTED]> | GNU LilyPond - The music typesetter http://www.xs4all

RE: Windows Scripts - spaces

2003-09-19 Thread Han-Wen Nienhuys
[EMAIL PROTECTED] writes: > Using the base name as parameter for ly2dvi ought to work > > system ('/usr/bin/ly2dvi -p %(base)s > %(stem)s.log 2>&1' % vars ())), > > because current dir is set to song's dir. But it still doesn't, perhaps > because ly2dvi somewhere uses absolute path. Can you che

RE: Windows Scripts - spaces

2003-09-19 Thread Han-Wen Nienhuys
[EMAIL PROTECTED] writes: > Using the base name as parameter for ly2dvi ought to work > > system ('/usr/bin/ly2dvi -p %(base)s > %(stem)s.log 2>&1' % vars ())), > > because current dir is set to song's dir. But it still doesn't, perhaps > because ly2dvi somewhere uses absolute path. Since ly2dv

RE: Windows Scripts - spaces

2003-09-19 Thread Fodor Bertalan
Using the base name as parameter for ly2dvi ought to work system ('/usr/bin/ly2dvi -p %(base)s > %(stem)s.log 2>&1' % vars ())), because current dir is set to song's dir. But it still doesn't, perhaps because ly2dvi somewhere uses absolute path. __

Re: Windows Scripts

2003-09-19 Thread Jan Nieuwenhuizen
Chris Jackson writes: > Is this restriction to files and directories without spaces really an > insurmountable problem? Yes, sort of. Tex cannot handle file names with spaces. Jan. -- Jan Nieuwenhuizen <[EMAIL PROTECTED]> | GNU LilyPond - The music typesetter http://www.xs4all.nl/~jantien

Re: Windows Scripts

2003-09-19 Thread Han-Wen Nienhuys
[EMAIL PROTECTED] writes: > Fodor Bertalan <[EMAIL PROTECTED]> wrote: > > > But Ly2dvi doesn't like file names with spaces: > > Is this restriction to files and directories without spaces really an > insurmountable problem? Could fixing this be just a matter of quoting or No, it's not, but ly2d

Re: Windows Scripts

2003-09-19 Thread Mats Bengtsson
A workaround, is to let the script copy the file to a temporary location, process it there and then move it back. Of course, it may be a problem with include files. Mats Chris Jackson wrote: Fodor Bertalan <[EMAIL PROTECTED]> wrote: But Ly2dvi doesn't like file names with spaces: Is this re

Re: Windows Scripts

2003-09-19 Thread Chris Jackson
Fodor Bertalan <[EMAIL PROTECTED]> wrote: > But Ly2dvi doesn't like file names with spaces: Is this restriction to files and directories without spaces really an insurmountable problem? Could fixing this be just a matter of quoting or escaping the appropriate file and directory path strings (fro

RE: Windows Scripts

2003-09-19 Thread Fodor Bertalan
I have one good and one bad news: Good: c:\cygwin\bin\bash.exe --login -c '/usr/bin/lily-wins "%1"' works as a correct association. The key is to put %1 in quotation marks. I don't know how to set these in post-lily.sh (I don't know python.) \" or "" or something ? Bad: For file names containin

Re: Windows Scripts

2003-09-19 Thread Jan Nieuwenhuizen
Fodor Bertalan writes: >>c:\cygwin\bin\bash.exe --login -c "/usr/bin/lily-wins '%1%'" > > Yes, that's also what I think. (And it does work:-) ) One problem down. >> bash --login -c "/usr/bin/lily-wins '%1%'" > That works only when d:\foobar\cygwin\bin is in the system path, which is > no

RE: Windows Scripts

2003-09-19 Thread Jan Nieuwenhuizen
from private mail From: "Fodor Bertalan" <[EMAIL PROTECTED]> To: "'Jan Nieuwenhuizen'" <[EMAIL PROTECTED]> Subject: RE: Windows Scripts Date: Fri, 19 Sep 2003 00:34:01 +0200 >@echo off >c:\cygwin\bin\bash.exe --login -c "/usr/bin/lily

Re: Windows Scripts

2003-09-19 Thread Jan Nieuwenhuizen
from private mail > I've tried the scripts. They are good, I have some suggestions. Ah, good thanks a lot! > 1. Python cannot be run as c:\cygwin\bin\python. It just doesn't do > anything. So bash should be used for PDF generation also. Ouch, that's strange. Maybe I don't understand. This is