Relocation algorithm

LilyPond uses the following algorithm to find its data files.

  1. Compute the directory where the currently executed lilypond binary is located. Let’s call this bindir. Set (internal) environment variable INSTALLER_PREFIX to bindir/.. (i.e., the parent directory of bindir).
  2. Check environment variable LILYPOND_DATADIR. If it is set, use its value for LilyPond’s data directory, datadir. Otherwise use either $INSTALLER_PREFIX/share/lilypond/version (with version being the current LilyPond version) or $INSTALLER_PREFIX/share/lilypond/current.
  3. Check environment variable LILYPOND_LOCALEDIR. If it is set, use its value for LilyPond’s locale data directory, localedir. Otherwise use $INSTALLER_PREFIX/share/locale.
  4. Check environment variable LILYPOND_RELOCDIR. If it is set, use its value for the directory of LilyPond’s relocation files, relocdir. Otherwise use $INSTALLER_PREFIX/etc/relocate.
  5. If datadir doesn’t exist, use a compile-time value instead. Ditto for localedir (but not for relocdir, since it doesn’t make sense to have that).
  6. If relocdir exists, process all files in this directory (see section Relocation files).

LilyPond Application Usage v2.25.14 (development-branch).