>>>>> "Ronald" == Ronald Florence <[EMAIL PROTECTED]> writes:
Ronald> This patch adapts Jean-Marc's proposed localdir patch so it Ronald> works only for LyX/Mac. It allows LyX/Mac to find its Ronald> localedir in the relocatable Application bundle. Should have Ronald> no effect on other architectures. (For 1.3.4) -- Ahh, I forgot about this patch. This will be fine for LyX/Mac, indeed. Here is a revised patch against 1.3.4cvs. Could you try it out? JMarc
Index: src/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.1021.2.26 diff -u -p -r1.1021.2.26 ChangeLog --- src/ChangeLog 29 Dec 2003 13:27:24 -0000 1.1021.2.26 +++ src/ChangeLog 11 Feb 2004 17:34:40 -0000 @@ -1,3 +1,8 @@ +2004-02-11 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * lyx_main.C (init): if running from a Mac OS X bundle, make sure + to fixup the locale directory + 2003-12-28 Angus Leeming <[EMAIL PROTECTED]> * text3.C (dispatch): output useful info on receipt of LFUN_GETLAYOUT. Index: src/lyx_main.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyx_main.C,v retrieving revision 1.134.2.1 diff -u -p -r1.134.2.1 lyx_main.C --- src/lyx_main.C 16 Dec 2003 14:51:59 -0000 1.134.2.1 +++ src/lyx_main.C 11 Feb 2004 17:34:40 -0000 @@ -388,20 +388,35 @@ void LyX::init(bool gui) << system_lyxdir << '\'' << endl; // - // Set PATH for LyX/Mac + // Set PATH and localedir for LyX/Mac + // // LyX/Mac is a relocatable application bundle; here we add to // the PATH so it can find binaries like reLyX inside its own // application bundle, and also append PATH elements that it - // needs to run latex, previewers, etc. + // needs to run latex, previewers, etc. We also set the + // localedir inside the application bundle. // if (system_lyxdir == NormalizePath(AddPath(binpath, "../Resources/") + OnlyFilename(binname))) { - string oldpath = GetEnv("PATH"); - string newpath = "PATH=" + oldpath + ":" + binpath + ":"; - newpath += "/sw/bin:/usr/local/bin:/usr/local/teTeX/bin/powerpc-apple-darwin-current"; - PutEnv(newpath); - lyxerr[Debug::INIT] << "Running from LyX/Mac bundle. Setting PATH to: " << GetEnv("PATH") << endl; + string oldpath = GetEnv("PATH"); + string newpath = "PATH=" + oldpath + ":" + binpath + ":"; + newpath += "/sw/bin:/usr/local/bin:/usr/local/teTeX/bin/powerpc-apple-darwin-current"; + PutEnv(newpath); + lyxerr[Debug::INIT] << "Running from LyX/Mac bundle. " + "Setting PATH to: " << GetEnv("PATH") << endl; + if (GetEnvPath("LYX_LOCALEDIR").empty()) { + string const maybe_localedir = + NormalizePath(AddPath(system_lyxdir, + "../locale")); + FileInfo fi(maybe_localedir); + if (fi.isOK() && fi.isDir()) { + lyxerr[Debug::INIT] + << "Setting locale directory to " + << maybe_localedir << endl; + gettext_init(maybe_localedir); + } + } } //