]> git.lyx.org Git - features.git/commitdiff
Do not quote the name of the executable when spawning an external process.
authorAngus Leeming <leeming@lyx.org>
Sun, 8 May 2005 14:11:55 +0000 (14:11 +0000)
committerAngus Leeming <leeming@lyx.org>
Sun, 8 May 2005 14:11:55 +0000 (14:11 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9921 a592a061-630c-0410-9148-cb99ea01b6c8

lib/ChangeLog
lib/scripts/legacy_lyxpreview2ppm.py
lib/scripts/lyxpreview2bitmap.py

index 2a63fc25c0a264a79f9020e1c893715cac0c7a12..7b5e55fc4de3c7b78d8e36b6257996ee056064f4 100644 (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:
index cc716e820615e423cf1400d85314deb0cbfc7f82..a36466d801441acc06d4240a0e2a24b6bc20b641 100644 (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"' \
index 3268beca7665beb778b0555ce9ef45622f1e1c72..bf13261d3e80a451d766f0452bab89a39941d204 100755 (executable)
@@ -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)