From: Angus Leeming Date: Sun, 8 May 2005 14:11:55 +0000 (+0000) Subject: Do not quote the name of the executable when spawning an external process. X-Git-Tag: 1.6.10~14308 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0a1fc13eff299b3081fb7ba4c9adf49517b1fccc;p=features.git Do not quote the name of the executable when spawning an external process. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9921 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/ChangeLog b/lib/ChangeLog index 2a63fc25c0..7b5e55fc4d 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,9 @@ +2005-05-08 Angus Leeming + + * scripts/lyxpreview2bitmap.py: + * scripts/legacy_lyxpreview2ppm.py do not quote the name of the + executable when spawning an external process. + 2005-05-07 Michael Schmitt * ui/*.ui: Synchronize menu entries with dialog titles: diff --git a/lib/scripts/legacy_lyxpreview2ppm.py b/lib/scripts/legacy_lyxpreview2ppm.py index cc716e8206..a36466d801 100644 --- a/lib/scripts/legacy_lyxpreview2ppm.py +++ b/lib/scripts/legacy_lyxpreview2ppm.py @@ -195,8 +195,8 @@ def legacy_latex_file(latex_file, fg_color, bg_color): def crop_files(pnmcrop, basename): t = pipes.Template() - t.append('"%s" -left' % pnmcrop, '--') - t.append('"%s" -right' % pnmcrop, '--') + t.append('%s -left' % pnmcrop, '--') + t.append('%s -right' % pnmcrop, '--') for file in glob.glob("%s*.ppm" % basename): tmp = mkstemp() @@ -236,7 +236,7 @@ def legacy_conversion(argv): error("Unable to move color info into the latex file") # Compile the latex file. - latex_call = '"%s" "%s"' % (latex, latex_file) + latex_call = '%s "%s"' % (latex, latex_file) latex_status, latex_stdout = run_command(latex_call) if latex_status != None: @@ -247,7 +247,7 @@ def legacy_conversion(argv): dvi_file = latex_file_re.sub(".dvi", latex_file) ps_file = latex_file_re.sub(".ps", latex_file) - dvips_call = '"%s" -o "%s" "%s"' % (dvips, ps_file, dvi_file) + dvips_call = '%s -o "%s" "%s"' % (dvips, ps_file, dvi_file) dvips_status, dvips_stdout = run_command(dvips_call) if dvips_status != None: @@ -264,7 +264,7 @@ def legacy_conversion(argv): alpha = 2 # Generate the bitmap images - gs_call = '"%s" -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pnmraw ' \ + gs_call = '%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pnmraw ' \ '-sOutputFile="%s%%d.ppm" ' \ '-dGraphicsAlphaBit=%d -dTextAlphaBits=%d ' \ '-r%f "%s"' \ diff --git a/lib/scripts/lyxpreview2bitmap.py b/lib/scripts/lyxpreview2bitmap.py index 3268beca76..bf13261d3e 100755 --- a/lib/scripts/lyxpreview2bitmap.py +++ b/lib/scripts/lyxpreview2bitmap.py @@ -107,7 +107,7 @@ def convert_to_ppm_format(pngtopnm, basename): for png_file in glob.glob("%s*.png" % basename): ppm_file = png_file_re.sub(".ppm", png_file) - p2p_cmd = "'%s' '%s'" % (pngtopnm, png_file) + p2p_cmd = '%s "%s"' % (pngtopnm, png_file) p2p_status, p2p_stdout = run_command(p2p_cmd) if p2p_status != None: error("Unable to convert %s to ppm format" % png_file) @@ -154,7 +154,7 @@ def main(argv): pngtopnm = find_exe_or_terminate(["pngtopnm"], path) # Compile the latex file. - latex_call = "'%s' '%s'" % (latex, latex_file) + latex_call = '%s "%s"' % (latex, latex_file) latex_status, latex_stdout = run_command(latex_call) if latex_status != None: @@ -163,7 +163,7 @@ def main(argv): # Run the dvi file through dvipng. dvi_file = latex_file_re.sub(".dvi", latex_file) - dvipng_call = "'%s' -Ttight -depth -height -D %d -fg '%s' -bg '%s' '%s'" \ + dvipng_call = '%s -Ttight -depth -height -D %d -fg "%s" -bg "%s" "%s"' \ % (dvipng, dpi, fg_color, bg_color, dvi_file) dvipng_status, dvipng_stdout = run_command(dvipng_call)