lyx_dir_ = FileName(lyx_dir_.realPath());
// Is LyX being run in-place from the build tree?
- bool in_build_dir = inBuildDir(abs_binary, build_support_dir_, system_support_dir_);
+ in_build_dir_ = inBuildDir(abs_binary, build_support_dir_, system_support_dir_);
- if (!in_build_dir) {
+ if (!in_build_dir_) {
system_support_dir_ =
get_system_support_dir(abs_binary,
command_line_system_support_dir);
FileName const configure_script(addName(system_support().absFileName(), "configure.py"));
configure_command_ = os::python() + ' ' +
quoteName(configure_script.toFilesystemEncoding(), quote_python) +
- with_version_suffix() + " --binary-dir=" + binary_dir().absFileName();
+ with_version_suffix() + " --binary-dir=" +
+ quoteName(binary_dir().absFileName(), quote_python);
LYXERR(Debug::INIT, "<package>\n"
<< "\tbinary_dir " << binary_dir().absFileName() << '\n'
temp_dir_ = temp_dir;
}
+
+FileName Package::messages_file(string const & c) const
+{
+ if (in_build_dir_)
+ return FileName(top_srcdir().absFileName() + "/po/"
+ + c + ".gmo");
+ else
+ return FileName(locale_dir_.absFileName() + "/" + c
+ + "/LC_MESSAGES/" PACKAGE ".mo");
+}
+
+
// The specification of home_dir_ is fixed for a given OS.
// A typical example on Windows: "C:/Documents and Settings/USERNAME"
// and on a Posix-like machine: "/home/USERNAME".