mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
run reconfigure when configure script is newer than lyxrc.defaults
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5365 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
58d8169cfe
commit
717fce48c5
@ -1,3 +1,7 @@
|
||||
2002-10-07 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* lyx_main.C (queryUserLyXDir): re-run automatically the configure
|
||||
script if it is newer than the lyxrc.defaults in user directory
|
||||
|
||||
2002-10-07 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
|
@ -571,10 +571,22 @@ void LyX::deadKeyBindings(kb_keymap * kbmap)
|
||||
|
||||
void LyX::queryUserLyXDir(bool explicit_userdir)
|
||||
{
|
||||
string const configure_script = AddName(system_lyxdir, "configure");
|
||||
|
||||
// Does user directory exist?
|
||||
FileInfo fileInfo(user_lyxdir);
|
||||
if (fileInfo.isOK() && fileInfo.isDir()) {
|
||||
first_start = false;
|
||||
Path p(user_lyxdir);
|
||||
FileInfo script(configure_script);
|
||||
FileInfo defaults("lyxrc.defaults");
|
||||
if (!defaults.isOK()
|
||||
|| defaults.getModificationTime() < script.getModificationTime()) {
|
||||
lyxerr << _("LyX: reconfiguring user directory")
|
||||
<< endl;
|
||||
::system(configure_script.c_str());
|
||||
lyxerr << "LyX: " << _("Done!") << endl;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -605,7 +617,7 @@ void LyX::queryUserLyXDir(bool explicit_userdir)
|
||||
|
||||
// Run configure in user lyx directory
|
||||
Path p(user_lyxdir);
|
||||
::system(AddName(system_lyxdir, "configure").c_str());
|
||||
::system(configure_script.c_str());
|
||||
lyxerr << "LyX: " << _("Done!") << endl;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user