aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--installer/UltraStar Deluxe.nsi143
-rw-r--r--installer/languages/English.nsh10
-rw-r--r--installer/languages/German.nsh10
-rw-r--r--installer/settings/files_main_uninstall.nsh24
-rw-r--r--installer/settings/functions.nsh4
-rw-r--r--installer/settings/variables.nsh1
6 files changed, 181 insertions, 11 deletions
diff --git a/installer/UltraStar Deluxe.nsi b/installer/UltraStar Deluxe.nsi
index 78e448fc..87079682 100644
--- a/installer/UltraStar Deluxe.nsi
+++ b/installer/UltraStar Deluxe.nsi
@@ -3,8 +3,9 @@
; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~
!include MUI2.nsh
-!include "WinVer.nsh"
-!include "LogicLib.nsh"
+!include WinVer.nsh
+!include LogicLib.nsh
+!include InstallOptions.nsh
; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~
; Variables
@@ -16,7 +17,7 @@
!define path_languages ".\languages"
!define path_images "..\installerdependencies\images"
!define path_plugins "..\installerdependencies\plugins"
-!define path_gdf "..\installerdependencies\gdf"
+!define path_gdf "$WINDIR\gdf.dll"
!addPluginDir "${path_plugins}\"
@@ -33,10 +34,18 @@ SetCompressor /SOLID lzma
SetCompressorDictSize 32
SetDatablockOptimize On
+XPStyle on
+
Name "${name} V.${version}"
-Brandingtext "${name} Installation"
+Brandingtext "${name} v.${version} Installation"
OutFile "ultrastardx-${version}-installer-full.exe"
+InstallDir "$PROGRAMFILES\${name}"
+
+; Windows Vista:
+
+RequestExecutionLevel user
+
; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~
; Interface Settings
; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~
@@ -97,6 +106,10 @@ OutFile "ultrastardx-${version}-installer-full.exe"
!define MUI_FINISHPAGE_LINK "$(page_finish_linktxt)"
!define MUI_FINISHPAGE_LINK_LOCATION "${homepage}"
+!define MUI_FINISHPAGE_SHOWREADME
+!define MUI_FINISHPAGE_SHOWREADME_TEXT $(page_finish_desktop)
+!define MUI_FINISHPAGE_SHOWREADME_FUNCTION CreateDesktopShortCuts
+
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
@@ -122,6 +135,81 @@ var ICONS_GROUP
!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
!insertmacro MUI_PAGE_INSTFILES
+
+; USDX Settings Page
+
+Page custom Settings
+
+Function Settings
+
+!insertmacro MUI_HEADER_TEXT " " "$(page_settings_subtitle)"
+
+ !insertmacro INSTALLOPTIONS_DISPLAY "Settings-$LANGUAGE"
+
+; Get all the variables:
+
+var /GLOBAL fullscreen
+var /GLOBAL language2
+var /GLOBAL resolution
+var /GLOBAL tabs
+var /GLOBAL animations
+
+ !insertmacro INSTALLOPTIONS_READ $fullscreen "Settings-$LANGUAGE" "Field 6" "State"
+ !insertmacro INSTALLOPTIONS_READ $language2 "Settings-$LANGUAGE" "Field 7" "State"
+ !insertmacro INSTALLOPTIONS_READ $resolution "Settings-$LANGUAGE" "Field 8" "State"
+ !insertmacro INSTALLOPTIONS_READ $tabs "Settings-$LANGUAGE" "Field 9" "State"
+ !insertmacro INSTALLOPTIONS_READ $animations "Settings-$LANGUAGE" "Field 10" "State"
+
+; Write all variables to config.ini
+
+FileOpen $0 '$INSTDIR\config.ini' w
+FileWrite $0 '[Game]$\r$\n'
+FileClose $0
+
+${If} $language2 != ""
+
+${WriteToConfig} "Language=$language2$\r$\n" "$INSTDIR\config.ini"
+
+${EndIf}
+
+${If} $tabs != ""
+
+${WriteToConfig} "Tabs=$tabs$\r$\n" "$INSTDIR\config.ini"
+
+${EndIf}
+
+${WriteToConfig} "[Graphics]$\r$\n" "$INSTDIR\config.ini"
+
+${If} $fullscreen != ""
+
+${WriteToConfig} "FullScreen=$fullscreen$\r$\n" "$INSTDIR\config.ini"
+
+${EndIf}
+
+${If} $resolution != ""
+
+${WriteToConfig} "Resolution=$resolution$\r$\n" "$INSTDIR\config.ini"
+
+${EndIf}
+
+${WriteToConfig} "[Advanced]$\r$\n" "$INSTDIR\config.ini"
+
+; Animations On / Off Tasks
+
+${If} $animations == "Off"
+
+${WriteToConfig} "LoadAnimation=Off$\r$\n" "$INSTDIR\config.ini"
+
+${WriteToConfig} "EffectSing=Off$\r$\n" "$INSTDIR\config.ini"
+
+${WriteToConfig} "ScreenFade=Off$\r$\n" "$INSTDIR\config.ini"
+
+${EndIf}
+
+
+FunctionEnd ; Settings page End
+
+
!insertmacro MUI_PAGE_FINISH
; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~
@@ -160,7 +248,7 @@ SetOutPath "$INSTDIR"
CreateDirectory "${name}"
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
- CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\${name}.lnk" "$INSTDIR\${exe}.exe"
+ CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\$(sm_shortcut).lnk" "$INSTDIR\${exe}.exe"
; CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\$(sm_documentation).lnk" "$INSTDIR\documentation.pdf"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\$(sm_website).lnk" "http://www.ultrastardeluxe.org/"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\$(sm_readme).lnk" "$INSTDIR\ReadMe.txt"
@@ -191,7 +279,7 @@ CreateShortcut "$APPDATA\Microsoft\Windows\GameExplorer\$0\PlayTasks\3\Fullscree
CreateDirectory $APPDATA\Microsoft\Windows\GameExplorer\$0\PlayTasks\3
CreateShortcut "$APPDATA\Microsoft\Windows\GameExplorer\$0\PlayTasks\3\Dual Screen.lnk" \
- "$INSTDIR\${exe}.exe" "-Screen 2"
+ "$INSTDIR\${exe}.exe" "-Screens 2"
CreateDirectory $APPDATA\Microsoft\Windows\GameExplorer\$0\SupportTasks\0
CreateShortcut "$APPDATA\Microsoft\Windows\GameExplorer\$0\SupportTasks\0\Support Forum.lnk" \
@@ -466,6 +554,7 @@ SectionEnd
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+
!insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
!insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)
!insertmacro MUI_DESCRIPTION_TEXT ${Section3} $(DESC_Section3)
@@ -491,17 +580,55 @@ SectionEnd
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "German"
-!include "${path_languages}\English.nsh"
-!include "${path_languages}\German.nsh"
+!insertmacro MUI_RESERVEFILE_LANGDLL
+
+!include "${path_languages}\*.nsh"
Function .onInit
+ System::Call 'kernel32::CreateMutexA(i 0, i 0, t "USdx Installer.exe") ?e'
+
+ Pop $R0
+
+ StrCmp $R0 0 +3
+ MessageBox MB_OK|MB_ICONEXCLAMATION $(oninit_running)
+ Abort
+
+ ReadRegStr $R0 HKLM \
+ "Software\Microsoft\Windows\CurrentVersion\Uninstall\${name}" \
+ "UninstallString"
+ StrCmp $R0 "" done
+
+ MessageBox MB_YESNO|MB_ICONEXCLAMATION \
+ "${name} $(oninit_alreadyinstalled). $\n$\n $(oninit_installagain)" \
+ IDYES done
+ Abort
+
+
+done:
+
!insertmacro MUI_LANGDLL_DISPLAY
+ !insertmacro INSTALLOPTIONS_EXTRACT_AS ".\settings\settings-1031.ini" "Settings-1031"
+ !insertmacro INSTALLOPTIONS_EXTRACT_AS ".\settings\settings-1033.ini" "Settings-1033"
+
FunctionEnd
Function un.onInit
+ ${nsProcess::FindProcess} "USdx.exe" $R0
+ StrCmp $R0 0 0 +2
+ MessageBox MB_YESNO|MB_ICONEXCLAMATION '$(oninit_closeusdx)' IDYES closeit IDNO end
+
+ closeit:
+ ${nsProcess::KillProcess} "USdx.exe" $R0
+ goto continue
+
+ end:
+ ${nsProcess::Unload}
+ Abort
+
+ continue:
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd
diff --git a/installer/languages/English.nsh b/installer/languages/English.nsh
index f0b9d1dd..35362675 100644
--- a/installer/languages/English.nsh
+++ b/installer/languages/English.nsh
@@ -4,6 +4,10 @@
LangString abort_install ${LANG_ENGLISH} "Are you sure to abort Installation?"
LangString abort_uninstall ${LANG_ENGLISH} "Are you sure to abort UnInstallation?"
+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?"
; Welcome Page:
@@ -14,10 +18,16 @@ LangString page_welcome_txt ${LANG_ENGLISH} "This wizard will guide you through
LangString page_components_info ${LANG_ENGLISH} "Hover the component to get details"
+; Custom Page
+
+LangString page_settings_fullscreen ${LANG_ENGLISH} "Fullscreen Mode"
+LangString page_settings_subtitle ${LANG_ENGLISH} "Specify your favorite settings for UltraStar Deluxe."
+
; Finish Page:
LangString page_finish_txt ${LANG_ENGLISH} "UltraStar Deluxe was installed successfully on you system.$\n$\r$\n$\rVisit out project website to get latest news and updates."
LangString page_finish_linktxt ${LANG_ENGLISH} "Project website"
+LangString page_finish_desktop ${LANG_ENGLISH} "Create Desktop Shortcut?"
; Start Menu and Shortcuts
diff --git a/installer/languages/German.nsh b/installer/languages/German.nsh
index 7ed7b422..853b01b3 100644
--- a/installer/languages/German.nsh
+++ b/installer/languages/German.nsh
@@ -4,6 +4,10 @@
LangString abort_install ${LANG_GERMAN} "Wollen Sie die Installation wirklich abbrechen?"
LangString abort_uninstall ${LANG_GERMAN} "Wollen Sie die Deinstallation wirklich abbrechen?"
+LangString oninit_running ${LANG_GERMAN} "Die Installation wird bereits ausgeführt."
+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?"
; Welcome Page:
@@ -14,10 +18,16 @@ LangString page_welcome_txt ${LANG_GERMAN} "Dieser Assistent wird Sie durch die
LangString page_components_info ${LANG_GERMAN} "Schieben Sie den Mauszeiger über die Komponente um Details einzusehen"
+; Custom Page
+
+LangString page_settings_fullscreen ${LANG_GERMAN} "Vollbild Modus:"
+LangString page_settings_subtitle ${LANG_GERMAN} "Lege deine favorisierten Einstellungen für UltraStar Deluxe fest."
+
; Finish Page:
LangString page_finish_txt ${LANG_GERMAN} "UltraStar Deluxe wurde erfolgreich auf Ihrem System installiert.$\n$\r$\n$\rBesuchen Sie unsere Projektwebseite um die neusten Updates und News zu erhalten."
LangString page_finish_linktxt ${LANG_GERMAN} "Projektwebseite"
+LangString page_finish_desktop ${LANG_GERMAN} "Verknüpfung auf dem Desktop erstellen?"
; Start Menu and Shortcuts
diff --git a/installer/settings/files_main_uninstall.nsh b/installer/settings/files_main_uninstall.nsh
index f6f4a1c8..882fba9a 100644
--- a/installer/settings/files_main_uninstall.nsh
+++ b/installer/settings/files_main_uninstall.nsh
@@ -2,3 +2,27 @@
; UltraStar Deluxe Installer - Version 1.1: Main components
; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~
+
+; Delete created Icons in startmenu
+
+ SetShellVarContext all
+
+ Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
+ Delete "$SMPROGRAMS\$ICONS_GROUP\Deinstallieren.lnk"
+ Delete "$SMPROGRAMS\$ICONS_GROUP\Website.lnk"
+ Delete "$SMPROGRAMS\$ICONS_GROUP\Internetseite.lnk"
+ Delete "$SMPROGRAMS\$ICONS_GROUP\UltraStar Deluxe spielen.lnk"
+ Delete "$SMPROGRAMS\$ICONS_GROUP\Play UltraStar Deluxe.lnk"
+ Delete "$SMPROGRAMS\$ICONS_GROUP\Readme.lnk"
+ Delete "$SMPROGRAMS\$ICONS_GROUP\Lies mich.lnk"
+ Delete "$SMPROGRAMS\$ICONS_GROUP\Lizenz.lnk"
+ Delete "$SMPROGRAMS\$ICONS_GROUP\License.lnk"
+
+; Delete created Icon on Desktop
+
+Delete "$Desktop\Play UltraStar Deluxe.lnk"
+Delete "$Desktop\UltraStar Deluxe spielen.lnk"
+
+StrCpy $0 "$SMPROGRAMS\$ICONS_GROUP"
+Call un.DeleteIfEmpty
+
diff --git a/installer/settings/functions.nsh b/installer/settings/functions.nsh
index 386def41..8345c4cc 100644
--- a/installer/settings/functions.nsh
+++ b/installer/settings/functions.nsh
@@ -1,5 +1,3 @@
-!define exe2 "USdx"
-
; Creates Desktop Shortcut(s) if
; checked on Finish Page
@@ -7,7 +5,7 @@ Function CreateDesktopShortCuts
SetOutPath "$INSTDIR"
-CreateShortcut "$Desktop\$(sm_shortcut).lnk" "$INSTDIR\${exe2}.exe"
+CreateShortcut "$Desktop\$(sm_shortcut).lnk" "$INSTDIR\USdx.exe"
FunctionEnd
diff --git a/installer/settings/variables.nsh b/installer/settings/variables.nsh
index 78f9d185..7b53bdbf 100644
--- a/installer/settings/variables.nsh
+++ b/installer/settings/variables.nsh
@@ -27,6 +27,7 @@
; Registry for Start menu entries:
+!define PRODUCT_NAME "${name}"
!define PRODUCT_VERSION "${version}"
!define PRODUCT_PUBLISHER "${publisher}"
!define PRODUCT_WEB_SITE "${homepage}"