]> git.lyx.org Git - lyx.git/commitdiff
On Windows, not all file systems provide for a short form of a filename,
authorEnrico Forestieri <forenr@lyx.org>
Wed, 1 Jun 2011 00:40:03 +0000 (00:40 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Wed, 1 Jun 2011 00:40:03 +0000 (00:40 +0000)
so we have to account for this. Also, when checking whether TeX allows
spaces in file names, we try different quoting styles in order to account
for the kind of TeX engine used.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38907 a592a061-630c-0410-9148-cb99ea01b6c8

lib/configure.py

index 7b76d69d670f5f1d2a08400fbf19fcb292aa42b9..ba87cd71046a19ebd725ebc371a06055cc35302f 100644 (file)
@@ -117,6 +117,8 @@ def checkTeXPaths():
         os.write(fd, r'\relax')
         os.close(fd)
         latex_out = cmdOutput(r'latex "\nonstopmode\input{%s}"' % inpname)
+        if 'Error' in latex_out:
+            latex_out = cmdOutput(r'latex "\nonstopmode\input{\"%s\"}"' % inpname)
         if 'Error' in latex_out:
             logger.warning("configure: TeX engine needs posix-style paths in latex files")
             windows_style_tex_paths = 'false'
@@ -1300,8 +1302,10 @@ def checkTeXAllowSpaces():
         msg = "Checking whether TeX allows spaces in file names... "
         writeToFile('a b.tex', r'\message{working^^J}' )
         if LATEX != '':
-            if os.name == 'nt':
+            if os.name == 'nt' or sys.platform == 'cygwin':
                 latex_out = cmdOutput(LATEX + r""" "\nonstopmode\input{\"a b\"}" """)
+                if not 'working' in latex_out:
+                    latex_out = cmdOutput(LATEX + r' "\nonstopmode\input{a b}"')
             else:
                 latex_out = cmdOutput(LATEX + r""" '\nonstopmode\input{"a b"}' """)
         else: