Georg Baum a écrit :
Abdelrazak Younes wrote:
Jean-Marc Lasgouttes a écrit :
buf->lyxrc.C: tempdir_path = "/tmp";
It seems that this one is overwritten in LyX::init() anyway. Remove it.
Should I update my patch with this and commit it?
I think so, but you should leave out the changes in createLyXTmpDir().
(chicken and egg problem). The tests for /tmp in createLyXTmpDir() ensure
that no attempt is made to create /tmp (if somebody specifies that as
temporary directory). One could of course add C:\\TEMP there if that is
needed, or maybe invent some more general test.
OK. New patch attached.
/tmp works in windows when called from c/c++. It just create a tmp drive
at the root of the current drive. In my case D:/tmp. So there's no
problem here.
What are the preprocessor macros that say we are in cygwin -mnocygwin
mode? This is what we have to test for.
I think there are none in current svn, 'configure' configure for cygwin
when executed from there. But it would be great if the same settings as
(msys+mingw) were applied (directory structure, etc). Maybe a
-with-mingw option?
I would prefer automatic detection. Are you sure that gcc does not have some
define that is set with -mnocygwin?
I have to confess that I am not using this option. I have just put mingw
path before cygwin path in my environment (I don't have cygwin gcc
installed). AFAIK this is exactly the same as the -mnocygwin option.
Abdel.
Index: D:/msys/home/yns/lyx/trunk/src/bufferlist.C
===================================================================
--- D:/msys/home/yns/lyx/trunk/src/bufferlist.C (revision 13409)
+++ D:/msys/home/yns/lyx/trunk/src/bufferlist.C (working copy)
@@ -333,7 +333,7 @@
// 3) In "/tmp" directory.
// MakeAbsPath to prepend the current
// drive letter on OS/2
- s = AddName(MakeAbsPath("/tmp/"), buf->fileName());
+ s = AddName(package().temp_dir(), buf->fileName());
s += ".emergency";
lyxerr << ' ' << s << endl;
if (buf->writeFile(s)) {
Index: D:/msys/home/yns/lyx/trunk/src/client/client.C
===================================================================
--- D:/msys/home/yns/lyx/trunk/src/client/client.C (revision 13409)
+++ D:/msys/home/yns/lyx/trunk/src/client/client.C (working copy)
@@ -458,7 +458,7 @@
}
-string mainTmp("/tmp");
+string mainTmp(package().temp_dir());
int t(vector<char *> const & arg)
Index: D:/msys/home/yns/lyx/trunk/src/lyxrc.C
===================================================================
--- D:/msys/home/yns/lyx/trunk/src/lyxrc.C (revision 13409)
+++ D:/msys/home/yns/lyx/trunk/src/lyxrc.C (working copy)
@@ -209,7 +209,6 @@
print_paper_flag = "-t";
print_paper_dimension_flag = "-T";
document_path.erase();
- tempdir_path = "/tmp";
view_dvi_paper_option.erase();
default_papersize = PAPER_DEFAULT;
custom_export_format = "ps";