From 1e62c1ec7c236b0cd5aa4435f42f5bcfeeb78b3c Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bonicoli Date: Tue, 19 Jun 2012 22:32:15 +0200 Subject: [PATCH] makensis.exe: if not in %PATH%, search in a default dir - search makensis.exe in %PROGRAMFILES%/NSIS - display a message when makensis.exe is not found. issue2634 review392001 --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 589880ebf1..d2c9e6f133 100644 --- a/setup.py +++ b/setup.py @@ -181,7 +181,8 @@ if os.name == 'nt': return None def find_makensis(): - for directory in os.environ['PATH'].split(';'): + default_path = os.path.join(os.environ['PROGRAMFILES'], 'NSIS') + for directory in os.environ['PATH'].split(';') + [default_path]: if not os.path.isdir(directory): continue path = os.path.join(directory, 'makensis.exe') @@ -267,6 +268,9 @@ if os.name == 'nt': Popen([makensis, "/DVERSION=" + VERSION, str(os.path.join(os.path.dirname(__file__), 'setup-single.nsi'))]).wait() + else: + print "makensis.exe not found: installers can not be created, "\ + "skip setup.nsi and setup-single.nsi" elif sys.platform == 'darwin': def find_gtk_dir():