diff --git a/wxPython/CHANGES.txt b/wxPython/CHANGES.txt index 517f8c9d0a..c829933d7c 100644 --- a/wxPython/CHANGES.txt +++ b/wxPython/CHANGES.txt @@ -52,6 +52,8 @@ Fixed method name clash in wxIEHtmlWin, renamed Refresh to RefreshPage. Added Throbber from Cliff Wells to the library and the demo. +Windows installer prompts to uninstall old version first. + diff --git a/wxPython/distrib/make_installer.py b/wxPython/distrib/make_installer.py index 8151a7725f..52bae1e6d9 100644 --- a/wxPython/distrib/make_installer.py +++ b/wxPython/distrib/make_installer.py @@ -7,7 +7,7 @@ will be created. """ -import sys, os, string +import sys, os, string, time KEEP_TEMPS = 0 ISCC = r"%s\InnoSetup2Ex\ISCC.exe %s" @@ -32,7 +32,7 @@ OutputDir = dist WizardStyle = modern UninstallStyle = modern DisableStartupPrompt = true -CompressLevel = 9 +Compression = bzip DirExistsWarning = no DisableReadyMemo = true DisableReadyPage = true @@ -47,6 +47,8 @@ AppPublisherURL = http://wxPython.org/ LicenseFile = licence\licence.txt CodeFile = %(IFSFILE)s +;; WizardDebug = yes + ;;------------------------------------------------------------ ;;[Dirs] @@ -142,6 +144,7 @@ Source: "wxPython\tools\*.py"; DestDir: "{app}\wxPython\tools"; Com Source: "wxPython\tools\XRCed\CHANGES"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools Source: "wxPython\tools\XRCed\TODO"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools Source: "wxPython\tools\XRCed\README"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools +Source: "wxPython\tools\XRCed\sawfishrc"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools Source: "wxPython\tools\XRCed\*.py"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools Source: "wxPython\tools\XRCed\*.xrc"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools Source: "wxPython\tools\XRCed\*.ico"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools @@ -269,6 +272,7 @@ var PythonDir : String; InstallDir : String; + function InitializeSetup(): Boolean; begin if not RegQueryStringValue(HKEY_LOCAL_MACHINE, @@ -279,7 +283,8 @@ begin 'Software\Python\PythonCore\%(PYTHONVER)s\InstallPath', '', PythonDir) then begin - MsgBox('No installation of Python %(PYTHONVER)s found in registry.\nBe sure to enter a pathname that places wxPython\non the PYTHONPATH', + MsgBox('No installation of Python %(PYTHONVER)s found in registry.' + #13 + + 'Be sure to enter a pathname that places wxPython on the PYTHONPATH', mbConfirmation, MB_OK); PythonDir := 'C:\Put a directory on PYTHONPATH here\'; end; @@ -300,12 +305,34 @@ begin Result := InstallDir; end; + + +function NextButtonClick(CurPage: Integer): Boolean; +var + FileName: string; + ResultCode: Integer; +begin + Result := True; + if CurPage <> wpSelectDir then Exit; + FileName := WizardDirValue() + '\wxPython\unins000.exe'; + if FileExists(FileName) then begin + ResultCode := MsgBox('A prior wxPython installation was found in this directory. It' + #13 + + 'is recommended that it be uninstalled first.' + #13#13 + + 'Should I do it?', + mbConfirmation, MB_YESNO); + if ResultCode = IDYES then begin + InstExec(FileName, '/SILENT', WizardDirValue()+'\wxPython', True, False, SW_SHOWNORMAL, ResultCode); + + end; + end; +end; + + begin end. """ - #---------------------------------------------------------------------- def find_DLLs(): @@ -370,6 +397,7 @@ def main(): os.system(ISCC % (os.environ['TOOLS'], ISSFILE)) if not KEEP_TEMPS: + time.sleep(1) os.remove(ISSFILE) os.remove(IFSFILE)