The windows installer now asks to run the uninstaller if an
existing STK installation is found, and will not install otherwise. This avoids problems when installing a new stk on top of an older stk installation (e.g. old tracks might show up in new installation, but not work). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11953 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
8fa7b8a0d0
commit
9ad6ea9653
@ -56,12 +56,29 @@
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
|
||||
;--------------------------------
|
||||
Function validate_dir
|
||||
IfFileExists $INSTDIR\data\*.* 0 return
|
||||
IfFileExists $INSTDIR\Uninstall.exe 0 dont_uninstall
|
||||
MessageBox MB_YESNO "You can't install SuperTuxKart 0.8 in an existing directory. Do you wish to run the uninstaller in $INSTDIR?" IDNO dont_uninstall
|
||||
; -?=$INSTDIR makes sure that this installer waits for the uninstaller
|
||||
; to finish. The uninstaller (and directory) are not removed, but the
|
||||
; uninstaller will be overwritten by our installer anyway.
|
||||
ExecWait '"$INSTDIR\Uninstall.exe" _?=$INSTDIR'
|
||||
goto return
|
||||
dont_uninstall:
|
||||
MessageBox MB_OK "You can't install SuperTuxKart 0.8 in an existing directory. Please select a new directory."
|
||||
abort
|
||||
return:
|
||||
FunctionEnd
|
||||
;--------------------------------
|
||||
;Pages
|
||||
|
||||
;Installer pages
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_LICENSE "SuperTuxKart\License.txt"
|
||||
|
||||
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE validate_dir
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
|
||||
;Start Menu Folder Page Configuration
|
||||
@ -92,7 +109,7 @@ Section "Main Section" SecMain
|
||||
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
;Adds all the tux kart files
|
||||
; Adds all SuperTuxKart files
|
||||
File /r supertuxkart\*.*
|
||||
|
||||
;Store installation folder
|
||||
|
Loading…
x
Reference in New Issue
Block a user