backport r38142:

Fix checkTeXPaths when no latex is found. It prevented
LyX to be installed without a LaTeX distribution on
Windows.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@38244 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Julien Rioux 2011-04-04 16:59:23 +00:00
parent 2cbdb7b34b
commit d05eefc89d
2 changed files with 5 additions and 1 deletions

View File

@ -97,6 +97,8 @@ def createDirectories():
def checkTeXPaths():
''' Determine the path-style needed by the TeX engine on Win32 (Cygwin) '''
windows_style_tex_paths = ''
if LATEX == '':
return windows_style_tex_paths
if os.name == 'nt' or sys.platform == 'cygwin':
from tempfile import mkstemp
fd, tmpfname = mkstemp(suffix='.ltx')
@ -991,7 +993,6 @@ Options:
sys.exit(1)
setEnviron()
createDirectories()
windows_style_tex_paths = checkTeXPaths()
dtl_tools = checkDTLtools()
## Write the first part of outfile
writeToFile(outfile, '''# This file has been automatically generated by LyX' lib/configure.py
@ -1007,6 +1008,7 @@ Options:
checkConverterEntries()
(chk_docbook, bool_docbook, docbook_cmd) = checkDocBook()
checkTeXAllowSpaces()
windows_style_tex_paths = checkTeXPaths()
if windows_style_tex_paths != '':
addToRC(r'\tex_expects_windows_paths %s' % windows_style_tex_paths)
checkOtherEntries()

View File

@ -88,3 +88,5 @@ What's new
- Fix compilation with gcc 4.6 (bug 7285).
- Fix reconfigure script: allow LaTeX-less install of LyX under Windows.