From 731fd4e0cfb0d96be674773be6423306f153fd40 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Thu, 28 Feb 2013 21:20:33 +0100 Subject: [PATCH] Add help entry and set PATH in windows installer. --- MANIFEST.in | 2 +- doc/changelog.txt | 1 + setup.py | 19 ++++++++++--------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index b00a589..2ae1820 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,5 @@ include MANIFEST.in include COPYING doc/*.1 doc/*.txt doc/*.tmpl doc/icon/* include Makefile *.bash-completion -include scripts/*.bat +include scripts/*.bat scripts/*.iss recursive-include tests *.py diff --git a/doc/changelog.txt b/doc/changelog.txt index 25129ac..813ae19 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -3,6 +3,7 @@ * Add support for searching in archive contents. * Add support for ISO image handling. * Allow multiple --verbose options to increase program output. +* Add patool.exe to the PATH in the windows installer. * Fixed Python lzma archive handling. * Fixed lzop, lrzip and rzip archive handling. * Fixed Python 3.x support. diff --git a/setup.py b/setup.py index a941f7f..e68af06 100644 --- a/setup.py +++ b/setup.py @@ -178,7 +178,7 @@ class InnoScript: print("SetupIconFile=%s" % self.icon, file=fd) print(file=fd) print("[Tasks]", file=fd) - print("Name: modifypath; Description: Add app directory to environment PATH; Flags: unchecked", file=fd) + print("Name: modifypath; Description: Add application directory to %PATH%; Flags: checked", file=fd) print(file=fd) # List of source files files = self.windows_exe_files + \ @@ -194,8 +194,9 @@ class InnoScript: for path in self.windows_exe_files: print(r'Name: "{group}\%s"; Filename: "{app}\%s"' % (self.name, path), file=fd) - if self.console_exe_files: - print(r'Name: "{group}\Patool command prompt"; Filename: "cmd.exe"', file=fd) + for path in self.console_exe_files: + name = os.path.basename(path).capitalize() + print(r'Name: "{group}\%s help"; Filename: "cmd.exe"; Parameters "/C %s --help";' % (name, path), file=fd) print(r'Name: "{group}\Uninstall %s"; Filename: "{uninstallexe}"' % self.name, file=fd) print(file=fd) # Uninstall optional log files @@ -207,13 +208,13 @@ class InnoScript: print("""\ const ModPathName = 'modifypath'; - ModPathType = 'user'; + ModPathType = 'user'; -function ModPathDir(): TArrayOfString; -begin - setArrayLength(Result, 1) - Result[0] := ExpandConstant('{app}'); -end; +function ModPathDir(): TArrayOfString; +begin + setArrayLength(Result, 1) + Result[0] := ExpandConstant('{app}'); +end; #include "modpath.iss" """, file=fd) shutil.copy(r"scripts\modpath.iss", "dist")