aboutsummaryrefslogtreecommitdiff
path: root/packages/win32_inno
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-06-07 20:16:04 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-06-07 20:16:04 +0000
commit8cf465ea89ea58b5e2469f7f99df1f43ef32f792 (patch)
tree2a37a8f088c21b7e3ce2bbfff043be3740afb894 /packages/win32_inno
parent38c5227e595159593c88e9423fd29de9c692e5f4 (diff)
checked in georg's patch that 'patch that checks for previous version and offers unistall choice' #2800683
svn path=/trunk/; revision=11699
Diffstat (limited to 'packages/win32_inno')
-rwxr-xr-xpackages/win32_inno/pd-inno.iss.in23
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/win32_inno/pd-inno.iss.in b/packages/win32_inno/pd-inno.iss.in
index f045955c..fb46c0d7 100755
--- a/packages/win32_inno/pd-inno.iss.in
+++ b/packages/win32_inno/pd-inno.iss.in
@@ -364,3 +364,26 @@ Source: build\msvcr71.dll; DestDir: {sys}; Flags: restartreplace uninsneverunins
;Source: build\portaudio\*.*; DestDir: {app}\portaudio; Flags: ignoreversion recursesubdirs
;Source: build\src\*.*; DestDir: {app}\src; Flags: ignoreversion recursesubdirs
;Source: build\tcl\*.*; DestDir: {app}\tcl; Flags: ignoreversion recursesubdirs
+
+[Code]
+function NextButtonClick(CurPageID: Integer): Boolean;
+var
+ ResultCode: Integer;
+begin
+ case CurPageID of
+ wpReady:
+ begin
+ if(FileExists(ExpandConstant('{app}\unins000.exe')) AND FileExists(ExpandConstant('{app}\bin\pd.exe'))) then begin
+ if MsgBox('Found a previous Version of Pure Data at ' + ExpandConstant('{app} ') + #13#13 'Do you want to uninstall it first? (recommended)', mbConfirmation, MB_YESNO) = idYes then begin
+ if not Exec(ExpandConstant('{app}\unins000.exe'), '', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode) then
+ MsgBox('NextButtonClick:' #13#13 'The uninstall file could not be executed. ' + SysErrorMessage(ResultCode) + '.', mbError, MB_OK);
+ end;
+ end;
+ BringToFrontAndRestore();
+ MsgBox('NextButtonClick:' #13#13 'The normal installation will now start.', mbInformation, MB_OK);
+ end;
+ end;
+
+ Result := True;
+end;
+