diff options
Diffstat (limited to 'indra/newview/installers')
| -rwxr-xr-x | indra/newview/installers/darwin/dmg-cleanup.applescript | 46 | ||||
| -rw-r--r-- | indra/newview/installers/darwin/release-dmg/_VolumeIcon.icns | bin | 2108870 -> 470085 bytes | |||
| -rw-r--r-- | indra/newview/installers/darwin/release-dmg/background.jpg | bin | 62112 -> 59956 bytes | |||
| -rw-r--r-- | indra/newview/installers/windows/installer_template.nsi | 86 |
4 files changed, 117 insertions, 15 deletions
diff --git a/indra/newview/installers/darwin/dmg-cleanup.applescript b/indra/newview/installers/darwin/dmg-cleanup.applescript index 8a71b392f9..866bf31e8f 100755 --- a/indra/newview/installers/darwin/dmg-cleanup.applescript +++ b/indra/newview/installers/darwin/dmg-cleanup.applescript @@ -4,25 +4,43 @@ tell application "Finder" - set foo to every item in front window - repeat with i in foo - if the name of i is "Applications" then - set the position of i to {391, 165} - else if the name of i ends with ".app" then - set the position of i to {121, 166} - end if - end repeat + -- set foo to every item in front window + -- repeat with i in foo + -- if the name of i is "Applications" then + -- set the position of i to {391, 165} + -- else if the name of i ends with ".app" then + -- set the position of i to {121, 166} + -- end if + -- end repeat -- There doesn't seem to be a way to set the background picture with applescript, but all the saved .DS_Store files should already have that set correctly. - set foo to front window - set current view of foo to icon view - set toolbar visible of foo to false - set statusbar visible of foo to false - set the bounds of foo to {100, 100, 600, 449} + -- set foo to front window + -- set current view of foo to icon view + -- set toolbar visible of foo to false + -- set statusbar visible of foo to false + -- set the bounds of foo to {100, 100, 600, 449} -- set the position of front window to {100, 100} -- get {name, position} of every item of front window - get properties of front window + -- get properties of front window + + tell disk "Megapahit Installer" + open + set current view of container window to icon view + set toolbar visible of container window to false + set statusbar visible of container window to false + set the bounds of container window to {400, 100, 900, 500} + set theViewOptions to the icon view options of container window + set arrangement of theViewOptions to not arranged + set icon size of theViewOptions to 128 + set background picture of theViewOptions to file ".background:background.jpg" + make new alias file at container window to POSIX file "/Applications" with properties {name:"Applications"} + set position of item "Megapahit" of container window to {125, 160} + set position of item "Applications" of container window to {375, 160} + update without registering applications + delay 5 + close + end tell end tell diff --git a/indra/newview/installers/darwin/release-dmg/_VolumeIcon.icns b/indra/newview/installers/darwin/release-dmg/_VolumeIcon.icns Binary files differindex 272b496e7d..1be2300130 100644 --- a/indra/newview/installers/darwin/release-dmg/_VolumeIcon.icns +++ b/indra/newview/installers/darwin/release-dmg/_VolumeIcon.icns diff --git a/indra/newview/installers/darwin/release-dmg/background.jpg b/indra/newview/installers/darwin/release-dmg/background.jpg Binary files differindex e7064d9545..41c2bc320b 100644 --- a/indra/newview/installers/darwin/release-dmg/background.jpg +++ b/indra/newview/installers/darwin/release-dmg/background.jpg diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 77f24ac6a6..0e36698018 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -164,6 +164,74 @@ Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation !include "x64.nsh" # for 64bit detection
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Substring function
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+!define StrStr "!insertmacro StrStr"
+
+!macro StrStr ResultVar String SubString
+ Push `${String}`
+ Push `${SubString}`
+ Call StrStr
+ Pop `${ResultVar}`
+!macroend
+
+Function StrStr
+
+# After this point:
+# ------------------------------------------
+# $R0 = SubString (input)
+# $R1 = String (input)
+# $R2 = SubStringLen (temp)
+# $R3 = StrLen (temp)
+# $R4 = StartCharPos (temp)
+# $R5 = TempStr (temp)
+# function from nsis.sourceforge.io/StrStr
+
+ ;Get input from user
+ Exch $R0
+ Exch
+ Exch $R1
+ Push $R2
+ Push $R3
+ Push $R4
+ Push $R5
+
+ ;Get "String" and "SubString" length
+ StrLen $R2 $R0
+ StrLen $R3 $R1
+ ;Start "StartCharPos" counter
+ StrCpy $R4 0
+
+ ;Loop until "SubString" is found or "String" reaches its end
+ ${Do}
+ ;Remove everything before and after the searched part ("TempStr")
+ StrCpy $R5 $R1 $R2 $R4
+
+ ;Compare "TempStr" with "SubString"
+ ${IfThen} $R5 == $R0 ${|} ${ExitDo} ${|}
+ ;If not "SubString", this could be "String"'s end
+ ${IfThen} $R4 >= $R3 ${|} ${ExitDo} ${|}
+ ;If not, continue the loop
+ IntOp $R4 $R4 + 1
+ ${Loop}
+
+# After this point:
+# ------------------------------------------
+# $R0 = ResultVar (output)
+
+ ;Remove part before "SubString" on "String" (if there has one)
+ StrCpy $R0 $R1 `` $R4
+
+ ;Return output to user
+ Pop $R5
+ Pop $R4
+ Pop $R3
+ Pop $R2
+ Pop $R1
+ Exch $R0
+FunctionEnd
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Pre-directory page callback
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function dirPre
@@ -190,15 +258,31 @@ Function .onInit # However, SL-10506 complains about the resulting behavior, so the logic below
# is adapted from before we introduced MultiUser.nsh.
+# Check if user specified /D= on the command line
+System::Call 'kernel32::GetCommandLine()t .r0'
+Push $0
+Push " /D="
+Call StrStr
+Pop $1
+${If} $1 != ""
+ # /D= was specified, extract the path
+ # spaces are allowed in path after /D=, it's expected to be the last parameter
+ StrLen $2 $1
+ StrCpy $INSTDIR $1 $2 4 # Skip over " /D="
+ Goto after_instdir
+${EndIf}
+
# if $0 is empty, this is the first time for this viewer name
ReadRegStr $0 SHELL_CONTEXT "${INSTNAME_KEY}" ""
# viewer with this name was installed before
${If} $0 != ""
- # use the value we got from registry as install location
+ # use the value we got from registry as install location
StrCpy $INSTDIR $0
${EndIf}
+after_instdir:
+
Call CheckCPUFlags # Make sure we have SSE2 support
Call CheckWindowsVersion # Don't install On unsupported systems
Push $0
|
