lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Windows Scripts


From: Jan Nieuwenhuizen
Subject: Re: Windows Scripts
Date: Fri, 19 Sep 2003 09:17:24 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

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 what should
happen:

    registry: .ly ->   [c:\cygwin\bin\run-lily-wins.bat]
    run-lily-wins.bat -> python /usr/bin/lily-wins

so, the python scripts should generate the PDF.  [reading further: ok,
you got past this.   I understand, bash must be used to call the
python script lily-wins]
    
> 2. It seems that /bin must be in the path. Should it be set in the scripts
> or just documented?

Documented is not good enough, I really want it to 'just work'.
Especially if /bin is c:\cygwin\bin

> For this reason I think the batch file cannot be avoided. I played along
> with direct script calling, but that didn't work.

Ok!

> So I've modified the bat file:
>
> @echo off
> PATH=c:\cygwin\bin;%PATH%
> c:\cygwin\bin\bash.exe -c "/usr/bin/lily-wins '%1%'"

Using 'c:\cygwin\bin' is a bit of a problem, as cygwin can be
installed in d:\foobar\cygwin (for example).  Let's take this step by
step.  I am pretty sure setting the PATH is not needed if we let BASH
run the login scripts (that will set the path when in bash).  I think
that this:

   @echo off
   c:\cygwin\bin\bash.exe --login -c "/usr/bin/lily-wins '%1%'"

should also work.

If that works, the second step, is that we need to remove the
c:\cygwin part when calling bash.exe.  I hoped that, because
run-lily-win.bat is in the same directory as bash.exe doing just:

    bash --login -c "/usr/bin/lily-wins '%1%'"

would work, but I understand that it did not work for you?  It would
be nice if we could just chdir to 'the directory that
run-lily-wins.bat lives in':

   @echo off
   chdir (to dirname of %0%)
   bash --login -c "/usr/bin/lily-wins '%1%'"

but I don't know if something like this is possible.  If not, we can
generate run-lily-wins.bat in the post-lilypond.sh script, we have the
Cygwin root there.

> 3. After the first run of the script one console window remains open while
> acrobat reader is open. It would be better if it were closed automatically
> after starting Acrobat - if it is possible.

Ok.  In bash terminology, we would want to do an exec, ie:

   @echo off
   chdir (to dirname of %0%)
   exec bash --login -c "/usr/bin/lily-wins '%1%'"

but I don't know if something like that exists in .BAT?  This is not
the most important part, let's see if we can get the run-lily-wins.bat
script fixed first.

Greetings,

Jan.

Btw, now that it gets a bit technical, I'd like to bring this on the
lilypond-devel (or lilypond-user if you're not subscribed) list; so
that others may help with their knowledge.  What do you think?

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org





reply via email to

[Prev in Thread] Current Thread [Next in Thread]