diff options
26 files changed, 240 insertions, 615 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 07fa71ce38..72e16ea70c 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3595,6 +3595,17 @@        <key>Value</key>        <integer>0</integer>      </map> +    <key>ForceMandatoryUpdate</key> +    <map> +      <key>Comment</key> +      <string>For QA: On next startup, forces the auto-updater to run</string> +      <key>Persist</key> +      <integer>1</integer> +      <key>Type</key> +      <string>Boolean</string> +      <key>Value</key> +      <integer>0</integer> +    </map>      <key>ForwardBtnRect</key>      <map>        <key>Comment</key> @@ -4178,7 +4189,7 @@        <key>Type</key>        <string>String</string>        <key>Value</key> -      <string>https://wiki.secondlife.com/wiki/[LSL_STRING]</string> +      <string>http://wiki.secondlife.com/wiki/[LSL_STRING]</string>      </map>      <key>LagMeterShrunk</key>      <map> diff --git a/indra/newview/installers/windows/FILES_ARE_UNICODE_UTF-16LE.txt b/indra/newview/installers/windows/FILES_ARE_UNICODE_UTF-16LE.txt new file mode 100644 index 0000000000..185c0180fb --- /dev/null +++ b/indra/newview/installers/windows/FILES_ARE_UNICODE_UTF-16LE.txt @@ -0,0 +1,6 @@ +The language files in this directory are Unicode (Little-Endian) format, also known as UTF-16 LE.
 +
 +This is the format required for NSIS Unicode.  See http://www.scratchpaper.com/ for details.
 +
 +James Cook
 +September 2008
 diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index c79550774c..01bd98f87c 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -1,30 +1,22 @@  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ;; secondlife setup.nsi -;; Copyright 2004-2007, Linden Research, Inc. -;; For info, see http://www.nullsoft.com/free/nsis/ +;; Copyright 2004-2008, Linden Research, Inc. +;; +;; NSIS Unicode 2.38.1 or higher required +;; http://www.scratchpaper.com/  ;; -;; NSIS 2.22 or higher required  ;; Author: James Cook, Don Kjer, Callum Prentice  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Detect NSIS compiler version -!define "NSIS${NSIS_VERSION}" -!ifdef "NSISv2.02" | "NSISv2.03" | "NSISv2.04" | "NSISv2.05" | "NSISv2.06" -    ;; before 2.07 defaulted lzma to solid (whole file) -    SetCompressor lzma -!else -    ;; after 2.07 required /solid for whole file compression -    SetCompressor /solid lzma -!endif - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ;; Compiler flags  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  SetOverwrite on				; overwrite files  SetCompress auto			; compress iff saves space +SetCompressor /solid lzma	; compress whole installer as one block  SetDatablockOptimize off	; only saves us 0.1%, not worth it  XPStyle on                  ; add an XP manifest to the installer +RequestExecutionLevel admin	; on Vista we must be admin because we write to Program Files  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ;;; Project flags @@ -41,9 +33,22 @@ XPStyle on                  ; add an XP manifest to the installer  !include "%%SOURCE%%\installers\windows\lang_en-us.nsi"  !include "%%SOURCE%%\installers\windows\lang_ja.nsi"  !include "%%SOURCE%%\installers\windows\lang_ko.nsi" +!include "%%SOURCE%%\installers\windows\lang_pt-br.nsi" +!include "%%SOURCE%%\installers\windows\lang_fr.nsi" +!include "%%SOURCE%%\installers\windows\lang_es.nsi" +!include "%%SOURCE%%\installers\windows\lang_it.nsi" +!include "%%SOURCE%%\installers\windows\lang_nl.nsi" +!include "%%SOURCE%%\installers\windows\lang_zh.nsi"  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ;; Tweak for different servers/builds (this placeholder is replaced by viewer_manifest.py) +;; For example: +;; !define INSTFLAGS "%(flags)s" +;; !define INSTNAME   "SecondLife%(grid_caps)s" +;; !define SHORTCUT   "Second Life (%(grid_caps)s)" +;; !define URLNAME   "secondlife%(grid)s" +;; !define UNINSTALL_SETTINGS 1 +  %%GRID_VARS%%  Name ${INSTNAME} @@ -63,11 +68,7 @@ AutoCloseWindow true					; after all files install, close window  InstallDir "$PROGRAMFILES\${INSTNAME}"  InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" -!ifdef UPDATE -DirText $(DirectoryChooseTitle) $(DirectoryChooseUpdate) -!else  DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) -!endif  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -76,145 +77,41 @@ DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup)  Var INSTPROG  Var INSTEXE  Var INSTFLAGS -Var LANGFLAGS  Var INSTSHORTCUT +Var COMMANDLINE         ; command line passed to this installer, set in .onInit -;;; Function definitions should go before file includes, because the NSIS package -;;; is a single stream of bytecodes + file data.  So if your function definitions are at -;;; the end of the file it has to decompress the whole thing before it can call a function. JC - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; PostInstallExe -; This just runs any post installation scripts. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function PostInstallExe -push $0 -  ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "PostInstallExe" -  ;MessageBox MB_OK '$0' -  ExecWait '$0' -pop $0 -FunctionEnd +;;; Function definitions should go before file includes, because calls to +;;; DLLs like LangDLL trigger an implicit file include, so if that call is at +;;; the end of this script NSIS has to decompress the whole installer before  +;;; it can call the DLL function. JC -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; CheckStartupParameters -; Sets INSTFLAGS, INSTPROG, and INSTEXE. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function CheckStartupParams -push $0 -push $R0 - -  ; Look for a registry entry with info about where to update. -  Call GetProgramName -  pop $R0 -  StrCpy $INSTPROG "$R0" -  StrCpy $INSTEXE "$R0.exe" - -  ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" -  ; If key doesn't exist, skip install -  IfErrors ABORT -  StrCpy $INSTDIR "$0" - -  ; We now have a directory to install to.  Get the startup parameters and shortcut as well. -  ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Flags" -  IfErrors +2 -  StrCpy $INSTFLAGS "$0" -  ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" -  IfErrors +2 -  StrCpy $INSTSHORTCUT "$0" -  ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" -  IfErrors +2 -  StrCpy $INSTEXE "$0" -  Goto FINISHED - -ABORT: -  MessageBox MB_OK $(CheckStartupParamsMB) -  Quit - -FINISHED: -  ;MessageBox MB_OK "INSTPROG: $INSTPROG, INSTEXE: $INSTEXE, INSTFLAGS: $INSTFLAGS" -pop $R0 -pop $0 -FunctionEnd - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function un.CheckStartupParams -push $0 -push $R0 - -  ; Look for a registry entry with info about where to update. -  Call un.GetProgramName -  pop $R0 -  StrCpy $INSTPROG "$R0" -  StrCpy $INSTEXE "$R0.exe" - -  ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" -  ; If key doesn't exist, skip install -  IfErrors ABORT -  StrCpy $INSTDIR "$0" - -  ; We now have a directory to install to.  Get the startup parameters and shortcut as well. -  ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Flags" -  IfErrors +2 -  StrCpy $INSTFLAGS "$0" -  ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" -  IfErrors +2 -  StrCpy $INSTSHORTCUT "$0" -  ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" -  IfErrors +2 -  StrCpy $INSTEXE "$0" -  Goto FINISHED - -ABORT: -  MessageBox MB_OK $(CheckStartupParamsMB) -  Quit - -FINISHED: -  ;MessageBox MB_OK "INSTPROG: $INSTPROG, INSTEXE: $INSTEXE, INSTFLAGS: $INSTFLAGS" -pop $R0 -pop $0 -FunctionEnd +!include "FileFunc.nsh"     ; For GetParameters, GetOptions +!insertmacro GetParameters +!insertmacro GetOptions  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; After install completes, offer readme file +;;; After install completes, launch app  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  Function .onInstSuccess -	MessageBox MB_YESNO \ -	$(InstSuccesssQuestion) /SD IDYES IDNO NoReadme -		; Assumes SetOutPath $INSTDIR -		Exec '"$INSTDIR\$INSTEXE" $INSTFLAGS' -	NoReadme: +    Push $R0	# Option value, unused +    ${GetOptions} $COMMANDLINE "/AUTOSTART" $R0 +    # If parameter was there (no error) just launch +    # Otherwise ask +    IfErrors label_ask_launch label_launch +     +label_ask_launch: +    # Don't launch by default when silent +    IfSilent label_no_launch +	MessageBox MB_YESNO $(InstSuccesssQuestion) \ +        IDYES label_launch IDNO label_no_launch +         +label_launch: +	# Assumes SetOutPath $INSTDIR +	Exec '"$INSTDIR\$INSTEXE" $INSTFLAGS' +label_no_launch: +	Pop $R0  FunctionEnd -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Remove old NSIS version. Modifies no variables. -; Does NOT delete the LindenWorld directory, or any -; user files in that directory. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RemoveNSIS -  Push $0 -  ; Grab the installation directory of the old version -  DetailPrint $(RemoveOldNSISVersion) -  ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" - -  ; If key doesn't exist, skip uninstall -  IfErrors NO_NSIS - -  ; Clean up legacy beta shortcuts -  Delete "$SMPROGRAMS\Second Life Beta.lnk" -  Delete "$DESKTOP\Second Life Beta.lnk" -  Delete "$SMPROGRAMS\Second Life.lnk" -   -  ; Clean up old newview.exe file -  Delete "$INSTDIR\newview.exe" - -  ; Intentionally don't delete the stuff in -  ; Documents and Settings, so we keep the user's settings - -  NO_NSIS: -  Pop $0 -FunctionEnd  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ; Make sure we're not on Windows 98 / ME @@ -242,28 +139,28 @@ FunctionEnd  ; Make sure the user can install/uninstall  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  Function CheckIfAdministrator -		DetailPrint $(CheckAdministratorInstDP) -         UserInfo::GetAccountType -         Pop $R0 -         StrCmp $R0 "Admin" is_admin -         MessageBox MB_OK $(CheckAdministratorInstMB) -         Quit -is_admin: -         Return +    DetailPrint $(CheckAdministratorInstDP) +    UserInfo::GetAccountType +    Pop $R0 +    StrCmp $R0 "Admin" lbl_is_admin +        MessageBox MB_OK $(CheckAdministratorInstMB) +        Quit +lbl_is_admin: +    Return  FunctionEnd  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ;;  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  Function un.CheckIfAdministrator -	DetailPrint $(CheckAdministratorUnInstDP) -         UserInfo::GetAccountType -         Pop $R0 -         StrCmp $R0 "Admin" is_admin -         MessageBox MB_OK $(CheckAdministratorUnInstMB) -         Quit -is_admin: -         Return +    DetailPrint $(CheckAdministratorUnInstDP) +    UserInfo::GetAccountType +    Pop $R0 +    StrCmp $R0 "Admin" lbl_is_admin +        MessageBox MB_OK $(CheckAdministratorUnInstMB) +        Quit +lbl_is_admin: +    Return  FunctionEnd  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -310,6 +207,33 @@ Function CloseSecondLife      Return  FunctionEnd +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Test our connection to secondlife.com +; Also allows us to count attempted installs by examining web logs. +; *TODO: Return current SL version info and have installer check +; if it is up to date. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function CheckNetworkConnection +    Push $0 +    Push $1 +    DetailPrint $(CheckNetworkConnectionDP) +    GetTempFileName $0 +    !define HTTP_TIMEOUT 5000 ; milliseconds +    ; Don't show secondary progress bar, this will be quick. +    NSISdl::download_quiet \ +        /TIMEOUT=${HTTP_TIMEOUT} \ +        "http://join.secondlife.com/installer-check/?v=${VERSION_LONG}" \ +        $0 +    Pop $1 ; Return value, either "success", "cancel" or an error message +    ; MessageBox MB_OK "Download result: $1" +    ; Result ignored for now +	; StrCmp $1 "success" +2 +	;	DetailPrint "Connection failed: $1" +    Delete $0 ; temporary file +    Pop $1 +    Pop $0 +    Return +FunctionEnd  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ; Delete files in Documents and Settings\<user>\SecondLife\cache @@ -577,7 +501,6 @@ StrCpy $INSTFLAGS ""  StrCpy $INSTPROG "${INSTNAME}"  StrCpy $INSTEXE "${INSTEXE}"  StrCpy $INSTSHORTCUT "${SHORTCUT}" -Call un.CheckStartupParams              ; Figure out where, what and how to uninstall.  Call un.CheckIfAdministrator		; Make sure the user can install/uninstall  ; uninstall for all users (if you change this, change it in the install as well) @@ -586,10 +509,9 @@ SetShellVarContext all  ; Make sure we're not running  Call un.CloseSecondLife -; Clean up registry keys (these should all be !defines somewhere) +; 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\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" -DeleteRegKey HKEY_LOCAL_MACHINE "Software\Linden Research, Inc.\Installer Language"   ; Clean up shortcuts  Delete "$SMPROGRAMS\$INSTSHORTCUT\*.*" @@ -613,123 +535,6 @@ Call un.ProgramFiles  SectionEnd 				; end of uninstall section -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; (From the NSIS wiki, DK) -; GetParameterValue -; -; Usage: -; !insertmacro GetParameterValue "/L=" "1033" -; pop $R0 -; -; Returns on top of stack -; -; Example command lines: -; foo.exe /S /L=1033 /D=C:\Program Files\Foo -; or: -; foo.exe /S "/L=1033" /D="C:\Program Files\Foo" -; gpv "/L=" "1033" -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - - !macro GetParameterValue SWITCH DEFAULT -   Push $0 -   Push $1 -   Push $2 -   Push $3 -   Push $4 - - ;$CMDLINE='"My Setup\Setup.exe" /L=1033 /S' -   Push "$CMDLINE" -   Push '${SWITCH}"' -   !insertmacro StrStr -   Pop $0 -   StrCmp "$0" "" gpv_notquoted - ;$0='/L="1033" /S' -   StrLen $2 "$0" -   Strlen $1 "${SWITCH}" -   IntOp $1 $1 + 1 -   StrCpy $0 "$0" $2 $1 - ;$0='1033" /S' -   Push "$0" -   Push '"' -   !insertmacro StrStr -   Pop $1 -   StrLen $2 "$0" -   StrLen $3 "$1" -   IntOp $4 $2 - $3 -   StrCpy $0 $0 $4 0 -   Goto gpv_done - -   gpv_notquoted: -   Push "$CMDLINE" -   Push "${SWITCH}" -   !insertmacro StrStr -   Pop $0 -   StrCmp "$0" "" gpv_done - ;$0='/L="1033" /S' -   StrLen $2 "$0" -   Strlen $1 "${SWITCH}" -   StrCpy $0 "$0" $2 $1 - ;$0=1033 /S' -   Push "$0" -   Push ' ' -   !insertmacro StrStr -   Pop $1 -   StrLen $2 "$0" -   StrLen $3 "$1" -   IntOp $4 $2 - $3 -   StrCpy $0 $0 $4 0 -   Goto gpv_done - -   gpv_done: -   StrCmp "$0" "" 0 +2 -   StrCpy $0 "${DEFAULT}" - -   Pop $4 -   Pop $3 -   Pop $2 -   Pop $1 -   Exch $0 - !macroend - -; And I had to modify StrStr a tiny bit. -; Possible upgrade switch the goto's to use ${__LINE__} - -!macro STRSTR -  Exch $R1 ; st=haystack,old$R1, $R1=needle -  Exch    ; st=old$R1,haystack -  Exch $R2 ; st=old$R1,old$R2, $R2=haystack -  Push $R3 -  Push $R4 -  Push $R5 -  StrLen $R3 $R1 -  StrCpy $R4 0 -  ; $R1=needle -  ; $R2=haystack -  ; $R3=len(needle) -  ; $R4=cnt -  ; $R5=tmp - ;  loop; -    StrCpy $R5 $R2 $R3 $R4 -    StrCmp $R5 $R1 +4 -    StrCmp $R5 "" +3 -    IntOp $R4 $R4 + 1 -    Goto -4 - ;  done; -  StrCpy $R1 $R2 "" $R4 -  Pop $R5 -  Pop $R4 -  Pop $R3 -  Pop $R2 -  Exch $R1 -!macroend - -Function GetProgramName -  !insertmacro GetParameterValue "/P=" "SecondLife" -FunctionEnd - -Function un.GetProgramName -  !insertmacro GetParameterValue "/P=" "SecondLife" -FunctionEnd  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ; (From the NSIS documentation, JC) @@ -827,42 +632,59 @@ FunctionEnd  ;;  entry to the language ID selector below  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  Function .onInit - -	; read the language from registry (ok if not there) and set langauge menu +    Push $0 +    ${GetParameters} $COMMANDLINE              ; get our command line +    ${GetOptions} $COMMANDLINE "/LANGID=" $0   ; /LANGID=1033 implies US English +    ; If no language (error), then proceed +    IfErrors lbl_check_silent +    ; No error means we got a language, so use it +    StrCpy $LANGUAGE $0 +    Goto lbl_return + +lbl_check_silent: +    ; For silent installs, no language prompt, use default +    IfSilent lbl_return +     +	; 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" +    IfErrors lbl_build_menu  	StrCpy $LANGUAGE $0 +lbl_build_menu:  	Push "" -	Push ${LANG_ENGLISH} -	Push English -	Push ${LANG_GERMAN} -	Push German -	Push ${LANG_JAPANESE} -	Push Japanese -	Push ${LANG_KOREAN} -	Push Korean +    # Use separate file so labels can be UTF-16 but we can still merge changes +    # into this ASCII file. JC +    !include "%%SOURCE%%\installers\windows\language_menu.nsi" +      	Push A ; A means auto count languages for the auto count to work the first empty push (Push "") must remain -	LangDLL::LangDialog "Installer Language" "Please select the language of the installer" -	Pop $LANGUAGE -	StrCmp $LANGUAGE "cancel" 0 +2 +	LangDLL::LangDialog $(InstallerLanguageTitle) $(SelectInstallerLanguage) +	Pop $0 +	StrCmp $0 "cancel" 0 +2  		Abort +    StrCpy $LANGUAGE $0  	; save language in registry		  	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" $LANGUAGE +lbl_return: +    Pop $0 +    Return  FunctionEnd  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  Function un.onInit - -	; read language from registry and set for ininstaller +	; 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" +    IfErrors lbl_end  	StrCpy $LANGUAGE $0 - +lbl_end: +    Return  FunctionEnd  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Sections +;;; MAIN SECTION  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  Section ""						; (default section) @@ -874,15 +696,11 @@ StrCpy $INSTPROG "${INSTNAME}"  StrCpy $INSTEXE "${INSTEXE}"  StrCpy $INSTSHORTCUT "${SHORTCUT}" -IfSilent +2 -Goto NOT_SILENT -  Call CheckStartupParams                 ; Figure out where, what and how to install. -NOT_SILENT:  Call CheckWindowsVersion		; warn if on Windows 98/ME  Call CheckIfAdministrator		; Make sure the user can install/uninstall  Call CheckIfAlreadyCurrent		; Make sure that we haven't already installed this version  Call CloseSecondLife			; Make sure we're not running -Call RemoveNSIS					; Check for old NSIS install to remove +Call CheckNetworkConnection		; ping secondlife.com  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ;;; Don't remove cache files during a regular install, removing the inventory cache on upgrades results in lots of damage to the servers. @@ -907,9 +725,6 @@ Call RemoveOldReleaseNotes  ;; This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py  %%INSTALL_FILES%% -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; If this is a silent update, we don't need to re-create these shortcuts or registry entries. -IfSilent POST_INSTALL  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ; Shortcuts in start menu @@ -918,25 +733,18 @@ SetOutPath "$INSTDIR"  CreateShortCut	"$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \  				"$INSTDIR\$INSTEXE" "$INSTFLAGS" -!ifdef MUSEUM -CreateShortCut	"$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT Museum.lnk" \ -				"$INSTDIR\$INSTEXE" "$INSTFLAGS -simple" -CreateShortCut	"$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT Museum Spanish.lnk" \ - -				"$INSTDIR\$INSTEXE" "$INSTFLAGS -simple -spanish" -!endif - -WriteINIStr		"$SMPROGRAMS\$INSTSHORTCUT\SL Create Trial Account.url" \ +WriteINIStr		"$SMPROGRAMS\$INSTSHORTCUT\SL Create Account.url" \  				"InternetShortcut" "URL" \  				"http://www.secondlife.com/registration/"  WriteINIStr		"$SMPROGRAMS\$INSTSHORTCUT\SL Your Account.url" \  				"InternetShortcut" "URL" \  				"http://www.secondlife.com/account/" -CreateShortCut	"$SMPROGRAMS\$INSTSHORTCUT\SL Scripting Language Help.lnk" \ -				"$INSTDIR\lsl_guide.html" +WriteINIStr		"$SMPROGRAMS\$INSTSHORTCUT\SL Scripting Language Help.url" \ +				"InternetShortcut" "URL" \ +                "http://wiki.secondlife.com/wiki/LSL_Portal"  CreateShortCut	"$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \ -				'"$INSTDIR\uninst.exe"' '/P="$INSTPROG"' +				'"$INSTDIR\uninst.exe"' ''  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ; Other shortcuts @@ -944,18 +752,8 @@ SetOutPath "$INSTDIR"  CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS"  CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS"  CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ -				'"$INSTDIR\uninst.exe"' '/P="$INSTPROG"' - -!ifdef MUSEUM -CreateShortCut "$DESKTOP\$INSTSHORTCUT Museum.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple" +				'"$INSTDIR\uninst.exe"' '' -CreateShortCut "$DESKTOP\$INSTSHORTCUT Museum Spanish.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple -spanish" - -CreateShortCut "$INSTDIR\$INSTSHORTCUT Museum.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple" - -CreateShortCut "$INSTDIR\$INSTSHORTCUT Museum Spanish.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple -spanish" - -!endif  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ; Write registry @@ -965,22 +763,17 @@ WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Flags  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\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG (remove only)" -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe" /P="$INSTPROG"' +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe"'  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ; Write URL registry info  WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life"  WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "URL Protocol" ""  WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' +;; URL param must be last item passed to viewer, it ignores subsequent params +;; to avoid parameter injection attacks.  WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" $INSTFLAGS -url "%1"' -Goto WRITE_UNINST - -POST_INSTALL: -; Run a post-executable script if necessary. -Call PostInstallExe - -WRITE_UNINST:  ; write out uninstaller  WriteUninstaller "$INSTDIR\uninst.exe" diff --git a/indra/newview/installers/windows/lang_de.nsi b/indra/newview/installers/windows/lang_de.nsi Binary files differindex c41012861f..911ed74348 100644 --- a/indra/newview/installers/windows/lang_de.nsi +++ b/indra/newview/installers/windows/lang_de.nsi diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi Binary files differindex 218f1c60fc..a01541377d 100644 --- a/indra/newview/installers/windows/lang_en-us.nsi +++ b/indra/newview/installers/windows/lang_en-us.nsi diff --git a/indra/newview/installers/windows/lang_es.nsi b/indra/newview/installers/windows/lang_es.nsi Binary files differnew file mode 100644 index 0000000000..3340a1230f --- /dev/null +++ b/indra/newview/installers/windows/lang_es.nsi diff --git a/indra/newview/installers/windows/lang_fr.nsi b/indra/newview/installers/windows/lang_fr.nsi Binary files differnew file mode 100644 index 0000000000..5c17ad077f --- /dev/null +++ b/indra/newview/installers/windows/lang_fr.nsi diff --git a/indra/newview/installers/windows/lang_it.nsi b/indra/newview/installers/windows/lang_it.nsi Binary files differnew file mode 100644 index 0000000000..9f18013691 --- /dev/null +++ b/indra/newview/installers/windows/lang_it.nsi diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi Binary files differindex 5e0496ee6f..f564291f7d 100644 --- a/indra/newview/installers/windows/lang_ja.nsi +++ b/indra/newview/installers/windows/lang_ja.nsi diff --git a/indra/newview/installers/windows/lang_ko.nsi b/indra/newview/installers/windows/lang_ko.nsi Binary files differindex b570315f03..5162b7ddad 100644 --- a/indra/newview/installers/windows/lang_ko.nsi +++ b/indra/newview/installers/windows/lang_ko.nsi diff --git a/indra/newview/installers/windows/lang_nl.nsi b/indra/newview/installers/windows/lang_nl.nsi Binary files differnew file mode 100644 index 0000000000..42453baa28 --- /dev/null +++ b/indra/newview/installers/windows/lang_nl.nsi diff --git a/indra/newview/installers/windows/lang_pt-br.nsi b/indra/newview/installers/windows/lang_pt-br.nsi Binary files differnew file mode 100644 index 0000000000..6524cc7c01 --- /dev/null +++ b/indra/newview/installers/windows/lang_pt-br.nsi diff --git a/indra/newview/installers/windows/lang_zh.nsi b/indra/newview/installers/windows/lang_zh.nsi Binary files differnew file mode 100644 index 0000000000..e644e6389b --- /dev/null +++ b/indra/newview/installers/windows/lang_zh.nsi diff --git a/indra/newview/installers/windows/language_menu.nsi b/indra/newview/installers/windows/language_menu.nsi Binary files differnew file mode 100644 index 0000000000..473f9e0784 --- /dev/null +++ b/indra/newview/installers/windows/language_menu.nsi diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index aed88497ee..f47f9b1f43 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -216,10 +216,6 @@ const F32 DEFAULT_AFK_TIMEOUT = 5.f * 60.f; // time with no input before user fl  F32 gSimLastTime; // Used in LLAppViewer::init and send_stats()  F32 gSimFrames; -std::string gDisabledMessage; // Set in LLAppViewer::initConfiguration used in idle_startup - -BOOL gHideLinks = FALSE; // Set in LLAppViewer::initConfiguration, used externally -  BOOL gAllowIdleAFK = TRUE;  BOOL gAllowTapTapHoldRun = TRUE;  BOOL gShowObjectUpdates = FALSE; @@ -1869,22 +1865,6 @@ bool LLAppViewer::initConfiguration()  	//		llerrs << "Failed to parse skin definition." << llendl;  	//	} -	//	LLXmlTreeNode* rootp = skin_def_tree.getRoot(); -	//	LLXmlTreeNode* disabled_message_node = rootp->getChildByName("disabled_message");	 -	//	if (disabled_message_node) -	//	{ -	//		gDisabledMessage = disabled_message_node->getContents(); -	//	} - -	//	static LLStdStringHandle hide_links_string = LLXmlTree::addAttributeString("hide_links"); -	//	rootp->getFastAttributeBOOL(hide_links_string, gHideLinks); - -	//	// Legacy string.  This flag really meant we didn't want to expose references to "Second Life". -	//	// Just set gHideLinks instead. -	//	static LLStdStringHandle silent_string = LLXmlTree::addAttributeString("silent_update"); -	//	BOOL silent_update; -	//	rootp->getFastAttributeBOOL(silent_string, silent_update); -	//	gHideLinks = (gHideLinks || silent_update);  	//}  #if LL_DARWIN diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index d1359daad4..b1262c3e5e 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -225,8 +225,6 @@ const S32 AGENT_UPDATES_PER_SECOND  = 10;  // "// llstartup" indicates that llstartup is the only client for this global.  extern BOOL gHandleKeysAsync; // gSavedSettings used by llviewerdisplay.cpp & llviewermenu.cpp -extern std::string gDisabledMessage; // llstartup -extern BOOL gHideLinks; // used by llpanellogin, lllfloaterbuycurrency, llstartup  extern LLSD gDebugInfo;  extern BOOL	gAllowIdleAFK; diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp index 34df1e06ae..150bf276a1 100644 --- a/indra/newview/llfloaterbuycurrency.cpp +++ b/indra/newview/llfloaterbuycurrency.cpp @@ -358,11 +358,6 @@ void LLFloaterBuyCurrencyUI::onClickErrorWeb(void* data)  // static  void LLFloaterBuyCurrency::buyCurrency()  { -	if (gHideLinks) -	{ -		return; -	} -  	LLFloaterBuyCurrencyUI* ui = LLFloaterBuyCurrencyUI::soleInstance(true);  	ui->noTarget();  	ui->updateUI(); @@ -371,15 +366,6 @@ void LLFloaterBuyCurrency::buyCurrency()  void LLFloaterBuyCurrency::buyCurrency(const std::string& name, S32 price)  { -	if (gHideLinks) -	{ -		LLStringUtil::format_map_t args; -		args["[NAME]"] = name; -		args["[PRICE]"] = llformat("%d", price); -		gViewerWindow->alertXml("NotEnoughCurrency", args); -		return; -	} -	  	LLFloaterBuyCurrencyUI* ui = LLFloaterBuyCurrencyUI::soleInstance(true);  	ui->target(name, price);  	ui->updateUI(); diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index ccf63b3285..3ad26b703a 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -236,17 +236,24 @@ void LLMuteList::loadUserVolumes()  //-----------------------------------------------------------------------------  LLMuteList::~LLMuteList()  { -	std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "volume_settings.xml"); -	LLSD settings_llsd; - -	for(user_volume_map_t::iterator iter = mUserVolumeSettings.begin(); iter != mUserVolumeSettings.end(); ++iter) +	// If we quit from the login screen we will not have an SL account +	// name.  Don't try to save, otherwise we'll dump a file in +	// C:\Program Files\SecondLife\  JC +	std::string user_dir = gDirUtilp->getLindenUserDir(); +	if (!user_dir.empty())  	{ -		settings_llsd[iter->first.asString()] = iter->second; -	} +		std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "volume_settings.xml"); +		LLSD settings_llsd; -	llofstream file; -	file.open(filename); -	LLSDSerialize::toPrettyXML(settings_llsd, file); +		for(user_volume_map_t::iterator iter = mUserVolumeSettings.begin(); iter != mUserVolumeSettings.end(); ++iter) +		{ +			settings_llsd[iter->first.asString()] = iter->second; +		} + +		llofstream file; +		file.open(filename); +		LLSDSerialize::toPrettyXML(settings_llsd, file); +	}  }  BOOL LLMuteList::isLinden(const std::string& name) const diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 7a8497aa2e..924b27a24c 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -63,7 +63,6 @@  #include "llviewernetwork.h"  #include "llviewerwindow.h"			// to link into child list  #include "llnotify.h" -#include "llappviewer.h"					// for gHideLinks  #include "llurlsimstring.h"  #include "lluictrlfactory.h"  #include "llhttpclient.h" @@ -1066,15 +1065,8 @@ void LLPanelLogin::onClickConnect(void *)  		}  		else  		{ -			if (gHideLinks) -			{ -				gViewerWindow->alertXml("MustHaveAccountToLogInNoLinks"); -			} -			else -			{ -				gViewerWindow->alertXml("MustHaveAccountToLogIn", -										LLPanelLogin::newAccountAlertCallback); -			} +			gViewerWindow->alertXml("MustHaveAccountToLogIn", +									LLPanelLogin::newAccountAlertCallback);  		}  	}  } diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index c6c0fb21a8..2717c44415 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -101,7 +101,7 @@ const std::string HELLO_LSL =  	"        llSay(0, \"Touched.\");\n"  	"    }\n"  	"}\n"; -const std::string HELP_LSL = "lsl_guide.html"; +const std::string HELP_LSL_URL = "http://wiki.secondlife.com/wiki/LSL_Portal";  const std::string DEFAULT_SCRIPT_NAME = "New Script"; // *TODO:Translate?  const std::string DEFAULT_SCRIPT_DESC = "(No Description)"; // *TODO:Translate? @@ -294,7 +294,7 @@ LLScriptEdCore::LLScriptEdCore(  	const std::string& name,  	const LLRect& rect,  	const std::string& sample, -	const std::string& help, +	const std::string& help_url,  	const LLHandle<LLFloater>& floater_handle,  	void (*load_callback)(void*),  	void (*save_callback)(void*, BOOL), @@ -304,7 +304,7 @@ LLScriptEdCore::LLScriptEdCore(  	:  	LLPanel( std::string("name"), rect ),  	mSampleText(sample), -	mHelpFile ( help ), +	mHelpURL(help_url),  	mEditor( NULL ),  	mLoadCallback( load_callback ),  	mSaveCallback( save_callback ), @@ -547,7 +547,6 @@ void LLScriptEdCore::setHelpPage(const std::string& help_string)  	if (!history_combo) return;  	LLUIString url_string = gSavedSettings.getString("LSLHelpURL"); -	url_string.setArg("[APP_DIRECTORY]", gDirUtilp->getWorkingDir());  	url_string.setArg("[LSL_STRING]", help_string);  	addHelpItemToHistory(help_string); @@ -556,6 +555,7 @@ void LLScriptEdCore::setHelpPage(const std::string& help_string)  } +  void LLScriptEdCore::addHelpItemToHistory(const std::string& help_string)  {  	if (help_string.empty()) return; @@ -647,7 +647,7 @@ void LLScriptEdCore::onHelpWebDialog(S32 option, void* userdata)  	switch(option)  	{  	case 0: -		load_url_local_file(corep->mHelpFile); +		LLWeb::loadURL(corep->mHelpURL);  		break;  	default:  		break; @@ -773,7 +773,6 @@ void LLScriptEdCore::onHelpComboCommit(LLUICtrl* ctrl, void* userdata)  		LLWebBrowserCtrl* web_browser = live_help_floater->getChild<LLWebBrowserCtrl>("lsl_guide_html");  		LLUIString url_string = gSavedSettings.getString("LSLHelpURL"); -		url_string.setArg("[APP_DIRECTORY]", gDirUtilp->getWorkingDir());  		url_string.setArg("[LSL_STRING]", help_string);  		web_browser->navigateTo(url_string);  	} @@ -1072,7 +1071,7 @@ void* LLPreviewLSL::createScriptEdPanel(void* userdata)  	self->mScriptEd =  new LLScriptEdCore("script panel",  								   LLRect(),  								   HELLO_LSL, -								   HELP_LSL, +								   HELP_LSL_URL,  								   self->getHandle(),  								   LLPreviewLSL::onLoad,  								   LLPreviewLSL::onSave, @@ -1590,7 +1589,7 @@ void* LLLiveLSLEditor::createScriptEdPanel(void* userdata)  	self->mScriptEd =  new LLScriptEdCore("script ed panel",  								   LLRect(),  								   HELLO_LSL, -								   HELP_LSL, +								   HELP_LSL_URL,  								   self->getHandle(),  								   &LLLiveLSLEditor::onLoad,  								   &LLLiveLSLEditor::onSave, diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index ca1c527cb2..c0af06f480 100644 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -65,7 +65,7 @@ public:  		const std::string& name,  		const LLRect& rect,  		const std::string& sample, -		const std::string& help, +		const std::string& help_url,  		const LLHandle<LLFloater>& floater_handle,  		void (*load_callback)(void* userdata),  		void (*save_callback)(void* userdata, BOOL close_after_save), @@ -132,7 +132,7 @@ protected:  private:  	std::string		mSampleText; -	std::string		mHelpFile; +	std::string		mHelpURL;  	LLTextEditor*	mEditor;  	void			(*mLoadCallback)(void* userdata);  	void			(*mSaveCallback)(void* userdata, BOOL close_after_save); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 4f98c3b524..1f1e56fce8 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1101,6 +1101,7 @@ bool idle_startup()  		LL_DEBUGS("AppInit") << "STATE_LOGIN_PROCESS_RESPONSE" << LL_ENDL;  		std::ostringstream emsg;  		bool quit = false; +		bool update = false;  		std::string login_response;  		std::string reason_response;  		std::string message_response; @@ -1144,11 +1145,7 @@ bool idle_startup()  				reason_response = LLUserAuth::getInstance()->getResponse("reason");  				message_response = LLUserAuth::getInstance()->getResponse("message"); -				if (gHideLinks && reason_response == "disabled") -				{ -					emsg << gDisabledMessage; -				} -				else if (!message_response.empty()) +				if (!message_response.empty())  				{  					// XUI: fix translation for strings returned during login  					// We need a generic table for translations @@ -1206,16 +1203,7 @@ bool idle_startup()  				if(reason_response == "update")  				{  					auth_message = LLUserAuth::getInstance()->getResponse("message"); -					if (show_connect_box) -					{ -						update_app(TRUE, auth_message); -						LLStartUp::setStartupState( STATE_UPDATE_CHECK ); -						return false; -					} -					else -					{ -						quit = true; -					} +					update = true;  				}  				if(reason_response == "optional")  				{ @@ -1253,6 +1241,21 @@ bool idle_startup()  			break;  		} +		if (update || gSavedSettings.getBOOL("ForceMandatoryUpdate")) +		{ +			gSavedSettings.setBOOL("ForceMandatoryUpdate", FALSE); +			if (show_connect_box) +			{ +				update_app(TRUE, auth_message); +				LLStartUp::setStartupState( STATE_UPDATE_CHECK ); +				return false; +			} +			else +			{ +				quit = true; +			} +		} +  		// Version update and we're not showing the dialog  		if(quit)  		{ @@ -2840,29 +2843,6 @@ void update_dialog_callback(S32 option, void *userdata)  	std::ostringstream params;  	params << "-url \"" << update_url.asString() << "\""; -	if (gHideLinks) -	{ -		// Figure out the program name. -		const std::string& data_dir = gDirUtilp->getAppRODataDir(); -		// Roll back from the end, stopping at the first '\' -		const char* program_name = data_dir.c_str() + data_dir.size();		/* Flawfinder: ignore */ -		while ( (data_dir != --program_name) && -				*(program_name) != '\\'); -		 -		if ( *(program_name) == '\\') -		{ -			// We found a '\'. -			program_name++; -		} -		else -		{ -			// Oops. -			program_name = "SecondLife"; -		} - -		params << " -silent -name \"" << LLAppViewer::instance()->getSecondLifeTitle() << "\""; -		params << " -program \"" << program_name << "\""; -	}  	LL_DEBUGS("AppInit") << "Calling updater: " << update_exe_path << " " << params.str() << LL_ENDL; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 7c78a26367..7f9ba3206c 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2752,33 +2752,6 @@ void process_grant_godlike_powers(LLMessageSystem* msg, void**)  	}  } -void load_url_local_file(const std::string& file_name) -{ -	if( gAgent.cameraMouselook() ) -	{ -		gAgent.changeCameraToDefault(); -	} - -#if LL_DARWIN || LL_LINUX || LL_SOLARIS -	// MBW -- If the Mac client is in fullscreen mode, it needs to go windowed so the browser will be visible. -	if(gViewerWindow->mWindow->getFullscreen()) -	{ -		gViewerWindow->toggleFullscreen(TRUE); -	} -#endif - -	// JC - system() blocks until IE has launched. -	// spawn() runs asynchronously, but opens a command prompt. -	// ShellExecute() just opens the damn file with the default -	// web browser. -	std::string full_path = "file:///"; -	full_path.append(gDirUtilp->getAppRODataDir()); -	full_path.append(gDirUtilp->getDirDelimiter()); -	full_path.append(file_name); - -	LLWeb::loadURL(full_path); -} -  /*  class LLHaveCallingcard : public LLInventoryCollectFunctor  { @@ -5415,37 +5388,6 @@ class LLPromptShowURL : public view_listener_t  	}  }; -void callback_show_file(S32 option, void* data) -{ -	std::string* filenamep = (std::string*)data; -	if (0 == option) -	{ -		load_url_local_file(*filenamep); -	} -	delete filenamep; -} - -class LLPromptShowFile : public view_listener_t -{ -	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) -	{ -		std::string param = userdata.asString(); -		std::string::size_type offset = param.find(","); -		if (offset != param.npos) -		{ -			std::string alert = param.substr(0, offset); -			std::string file = param.substr(offset+1); -			std::string* file_copy = new std::string(file); -			gViewerWindow->alertXml(alert, callback_show_file, file_copy); -		} -		else -		{ -			llinfos << "PromptShowFile invalid parameters! Expecting \"ALERT,FILE\"." << llendl; -		} -		return true; -	} -}; -  class LLShowAgentProfile : public view_listener_t  {  	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) @@ -7809,7 +7751,6 @@ void initialize_menus()  	// Generic actions  	addMenu(new LLShowFloater(), "ShowFloater");  	addMenu(new LLPromptShowURL(), "PromptShowURL"); -	addMenu(new LLPromptShowFile(), "PromptShowFile");  	addMenu(new LLShowAgentProfile(), "ShowAgentProfile");  	addMenu(new LLShowAgentGroups(), "ShowAgentGroups");  	addMenu(new LLToggleControl(), "ToggleControl"); diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index d8a8bba08c..288c501b59 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -50,7 +50,6 @@ void cleanup_menus();  void show_debug_menus(); // checks for if menus should be shown first.  void show_context_menu( S32 x, S32 y, MASK mask );  void show_build_mode_context_menu(S32 x, S32 y, MASK mask); -void load_url_local_file(const std::string& file_name);  BOOL enable_save_into_inventory(void*);  void handle_reset_view();  void handle_cut(void*); diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 978d70c646..875b3ccbf7 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -51,7 +51,6 @@ class ViewerManifest(LLManifest):              self.path("*.pem")              self.path("*.ini")              self.path("*.xml") -            self.path("*.vp")              self.path("*.db2")              # include the entire shaders directory recursively @@ -66,35 +65,35 @@ class ViewerManifest(LLManifest):              self.path("*.tga")              self.end_prefix("character") -          # Include our fonts          if self.prefix(src="fonts"):              self.path("*.ttf")              self.path("*.txt")              self.end_prefix("fonts") -            # skins -            if self.prefix(src="skins"): -                    self.path("paths.xml") -                    # include the entire textures directory recursively -                    if self.prefix(src="*/textures"): -                            self.path("*.tga") -                            self.path("*.j2c") -                            self.path("*.jpg") -                            self.path("*.png") -                            self.path("textures.xml") -                            self.end_prefix("*/textures") -                    self.path("*/xui/*/*.xml") -                    self.path("*/*.xml") -                     -                    # Local HTML files (e.g. loading screen) -                    if self.prefix(src="*/html"): -                            self.path("*.png") -                            self.path("*/*/*.html") -                            self.path("*/*/*.gif") -                            self.end_prefix("*/html") -                    self.end_prefix("skins") -        self.path("lsl_guide.html") +        # skins +        if self.prefix(src="skins"): +                self.path("paths.xml") +                # include the entire textures directory recursively +                if self.prefix(src="*/textures"): +                        self.path("*.tga") +                        self.path("*.j2c") +                        self.path("*.jpg") +                        self.path("*.png") +                        self.path("textures.xml") +                        self.end_prefix("*/textures") +                self.path("*/xui/*/*.xml") +                self.path("*/*.xml") +                 +                # Local HTML files (e.g. loading screen) +                if self.prefix(src="*/html"): +                        self.path("*.png") +                        self.path("*/*/*.html") +                        self.path("*/*/*.gif") +                        self.end_prefix("*/html") +                self.end_prefix("skins") +         +        # Files in the newview/ directory          self.path("gpu_table.txt")      def login_channel(self): @@ -361,7 +360,7 @@ class WindowsManifest(ViewerManifest):                  "%%INSTALL_FILES%%":self.nsi_file_commands(True),                  "%%DELETE_FILES%%":self.nsi_file_commands(False)}) -        NSIS_path = 'C:\\Program Files\\NSIS\\makensis.exe' +        NSIS_path = 'C:\\Program Files\\NSIS\\Unicode\\makensis.exe'          self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))          # self.remove(self.dst_path_of(tempfile))          self.created_path(self.dst_path_of(installer_file)) @@ -505,9 +504,6 @@ class DarwinManifest(ViewerManifest):          if not os.path.exists (self.src_path_of(dmg_template)):              dmg_template = os.path.join ('installers', 'darwin', 'release-dmg') -        # To reinstate the linden scripting guide, add this to the list below: -        #            "lsl_guide.html":"Linden Scripting Language Guide.html", -          for s,d in {self.get_dst_prefix():app_name + ".app",                      os.path.join(dmg_template, "_VolumeIcon.icns"): ".VolumeIcon.icns",                      os.path.join(dmg_template, "background.jpg"): "background.jpg", diff --git a/indra/win_updater/updater.cpp b/indra/win_updater/updater.cpp index f849e4e9ad..4bd07ead96 100644 --- a/indra/win_updater/updater.cpp +++ b/indra/win_updater/updater.cpp @@ -30,7 +30,7 @@   */  // -// Usage: updater -url <url> [-name <window_title>] [-program <program_name>] [-silent] +// Usage: updater -url <url>  //  #include "linden_common.h" @@ -45,9 +45,6 @@ DWORD gTotalBytes = -1;  HWND gWindow = NULL;  WCHAR gProgress[256];  char* gUpdateURL; -char* gProgramName; -char* gProductName; -bool gIsSilent;  #if _DEBUG  FILE* logfile = 0; @@ -217,7 +214,7 @@ int WINAPI get_url_into_file(WCHAR *uri, char *path, int *cancelled)  		fprintf(logfile,"Calling PeekMessage\n");  		fflush(logfile);  #endif	 -		if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) +		while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))  		{  			TranslateMessage(&msg);  			DispatchMessage(&msg); @@ -279,26 +276,14 @@ int parse_args(int argc, char **argv)  	for (j = 1; j < argc; j++)   	{ -		if ((!strcmp(argv[j], "-name")) && (++j < argc))  -		{ -			gProductName = argv[j]; -		} -		else if ((!strcmp(argv[j], "-url")) && (++j < argc))  +		if ((!strcmp(argv[j], "-url")) && (++j < argc))   		{  			gUpdateURL = argv[j];  		} -		else if ((!strcmp(argv[j], "-program")) && (++j < argc))  -		{ -			gProgramName = argv[j]; -		} -		else if (!strcmp(argv[j], "-silent")) -		{ -			gIsSilent = true; -		}  	}  	// If nothing was set, let the caller know. -	if (!gProductName && !gProgramName && !gIsSilent && !gUpdateURL) +	if (!gUpdateURL)  	{  		return 1;  	} @@ -350,9 +335,6 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nSho  	}  	gUpdateURL = NULL; -	gProgramName = NULL; -	gProductName = NULL; -	gIsSilent = false;  	/////////////////////////////////////////  	// @@ -368,21 +350,10 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nSho  	// Parse the command line arguments  	//  	int parse_args_result = parse_args(argc, argv); -	WCHAR window_title[2048]; -	if (gProductName) -	{ -		mbstowcs(window_title, gProductName, 2048); -		wcscat(window_title, L" Updater");		/* Flawfinder: ignore */ -	} -	else -	{ -		mbstowcs(window_title, "Second Life Updater", 2048); -	}  	WNDCLASSEX wndclassex = { 0 };  	DEVMODE dev_mode = { 0 };  	char update_exec_path[MAX_PATH];		/* Flawfinder: ignore */ -	char *ptr;  	const int WINDOW_WIDTH = 250;  	const int WINDOW_HEIGHT = 100; @@ -403,7 +374,7 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nSho  	EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dev_mode);  	gWindow = CreateWindowEx(NULL, win_class_name,  -		window_title, +		L"Second Life Updater",  		WS_OVERLAPPEDWINDOW,   		CW_USEDEFAULT,   		CW_USEDEFAULT,  @@ -437,24 +408,13 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nSho  			L"Error", MB_OK);  		return 1;  	} -	if (0 == GetTempFileNameA(update_exec_path, NULL, 0, update_exec_path)) -	{ -		MessageBox(gWindow, L"Problem with GetTempFileName()", -			L"Error", MB_OK); -		return 1; -	} -	// Hack hack hack -	ptr = strrchr(update_exec_path, '.'); -	*(ptr + 1) = 'e'; -	*(ptr + 2) = 'x'; -	*(ptr + 3) = 'e'; -	*(ptr + 4) = 0; +	strcat(update_exec_path, "Second_Life_Updater.exe");  	WCHAR update_uri[4096];  	mbstowcs(update_uri, gUpdateURL, 4096); -	int success; -	int cancelled; +	int success = 0; +	int cancelled = 0;  	// Actually do the download  #if _DEBUG @@ -493,47 +453,24 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nSho  		return 1;  	} -	// Construct some parameters. -	char params[2048];		/* Flawfinder: ignore */ -	if (gIsSilent && gProgramName) -	{ -		_snprintf(params, sizeof(params), "/S /P=\"%s\"", gProgramName);		/* Flawfinder: ignore */ -		params[2047] = '\0'; -	} -	else if (gProgramName) -	{ -		_snprintf(params, sizeof(params), "/P=\"%s\"", gProgramName);		/* Flawfinder: ignore */ -		params[2047] = '\0'; -	} -	else if (gIsSilent) -	{ -		sprintf(params, "/S");		/* Flawfinder: ignore */ -	} -	else -	{ -		params[0] = '\0'; -	} +	// TODO: Make updates silent (with /S to NSIS) +	//char params[256];		/* Flawfinder: ignore */ +	//sprintf(params, "/S");	/* Flawfinder: ignore */ +	//MessageBox(gWindow,  +	//	L"Updating Second Life.\n\nSecond Life will automatically start once the update is complete.  This may take a minute...", +	//	L"Download Complete", +	//	MB_OK); -	if (32 >= (int) ShellExecuteA(gWindow, "open", update_exec_path, params,  +	if (32 >= (int) ShellExecuteA(gWindow, "open", update_exec_path, NULL,   		"C:\\", SW_SHOWDEFAULT))  	{ -		// No shit: less than or equal to 32 means failure -		MessageBox(gWindow, L"ShellExecute failed.  Please try again later.", NULL, MB_OK); +		// Less than or equal to 32 means failure +		MessageBox(gWindow, L"Update failed.  Please try again later.", NULL, MB_OK);  		return 1;  	} -	if (gIsSilent && gProductName) -	{ -		WCHAR message[2048]; -		WCHAR wproduct[2048]; -		mbstowcs(wproduct, gProductName, 2048); - -		wsprintf(message,  -				L"Updating %s.  %s will automatically start once the update is complete.  This may take a minute...", -				wproduct, wproduct); -				 -		MessageBox(gWindow, message, L"Download Complete", MB_OK); -	} +	// Give installer some time to open a window +	Sleep(1000);  	return 0;  }  | 
