More helpful fixes and touchups from Cinder

This commit is contained in:
Inusaito Sayori
2014-03-27 20:10:06 -04:00
parent 2af2e37dcd
commit 70e92a1cea
12 changed files with 39 additions and 51 deletions

View File

@@ -31,6 +31,7 @@ RequestExecutionLevel admin ; on Vista we must be admin because we write to Prog
;; !define INSTNAME "SecondLife%(grid_caps)s"
;; !define SHORTCUT "Second Life (%(grid_caps)s)"
;; !define URLNAME "secondlife%(grid)s"
;; !define AUTHOR "Linden Research, Inc."
;; !define UNINSTALL_SETTINGS 1
%%GRID_VARS%%
@@ -76,8 +77,8 @@ Name "${VIEWERNAME}"
SubCaption 0 $(LicenseSubTitleSetup) ; override "license agreement" text
BrandingText "Prepare to Implode!" ; bottom of window text
Icon %%SOURCE%%\installers\windows\install_icon_singularity.ico
UninstallIcon %%SOURCE%%\installers\windows\uninstall_icon_singularity.ico
Icon %%SOURCE%%\installers\windows\${INSTALL_ICON}
UninstallIcon %%SOURCE%%\installers\windows\${UNINSTALL_ICON}
WindowIcon off ; show our icon in left corner
# BGGradient 9090b0 000000 notext
CRCCheck on ; make sure CRC is OK
@@ -89,7 +90,7 @@ SetOverwrite on ; stomp files by default
AutoCloseWindow true ; after all files install, close window
InstallDir "%%INSTALLDIR%%"
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" ""
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\${AUTHOR}\${INSTNAME}" ""
DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -191,7 +192,7 @@ FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function CheckIfAlreadyCurrent
Push $0
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version"
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\${AUTHOR}\$INSTPROG" "Version"
StrCmp $0 ${VERSION_LONG} 0 DONE
MessageBox MB_OKCANCEL $(CheckIfCurrentMB) /SD IDOK IDOK DONE
Quit
@@ -550,7 +551,7 @@ SetShellVarContext all
Call un.CloseSecondLife
; Clean up registry keys and subkeys (these should all be !defines somewhere)
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\${AUTHOR}\$INSTPROG"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG"
; Clean up shortcuts
@@ -693,7 +694,7 @@ lbl_check_silent:
; If we currently have a version of SL installed, default to the language of that install
; Otherwise don't change $LANGUAGE and it will default to the OS UI language.
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage"
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\${AUTHOR}\${INSTNAME}" "InstallerLanguage"
IfErrors lbl_build_menu
StrCpy $LANGUAGE $0
@@ -711,7 +712,7 @@ lbl_build_menu:
StrCpy $LANGUAGE $0
; save language in registry
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" $LANGUAGE
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\${AUTHOR}\${INSTNAME}" "InstallerLanguage" $LANGUAGE
lbl_return:
Pop $0
Return
@@ -721,7 +722,7 @@ FunctionEnd
Function un.onInit
; read language from registry and set for uninstaller
; Key will be removed on successful uninstall
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage"
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\${AUTHOR}\${INSTNAME}" "InstallerLanguage"
IfErrors lbl_end
StrCpy $LANGUAGE $0
lbl_end:
@@ -810,11 +811,11 @@ CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Write registry
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$INSTDIR"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Flags" "$INSTFLAGS"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\${AUTHOR}\$INSTPROG" "" "$INSTDIR"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\${AUTHOR}\$INSTPROG" "Version" "${VERSION_LONG}"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\${AUTHOR}\$INSTPROG" "Flags" "$INSTFLAGS"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\${AUTHOR}\$INSTPROG" "Shortcut" "$INSTSHORTCUT"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\${AUTHOR}\$INSTPROG" "Exe" "$INSTEXE"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG (remove only)"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe"'