2017-09-28 17:52:58 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2018-04-23 22:44:19 +00:00
|
|
|
|
2017-09-28 17:52:58 +00:00
|
|
|
|
|
|
|
import biplist
|
|
|
|
import os.path
|
|
|
|
|
|
|
|
application = defines.get('app', 'dist/Syncplay.app')
|
|
|
|
appname = os.path.basename(application)
|
|
|
|
|
2018-07-23 21:08:44 +00:00
|
|
|
|
2017-09-28 17:52:58 +00:00
|
|
|
def icon_from_app(app_path):
|
|
|
|
plist_path = os.path.join(app_path, 'Contents', 'Info.plist')
|
|
|
|
plist = biplist.readPlist(plist_path)
|
|
|
|
icon_name = plist['CFBundleIconFile']
|
2018-07-23 21:08:44 +00:00
|
|
|
icon_root, icon_ext = os.path.splitext(icon_name)
|
2017-09-28 17:52:58 +00:00
|
|
|
if not icon_ext:
|
|
|
|
icon_ext = '.icns'
|
|
|
|
icon_name = icon_root + icon_ext
|
|
|
|
return os.path.join(app_path, 'Contents', 'Resources', icon_name)
|
|
|
|
|
2018-07-23 21:08:44 +00:00
|
|
|
|
2017-09-28 17:52:58 +00:00
|
|
|
# Volume format (see hdiutil create -help)
|
|
|
|
format = defines.get('format', 'UDZO')
|
|
|
|
|
|
|
|
# Compression level (if relevant)
|
|
|
|
compression_level = 9
|
|
|
|
|
|
|
|
# Volume size
|
|
|
|
size = defines.get('size', None)
|
|
|
|
|
|
|
|
# Files to include
|
2018-07-23 21:08:44 +00:00
|
|
|
files = [
|
|
|
|
application,
|
|
|
|
'resources/.macOS_readme.pdf'
|
|
|
|
]
|
2017-09-28 17:52:58 +00:00
|
|
|
|
|
|
|
# Symlinks to create
|
2018-07-23 21:08:44 +00:00
|
|
|
symlinks = {
|
|
|
|
'Applications': '/Applications',
|
|
|
|
'Read Me': '.macOS_readme.pdf'
|
|
|
|
}
|
2017-09-28 17:52:58 +00:00
|
|
|
|
|
|
|
# Volume icon
|
|
|
|
#
|
|
|
|
# You can either define icon, in which case that icon file will be copied to the
|
|
|
|
# image, *or* you can define badge_icon, in which case the icon file you specify
|
|
|
|
# will be used to badge the system's Removable Disk icon
|
|
|
|
#
|
2018-07-23 21:08:44 +00:00
|
|
|
# icon = '/path/to/icon.icns'
|
2017-09-28 17:52:58 +00:00
|
|
|
badge_icon = icon_from_app(application)
|
|
|
|
|
|
|
|
# Where to put the icons
|
|
|
|
icon_locations = {
|
2019-02-05 22:13:33 +00:00
|
|
|
appname: (90, 110),
|
|
|
|
'Applications': (410, 110),
|
|
|
|
'Read Me': (250, 240),
|
2017-09-28 17:52:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# .. Window configuration ......................................................
|
|
|
|
|
|
|
|
# Background
|
|
|
|
#
|
|
|
|
# This is a STRING containing any of the following:
|
|
|
|
#
|
|
|
|
# #3344ff - web-style RGB color
|
|
|
|
# #34f - web-style RGB color, short form (#34f == #3344ff)
|
|
|
|
# rgb(1,0,0) - RGB color, each value is between 0 and 1
|
|
|
|
# hsl(120,1,.5) - HSL (hue saturation lightness) color
|
|
|
|
# hwb(300,0,0) - HWB (hue whiteness blackness) color
|
|
|
|
# cmyk(0,1,0,0) - CMYK color
|
|
|
|
# goldenrod - X11/SVG named color
|
|
|
|
# builtin-arrow - A simple built-in background with a blue arrow
|
|
|
|
# /foo/bar/baz.png - The path to an image file
|
|
|
|
#
|
|
|
|
# The hue component in hsl() and hwb() may include a unit; it defaults to
|
|
|
|
# degrees ('deg'), but also supports radians ('rad') and gradians ('grad'
|
|
|
|
# or 'gon').
|
|
|
|
#
|
|
|
|
# Other color components may be expressed either in the range 0 to 1, or
|
|
|
|
# as percentages (e.g. 60% is equivalent to 0.6).
|
2019-02-27 21:42:04 +00:00
|
|
|
background = 'resources/macOS_legacy_dmg_bkg.png'
|
2017-09-28 17:52:58 +00:00
|
|
|
|
|
|
|
show_status_bar = False
|
|
|
|
show_tab_view = False
|
|
|
|
show_toolbar = False
|
|
|
|
show_pathbar = False
|
|
|
|
show_sidebar = False
|
|
|
|
sidebar_width = 180
|
|
|
|
|
|
|
|
# Window position in ((x, y), (w, h)) format
|
2019-02-05 22:13:33 +00:00
|
|
|
window_rect = ((100, 100), (500, 400))
|
2017-09-28 17:52:58 +00:00
|
|
|
|
|
|
|
# Select the default view; must be one of
|
|
|
|
#
|
|
|
|
# 'icon-view'
|
|
|
|
# 'list-view'
|
|
|
|
# 'column-view'
|
|
|
|
# 'coverflow'
|
|
|
|
#
|
|
|
|
default_view = 'icon-view'
|
|
|
|
|
|
|
|
# General view configuration
|
|
|
|
show_icon_preview = False
|
|
|
|
|
|
|
|
# Set these to True to force inclusion of icon/list view settings (otherwise
|
|
|
|
# we only include settings for the default view)
|
|
|
|
include_icon_view_settings = 'auto'
|
|
|
|
include_list_view_settings = 'auto'
|
|
|
|
|
|
|
|
# .. Icon view configuration ...................................................
|
|
|
|
|
|
|
|
arrange_by = None
|
|
|
|
grid_offset = (0, 0)
|
|
|
|
grid_spacing = 20
|
|
|
|
scroll_position = (0, 0)
|
2018-07-23 21:08:44 +00:00
|
|
|
label_pos = 'bottom' # or 'right'
|
2017-09-28 17:52:58 +00:00
|
|
|
text_size = 12
|
|
|
|
icon_size = 80
|
|
|
|
|
|
|
|
# .. List view configuration ...................................................
|
|
|
|
|
|
|
|
# Column names are as follows:
|
|
|
|
#
|
|
|
|
# name
|
|
|
|
# date-modified
|
|
|
|
# date-created
|
|
|
|
# date-added
|
|
|
|
# date-last-opened
|
|
|
|
# size
|
|
|
|
# kind
|
|
|
|
# label
|
|
|
|
# version
|
|
|
|
# comments
|
|
|
|
#
|
|
|
|
list_icon_size = 16
|
|
|
|
list_text_size = 12
|
|
|
|
list_scroll_position = (0, 0)
|
|
|
|
list_sort_by = 'name'
|
|
|
|
list_use_relative_dates = True
|
|
|
|
list_calculate_all_sizes = False,
|
|
|
|
list_columns = ('name', 'date-modified', 'size', 'kind', 'date-added')
|
|
|
|
list_column_widths = {
|
|
|
|
'name': 300,
|
|
|
|
'date-modified': 181,
|
|
|
|
'date-created': 181,
|
|
|
|
'date-added': 181,
|
|
|
|
'date-last-opened': 181,
|
|
|
|
'size': 97,
|
|
|
|
'kind': 115,
|
|
|
|
'label': 100,
|
|
|
|
'version': 75,
|
|
|
|
'comments': 300,
|
|
|
|
}
|
|
|
|
list_column_sort_directions = {
|
|
|
|
'name': 'ascending',
|
|
|
|
'date-modified': 'descending',
|
|
|
|
'date-created': 'descending',
|
|
|
|
'date-added': 'descending',
|
|
|
|
'date-last-opened': 'descending',
|
|
|
|
'size': 'descending',
|
|
|
|
'kind': 'ascending',
|
|
|
|
'label': 'ascending',
|
|
|
|
'version': 'ascending',
|
|
|
|
'comments': 'ascending',
|
|
|
|
}
|