From: Georg Baum Date: Tue, 1 Feb 2011 20:03:01 +0000 (+0000) Subject: Disable preview converters that need dv2dt if dv2dt is not available. X-Git-Tag: 2.0.0~943 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=cfc81ea3d7b2b9af2be6196c9596ad16dec08995;p=lyx.git Disable preview converters that need dv2dt if dv2dt is not available. This gives a better error message on the console (although it is still impossible to figure out what went wrong from the GUI). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37407 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 0727a18feb..0341ae90a3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -219,7 +219,7 @@ least version 2.14 for proper work. 4.) INSTANT PREVIEW: Make sure that dv2dt (often part of LaTeX distributions) is installed -on your system. +on your system. Instant preview wil be disabled if dv2dt is not found. Known issues in version 2.0.0 diff --git a/lib/configure.py b/lib/configure.py index aecbfaf2b4..99b931edd7 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -726,10 +726,17 @@ def checkConverterEntries(): rc_entry = [ r'\converter dvi pdf3 "%%" ""' ]) # path, dvipng = checkProg('dvipng', ['dvipng']) - if dvipng == "dvipng": + path, dv2dt = checkProg('DVI to DTL converter', ['dv2dt']) + if dvipng == "dvipng" and dv2dt == 'dv2dt': addToRC(r'\converter lyxpreview png "python -tt $$s/scripts/lyxpreview2bitmap.py" ""') else: + # set empty converter to override the default imagemagick addToRC(r'\converter lyxpreview png "" ""') + if dv2dt == 'dv2dt': + addToRC(r'\converter lyxpreview ppm "python -tt $$s/scripts/lyxpreview2bitmap.py" ""') + else: + # set empty converter to override the default imagemagick + addToRC(r'\converter lyxpreview ppm "" ""') # checkProg('a fax program', ['kdeprintfax $$i', 'ksendfax $$i', 'hylapex $$i'], rc_entry = [ r'\converter ps fax "%%" ""']) @@ -833,10 +840,15 @@ def checkConverterEntries(): version_number = match.groups()[0] version = version_number.split('.') if int(version[0]) > 2 or (len(version) > 1 and int(version[0]) == 2 and int(version[1]) >= 13): - addToRC(r'\converter lyxpreview-lytex ppm "python -tt $$s/scripts/lyxpreview-lytex2bitmap.py" ""') - if dvipng == "dvipng": + if dv2dt == 'dv2dt': + addToRC(r'\converter lyxpreview-lytex ppm "python -tt $$s/scripts/lyxpreview-lytex2bitmap.py" ""') + else: + # set empty converter to override the default imagemagick + addToRC(r'\converter lyxpreview-lytex ppm "" ""') + if dvipng == "dvipng" and dv2dt == 'dv2dt': addToRC(r'\converter lyxpreview-lytex png "python -tt $$s/scripts/lyxpreview-lytex2bitmap.py" ""') else: + # set empty converter to override the default imagemagick addToRC(r'\converter lyxpreview-lytex png "" ""') # Note: The --lily-output-dir flag is required because lilypond-book # does not process input again unless the input has changed, @@ -860,8 +872,7 @@ def checkConverterEntries(): # checkProg('Image converter', ['convert $$i $$o']) # # Entries that do not need checkProg - addToRC(r'''\converter lyxpreview ppm "python -tt $$s/scripts/lyxpreview2bitmap.py" "" -\converter lyxpreview-platex ppm "python -tt $$s/scripts/lyxpreview-platex2bitmap.py" "" + addToRC(r'''\converter lyxpreview-platex ppm "python -tt $$s/scripts/lyxpreview-platex2bitmap.py" "" \converter csv lyx "python -tt $$s/scripts/csv2lyx.py $$i $$o" "" \converter date dateout "python -tt $$s/scripts/date.py %d-%m-%Y > $$o" "" \converter docbook docbook-xml "cp $$i $$o" "xml"