document_dir_ = get_document_dir(home_dir_);
FileName const abs_binary = abs_path_from_binary_name(command_line_arg0);
- string const bdir = onlyPath(abs_binary.absFilename());
- // We may be using libtools
- if (suffixIs(bdir, ".libs/"))
- binary_dir_ = FileName(addPath(bdir, "../"));
- else
- binary_dir_ = FileName(bdir);
+ binary_dir_ = FileName(onlyPath(abs_binary.absFilename()));
// Is LyX being run in-place from the build tree?
buildDirs(abs_binary, top_build_dir_location,
FileName const configure_script(addName(system_support().absFilename(), "configure.py"));
configure_command_ = os::python() + ' ' +
- quoteName(configure_script.toFilesystemEncoding()) +
+ quoteName(configure_script.toFilesystemEncoding(), quote_python) +
with_version_suffix();
LYXERR(Debug::INIT, "<package>\n"
while (true) {
// Try and find "lyxrc.defaults".
string binary_dir = onlyPath(binary.absFilename());
- // We may be using libtools with static linking.
- if (suffixIs(binary_dir, ".libs/"))
- binary_dir = addPath(binary_dir, "../");
build_support_dir = buildSupportDir(binary_dir, top_build_dir_location);
if (!fileSearch(build_support_dir.absFilename(), "Makefile").empty()) {
// Try and find "chkconfig.ltx".
return FileName();
string const str_path = fix_dir_name(command_line);
- FileName path(str_path);
- return path.isAbsolute() ? path : makeAbsPath(str_path);
+ return makeAbsPath(str_path);
}
#else
string const exe_path = os::internal_path(exe);
#endif
- FileName exepath(exe_path);
- if (exepath.isAbsolute())
- return exepath;
+ if (FileName::isAbsolute(exe_path))
+ return FileName(exe_path);
// Two possibilities present themselves.
// 1. The binary is relative to the CWD.