1# -*- coding: utf-8 -*- 2 3 4import biplist 5import os.path 6 7application = defines.get('app', 'dist/Syncplay.app') 8appname = os.path.basename(application) 9 10 11def icon_from_app(app_path): 12 plist_path = os.path.join(app_path, 'Contents', 'Info.plist') 13 plist = biplist.readPlist(plist_path) 14 icon_name = plist['CFBundleIconFile'] 15 icon_root, icon_ext = os.path.splitext(icon_name) 16 if not icon_ext: 17 icon_ext = '.icns' 18 icon_name = icon_root + icon_ext 19 return os.path.join(app_path, 'Contents', 'Resources', icon_name) 20 21 22# Volume format (see hdiutil create -help) 23format = defines.get('format', 'UDZO') 24 25# Compression level (if relevant) 26compression_level = 9 27 28# Volume size 29size = defines.get('size', None) 30 31# Files to include 32files = [ 33 application, 34 'syncplay/resources/.macOS_readme.pdf' 35] 36 37# Symlinks to create 38symlinks = { 39 'Applications': '/Applications', 40 'Read Me': '.macOS_readme.pdf' 41} 42 43# Volume icon 44# 45# You can either define icon, in which case that icon file will be copied to the 46# image, *or* you can define badge_icon, in which case the icon file you specify 47# will be used to badge the system's Removable Disk icon 48# 49# icon = '/path/to/icon.icns' 50badge_icon = icon_from_app(application) 51 52# Where to put the icons 53icon_locations = { 54 appname: (90, 110), 55 'Applications': (410, 110), 56 'Read Me': (250, 240), 57} 58 59# .. Window configuration ...................................................... 60 61# Background 62# 63# This is a STRING containing any of the following: 64# 65# #3344ff - web-style RGB color 66# #34f - web-style RGB color, short form (#34f == #3344ff) 67# rgb(1,0,0) - RGB color, each value is between 0 and 1 68# hsl(120,1,.5) - HSL (hue saturation lightness) color 69# hwb(300,0,0) - HWB (hue whiteness blackness) color 70# cmyk(0,1,0,0) - CMYK color 71# goldenrod - X11/SVG named color 72# builtin-arrow - A simple built-in background with a blue arrow 73# /foo/bar/baz.png - The path to an image file 74# 75# The hue component in hsl() and hwb() may include a unit; it defaults to 76# degrees ('deg'), but also supports radians ('rad') and gradians ('grad' 77# or 'gon'). 78# 79# Other color components may be expressed either in the range 0 to 1, or 80# as percentages (e.g. 60% is equivalent to 0.6). 81background = 'syncplay/resources/macOS_dmg_bkg.tiff' 82 83show_status_bar = False 84show_tab_view = False 85show_toolbar = False 86show_pathbar = False 87show_sidebar = False 88sidebar_width = 180 89 90# Window position in ((x, y), (w, h)) format 91window_rect = ((100, 100), (500, 400)) 92 93# Select the default view; must be one of 94# 95# 'icon-view' 96# 'list-view' 97# 'column-view' 98# 'coverflow' 99# 100default_view = 'icon-view' 101 102# General view configuration 103show_icon_preview = False 104 105# Set these to True to force inclusion of icon/list view settings (otherwise 106# we only include settings for the default view) 107include_icon_view_settings = 'auto' 108include_list_view_settings = 'auto' 109 110# .. Icon view configuration ................................................... 111 112arrange_by = None 113grid_offset = (0, 0) 114grid_spacing = 20 115scroll_position = (0, 0) 116label_pos = 'bottom' # or 'right' 117text_size = 12 118icon_size = 80 119 120# .. List view configuration ................................................... 121 122# Column names are as follows: 123# 124# name 125# date-modified 126# date-created 127# date-added 128# date-last-opened 129# size 130# kind 131# label 132# version 133# comments 134# 135list_icon_size = 16 136list_text_size = 12 137list_scroll_position = (0, 0) 138list_sort_by = 'name' 139list_use_relative_dates = True 140list_calculate_all_sizes = False, 141list_columns = ('name', 'date-modified', 'size', 'kind', 'date-added') 142list_column_widths = { 143 'name': 300, 144 'date-modified': 181, 145 'date-created': 181, 146 'date-added': 181, 147 'date-last-opened': 181, 148 'size': 97, 149 'kind': 115, 150 'label': 100, 151 'version': 75, 152 'comments': 300, 153 } 154list_column_sort_directions = { 155 'name': 'ascending', 156 'date-modified': 'descending', 157 'date-created': 'descending', 158 'date-added': 'descending', 159 'date-last-opened': 'descending', 160 'size': 'descending', 161 'kind': 'ascending', 162 'label': 'ascending', 163 'version': 'ascending', 164 'comments': 'ascending', 165 } 166