aboutsummaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
authorcanni0 <canni0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-05-01 02:25:01 +0000
committercanni0 <canni0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-05-01 02:25:01 +0000
commit818ab818dcc87bacb1acc8448f49c5c5ff99d37f (patch)
treef882a56cce70f4993a8cfd4027cd2409cc05b826 /installer
parent7209bd9d217cf7358f5921842af9bdf5dd2bbed1 (diff)
downloadusdx-818ab818dcc87bacb1acc8448f49c5c5ff99d37f.tar.gz
usdx-818ab818dcc87bacb1acc8448f49c5c5ff99d37f.tar.xz
usdx-818ab818dcc87bacb1acc8448f49c5c5ff99d37f.zip
- better support for update installation
- old files will be removed - uninstaller now deletes all shortcuts - select components in uninstaller: covers, highscores, config, screenshots, playlists, songs git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2325 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--installer/UltraStar Deluxe.nsi114
-rw-r--r--installer/languages/English.nsh9
-rw-r--r--installer/languages/German.nsh9
-rw-r--r--installer/languages/Hungarian.nsh10
-rw-r--r--installer/settings/files_main_install.nsh27
-rw-r--r--installer/settings/files_main_uninstall.nsh11
6 files changed, 143 insertions, 37 deletions
diff --git a/installer/UltraStar Deluxe.nsi b/installer/UltraStar Deluxe.nsi
index 66b0bd42..13cf46d0 100644
--- a/installer/UltraStar Deluxe.nsi
+++ b/installer/UltraStar Deluxe.nsi
@@ -158,8 +158,20 @@ Function Settings
; Get all the variables:
-Var /GLOBAL CHECKBOX
-Var /GLOBAL checkbox_state
+Var /GLOBAL LABEL_COMPONENTS
+
+Var /GLOBAL CHECKBOX_COVERS
+Var /GLOBAL CB_COVERS_State
+Var /GLOBAL CHECKBOX_SCORES
+Var /GLOBAL CB_SCORES_State
+Var /GLOBAL CHECKBOX_CONFIG
+Var /GLOBAL CB_CONFIG_State
+Var /GLOBAL CHECKBOX_SCREENSHOTS
+Var /GLOBAL CB_SCREENSHOTS_State
+Var /GLOBAL CHECKBOX_PLAYLISTS
+Var /GLOBAL CB_PLAYLISTS_State
+Var /GLOBAL CHECKBOX_SONGS
+Var /GLOBAL CB_SONGS_State
var /GLOBAL fullscreen
var /GLOBAL language2
@@ -219,10 +231,33 @@ Function un.AskDelete
nsDialogs::Create /NOUNLOAD 1018
- ${NSD_CreateCheckbox} 0 -150 100% 8u "$(delete_all)"
- Pop $CHECKBOX
+ ${NSD_CreateLabel} 0 -195 100% 12u "$(delete_components)"
+ Pop $LABEL_COMPONENTS
+
+ ${NSD_CreateCheckbox} 0 -175 100% 8u "$(delete_covers)"
+ Pop $CHECKBOX_COVERS
+ nsDialogs::OnClick /NOUNLOAD $CHECKBOX_COVERS $1
+
+ ${NSD_CreateCheckbox} 0 -155 100% 8u "$(delete_config)"
+ Pop $CHECKBOX_CONFIG
+ nsDialogs::OnClick /NOUNLOAD $CHECKBOX_CONFIG $2
+
+ ${NSD_CreateCheckbox} 0 -135 100% 8u "$(delete_highscores)"
+ Pop $CHECKBOX_SCORES
+ nsDialogs::OnClick /NOUNLOAD $CHECKBOX_SCORES $3
+
+ ${NSD_CreateCheckbox} 0 -115 100% 8u "$(delete_screenshots)"
+ Pop $CHECKBOX_SCREENSHOTS
+ nsDialogs::OnClick /NOUNLOAD $CHECKBOX_SCREENSHOTS $4
+
+ ${NSD_CreateCheckbox} 0 -95 100% 8u "$(delete_playlists)"
+ Pop $CHECKBOX_PLAYLISTS
+ nsDialogs::OnClick /NOUNLOAD $CHECKBOX_PLAYLISTS $5
+
+ ${NSD_CreateCheckbox} 0 -65 100% 18u "$(delete_songs)"
+ Pop $CHECKBOX_SONGS
+ nsDialogs::OnClick /NOUNLOAD $CHECKBOX_SONGS $6
- nsDialogs::OnClick /NOUNLOAD $CHECKBOX $0
nsDialogs::Show
@@ -230,29 +265,53 @@ FunctionEnd
Function un.DeleteAll
-${NSD_GetState} $CHECKBOX $checkbox_state
-
-${If} $checkbox_state == "1"
-
-; Remove settings, songs, highscores, covers
+${NSD_GetState} $CHECKBOX_COVERS $CB_COVERS_State
+${NSD_GetState} $CHECKBOX_CONFIG $CB_CONFIG_State
+${NSD_GetState} $CHECKBOX_SCORES $CB_SCORES_State
+${NSD_GetState} $CHECKBOX_SCORES $CB_SCREENSHOTS_State
+${NSD_GetState} $CHECKBOX_SCORES $CB_PLAYLISTS_State
+${NSD_GetState} $CHECKBOX_SONGS $CB_SONGS_State
- RMDir /r "$INSTDIR\songs"
+${If} $CB_COVERS_State == "1" ; Remove covers
RMDir /r "$INSTDIR\covers"
- Delete "$INSTDIR\config.ini"
- Delete "$INSTDIR\Ultrastar.db"
-
SetShellVarContext current
- RMDir /r "$APPDATA\ultrastardx\songs"
RMDir /r "$APPDATA\ultrastardx\covers"
- Delete "$APPDATA\ultrastardx\config.ini"
- Delete "$APPDATA\ultrastardx\Ultrastar.db"
SetShellVarContext all
+${EndIf}
-${Else}
+${If} $CB_CONFIG_State == "1" ; Remove config
+ SetShellVarContext current
+ Delete "$APPDATA\ultrastardx\config.ini"
+ SetShellVarContext all
+ Delete "$INSTDIR\config.ini"
+${EndIf}
-; If checkbox_state = 0
+${If} $CB_SCORES_State == "1" ; Remove highscores
+ SetShellVarContext current
+ Delete "$APPDATA\ultrastardx\Ultrastar.db"
+ SetShellVarContext all
+ Delete "$INSTDIR\Ultrastar.db"
+${EndIf}
+${If} $CB_SCREENSHOTS_State == "1" ; Remove screenshots
+ RMDir /r "$INSTDIR\sreenshots"
+ SetShellVarContext current
+ RMDir /r "$APPDATA\ultrastardx\screenshots"
+ SetShellVarContext all
+${EndIf}
+${If} $CB_SCREENSHOTS_State == "1" ; Remove playlists
+ RMDir /r "$INSTDIR\playlists"
+ SetShellVarContext current
+ RMDir /r "$APPDATA\ultrastardx\playlists"
+ SetShellVarContext all
+${EndIf}
+
+${If} $CB_SONGS_State == "1" ; Remove songs
+ RMDir /r "$INSTDIR\songs"
+ SetShellVarContext current
+ RMDir /r "$APPDATA\ultrastardx\songs"
+ SetShellVarContext all
${EndIf}
@@ -432,7 +491,7 @@ var /GLOBAL version
StrCpy $version "1.1beta"
- System::Call 'kernel32::CreateMutexA(i 0, i 0, t "USdx Installer.exe") ?e'
+ System::Call 'kernel32::CreateMutexA(i 0, i 0, t "USdx Installer.exe") ?e'
Pop $R0
@@ -445,22 +504,27 @@ StrCpy $version "1.1beta"
${If} $R0 == $version
MessageBox MB_YESNO|MB_ICONEXCLAMATION \
"${name} v.$R0 $(oninit_alreadyinstalled). $\n$\n $(oninit_installagain)" \
- IDYES done
+ IDYES continue
Abort
${EndIf}
- ReadRegStr $R1 HKLM \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\${name}" \
- "UninstallString"
+ ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${name}" 'UninstallString'
StrCmp $R1 "" done
+
${If} $R0 != $version
MessageBox MB_YESNO|MB_ICONEXCLAMATION \
"${name} v.$R0 $(oninit_alreadyinstalled). $\n$\n $(oninit_updateusdx) v.$R0 -> v.${version}" \
- IDYES done
+ IDYES continue
Abort
${EndIf}
+
+continue:
+ ReadRegStr $R2 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${name}" 'UninstallString'
+ MessageBox MB_YESNO|MB_ICONEXCLAMATION "$(oninit_uninstall)" IDNO done
+ ExecWait '"$R2" _?=$INSTDIR'
+
done:
!insertmacro MUI_LANGDLL_DISPLAY
diff --git a/installer/languages/English.nsh b/installer/languages/English.nsh
index c6c759b9..a3325d5b 100644
--- a/installer/languages/English.nsh
+++ b/installer/languages/English.nsh
@@ -9,13 +9,20 @@ LangString oninit_installagain ${LANG_ENGLISH} "Are you sure you want to install
LangString oninit_alreadyinstalled ${LANG_ENGLISH} "is already installed"
LangString oninit_closeusdx ${LANG_ENGLISH} "cannot be uninstalled while its running! Do you want to close it?"
LangString oninit_updateusdx ${LANG_ENGLISH} "Do you want to update the installation from:"
+LangString oninit_uninstall ${LANG_ENGLISH} "Do you want to uninstall the old version? (recommended)"
LangString update_connect ${LANG_ENGLISH} "Establish internet connection and check for new version"
LangString button_next ${LANG_ENGLISH} "Next >"
LangString button_close ${LANG_ENGLISH} "Close"
LangString update_information ${LANG_ENGLISH} "You can check if a new version of 'UltraStar Deluxe' is available. Thereto an internet connection will be established. If a new version is found, it can be installed afterwards."
-LangString delete_all ${LANG_ENGLISH} "Also delete Songs, Settings, Highscores and Covers ?"
+LangString delete_components ${LANG_ENGLISH} "Also delete the following components:"
+LangString delete_covers ${LANG_ENGLISH} "Cover?"
+LangString delete_highscores ${LANG_ENGLISH} "Highscores?"
+LangString delete_config ${LANG_ENGLISH} "Config?"
+LangString delete_screenshots ${LANG_ENGLISH} "Screenshots?"
+LangString delete_playlists ${LANG_ENGLISH} "Playlists?"
+LangString delete_songs ${LANG_ENGLISH} "Remove songs? WARNING: ALL files within the InstallationDir\songs folder will be removed(!)"
LangString update_check_older ${LANG_ENGLISH} "Your version $R0 is outdated. The new version $1 of UltraStar Deluxe is available. Do you want to update?"
LangString update_check_equal ${LANG_ENGLISH} "Your currently installed version $R0 is up-to-date. No update needed."
diff --git a/installer/languages/German.nsh b/installer/languages/German.nsh
index 6580fa7a..56507ec5 100644
--- a/installer/languages/German.nsh
+++ b/installer/languages/German.nsh
@@ -9,13 +9,20 @@ LangString oninit_installagain ${LANG_GERMAN} "Bist du sicher, dass du es erneut
LangString oninit_alreadyinstalled ${LANG_GERMAN} "ist bereits installiert"
LangString oninit_closeusdx ${LANG_GERMAN} "kann nicht während der Laufzeit deinstalliert werden. Soll es geschlossen werden?"
LangString oninit_updateusdx ${LANG_GERMAN} "Möchtest du das Programm aktualisieren von"
+LangString oninit_uninstall ${LANG_GERMAN} "Möchtest du die alte Version entfernen? (empfohlen)"
LangString update_connect ${LANG_GERMAN} "Mit dem Internet verbinden und nach aktueller Version suchen"
LangString button_next ${LANG_GERMAN} "Weiter >"
LangString button_close ${LANG_GERMAN} "Beenden"
LangString update_information ${LANG_GERMAN} "Du kannst nach einer aktuelleren Version von 'UltraStar Deluxe' suchen. Dazu wird eine Verbindung mit dem Internet hergestellt. Wurde eine aktuellere Version gefunden, kann diese anschließend installiert werden."
-LangString delete_all ${LANG_GERMAN} "Lieder, Einstellungen, Highscores und Cover auch löschen?"
+LangString delete_components ${LANG_GERMAN} "Folgende Komponenten ebenfalls entfernen:"
+LangString delete_covers ${LANG_GERMAN} "Cover?"
+LangString delete_highscores ${LANG_GERMAN} "Statistiken?"
+LangString delete_config ${LANG_GERMAN} "Konfiguration?"
+LangString delete_screenshots ${LANG_GERMAN} "Screenshots?"
+LangString delete_playlists ${LANG_GERMAN} "Playlisten?"
+LangString delete_songs ${LANG_GERMAN} "Lieder löschen? WARNUNG: ALLE Dateien im Unterordner 'songs' des Installationsverzeichnisses werden gelöscht(!)"
LangString update_check_older ${LANG_GERMAN} "Deine aktuelle Version $R0 ist veraltet. Die neue Version $1 von UltraStar Deluxe ist verfügbar. Möchtest du sie runterladen?"
LangString update_check_equal ${LANG_GERMAN} "Deine aktuelle Version $R0 ist auf dem neusten Stand.$\n$\rKein Update benötigt."
diff --git a/installer/languages/Hungarian.nsh b/installer/languages/Hungarian.nsh
index d1cc569d..198251f6 100644
--- a/installer/languages/Hungarian.nsh
+++ b/installer/languages/Hungarian.nsh
@@ -10,12 +10,20 @@ LangString oninit_installagain ${LANG_HUNGARIAN} "Biztos abban, hogy még egyszer
LangString oninit_alreadyinstalled ${LANG_HUNGARIAN} "már telepítve van"
LangString oninit_closeusdx ${LANG_HUNGARIAN} "nem eltávolítható, ha még fut! Kívánja a program bezárását?"
LangString oninit_updateusdx ${LANG_HUNGARIAN} "Kívánja-e a programot frissíteni erről a helyről:"
+LangString oninit_uninstall ${LANG_HUNGARIAN} "Do you want to uninstall the old version? (recommended)"
LangString update_connect ${LANG_HUNGARIAN} "Új verzió keresése az interneten"
LangString button_next ${LANG_HUNGARIAN} "Tovább >"
LangString button_close ${LANG_HUNGARIAN} "Bezárás"
LangString update_information ${LANG_HUNGARIAN} "Ellenőrizheti, hogy van-e új 'UltraStar Deluxe'-verzió. Ehhez internetkapcsolat szükséges. Ha van új verzió, az ezt követően telepíthető."
-LangString delete_all ${LANG_HUNGARIAN} "Töröljük a dalokat, a pontszámokat és a borítókat is?"
+
+LangString delete_components ${LANG_HUNGARIAN} "Also delete the following components:"
+LangString delete_covers ${LANG_HUNGARIAN} "Töröljük a borítókat?"
+LangString delete_highscores ${LANG_HUNGARIAN} "Töröljük a pontszámokat?"
+LangString delete_config ${LANG_HUNGARIAN} "Config?"
+LangString delete_screenshots ${LANG_HUNGARIAN} "Screenshots?"
+LangString delete_playlists ${LANG_HUNGARIAN} "Playlists?"
+LangString delete_songs ${LANG_HUNGARIAN} "Töröljük a dalokat is? WARNING: ALL files within the InstallationDir\songs folder will be removed(!)"
LangString update_check_older ${LANG_HUNGARIAN} "Az Ön gépén telepített verziónál ($R0) van már újabb ($1). Kívánja frissíteni?"
LangString update_check_equal ${LANG_HUNGARIAN} "Az Ön gépén a legfrissebb verzió ($R0) van telepítve. Frissítés nem szükséges."
diff --git a/installer/settings/files_main_install.nsh b/installer/settings/files_main_install.nsh
index df697d5e..a79d4991 100644
--- a/installer/settings/files_main_install.nsh
+++ b/installer/settings/files_main_install.nsh
@@ -2,6 +2,31 @@
; UltraStar Deluxe Installer: Main components
; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~
+; Remove old files from previous versions
+IfFileExists $INSTDIR\ScoreConverter.exe 0 +2
+Delete "$INSTDIR\ScoreConverter.exe"
+IfFileExists $INSTDIR\USdx.exe 0 +2
+Delete "$INSTDIR\USdx.exe"
+IfFileExists $INSTDIR\covers.cache 0 +2
+Delete "$INSTDIR\covers.cache"
+IfFileExists $INSTDIR\avcodec-51.dll 0 +2
+Delete "$INSTDIR\avcodec-51.dll"
+IfFileExists $INSTDIR\avformat-50.dll 0 +2
+Delete "$INSTDIR\avformat-50.dll"
+IfFileExists $INSTDIR\avutil-49.dll 0 +2
+Delete "$INSTDIR\avutil-49.dll"
+IfFileExists $INSTDIR\bass.dll 0 +2
+Delete "$INSTDIR\bass.dll"
+IfFileExists $INSTDIR\SDL.dll 0 +2
+Delete "$INSTDIR\SDL.dll"
+IfFileExists $INSTDIR\sqlite3.dll 0 +2
+Delete "$INSTDIR\sqlite3.dll"
+
+RMDir /r "$INSTDIR\Themes"
+RMDir /r "$INSTDIR\Skins"
+RMDir /r "$INSTDIR\Plugins"
+RMDir /r "$INSTDIR\Languages"
+
; Create Directories:
CreateDirectory $INSTDIR\plugins
@@ -62,4 +87,4 @@ File ..\game\covers\NoCover.jpg
SetOutPath "$INSTDIR\plugins\"
File "..\game\plugins\*.*"
-SetOutPath "$INSTDIR"
+SetOutPath "$INSTDIR" \ No newline at end of file
diff --git a/installer/settings/files_main_uninstall.nsh b/installer/settings/files_main_uninstall.nsh
index 6a081c5b..ed2259bf 100644
--- a/installer/settings/files_main_uninstall.nsh
+++ b/installer/settings/files_main_uninstall.nsh
@@ -11,6 +11,7 @@
Delete "$Desktop\Play UltraStar Deluxe.lnk"
Delete "$Desktop\UltraStar Deluxe spielen.lnk"
+ Delete "$Desktop\UltraStar Deluxe karaoke.lnk"
; Remove dirs
@@ -22,14 +23,6 @@
RMDir /r "$INSTDIR\resources"
RMDir /r "$INSTDIR\sounds"
-; Remove old files from previous versions
- IfFileExists $INSTDIR\ScoreConverter.exe 0 +2
- Delete "$INSTDIR\ScoreConverter.exe"
- IfFileExists $INSTDIR\USdx.exe 0 +2
- Delete "$INSTDIR\USdx.exe"
- IfFileExists $INSTDIR\covers.cache 0 +2
- Delete "$INSTDIR\covers.cache"
-
; Delete remaining files
Delete "$INSTDIR\ScoreConverter.exe"
Delete "$INSTDIR\${exe}.exe"
@@ -44,6 +37,7 @@
Delete "$INSTDIR\config.ini.lnk"
Delete "$INSTDIR\Error.log"
+ Delete "$INSTDIR\Benchmark.log"
Delete "$INSTDIR\cover.db"
Delete "$INSTDIR\avcodec-52.dll"
@@ -88,6 +82,7 @@
SetShellVarContext current
Delete "$APPDATA\ultrastardx\Error.log"
+ Delete "$APPDATA\ultrastardx\Benchmark.log"
Delete "$APPDATA\ultrastardx\cover.db"
StrCpy $0 "$APPDATA\ultrastardx\covers"