Skip to content
Snippets Groups Projects
Commit bfa393f9 authored by Mark Palange (Mani)'s avatar Mark Palange (Mani)
Browse files

CHOP-178 Add a non-interactive moe to the windows installer. Rev by Brad

parent 7a7f89db
No related branches found
No related tags found
No related merge requests found
...@@ -85,6 +85,8 @@ AutoCloseWindow true ; after all files install, close window ...@@ -85,6 +85,8 @@ AutoCloseWindow true ; after all files install, close window
InstallDir "$PROGRAMFILES\${INSTNAME}" InstallDir "$PROGRAMFILES\${INSTNAME}"
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" ""
DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup)
Page directory dirPre
Page instfiles
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Variables ;;; Variables
...@@ -95,6 +97,8 @@ Var INSTFLAGS ...@@ -95,6 +97,8 @@ Var INSTFLAGS
Var INSTSHORTCUT Var INSTSHORTCUT
Var COMMANDLINE ; command line passed to this installer, set in .onInit Var COMMANDLINE ; command line passed to this installer, set in .onInit
Var SHORTCUT_LANG_PARAM ; "--set InstallLanguage de", passes language to viewer Var SHORTCUT_LANG_PARAM ; "--set InstallLanguage de", passes language to viewer
Var SKIP_DIALOGS ; set from command line in .onInit. autoinstall
; GUI and the defaults.
;;; Function definitions should go before file includes, because calls to ;;; Function definitions should go before file includes, because calls to
;;; DLLs like LangDLL trigger an implicit file include, so if that call is at ;;; DLLs like LangDLL trigger an implicit file include, so if that call is at
...@@ -110,6 +114,9 @@ Var SHORTCUT_LANG_PARAM ; "--set InstallLanguage de", passes language to viewer ...@@ -110,6 +114,9 @@ Var SHORTCUT_LANG_PARAM ; "--set InstallLanguage de", passes language to viewer
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function .onInstSuccess Function .onInstSuccess
Push $R0 # Option value, unused Push $R0 # Option value, unused
StrCmp $SKIP_DIALOGS "true" label_launch
${GetOptions} $COMMANDLINE "/AUTOSTART" $R0 ${GetOptions} $COMMANDLINE "/AUTOSTART" $R0
# If parameter was there (no error) just launch # If parameter was there (no error) just launch
# Otherwise ask # Otherwise ask
...@@ -128,6 +135,13 @@ label_no_launch: ...@@ -128,6 +135,13 @@ label_no_launch:
Pop $R0 Pop $R0
FunctionEnd FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Pre-directory page callback
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function dirPre
StrCmp $SKIP_DIALOGS "true" 0 +2
Abort
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Make sure we're not on Windows 98 / ME ; Make sure we're not on Windows 98 / ME
...@@ -145,7 +159,8 @@ Function CheckWindowsVersion ...@@ -145,7 +159,8 @@ Function CheckWindowsVersion
StrCmp $R0 "NT" win_ver_bad StrCmp $R0 "NT" win_ver_bad
Return Return
win_ver_bad: win_ver_bad:
MessageBox MB_YESNO $(CheckWindowsVersionMB) IDNO win_ver_abort StrCmp $SKIP_DIALOGS "true" +2 ; If skip_dialogs is set just install
MessageBox MB_YESNO $(CheckWindowsVersionMB) IDNO win_ver_abort
Return Return
win_ver_abort: win_ver_abort:
Quit Quit
...@@ -184,13 +199,13 @@ FunctionEnd ...@@ -184,13 +199,13 @@ FunctionEnd
; If it has, allow user to bail out of install process. ; If it has, allow user to bail out of install process.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function CheckIfAlreadyCurrent Function CheckIfAlreadyCurrent
Push $0 Push $0
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version"
StrCmp $0 ${VERSION_LONG} 0 DONE StrCmp $0 ${VERSION_LONG} 0 continue_install
MessageBox MB_OKCANCEL $(CheckIfCurrentMB) /SD IDOK IDOK DONE StrCmp $SKIP_DIALOGS "true" continue_install
MessageBox MB_OKCANCEL $(CheckIfCurrentMB) /SD IDOK IDOK continue_install
Quit Quit
continue_install:
DONE:
Pop $0 Pop $0
Return Return
FunctionEnd FunctionEnd
...@@ -203,7 +218,9 @@ Function CloseSecondLife ...@@ -203,7 +218,9 @@ Function CloseSecondLife
Push $0 Push $0
FindWindow $0 "Second Life" "" FindWindow $0 "Second Life" ""
IntCmp $0 0 DONE IntCmp $0 0 DONE
MessageBox MB_OKCANCEL $(CloseSecondLifeInstMB) IDOK CLOSE IDCANCEL CANCEL_INSTALL
StrCmp $SKIP_DIALOGS "true" CLOSE
MessageBox MB_OKCANCEL $(CloseSecondLifeInstMB) IDOK CLOSE IDCANCEL CANCEL_INSTALL
CANCEL_INSTALL: CANCEL_INSTALL:
Quit Quit
...@@ -659,23 +676,29 @@ FunctionEnd ...@@ -659,23 +676,29 @@ FunctionEnd
Function .onInit Function .onInit
Push $0 Push $0
${GetParameters} $COMMANDLINE ; get our command line ${GetParameters} $COMMANDLINE ; get our command line
${GetOptions} $COMMANDLINE "/SKIP_DIALOGS" $0
IfErrors +2 0 ; If error jump past setting SKIP_DIALOGS
StrCpy $SKIP_DIALOGS "true"
${GetOptions} $COMMANDLINE "/LANGID=" $0 ; /LANGID=1033 implies US English ${GetOptions} $COMMANDLINE "/LANGID=" $0 ; /LANGID=1033 implies US English
; If no language (error), then proceed ; If no language (error), then proceed
IfErrors lbl_check_silent IfErrors lbl_configure_default_lang
; No error means we got a language, so use it ; No error means we got a language, so use it
StrCpy $LANGUAGE $0 StrCpy $LANGUAGE $0
Goto lbl_return Goto lbl_return
lbl_check_silent: lbl_configure_default_lang:
; For silent installs, no language prompt, use default ; If we currently have a version of SL installed, default to the language of that install
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. ; 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\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage"
IfErrors lbl_build_menu IfErrors +2 0 ; If error skip the copy instruction
StrCpy $LANGUAGE $0 StrCpy $LANGUAGE $0
; For silent installs, no language prompt, use default
IfSilent lbl_return
StrCmp $SKIP_DIALOGS "true" lbl_return
lbl_build_menu: lbl_build_menu:
Push "" Push ""
# Use separate file so labels can be UTF-16 but we can still merge changes # Use separate file so labels can be UTF-16 but we can still merge changes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment