Installation routine checks now if there exists a previous installation and asks whether it should uninstall it or not.
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6693 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -358,6 +358,8 @@ FunctionEnd
|
||||
|
||||
Function WelcomePage
|
||||
|
||||
Call CheckPrevInstallation
|
||||
|
||||
nsDialogs::Create /NOUNLOAD 1044
|
||||
Pop $DIALOG
|
||||
|
||||
@@ -468,7 +470,7 @@ Function InstallationTypePage
|
||||
Pop $R1 ; minor version
|
||||
|
||||
StrCmp $R0 "6" 0 winvercheckdone ; vista
|
||||
|
||||
|
||||
; suggest multiuser option on vista and later
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "InstallTypes.ini" "Field 2" "State" "1"
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "InstallTypes.ini" "Field 1" "State" "0"
|
||||
@@ -502,6 +504,18 @@ Function ConfigureWithoutAppdata
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function CheckPrevInstallation
|
||||
|
||||
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${AC_SHORTNAME}" "UninstallString"
|
||||
StrCmp $0 "" isnotinstalled isinstalled
|
||||
isinstalled:
|
||||
MessageBox MB_YESNO "A previous installation was detected. Would you like to uninstall before installation?" IDNO uninstallno
|
||||
ExecWait "$0"
|
||||
uninstallno:
|
||||
isnotinstalled:
|
||||
|
||||
FunctionEnd
|
||||
|
||||
; Installer Sections
|
||||
|
||||
Section "AssaultCube ${AC_FULLVERSION}" AC
|
||||
|
||||
Reference in New Issue
Block a user