From: Juergen Spitzmueller Date: Sun, 29 Oct 2017 07:52:15 +0000 (+0100) Subject: Only use full path for inkscape file arguments on Mac. X-Git-Tag: 2.3.0rc1~2 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=bf77b611629bdcbf0159af82c18abd38678c5bab;p=features.git Only use full path for inkscape file arguments on Mac. (cherry picked from commit 22125fa6de76ec884a0a0c41506e78a8fdae575c) --- diff --git a/lib/configure.py b/lib/configure.py index 8cc1a0c84e..c638c6a34e 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -1010,16 +1010,18 @@ def checkConverterEntries(): \converter tgif png "tgif -print -color -png -o $$d $$i" "" \converter tgif pdf6 "tgif -print -color -pdf -stdout $$i > $$o" ""''']) # - checkProg('a WMF -> EPS converter', ['metafile2eps $$i $$o', 'wmf2eps -o $$o $$i', inkscape_name + ' --file=$$p$$i --export-area-drawing --without-gui --export-eps=$$p$$o'], + checkProg('a WMF -> EPS converter', ['metafile2eps $$i $$o', 'wmf2eps -o $$o $$i', inkscape_name + ' --file=%s$$i --export-area-drawing --without-gui --export-eps=%s$$o' + % (inkscape_fileprefix, inkscape_fileprefix)], rc_entry = [ r'\converter wmf eps "%%" ""']) # - checkProg('an EMF -> EPS converter', ['metafile2eps $$i $$o', 'wmf2eps -o $$o $$i', inkscape_name + ' --file=$$p$$i --export-area-drawing --without-gui --export-eps=$$p$$o'], + checkProg('an EMF -> EPS converter', ['metafile2eps $$i $$o', 'wmf2eps -o $$o $$i', inkscape_name + ' --file=%s$$i --export-area-drawing --without-gui --export-eps=%s$$o' + % (inkscape_fileprefix, inkscape_fileprefix)], rc_entry = [ r'\converter emf eps "%%" ""']) # - checkProg('a WMF -> PDF converter', [inkscape_name + ' --file=$$p$$i --export-area-drawing --without-gui --export-pdf=$$p$$o'], + checkProg('a WMF -> PDF converter', [inkscape_name + ' --file=%s$$i --export-area-drawing --without-gui --export-pdf=%s$$o' % (inkscape_fileprefix, inkscape_fileprefix)], rc_entry = [ r'\converter wmf pdf6 "%%" ""']) # - checkProg('an EMF -> PDF converter', [inkscape_name + ' --file=$$p$$i --export-area-drawing --without-gui --export-pdf=$$p$$o'], + checkProg('an EMF -> PDF converter', [inkscape_name + ' --file=%s$$i --export-area-drawing --without-gui --export-pdf=%s$$o' % (inkscape_fileprefix, inkscape_fileprefix)], rc_entry = [ r'\converter emf pdf6 "%%" ""']) # Only define a converter to pdf6 for graphics checkProg('an EPS -> PDF converter', ['epstopdf'], @@ -1065,17 +1067,20 @@ def checkConverterEntries(): rc_entry = [ r'\converter svg svgz "%%" ""']) # Only define a converter to pdf6 for graphics # Prefer rsvg-convert over inkscape since it is faster (see http://www.lyx.org/trac/ticket/9891) - checkProg('a SVG -> PDF converter', ['rsvg-convert -f pdf -o $$o $$i', inkscape_name + ' --file=$$p$$i --export-area-drawing --without-gui --export-pdf=$$p$$o'], + checkProg('a SVG -> PDF converter', ['rsvg-convert -f pdf -o $$o $$i', inkscape_name + ' --file=%s$$i --export-area-drawing --without-gui --export-pdf=%s$$o' + % (inkscape_fileprefix, inkscape_fileprefix)], rc_entry = [ r'''\converter svg pdf6 "%%" "" \converter svgz pdf6 "%%" ""'''], path = ['', inkscape_path]) # - checkProg('a SVG -> EPS converter', ['rsvg-convert -f ps -o $$o $$i', inkscape_name + ' --file=$$p$$i --export-area-drawing --without-gui --export-eps=$$p$$o'], + checkProg('a SVG -> EPS converter', ['rsvg-convert -f ps -o $$o $$i', inkscape_name + ' --file=%s$$i --export-area-drawing --without-gui --export-eps=%s$$o' + % (inkscape_fileprefix, inkscape_fileprefix)], rc_entry = [ r'''\converter svg eps "%%" "" \converter svgz eps "%%" ""'''], path = ['', inkscape_path]) # - checkProg('a SVG -> PNG converter', ['rsvg-convert -f png -o $$o $$i', inkscape_name + ' --without-gui --file=$$i --export-png=$$o'], + checkProg('a SVG -> PNG converter', ['rsvg-convert -f png -o $$o $$i', inkscape_name + ' --without-gui --file=%s$$i --export-png=%s$$o' + % (inkscape_fileprefix, inkscape_fileprefix)], rc_entry = [ r'''\converter svg png "%%" "", \converter svgz png "%%" ""'''], path = ['', inkscape_path]) @@ -1846,6 +1851,11 @@ Format %i java = checkProg('a java interpreter', ['java'])[1] perl = checkProg('a perl interpreter', ['perl'])[1] (inkscape_path, inkscape_name) = os.path.split(checkInkscape()) + # On MacOSX, Inkscape requires full path file arguments. This + # is not needed on Linux and Win and even breaks the latter. + inkscape_fileprefix = "" + if sys.platform == 'darwin': + inkscape_fileprefix = "$$p" checkFormatEntries(dtl_tools) checkConverterEntries() (chk_docbook, bool_docbook, docbook_cmd) = checkDocBook()