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