Skip to content

Commit

Permalink
prevent installer from overwriting a profile if it exists in the inst…
Browse files Browse the repository at this point in the history
…all dir already and stop installer from removing cache (if the cache needs to be updated the cache version should be used to force it), other minor updates
  • Loading branch information
MinaciousGrace committed Dec 6, 2016
1 parent ae0420a commit ad5b0ff
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ Save/*
Save/*/*
Save/LocalProfiles/*
!Save/LocalProfiles/00000000
Save/LocalProfiles/00000000/
Logs/
Songs/*
!Songs/Etterna
Expand Down
2 changes: 1 addition & 1 deletion src/ProductInfo.inc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
; when they install StepMania 5. (not recommended)
!define PRODUCT_ID "Stepmania - Etterna"
; TODO: This needs to be updated with the git rev hash
!define PRODUCT_VER "- Etterna v0.5 Installer"
!define PRODUCT_VER "- Etterna v0.51 Installer"
!define PRODUCT_DISPLAY "${PRODUCT_FAMILY} ${PRODUCT_VER}"
!define PRODUCT_BITMAP "sm5"

Expand Down
14 changes: 8 additions & 6 deletions stepmania.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
!endif

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_WELCOME

;!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
Expand Down Expand Up @@ -298,6 +299,7 @@ Section "Main Section" SecMain
RMDir /r "$INSTDIR\NoteSkins\common\_Editor"
; dance
RMDir /r "$INSTDIR\NoteSkins\dance\default"
RMDir /r "$INSTDIR\NoteSkins\dance\DivideByZero"
RMDir /r "$INSTDIR\NoteSkins\dance\Delta"
; the "midi-*" noteskin series was formerly known as just "midi".
RMDir /r "$INSTDIR\NoteSkins\dance\midi"
Expand Down Expand Up @@ -420,9 +422,13 @@ Section "Main Section" SecMain
File /r "pcks\*.*"
!endif

SetOverwrite off
;Default player profile
SetOutPath "$INSTDIR\Save\LocalProfiles"
File /r /x CVS /x .svn "Save\LocalProfiles\00000000"
SetOutPath "$INSTDIR\Save\LocalProfiles\00000000"
File /r /x CVS /x .svn "Save\LocalProfiles\00000000\Stats.xml"
File /r /x CVS /x .svn "Save\LocalProfiles\00000000\Type.ini"
File /r /x CVS /x .svn "Save\LocalProfiles\00000000\Editable.ini"
SetOverwrite on

SetOutPath "$INSTDIR\Program"
!ifdef INSTALL_EXECUTABLES
Expand Down Expand Up @@ -755,16 +761,12 @@ Section "Uninstall"
Delete "$INSTDIR\BGAnimations\instructions.txt"
RMDir "$INSTDIR\BGAnimations"

RMDir /r "$INSTDIR\Cache"

Delete "$INSTDIR\CDTitles\Instructions.txt"
RMDir "$INSTDIR\CDTitles"

Delete "$INSTDIR\Characters\Instructions.txt"
RMDir /r "$INSTDIR\Characters\default"
RMDir "$INSTDIR\Characters"

RMDir /r "$INSTDIR\Cache"

RMDir /r "$INSTDIR\Data\AutoMappings"
RMDir /r "$INSTDIR\Data\Shaders"
Expand Down

0 comments on commit ad5b0ff

Please sign in to comment.