Branding fix: Set the background image explicitly, instead of depending on .DS_Store to have it.
parent
8f8922b1d6
commit
1024e30e22
Binary file not shown.
|
Before Width: | Height: | Size: 60 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 188 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 61 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 184 KiB |
|
|
@ -0,0 +1,34 @@
|
|||
-- This Applescript sets up the installer disk image: size, background image,
|
||||
-- icon view, background image, icon positioning.
|
||||
-- Usage: osascript installer-dmg.applescript <volume-name>
|
||||
-- where <volume-name> is the volume name of the disk image.
|
||||
|
||||
on run argv
|
||||
tell application "Finder"
|
||||
set diskname to item 1 of argv
|
||||
tell disk diskname
|
||||
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 bounds of container window to {400, 100, 900, 699}
|
||||
set theViewOptions to the icon view options of container window
|
||||
set arrangement of theViewOptions to not arranged
|
||||
set icon size of theViewOptions to 100
|
||||
set background picture of theViewOptions to file "background.png"
|
||||
set file_list to every file
|
||||
repeat with i in file_list
|
||||
if the name of i is "Applications" then
|
||||
set the position of i to {368, 135}
|
||||
else if the name of i ends with ".app" then
|
||||
set the position of i to {134, 135}
|
||||
end if
|
||||
-- Change the 7 to change the color: 0 is no label, then red,
|
||||
-- orange, yellow, green, blue, purple, or gray.
|
||||
set the label index of i to 7
|
||||
end repeat
|
||||
update without registering applications
|
||||
delay 4
|
||||
end tell
|
||||
end tell
|
||||
end run
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 57 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 182 KiB |
|
|
@ -1,26 +0,0 @@
|
|||
-- This Applescript changes all of the icon labels on the disk image to
|
||||
-- a different color.
|
||||
-- Usage: osascript set-labels.applescript <volume-name>
|
||||
-- where <volume-name> is the volume name of the disk image.
|
||||
|
||||
on run argv
|
||||
tell application "Finder"
|
||||
set diskname to item 1 of argv
|
||||
tell disk diskname
|
||||
set file_list to every file
|
||||
repeat with i in file_list
|
||||
if the name of i is "Applications" then
|
||||
set the position of i to {368, 135}
|
||||
else if the name of i ends with ".app" then
|
||||
set the position of i to {134, 135}
|
||||
end if
|
||||
-- The magic happens here: This will set the label color of
|
||||
-- the file icon. Change the 7 to change the color: 0 is no
|
||||
-- label, then red, orange, yellow, green, blue, purple, or gray.
|
||||
set the label index of i to 7
|
||||
end repeat
|
||||
update without registering applications
|
||||
delay 4
|
||||
end tell
|
||||
end tell
|
||||
end run
|
||||
|
|
@ -931,7 +931,7 @@ class DarwinManifest(ViewerManifest):
|
|||
|
||||
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",
|
||||
os.path.join(dmg_template, "background.png"): "background.png",
|
||||
os.path.join(dmg_template, "VivoxAUP.txt"): "Vivox (Voice Services) Usage Policy.txt",
|
||||
os.path.join(dmg_template, "LGPL-license.txt"): "LGPL License.txt",
|
||||
os.path.join(dmg_template, "_DS_Store"): ".DS_Store"}.items():
|
||||
|
|
@ -939,7 +939,7 @@ class DarwinManifest(ViewerManifest):
|
|||
self.copy_action(self.src_path_of(s), os.path.join(volpath, d))
|
||||
|
||||
# Hide the background image, DS_Store file, and volume icon file (set their "visible" bit)
|
||||
for f in ".VolumeIcon.icns", "background.jpg", ".DS_Store":
|
||||
for f in ".VolumeIcon.icns", "background.png", ".DS_Store":
|
||||
pathname = os.path.join(volpath, f)
|
||||
# We've observed mysterious "no such file" failures of the SetFile
|
||||
# command, especially on the first file listed above -- yet
|
||||
|
|
@ -969,10 +969,10 @@ class DarwinManifest(ViewerManifest):
|
|||
# Set the disk image root's custom icon bit
|
||||
self.run_command('SetFile -a C %r' % volpath)
|
||||
|
||||
# Set the file labels to gray so they can be seen against the
|
||||
# black background -- TS
|
||||
# Set up the installer disk image: set icon positions, folder view
|
||||
# options, and icon label colors -- TS
|
||||
self.run_command('osascript %r %r' %
|
||||
(self.src_path_of("installers/darwin/set-labels.applescript"),
|
||||
(self.src_path_of("installers/darwin/installer-dmg.applescript"),
|
||||
volname))
|
||||
finally:
|
||||
# Unmount the image even if exceptions from any of the above
|
||||
|
|
|
|||
Loading…
Reference in New Issue