Skip to content
Urs Liska edited this page Mar 24, 2015 · 5 revisions

"Installing" openLilyLib consists of two steps: obtaining the code and making it known to LilyPond.

Getting openLilyLib

There are two (and a half) ways to obtain openLilyLib in the first place. The easiest way is to download the repository through direct download of the ZIP file (you can reach it through the "Download ZIP" button on the home page). This always represents the latest state of all contained projects, but it is a solution that has to be repeated for each update.

Clearly the best way to get hold of openLilyLibs code is to clone the repository through Git. Even if you're not familiar with Git (or version control in general) we encourage you to go that way. We strongly encourage any LilyPond user to use version control, and managing the openLilyLib installation could be a good starter to become acquainted with it.

If you consider contributing to openLilyLib you should rather fork the repository (the Fork button on the top right corner of the overview window) and clone your personal copy. After that you should add the main repository with git remote add upstream https://github.com/openlilylib/openlilylib.git. There are other ways to do that but this is the most straightforward approach.

Both downloading and cloning can be done wherever you like on your local disk.

Making it Available

"Installing" openLilyLib actually means making it available to LilyPond. You do that by adding the /ly directory inside the source tree to LilyPond's Include Path. To do this you can use the -I command line option, which you will proably want to do inside of a wrapper script. If you use Frescobaldi as your LilyPond editing environment you can also add that directory to the LilyPond Preferences. TODO: Are there more options?

[NOTE: In a preliminary stage of migrating existing content to the new structure you will also have to add openLilyLib's root directory to LilyPond's include path. As soon as all existing material has been moved this additional step can be ignored.]

Once you have completed these steps you can use openLilyLib through

\include "openlilylib"

This will make the contained libraries available for loading, but it will also implicitly load some common functionality that is immediately available to your LilyPond files. For more details please refer to General Interface.