]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeX.C
* src/frontends/qt4/QTocDialog.C (updateGui):
[lyx.git] / src / LaTeX.C
index d148fea966dd184c9cc24d679e4c3a7cec08c0ef..e840688324b7e6f5c534c5540d19da3b1eb0f380 100644 (file)
@@ -184,7 +184,7 @@ int LaTeX::run(TeXErrors & terr)
        bool rerun = false; // rerun requested
 
        // The class LaTeX does not know the temp path.
-       theBufferList().updateIncludedTeXfiles(getcwd(), runparams);
+       theBufferList().updateIncludedTeXfiles(getcwd().absFilename(), runparams);
 
        // Never write the depfile if an error was encountered.
 
@@ -287,12 +287,14 @@ int LaTeX::run(TeXErrors & terr)
                // no checks for now
                lyxerr[Debug::LATEX] << "Running MakeIndex." << endl;
                message(_("Running MakeIndex."));
+               // onlyFilename() is needed for cygwin
                rerun |= runMakeIndex(onlyFilename(idxfile.absFilename()), runparams);
        }
        if (head.haschanged(FileName(changeExtension(file.absFilename(), ".nlo")))) {
                lyxerr[Debug::LATEX] << "Running MakeIndex for nomencl." << endl;
                message(_("Running MakeIndex for nomencl."));
-               string const nomenclstr = " -s nomencl.ist -o " + changeExtension(file.toFilesystemEncoding(), ".nls");
+               // onlyFilename() is needed for cygwin
+               string const nomenclstr = " -s nomencl.ist -o " + onlyFilename(changeExtension(file.toFilesystemEncoding(), ".nls"));
                rerun |= runMakeIndex(onlyFilename(changeExtension(file.absFilename(), ".nlo")), runparams, nomenclstr);
        }
 
@@ -361,6 +363,7 @@ int LaTeX::run(TeXErrors & terr)
                // no checks for now
                lyxerr[Debug::LATEX] << "Running MakeIndex." << endl;
                message(_("Running MakeIndex."));
+               // onlyFilename() is needed for cygwin
                rerun = runMakeIndex(onlyFilename(changeExtension(file.absFilename(), ".idx")), runparams);
        }
 
@@ -368,7 +371,8 @@ int LaTeX::run(TeXErrors & terr)
        if (head.haschanged(FileName(changeExtension(file.absFilename(), ".nlo")))) {
                lyxerr[Debug::LATEX] << "Running MakeIndex for nomencl." << endl;
                message(_("Running MakeIndex for nomencl."));
-               string nomenclstr = " -s nomencl.ist -o " + changeExtension(file.toFilesystemEncoding(), ".nls");
+               // onlyFilename() is needed for cygwin
+               string nomenclstr = " -s nomencl.ist -o " + onlyFilename(changeExtension(file.toFilesystemEncoding(), ".nls"));
                rerun |= runMakeIndex(onlyFilename(changeExtension(file.absFilename(), ".nlo")), runparams, nomenclstr);
        }
 
@@ -410,7 +414,8 @@ int LaTeX::run(TeXErrors & terr)
 
 int LaTeX::startscript()
 {
-       string tmp = cmd + ' ' + quoteName(file.toFilesystemEncoding()) + " > " + os::nulldev();
+       // onlyFilename() is needed for cygwin
+       string tmp = cmd + ' ' + quoteName(onlyFilename(file.toFilesystemEncoding())) + " > " + os::nulldev();
        Systemcall one;
        return one.startscript(Systemcall::Wait, tmp);
 }
@@ -507,7 +512,7 @@ void LaTeX::scanAuxFile(FileName const & file, Aux_Info & aux_info)
                        aux_info.styles.insert(style);
                } else if (regex_match(token, sub, reg4)) {
                        string const file2 = sub.str(1);
-                       scanAuxFile(FileName(makeAbsPath(file2)), aux_info);
+                       scanAuxFile(makeAbsPath(file2), aux_info);
                }
        }
 }
@@ -551,6 +556,7 @@ bool LaTeX::runBibTeX(vector<Aux_Info> const & bibtex_info)
                result = true;
 
                string tmp = lyxrc.bibtex_command + " ";
+               // onlyFilename() is needed for cygwin
                tmp += quoteName(onlyFilename(removeExtension(it->aux_file.absFilename())));
                Systemcall one;
                one.startscript(Systemcall::Wait, tmp);
@@ -803,7 +809,7 @@ void LaTeX::deplog(DepTable & head)
        // This line is not present if no toc should be created.
        static regex miktexTocReg("\\\\tf@toc=\\\\write.*");
 
-       FileName const fn = FileName(makeAbsPath(logfile));
+       FileName const fn(makeAbsPath(logfile));
        ifstream ifs(fn.toFilesystemEncoding().c_str());
        while (ifs) {
                // Ok, the scanning of files here is not sufficient.