From da957735cf8f37e6bda903626e826c4993f37f8a Mon Sep 17 00:00:00 2001 From: canni0 Date: Sat, 10 Jan 2009 21:57:04 +0000 Subject: - Added: Check online for USdx Updates - Changed: Installer Icon git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1553 b956fd51-792f-4845-bead-9b4dfca2ff2c --- installer/Update.nsi | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 installer/Update.nsi (limited to 'installer/Update.nsi') diff --git a/installer/Update.nsi b/installer/Update.nsi new file mode 100644 index 00000000..6da20f5d --- /dev/null +++ b/installer/Update.nsi @@ -0,0 +1,176 @@ +; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ +; UltraStar Deluxe Installer: Update +; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ + +!include MUI2.nsh +!include WinVer.nsh +!include LogicLib.nsh +!include nsDialogs.nsh + +; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ +; Variables +; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ + +; Installer Paths: + +!define path_settings ".\settings" +!define path_languages ".\languages" +!define path_images "..\installerdependencies\images" +!define path_plugins "..\installerdependencies\plugins" +!define path_gdf "$WINDIR\gdf.dll" + +!addPluginDir "${path_plugins}\" + +!include "${path_settings}\variables.nsh" +!include "${path_settings}\GameExplorer.nsh" +!include "${path_settings}\functions.nsh" + +; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ +; Export Settings +; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ + +SetCompress Auto +SetCompressor /SOLID lzma +SetCompressorDictSize 32 +SetDatablockOptimize On + +Var /GLOBAL CHECKBOX +Var /GLOBAL label_update_information +Var /GLOBAL checkbox_state + +XPStyle on + +Name "${name} v.${version} - Update" +Brandingtext "${name} v.${version} Update" +OutFile "ultrastardx-update.exe" + +InstallDir "$PROGRAMFILES\${name}" + +; Windows Vista: + +RequestExecutionLevel user + +; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ +; Interface Settings +; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ + +; Icons: + +!define MUI_ICON "${path_images}\${img_install}" +!define MUI_UNICON "${path_images}\${img_uninstall}" + +; Header and Side Images: + +!define MUI_HEADERIMAGE +!define MUI_HEADERIMAGE_BITMAP "${path_images}\${img_header}" +!define MUI_HEADERIMAGE_UNBITMAP "${path_images}\${img_header}" + +!define MUI_WELCOMEFINISHPAGE_BITMAP "${path_images}\${img_side}" +!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${path_images}\${img_side}" + +; Abort Warnings: + +!define MUI_ABORTWARNING +!define MUI_ABORTWARNING_TEXT "$(abort_install)" +!define MUI_ABORTWARNING_CANCEL_DEFAULT + +!define MUI_UNABORTWARNING +!define MUI_UNABORTWARNING_TEXT "$(abort_uninstall)" +!define MUI_UNABORTWARNING_CANCEL_DEFAULT + +; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ +; Pages Installation Routine Settings +; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ + +; Welcome Page: + +!define MUI_WELCOMEPAGE_TITLE_3LINES +!define MUI_WELCOMEPAGE_TITLE "$(page_welcome_title_update)" +!define MUI_WELCOMEPAGE_TEXT "$(page_welcome_txt_update)" + +; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ +; Pages Installation Routine +; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ + +!insertmacro MUI_PAGE_WELCOME + +; USDX Update Page + +Page custom Update Download + +Function Update + +nsDialogs::Create /NOUNLOAD 1018 + + Pop $0 + + ${NSD_CreateCheckbox} 0 -150 100% 8u "$(update_connect)" + Pop $CHECKBOX + GetFunctionAddress $0 OnCheckbox + nsDialogs::OnClick /NOUNLOAD $CHECKBOX $0 + + ${NSD_CreateLabel} 0 0 100% 30u "$(update_information)" + Pop $label_update_information + +nsDialogs::Show + + +FunctionEnd ; Update page End + +Function Download + +${NSD_GetState} $CHECKBOX $checkbox_state + +${If} $checkbox_state == "1" + +NSISdl::download_quiet /TIMEOUT=30000 http://ultrastardx.svn.sourceforge.net/viewvc/ultrastardx/trunk/installer/version.txt $TEMP\version.txt + +FileOpen $4 "$TEMP\version.txt" r +FileRead $4 $1 + +ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${name}" 'DisplayVersion' + + +${VersionCompare} "$R0" "$1" $R1 + +MessageBox MB_OK "$R1. R0 = $R0 und R1 = $1" + + + +${Else} + + + +${EndIf} + +FunctionEnd + +; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ +; UPDATE (Section 1) +; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ + +Section $(name_section1) Section1 + SectionIn RO + SetOutPath $INSTDIR + SetOverwrite try + +SectionEnd + +; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ +; Language Support +; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ + +!insertmacro MUI_LANGUAGE "English" +!insertmacro MUI_LANGUAGE "German" + +!insertmacro MUI_RESERVEFILE_LANGDLL + +!include "${path_languages}\*.nsh" + +Function .onInit + + !insertmacro MUI_LANGDLL_DISPLAY + + + +FunctionEnd -- cgit v1.2.3 From 8eb1dca0ac1974f13266bf4645c0cb8913d58d9d Mon Sep 17 00:00:00 2001 From: canni0 Date: Sat, 10 Jan 2009 23:29:25 +0000 Subject: - Update: Changed routines for online update check - Fixed: Added missing Language Strings git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1554 b956fd51-792f-4845-bead-9b4dfca2ff2c --- installer/Update.nsi | 53 +++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 7 deletions(-) (limited to 'installer/Update.nsi') diff --git a/installer/Update.nsi b/installer/Update.nsi index 6da20f5d..b8e5a458 100644 --- a/installer/Update.nsi +++ b/installer/Update.nsi @@ -40,8 +40,8 @@ Var /GLOBAL checkbox_state XPStyle on -Name "${name} v.${version} - Update" -Brandingtext "${name} v.${version} Update" +Name "${name} - Update" +Brandingtext "${name} Update" OutFile "ultrastardx-update.exe" InstallDir "$PROGRAMFILES\${name}" @@ -123,26 +123,65 @@ ${NSD_GetState} $CHECKBOX $checkbox_state ${If} $checkbox_state == "1" -NSISdl::download_quiet /TIMEOUT=30000 http://ultrastardx.svn.sourceforge.net/viewvc/ultrastardx/trunk/installer/version.txt $TEMP\version.txt +NSISdl::download /TIMEOUT=50000 http://ultrastardeluxe.xtremeweb-hosting.net/version.txt $TEMP\version.txt -FileOpen $4 "$TEMP\version.txt" r -FileRead $4 $1 +Push 1 +Push "$TEMP\version.txt" + Call ReadFileLine +Pop $1 ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${name}" 'DisplayVersion' - ${VersionCompare} "$R0" "$1" $R1 -MessageBox MB_OK "$R1. R0 = $R0 und R1 = $1" +${If} $R1 == "0" + +messageBox MB_OK|MB_ICONINFORMATION "$(update_check_equal)" + +${Else} + ${If} $R1 == "1" + + IfFileExists $TEMP\version.txt FileExists + SetErrors + Goto Failed + + FileExists: + messageBox MB_OK|MB_ICONINFORMATION "$(update_check_newer)" + + ${Else} + ${If} $R1 == "2" + messageBox MB_YESNO|MB_ICONQUESTION \ + "$(update_check_older)" IDNO +6 + Push 2 + Push "$TEMP\version.txt" + Call ReadFileLine + Pop $2 + ExecShell Open $2 + + ${Else} + + Failed: + messageBox MB_YESNO|MB_ICONQUESTION \ + "$(update_check_failed)" IDNO +2 + + ExecShell Open http://www.ultrastardeluxe.org + + ${EndIf} + ${EndIf} +${EndIf} ${Else} +; If checkbox_state = 0 ${EndIf} +Delete "$TEMP\version.txt" + + FunctionEnd ; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ -- cgit v1.2.3 From 81bd09278aeffe40bf73e3ee4c6613cbeada6859 Mon Sep 17 00:00:00 2001 From: canni0 Date: Sat, 25 Apr 2009 16:05:33 +0000 Subject: - updated portugese (thx to zup3r_vock) and croation language - changed installer timeouts git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1696 b956fd51-792f-4845-bead-9b4dfca2ff2c --- installer/Update.nsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'installer/Update.nsi') diff --git a/installer/Update.nsi b/installer/Update.nsi index b8e5a458..e916d3e9 100644 --- a/installer/Update.nsi +++ b/installer/Update.nsi @@ -46,9 +46,9 @@ OutFile "ultrastardx-update.exe" InstallDir "$PROGRAMFILES\${name}" -; Windows Vista: +; Windows Vista / Windows 7: -RequestExecutionLevel user +RequestExecutionLevel admin ; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ; Interface Settings -- cgit v1.2.3