aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--installer/UltraStar Deluxe.nsi35
-rw-r--r--installer/languages/English.nsh1
-rw-r--r--installer/languages/German.nsh1
-rw-r--r--installer/settings/files_opt_uninstall.nsh4
-rw-r--r--installer/settings/variables.nsh3
5 files changed, 29 insertions, 15 deletions
diff --git a/installer/UltraStar Deluxe.nsi b/installer/UltraStar Deluxe.nsi
index 87079682..882a1c9a 100644
--- a/installer/UltraStar Deluxe.nsi
+++ b/installer/UltraStar Deluxe.nsi
@@ -36,7 +36,7 @@ SetDatablockOptimize On
XPStyle on
-Name "${name} V.${version}"
+Name "${name} v.${version}"
Brandingtext "${name} v.${version} Installation"
OutFile "ultrastardx-${version}-installer-full.exe"
@@ -533,7 +533,6 @@ Section Uninstall
!insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
- !include "${path_settings}\files_opt_uninstall.nsh"
!include "${path_settings}\files_main_uninstall.nsh"
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
@@ -546,6 +545,8 @@ ${GameExplorer_RemoveGame} $0
${EndIf}
+
+
SectionEnd
; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~
@@ -586,6 +587,10 @@ SectionEnd
Function .onInit
+var /GLOBAL version
+StrCpy $version "1.1a"
+
+
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "USdx Installer.exe") ?e'
Pop $R0
@@ -594,16 +599,26 @@ Function .onInit
MessageBox MB_OK|MB_ICONEXCLAMATION $(oninit_running)
Abort
- ReadRegStr $R0 HKLM \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\${name}" \
- "UninstallString"
- StrCmp $R0 "" done
+ ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${name}" 'DisplayVersion'
- MessageBox MB_YESNO|MB_ICONEXCLAMATION \
- "${name} $(oninit_alreadyinstalled). $\n$\n $(oninit_installagain)" \
- IDYES done
- Abort
+ ${If} $R0 == $version
+ MessageBox MB_YESNO|MB_ICONEXCLAMATION \
+ "${name} v.$R0 $(oninit_alreadyinstalled). $\n$\n $(oninit_installagain)" \
+ IDYES done
+ Abort
+ ${EndIf}
+ 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
+ Abort
+ ${EndIf}
done:
diff --git a/installer/languages/English.nsh b/installer/languages/English.nsh
index 35362675..2b6f17c3 100644
--- a/installer/languages/English.nsh
+++ b/installer/languages/English.nsh
@@ -8,6 +8,7 @@ LangString oninit_running ${LANG_ENGLISH} "The installer is already running."
LangString oninit_installagain ${LANG_ENGLISH} "Are you sure you want to install it again?"
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:"
; Welcome Page:
diff --git a/installer/languages/German.nsh b/installer/languages/German.nsh
index 853b01b3..b536eb0e 100644
--- a/installer/languages/German.nsh
+++ b/installer/languages/German.nsh
@@ -8,6 +8,7 @@ LangString oninit_running ${LANG_GERMAN} "Die Installation wird bereits ausgefüh
LangString oninit_installagain ${LANG_GERMAN} "Sind Sie sicher, dass Sie es erneut installieren möchten?"
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öchten Sie das Programm aktualisieren von"
; Welcome Page:
diff --git a/installer/settings/files_opt_uninstall.nsh b/installer/settings/files_opt_uninstall.nsh
deleted file mode 100644
index f6f4a1c8..00000000
--- a/installer/settings/files_opt_uninstall.nsh
+++ /dev/null
@@ -1,4 +0,0 @@
-; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~
-; UltraStar Deluxe Installer - Version 1.1: Main components
-; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~
-
diff --git a/installer/settings/variables.nsh b/installer/settings/variables.nsh
index 7b53bdbf..64df51f1 100644
--- a/installer/settings/variables.nsh
+++ b/installer/settings/variables.nsh
@@ -4,7 +4,8 @@
; Product Information:
-!define version "1.1 Alpha"
+!define version "1.1a" ; Make sure version is also set in onInit
+
!define name "UltraStar Deluxe"
!define publisher "USDX Team"