aboutsummaryrefslogtreecommitdiffstats
path: root/installer/Update.nsi
diff options
context:
space:
mode:
authorcanni0 <canni0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-01-10 23:29:25 +0000
committercanni0 <canni0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-01-10 23:29:25 +0000
commit8eb1dca0ac1974f13266bf4645c0cb8913d58d9d (patch)
tree7afcb46b447a458536cb24a21c33a6d02b99ea0b /installer/Update.nsi
parentda957735cf8f37e6bda903626e826c4993f37f8a (diff)
downloadusdx-8eb1dca0ac1974f13266bf4645c0cb8913d58d9d.tar.gz
usdx-8eb1dca0ac1974f13266bf4645c0cb8913d58d9d.tar.xz
usdx-8eb1dca0ac1974f13266bf4645c0cb8913d58d9d.zip
- 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
Diffstat (limited to 'installer/Update.nsi')
-rw-r--r--installer/Update.nsi53
1 files changed, 46 insertions, 7 deletions
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
; ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~ ~+~