#if ARGV0_RELOCATION
env_var_info (out, "FONTCONFIG_FILE");
env_var_info (out, "FONTCONFIG_PATH");
+ env_var_info (out, "GS_FONTPATH");
+ env_var_info (out, "GS_LIB");
env_var_info (out, "GUILE_LOAD_PATH");
env_var_info (out, "PANGO_RC_FILE");
env_var_info (out, "PATH");
}
#endif
+#ifdef __MINGW32__
+# include <winbase.h>
+#endif
+
static void
setup_paths (char const* argv0)
{
prefix_directory = datadir + "/lilypond/" TOPLEVEL_VERSION;
sane_putenv ("FONTCONFIG_FILE", sysconfdir + "/fonts/fonts.conf", false);
+#ifdef __MINGW32__
+ char font_dir[PATH_MAX];
+ ExpandEnvironmentStrings ("%windir%/fonts", font_dir, sizeof (font_dir));
+ prepend_env_path ("GS_FONTPATH", font_dir);
+#endif
+ prepend_env_path ("GS_FONTPATH", datadir + "/gs/fonts");
+ prepend_env_path ("GS_LIB", datadir + "/gs/Resource");
+ prepend_env_path ("GS_LIB", datadir + "/gs/lib");
prepend_env_path ("GUILE_LOAD_PATH", datadir
+ to_string ("/guile/%d.%d",
SCM_MAJOR_VERSION, SCM_MINOR_VERSION));
- sane_putenv ("PANGO_RC_FILE", sysconfdir + "/pango/pango.modules", false);
+ sane_putenv ("PANGO_RC_FILE", sysconfdir + "/pango/pangorc", false);
prepend_env_path ("PATH", bindir);
}
+#else
+ (void) argv0;
#endif /* ARGV0_RELOCATION */
if (char const *env = getenv ("LILYPONDPREFIX"))
- prefix_directory = env;
+ {
+#ifdef __MINGW32__
+ /* Normalize file name. */
+ env = File_name (env).to_string ().get_copy_str0 ();
+#endif
+ prefix_directory = env;
+ }
global_path.append ("");
}
}
-#ifdef __MINGW32__
-/* If no TTY and not using safe, assume running from GUI.
- For mingw, the test must be inverted. */
-# define isatty(x) (!isatty (x))
-#endif
-
int
main (int argc, char **argv)
{