} catch (ExceptionMessage const & message) {
LYXERR(Debug::LOCALE, message.title_ + ", " + message.details_);
}
- // FIXME: This breaks out of source build under Windows.
locale_init();
// Here we need to parse the command line. At least
"hope you have not lost any data.\n"
"Please read the bug-reporting instructions "
"in 'Help->Introduction' and send us a bug report, "
- "if necessary. Thanks !\nBye.");
+ "if necessary. Thanks!\nBye.");
break;
case SIGINT:
case SIGTERM:
"templates");
}
+ // init LyXDir environment variable
+ string const lyx_dir = package().lyx_dir().absFileName();
+ LYXERR(Debug::INIT, "Setting LyXDir... to \"" << lyx_dir << "\"");
+ if (!setEnv("LyXDir", lyx_dir))
+ LYXERR(Debug::INIT, "\t... failed!");
+
//
// Read configuration files
//
prependEnvPath("PATH", package().binary_dir().absFileName());
#endif
if (!lyxrc.path_prefix.empty())
- prependEnvPath("PATH", lyxrc.path_prefix);
+ prependEnvPath("PATH", replaceEnvironmentPath(lyxrc.path_prefix));
// Check that user LyX directory is ok.
if (queryUserLyXDir(package().explicit_user_support()))
os::windows_style_tex_paths(lyxrc.windows_style_tex_paths);
if (!lyxrc.path_prefix.empty())
- prependEnvPath("PATH", lyxrc.path_prefix);
+ prependEnvPath("PATH", replaceEnvironmentPath(lyxrc.path_prefix));
FileName const document_path(lyxrc.document_path);
if (document_path.exists() && document_path.isDirectory())