Win32 installer first prompts to uninstall old version
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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.
|
Added Throbber from Cliff Wells to the library and the demo.
|
||||||
|
|
||||||
|
Windows installer prompts to uninstall old version first.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -7,7 +7,7 @@ will be created.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
import sys, os, string
|
import sys, os, string, time
|
||||||
|
|
||||||
KEEP_TEMPS = 0
|
KEEP_TEMPS = 0
|
||||||
ISCC = r"%s\InnoSetup2Ex\ISCC.exe %s"
|
ISCC = r"%s\InnoSetup2Ex\ISCC.exe %s"
|
||||||
@@ -32,7 +32,7 @@ OutputDir = dist
|
|||||||
WizardStyle = modern
|
WizardStyle = modern
|
||||||
UninstallStyle = modern
|
UninstallStyle = modern
|
||||||
DisableStartupPrompt = true
|
DisableStartupPrompt = true
|
||||||
CompressLevel = 9
|
Compression = bzip
|
||||||
DirExistsWarning = no
|
DirExistsWarning = no
|
||||||
DisableReadyMemo = true
|
DisableReadyMemo = true
|
||||||
DisableReadyPage = true
|
DisableReadyPage = true
|
||||||
@@ -47,6 +47,8 @@ AppPublisherURL = http://wxPython.org/
|
|||||||
LicenseFile = licence\licence.txt
|
LicenseFile = licence\licence.txt
|
||||||
CodeFile = %(IFSFILE)s
|
CodeFile = %(IFSFILE)s
|
||||||
|
|
||||||
|
;; WizardDebug = yes
|
||||||
|
|
||||||
;;------------------------------------------------------------
|
;;------------------------------------------------------------
|
||||||
|
|
||||||
;;[Dirs]
|
;;[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\CHANGES"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
|
||||||
Source: "wxPython\tools\XRCed\TODO"; 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\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\*.py"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
|
||||||
Source: "wxPython\tools\XRCed\*.xrc"; 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
|
Source: "wxPython\tools\XRCed\*.ico"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
|
||||||
@@ -269,6 +272,7 @@ var
|
|||||||
PythonDir : String;
|
PythonDir : String;
|
||||||
InstallDir : String;
|
InstallDir : String;
|
||||||
|
|
||||||
|
|
||||||
function InitializeSetup(): Boolean;
|
function InitializeSetup(): Boolean;
|
||||||
begin
|
begin
|
||||||
if not RegQueryStringValue(HKEY_LOCAL_MACHINE,
|
if not RegQueryStringValue(HKEY_LOCAL_MACHINE,
|
||||||
@@ -279,7 +283,8 @@ begin
|
|||||||
'Software\Python\PythonCore\%(PYTHONVER)s\InstallPath',
|
'Software\Python\PythonCore\%(PYTHONVER)s\InstallPath',
|
||||||
'', PythonDir) then begin
|
'', 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);
|
mbConfirmation, MB_OK);
|
||||||
PythonDir := 'C:\Put a directory on PYTHONPATH here\';
|
PythonDir := 'C:\Put a directory on PYTHONPATH here\';
|
||||||
end;
|
end;
|
||||||
@@ -300,12 +305,34 @@ begin
|
|||||||
Result := InstallDir;
|
Result := InstallDir;
|
||||||
end;
|
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
|
begin
|
||||||
end.
|
end.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
def find_DLLs():
|
def find_DLLs():
|
||||||
@@ -370,6 +397,7 @@ def main():
|
|||||||
os.system(ISCC % (os.environ['TOOLS'], ISSFILE))
|
os.system(ISCC % (os.environ['TOOLS'], ISSFILE))
|
||||||
|
|
||||||
if not KEEP_TEMPS:
|
if not KEEP_TEMPS:
|
||||||
|
time.sleep(1)
|
||||||
os.remove(ISSFILE)
|
os.remove(ISSFILE)
|
||||||
os.remove(IFSFILE)
|
os.remove(IFSFILE)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user