]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_main.C
Implement os::current_root for native Win32 builds.
[lyx.git] / src / lyx_main.C
index 7b4b8ce795c6bcff9aa1f72a2aee920498bdfba6..f76a5f4531f8ce9e682899df10ea3a6c6f5c0ac7 100644 (file)
@@ -36,6 +36,7 @@
 #include "lyxtextclasslist.h"
 #include "lyxserver.h"
 #include "MenuBackend.h"
+#include "mover.h"
 #include "ToolbarBackend.h"
 
 #include "mathed/math_inset.h"
@@ -64,7 +65,6 @@ using lyx::support::createLyXTmpDir;
 using lyx::support::FileInfo;
 using lyx::support::FileSearch;
 using lyx::support::GetEnv;
-using lyx::support::GetEnvPath;
 using lyx::support::i18nLibFileSearch;
 using lyx::support::LibFileSearch;
 using lyx::support::Path;
@@ -76,6 +76,8 @@ using lyx::support::user_lyxdir;
 using lyx::support::os::getTmpDir;
 using lyx::support::os::setTmpDir;
 
+namespace os = lyx::support::os;
+
 using std::endl;
 using std::string;
 using std::vector;
@@ -373,6 +375,7 @@ void LyX::init(bool gui)
        system_lyxrc = lyxrc;
        system_formats = formats;
        system_converters = converters;
+       system_movers = movers;
        system_lcolor = lcolor;
 
        string prefsfile = "preferences";
@@ -550,7 +553,7 @@ void LyX::queryUserLyXDir(bool explicit_userdir)
 
        if (!createDirectory(user_lyxdir(), 0755)) {
                // Failed, let's use $HOME instead.
-               user_lyxdir(GetEnvPath("HOME"));
+               user_lyxdir(os::homepath());
                lyxerr << bformat(_("Failed. Will use %1$s instead."),
                        user_lyxdir()) << endl;
                return;