]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_main.C
bug 2298: cursorTop/Bottom/Home/End does not redraw after dEPM
[lyx.git] / src / lyx_main.C
index 01c2aaafff58b157ec452e239b805740f870af86..f19801213e45725b82930232e67a873ca271d13b 100644 (file)
@@ -87,7 +87,7 @@ using std::system;
 #endif
 
 
-extern void QuitLyX();
+extern void QuitLyX(bool);
 
 extern LyXServer * lyxserver;
 
@@ -117,9 +117,9 @@ void showFileError(string const & error)
 void reconfigureUserLyXDir()
 {
        string const configure_script =
-               AddName(package().system_support(), "configure");
+               AddName(package().system_support(), "configure.py");
        string const configure_command =
-               "sh " + QuoteName(configure_script);
+               "python " + QuoteName(configure_script);
 
        lyxerr << _("LyX: reconfiguring user directory") << endl;
        Path p(package().user_support());
@@ -230,8 +230,6 @@ void LyX::priv_exec(int & argc, char * argv[])
        if (want_gui)
                lyx_gui::parse_lyxrc();
 
-       initMath();
-
        vector<string> files;
 
        for (int argi = argc - 1; argi >= 1; --argi)
@@ -271,7 +269,7 @@ void LyX::priv_exec(int & argc, char * argv[])
                if (last_loaded) {
                        bool success = false;
                        if (last_loaded->dispatch(batch_command, &success)) {
-                               QuitLyX();
+                               QuitLyX(false);
                                exit(!success);
                        }
                }
@@ -282,7 +280,7 @@ void LyX::priv_exec(int & argc, char * argv[])
                lyx_gui::start(batch_command, files);
        else {
                // Something went wrong above
-               QuitLyX();
+               QuitLyX(false);
                exit(EXIT_FAILURE);
        }
 }
@@ -406,13 +404,6 @@ void LyX::init(bool gui)
        signal(SIGTERM, error_handler);
        // SIGPIPE can be safely ignored.
 
-#if !defined (USE_POSIX_PACKAGING)
-       // Add the directory containing the LyX executable to the path
-       // so that LyX can find things like reLyX.
-       if (package().build_support().empty())
-               prependEnvPath("PATH", package().binary_dir());
-#endif
-
        // Check that user LyX directory is ok. We don't do that if
        // running in batch mode.
        bool reconfigure = false;
@@ -487,6 +478,13 @@ void LyX::init(bool gui)
        if (!lyxrc.path_prefix.empty())
                prependEnvPath("PATH", lyxrc.path_prefix);
 
+#if !defined (USE_POSIX_PACKAGING)
+       // Add the directory containing the LyX executable to the path
+       // so that LyX can find things like tex2lyx.
+       if (package().build_support().empty())
+               prependEnvPath("PATH", package().binary_dir());
+#endif
+
        // Having reset the PATH we're now in a position to run configure
        // if necessary.
        if (reconfigure)
@@ -623,7 +621,7 @@ bool LyX::queryUserLyXDir(bool explicit_userdir)
            fs::is_directory(package().user_support())) {
                first_start = false;
                string const configure_script =
-                       AddName(package().system_support(), "configure");
+                       AddName(package().system_support(), "configure.py");
                string const userDefaults =
                        AddName(package().user_support(), "lyxrc.defaults");
                if (fs::exists(configure_script) &&
@@ -641,7 +639,7 @@ bool LyX::queryUserLyXDir(bool explicit_userdir)
        // to create it. If the user says "no", then exit.
        if (explicit_userdir &&
            Alert::prompt(
-                   _("Missing LyX support directory"),
+                   _("Missing user LyX directory"),
                    bformat(_("You have specified a non-existent user "
                              "LyX directory, %1$s.\n"
                              "It is needed to keep your own configuration."),