Append ".exe" to the name of the searched-for program on Win32.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8765 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2004-05-19 14:56:33 +00:00
parent 323d128a13
commit 3e34d6f23c
3 changed files with 16 additions and 2 deletions

View 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

View 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

View File

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