X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Fconfigure.py;h=b376d5029d47eb9b2c62e8705489e80fa983e495;hb=ecda7b0d557de2075509ebc610c22f009443f952;hp=318bdcdc7d9563274afa63934795b8ec92a3b3aa;hpb=a6a23d17818baf0dde676fcdf280bb17c5f59230;p=lyx.git diff --git a/lib/configure.py b/lib/configure.py index 318bdcdc7d..b376d5029d 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -458,7 +458,7 @@ def checkLuatex(): if DVILUATEX != '': addToRC(r'\converter luatex dvi3 "%s" "latex=lualatex"' % DVILUATEX) # remove temporary files - removeFiles(['luatest.tex', 'luatest.log']) + removeFiles(['luatest.tex', 'luatest.log', 'luatest.aux', 'luatest.pdf']) def checkModule(module): @@ -527,7 +527,7 @@ def checkFormatEntries(dtl_tools): \Format xpm xpm XPM "" "%s" "%s" ""''' % \ (iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie) ) # - checkViewerEditor('a text editor', ['sensible-editor', 'xemacs', 'gvim', 'kedit', 'kwrite', 'kate', \ + checkViewerEditor('a text editor', ['xemacs', 'gvim', 'kedit', 'kwrite', 'kate', \ 'nedit', 'gedit', 'notepad'], rc_entry = [r'''\Format asciichess asc "Plain text (chess output)" "" "" "%%" "" \Format asciiimage asc "Plain text (image)" "" "" "%%" "" @@ -540,7 +540,7 @@ def checkFormatEntries(dtl_tools): \Format literate nw NoWeb N "" "%%" "document,menu=export" \Format sweave Rnw "Sweave" S "" "%%" "document,menu=export" \Format lilypond ly "LilyPond music" "" "" "%%" "vector" -\Format lilypond-book lytex "LilyPond book (LaTeX)" "" "" "%%" "document" +\Format lilypond-book lytex "LilyPond book (LaTeX)" "" "" "%%" "document,menu=export" \Format latex tex "LaTeX (plain)" L "" "%%" "document,menu=export" \Format luatex tex "LaTeX (LuaTeX)" "" "" "%%" "document,menu=export" \Format pdflatex tex "LaTeX (pdflatex)" "" "" "%%" "document,menu=export" @@ -561,7 +561,7 @@ def checkFormatEntries(dtl_tools): if xhtmlview == "": addToRC(r'\Format xhtml xhtml "LyXHTML" y "" "" "document,menu=export"') # - checkEditor('a BibTeX editor', ['sensible-editor', 'jabref', 'JabRef', \ + checkEditor('a BibTeX editor', ['jabref', 'JabRef', \ 'pybliographic', 'bibdesk', 'gbib', 'kbib', \ 'kbibtex', 'sixpack', 'bibedit', 'tkbibtex' \ 'xemacs', 'gvim', 'kedit', 'kwrite', 'kate', \ @@ -659,10 +659,10 @@ def checkConverterEntries(): \converter literate pdflatex "%%" ""''']) # checkProg('a Sweave -> LaTeX converter', ['Rscript --verbose --no-save --no-restore $$s/scripts/lyxsweave.R $$p$$i $$p$$o $$e $$r'], - rc_entry = [r'''\converter sweave latex "%%" "latex" -\converter sweave pdflatex "%%" "latex=pdflatex" -\converter sweave xetex "%%" "latex=xelatex" -\converter sweave luatex "%%" "latex=lualatex"''']) + rc_entry = [r'''\converter sweave latex "%%" "" +\converter sweave pdflatex "%%" "" +\converter sweave xetex "%%" "" +\converter sweave luatex "%%" ""''']) # checkProg('an HTML -> LaTeX converter', ['html2latex $$i', 'gnuhtml2latex $$i', \ 'htmltolatex -input $$i -output $$o', 'java -jar htmltolatex.jar -input $$i -output $$o'], @@ -892,6 +892,8 @@ def checkConverterEntries(): # this, use different output folders for eps and pdf outputs. addToRC(r'\converter lilypond-book latex "lilypond-book --safe --lily-output-dir=ly-eps $$i" ""') addToRC(r'\converter lilypond-book pdflatex "lilypond-book --safe --pdf --latex-program=pdflatex --lily-output-dir=ly-pdf $$i" ""') + addToRC(r'\converter lilypond-book xetex "lilypond-book --safe --pdf --latex-program=xelatex --lily-output-dir=ly-pdf $$i" ""') + addToRC(r'\converter lilypond-book luatex "lilypond-book --safe --pdf --latex-program=lualatex --lily-output-dir=ly-pdf $$i" ""') logger.info('+ found LilyPond-book version %s.' % version_number) else: logger.info('+ found LilyPond-book, but version %s is too old.' % version_number) @@ -1167,22 +1169,32 @@ def checkModulesConfig(): ## configuration change. ## "ModuleName" "filename" "Description" "Packages" "Requires" "Excludes" "Category" ''') + # build the list of available modules - foundClasses = [] + seen = [] + # note that this searches the local directory first, then the + # system directory. that way, we pick up the user's version first. for file in glob.glob( os.path.join('layouts', '*.module') ) + \ glob.glob( os.path.join(srcdir, 'layouts', '*.module' ) ) : # valid file? logger.info(file) if not os.path.isfile(file): continue - retval = processModuleFile(file, bool_docbook) + + filename = file.split(os.sep)[-1] + filename = filename[:-7] + if seen.count(filename): + continue + + seen.append(filename) + retval = processModuleFile(file, filename, bool_docbook) if retval != "": tx.write(retval) tx.close() logger.info('\tdone') -def processModuleFile(file, bool_docbook): +def processModuleFile(file, filename, bool_docbook): ''' process module file and get a line of result The top of a module file should look like this: @@ -1207,8 +1219,6 @@ def processModuleFile(file, bool_docbook): modname = desc = pkgs = req = excl = catgy = "" readingDescription = False descLines = [] - filename = file.split(os.sep)[-1] - filename = filename[:-7] for line in open(file).readlines(): if readingDescription: