+2006-04-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * lily/relocate.cc (read_relocation_dir): new function.
+
2006-04-26 Graham Percival <gpermus@gmail.com>
* Documentation/user/instrument-notation.itely: a few more fixes
sane_putenv ("GUILE_MIN_YIELD_MALLOC", yield, overwrite);
}
-void read_relocation_file(string);
+void
+read_relocation_dir (string);
+
int
main (int argc, char **argv)
{
if (getenv ("LILYPOND_VERBOSE"))
be_verbose_global = true;
- read_relocation_file ("test.reloc");
-
setup_localisation ();
parse_argv (argc, argv);
if (isatty (STDIN_FILENO))
#include "config.hh"
+
+/* TODO: autoconf support */
+
+#include <sys/types.h>
+#include <dirent.h>
+
#if HAVE_GETTEXT
#include <libintl.h>
#endif
if (be_verbose_global)
warning (_f ("Relocation: framework_prefix=%s", prefix));
+ sane_putenv ("INSTALLER_ROOT", prefix, true);
+
string bindir = prefix + "/bin";
string datadir = prefix + "/share";
string libdir = prefix + "/lib";
/* Adding mf/out make lilypond unchanged source directory, when setting
LILYPONDPREFIX to lilypond-x.y.z */
char const *suffixes[] = {"ly", "ps", "scm", 0 };
-
vector<string> dirs;
for (char const **s = suffixes; *s; s++)
string path = prefix_directory + to_string ('/') + string (*s);
dirs.push_back (path);
}
-
-
+
dirs.push_back (prefix_directory + "/fonts/otf/");
dirs.push_back (prefix_directory + "/fonts/type1/");
dirs.push_back (prefix_directory + "/fonts/svg/");
fclose (f);
}
+
+void
+read_relocation_dir (string dirname)
+{
+ DIR *dir = opendir (dirname.c_str ());
+
+ while (struct dirent *ent = readdir (dir))
+ {
+ File_name name (ent->d_name);
+ if (name.ext_ == "reloc")
+ {
+ read_relocation_file (name.to_string ());
+ }
+ }
+}