]> git.lyx.org Git - features.git/commitdiff
Append ".exe" to the name of the searched-for program on Win32.
authorAngus Leeming <leeming@lyx.org>
Wed, 19 May 2004 14:56:33 +0000 (14:56 +0000)
committerAngus Leeming <leeming@lyx.org>
Wed, 19 May 2004 14:56:33 +0000 (14:56 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8765 a592a061-630c-0410-9148-cb99ea01b6c8

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

index 02fb40d2b71aff78f1123f97607e82acc40019f6..0e004c247384978c93941b6a49eb33213f475b64 100644 (file)
@@ -1,3 +1,9 @@
+2004-05-19  Angus Leeming  <leeming@lyx.org>
+
+       * scripts/lyxpreview2bitmap.py (find_exe):
+       * scripts/legacy_lyxpreview2ppm.py (find_exe): append ".exe" to the
+       program name on Win32.
+
 2004-05-18  Angus Leeming  <leeming@lyx.org>
 
        * legacy_lyxpreview2ppm.py: search for "gswin32" also when looking
index 6105e4418e377d3f3a83efc8a0a05ad1613e2343..9b39354673a52da2dd5d34dc324f220af8b20687 100644 (file)
@@ -36,7 +36,11 @@ def error(message):
 def find_exe(candidates, path):
     for prog in candidates:
         for directory in path:
-            full_path = os.path.join(directory, prog)
+            if os.name == "nt":
+                full_path = os.path.join(directory, prog + ".exe")
+            else:
+                full_path = os.path.join(directory, prog)
+
             if os.access(full_path, os.X_OK):
                 return full_path
 
index d7802edf70844ecc888e7321ee2637ed9ca2048b..bb7438bf066c31ea32cb345bd3d04bab6333f376 100755 (executable)
@@ -67,7 +67,11 @@ def error(message):
 def find_exe(candidates, path):
     for prog in candidates:
         for directory in path:
-            full_path = os.path.join(directory, prog)
+            if os.name == "nt":
+                full_path = os.path.join(directory, prog + ".exe")
+            else:
+                full_path = os.path.join(directory, prog)
+
             if os.access(full_path, os.X_OK):
                 return full_path