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
This commit is contained in:
Angus Leeming 2005-05-08 14:11:55 +00:00
parent ce7da69af1
commit 0a1fc13eff
3 changed files with 14 additions and 8 deletions

View File

@ -1,3 +1,9 @@
2005-05-08 Angus Leeming <leeming@lyx.org>
* 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 <michael.schmitt@teststep.org>
* ui/*.ui: Synchronize menu entries with dialog titles:

View File

@ -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"' \

View File

@ -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)