mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
fix running in place
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7482 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f1ff990de7
commit
fea30d5137
@ -1,3 +1,11 @@
|
|||||||
|
2003-08-01 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||||
|
|
||||||
|
* path_defines.C.in (setLyxPaths): re-introduce the code to check
|
||||||
|
whether lyx is run in place
|
||||||
|
(build_dir): renamed from build_lyxdir
|
||||||
|
(build_lyxdir): give this better semantics compatible with what
|
||||||
|
LibFileSearch expects.
|
||||||
|
|
||||||
2003-07-29 Angus Leeming <leeming@lyx.org>
|
2003-07-29 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
* filename.[Ch] (relFilename, outputFilename): the 'path' arg
|
* filename.[Ch] (relFilename, outputFilename): the 'path' arg
|
||||||
|
@ -32,6 +32,9 @@ namespace {
|
|||||||
// Store for the path to the lyx support files we're actually going to use.
|
// Store for the path to the lyx support files we're actually going to use.
|
||||||
string system_lyxdir_;
|
string system_lyxdir_;
|
||||||
|
|
||||||
|
// Store for the path to the autogenerated files when running in place
|
||||||
|
string build_lyxdir_;
|
||||||
|
|
||||||
// Store for the path to the user-level support files.
|
// Store for the path to the user-level support files.
|
||||||
string user_lyxdir_;
|
string user_lyxdir_;
|
||||||
|
|
||||||
@ -72,13 +75,25 @@ string const & lyx_localedir()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
string const & build_lyxdir()
|
string const & build_dir()
|
||||||
{
|
{
|
||||||
static string const bl = "%BUILDDIR%";
|
static string const bl = "%BUILDDIR%";
|
||||||
return bl;
|
return bl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
string const & build_lyxdir()
|
||||||
|
{
|
||||||
|
return build_lyxdir_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void build_lyxdir(string const & sld)
|
||||||
|
{
|
||||||
|
build_lyxdir_ = sld;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
string const & system_lyxdir()
|
string const & system_lyxdir()
|
||||||
{
|
{
|
||||||
return system_lyxdir_;
|
return system_lyxdir_;
|
||||||
@ -122,6 +137,26 @@ bool setLyxPaths()
|
|||||||
lyxerr[Debug::INIT] << "Name of binary: " << binname << endl;
|
lyxerr[Debug::INIT] << "Name of binary: " << binname << endl;
|
||||||
lyxerr[Debug::INIT] << "Path of binary: " << binpath << endl;
|
lyxerr[Debug::INIT] << "Path of binary: " << binpath << endl;
|
||||||
|
|
||||||
|
|
||||||
|
string searchpath;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Determine whether we are running in place and set
|
||||||
|
// build_lyxdir accordingly
|
||||||
|
//
|
||||||
|
|
||||||
|
string const buildlyxdir = MakeAbsPath("../lib", binpath);
|
||||||
|
if (!FileSearch(buildlyxdir, "lyxrc.defaults").empty()) {
|
||||||
|
searchpath += AddPath(lyx_top_srcdir(), "lib") + ';';
|
||||||
|
build_lyxdir(buildlyxdir);
|
||||||
|
lyxerr[Debug::INIT] << "Checking whether LyX is run in "
|
||||||
|
"place... yes" << endl;
|
||||||
|
} else {
|
||||||
|
lyxerr[Debug::INIT]
|
||||||
|
<< "Checking whether LyX is run in place... no"
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Determine system directory.
|
// Determine system directory.
|
||||||
//
|
//
|
||||||
@ -141,7 +176,6 @@ bool setLyxPaths()
|
|||||||
// and the hardcoded lyx_dir is used.
|
// and the hardcoded lyx_dir is used.
|
||||||
|
|
||||||
// If we had a command line switch, system_lyxdir_ is already set
|
// If we had a command line switch, system_lyxdir_ is already set
|
||||||
string searchpath;
|
|
||||||
if (!system_lyxdir_.empty())
|
if (!system_lyxdir_.empty())
|
||||||
searchpath = MakeAbsPath(system_lyxdir_) + ';';
|
searchpath = MakeAbsPath(system_lyxdir_) + ';';
|
||||||
|
|
||||||
|
@ -19,17 +19,15 @@ namespace support {
|
|||||||
|
|
||||||
string const & lyx_localedir();
|
string const & lyx_localedir();
|
||||||
|
|
||||||
/* The absolute path to the lyx build directory.
|
|
||||||
* (Make-time value.)
|
|
||||||
*/
|
|
||||||
string const & build_lyxdir();
|
|
||||||
|
|
||||||
/// The absolute path to the lyx support files we're actually going to use.
|
/// The absolute path to the lyx support files we're actually going to use.
|
||||||
string const & system_lyxdir();
|
string const & system_lyxdir();
|
||||||
|
|
||||||
/// Set the absolute path to the lyx support files (from the command line).
|
/// Set the absolute path to the lyx support files (from the command line).
|
||||||
void system_lyxdir(string const &);
|
void system_lyxdir(string const &);
|
||||||
|
|
||||||
|
/// The absolute path to the lyx support files in the build directory
|
||||||
|
string const & build_lyxdir();
|
||||||
|
|
||||||
/// The absolute path to the user-level lyx support files.
|
/// The absolute path to the user-level lyx support files.
|
||||||
string const & user_lyxdir();
|
string const & user_lyxdir();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user