lilypond-user
[Top][All Lists]
Advanced

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

Re: lost in trying to fine oll-core and or package.ily


From: David Wright
Subject: Re: lost in trying to fine oll-core and or package.ily
Date: Wed, 16 Oct 2019 19:49:43 -0500
User-agent: Mutt/1.10.1 (2018-07-13)

On Wed 16 Oct 2019 at 00:17:06 (-0400), Freeman Gilmore wrote:
> On Tue, Oct 15, 2019 at 7:16 PM Urs Liska <address@hidden> wrote:
> 
> > Simon has already given a very clear answer, but I want to add some more
> > examples that may help you understanding the context and a part of your
> > question that may not be fully covered yet.
> >
> The following is making it clear, i have 5 questions below.
> >
> > Say you have a document
> >   C:\myscores\alleluja.ly
> > which contains a line
> >   \include "my-config.ily"
> > (note that the file extensions are not significant but only *conventions*,
> > .ly typically indication LilyPond documents and .ily *i*nclude ly files)
> >
> > If you navigate to C:\myscores and compile this file using
> >   lilypond-windows.exe alleluja.ly
> > LilyPond will look for the file my-config.ily first in the directory of
> > the main file (C:\myscores) and then in some directories in the LilyPond
> > installation itself.
> >
> > However, if you compile using
> >   lilypond-windows.exe -I C:\my-lilypond-library alleluja.ly
> > then LilyPond will *additionally* look for the include file in the
> > directory C:\my-lilypond-library.
> >
> > If the \include statement references not simply a file but a relative path
> > then the include file will be looked for in all item of the search path:
> >   \include "lyriclib/hymns.ily"
> > would then find files like
> >   C:\myscores\lyriclib\hymns.ily
> >   C.\my-lilypons-library\lyriclib\hymns.ily
       ↑ is a colon

> 1, Why would you do this?

Were C:\my-lilypond-library to contain a dozen subdirectories
(lyriclib, noteslib, tablib, chordlib, say), it would be impractical
to specify them all in the command line. In my posted example, I had
three: the parent, margins and part-midis.

The penalty is having to specify the subdirectory with the filename,
as in \include lyriclib/hymns.ily above. For each include directive,
the -I directories are searched from left to right until a filename
matches.

> 2, What stops you from searching the whole file system?

In theory, nothing. In practice, the command line would probably be
too long as you'd have to specify every "upper-level" directory with
an -I switch. (By upper-level, I mean any directory above the path
in the \include directive itself.)

Note that -I C:\ does not imply that all the top-level directories in
C:\ are searched: there's no recursion here. Each filename that is
included consists entirely of one (optional) -I value concatentated
with one \include value; nothing in between.

> >   This is how openLilyLib is loaded. If you have oll-core stored so that
> >   C:\openLilyLib\oll-core\package.ily
> >   is a file and call LilyPond with
> >   lilypond-windows.exe -I C:\openLilyLib alleluja.ly
> >   then
> >   \include "oll-core/package.ily"
> >   will find the file because the search path C:\openLilyLib plus the
> > relative path given in the \include statement "oll-
> >   core/package.ily" will be joined to C:\openLilyLib\oll-core\package.ily

> 1, Using the include: \include “C:\openLilyLib\oll-core\package.ily” in
> alleluja.ly .   Would lilypond-    windows.exe  alleluja.ly work?
> 
> 2, If not, why?

You need to distinguish directory names being handed to -I in the
command line from paths being handed to \include directives.

. For -I, use the conventions of your operating system (though I don't
  know how Windows deals with the "drive" names thenselves, as linux
  doesn't work that way; they *should* work).

. For \include, use the forward slash (/), and make sure too that you
  don't use 66/99 double quotation marks instead of ASCII ones. So
    \include “C:\openLilyLib\oll-core\package.ily”
  becomes
    \include "C:/openLilyLib/oll-core/package.ily"

> 3,Before you stated “Then you need to add C:\openLilyLib to LilyPond’s
> search path”; is this what you mean:   lilypond-windows.exe -I
> C:\openLilyLib alleluja.ly

Assuming this line is being split by your email client's attempt to
generate a text representation of your HTML postings, then it should
be correct.

    lilypond-windows.exe -I C:\openLilyLib alleluja.ly

So C:\openLilyLib should be where you installed whatever you downloaded.
You might have seen this already:

https://github.com/openlilylib/oll-core/wiki

> > On Tue 15 Oct 2019 at 11:16:43 (-0400), Freeman Gilmore wrote:
> > > Now if I use the include with the path  C:\openLilyLib , dose Lilypond
> > > search all the directories and subdirectories of openLilyLib or do i need
> > > an include  ...\directory\file for each file I use?

The latter: only the directory given with -I is searched, as noted above.

Cheers,
David.



reply via email to

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