mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-12 22:14:35 +00:00
Rescan TeX Files on reconfigure
This commit is contained in:
parent
e6907006ae
commit
6a8231401b
@ -1322,6 +1322,17 @@ def checkTeXAllowSpaces():
|
|||||||
removeFiles( [ 'a b.tex', 'a b.log', 'texput.log' ])
|
removeFiles( [ 'a b.tex', 'a b.log', 'texput.log' ])
|
||||||
|
|
||||||
|
|
||||||
|
def rescanTeXFiles():
|
||||||
|
''' Run kpsewhich to update information about TeX files '''
|
||||||
|
logger.info("+Indexing TeX files... ")
|
||||||
|
if not os.path.isfile( os.path.join(srcdir, 'scripts', 'TeXFiles.py') ):
|
||||||
|
logger.error("configure: error: cannot find TeXFiles.py script")
|
||||||
|
sys.exit(1)
|
||||||
|
tfp = cmdOutput("python -tt " + os.path.join(srcdir, 'scripts', 'TeXFiles.py'))
|
||||||
|
logger.info(tfp)
|
||||||
|
logger.info("\tdone")
|
||||||
|
|
||||||
|
|
||||||
def removeTempFiles():
|
def removeTempFiles():
|
||||||
# Final clean-up
|
# Final clean-up
|
||||||
if not lyx_keep_temps:
|
if not lyx_keep_temps:
|
||||||
@ -1332,6 +1343,7 @@ def removeTempFiles():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
lyx_check_config = True
|
lyx_check_config = True
|
||||||
|
lyx_kpsewhich = True
|
||||||
outfile = 'lyxrc.defaults'
|
outfile = 'lyxrc.defaults'
|
||||||
lyxrc_fileformat = 7
|
lyxrc_fileformat = 7
|
||||||
rc_entries = ''
|
rc_entries = ''
|
||||||
@ -1344,10 +1356,13 @@ if __name__ == '__main__':
|
|||||||
Options:
|
Options:
|
||||||
--help show this help lines
|
--help show this help lines
|
||||||
--keep-temps keep temporary files (for debug. purposes)
|
--keep-temps keep temporary files (for debug. purposes)
|
||||||
|
--without-kpsewhich do not update TeX files information via kpsewhich
|
||||||
--without-latex-config do not run LaTeX to determine configuration
|
--without-latex-config do not run LaTeX to determine configuration
|
||||||
--with-version-suffix=suffix suffix of binary installed files
|
--with-version-suffix=suffix suffix of binary installed files
|
||||||
'''
|
'''
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
elif op == '--without-kpsewhich':
|
||||||
|
lyx_kpsewhich = False
|
||||||
elif op == '--without-latex-config':
|
elif op == '--without-latex-config':
|
||||||
lyx_check_config = False
|
lyx_check_config = False
|
||||||
elif op == '--keep-temps':
|
elif op == '--keep-temps':
|
||||||
@ -1392,6 +1407,8 @@ Format %i
|
|||||||
if windows_style_tex_paths != '':
|
if windows_style_tex_paths != '':
|
||||||
addToRC(r'\tex_expects_windows_paths %s' % windows_style_tex_paths)
|
addToRC(r'\tex_expects_windows_paths %s' % windows_style_tex_paths)
|
||||||
checkOtherEntries()
|
checkOtherEntries()
|
||||||
|
if lyx_kpsewhich:
|
||||||
|
rescanTeXFiles()
|
||||||
checkModulesConfig()
|
checkModulesConfig()
|
||||||
# --without-latex-config can disable lyx_check_config
|
# --without-latex-config can disable lyx_check_config
|
||||||
ret = checkLatexConfig(lyx_check_config and LATEX != '', bool_docbook)
|
ret = checkLatexConfig(lyx_check_config and LATEX != '', bool_docbook)
|
||||||
|
Loading…
Reference in New Issue
Block a user