aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/macosx/logray-app.dmgbuild.in
blob: d392109dd70942c02417c27679a82b2df0c87395 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

import biplist
import os.path

#
# Example settings file for dmgbuild
#
# Adapted from https://raw.githubusercontent.com/al45tair/dmgbuild/master/examples/settings.py

# Use like this: dmgbuild -s settings.py "Test Volume" test.dmg

# You can actually use this file for your own application (not just TextEdit)
# by doing e.g.
#
#   dmgbuild -s settings.py -D app=/path/to/My.app "My Application" MyApp.dmg

# .. Useful stuff ..............................................................

lr_version = '@LOG_PROJECT_VERSION@'
lr_volname = 'Logray ' + lr_version
lr_srcdir = '@CMAKE_SOURCE_DIR@'
lr_bindir = '@CMAKE_BINARY_DIR@'
lr_app = 'Logray.app'
lr_readme = 'Read me first.html'
lr_install_chmodbpf = 'Install ChmodBPF.pkg'
lr_uninstall_chmodbpf = 'Uninstall ChmodBPF.pkg'
lr_install_path_helper = 'Add Logray to the system path.pkg'
lr_uninstall_path_helper = 'Remove Logray from the system path.pkg'

# .. Basics ....................................................................

# Uncomment to override the output filename
# filename = lr_volname + ' Intel 64.dmg'

# Uncomment to override the output volume name
# volume_name = 'Logray ' + lr_version

# From the hdiutil man page:
# UDZO - UDIF zlib-compressed image
# UDBZ - UDIF bzip2-compressed image (Mac OS X 10.4+ only)
# ULFO - UDIF lzfse-compressed image (OS X 10.11+ only)
# ULMO - UDIF lzma-compressed image (macOS 10.15+ only)
# Volume format (see hdiutil create -help)

format = defines.get('format', 'UDBZ')

# Compression level (if relevant)
compression_level = 9

# Volume size
size = None

# Files to include
files = [
    os.path.join(lr_bindir, 'run', lr_app),
    os.path.join(lr_bindir, 'packaging', 'macosx', 'logray', lr_readme),
]

# Symlinks to create
symlinks = {
    'Applications': '/Applications',
    lr_install_chmodbpf: os.path.join(lr_app, 'Contents', 'Resources', 'Extras', lr_install_chmodbpf),
    lr_uninstall_chmodbpf: os.path.join(lr_app, 'Contents', 'Resources', 'Extras', lr_uninstall_chmodbpf),
    lr_install_path_helper: os.path.join(lr_app, 'Contents', 'Resources', 'Extras', lr_install_path_helper),
    lr_uninstall_path_helper: os.path.join(lr_app, 'Contents', 'Resources', 'Extras', lr_uninstall_path_helper),
    }

# 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
#
badge_icon = os.path.join(lr_srcdir, 'packaging', 'macosx', 'lriconvol.icns')
#badge_icon = icon_from_app(application)

# Where to put the icons
icon_locations = {
    lr_app:                     ( 80,  64),
    'Applications':             (240,  64),
    lr_readme:                  (160, 170),
    lr_install_chmodbpf:        ( 80, 276),
    lr_uninstall_chmodbpf:      (250, 276),
    lr_install_path_helper:     ( 80, 382),
    lr_uninstall_path_helper:   (250, 382),
    }

# .. 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).
background = os.path.join(lr_srcdir, 'packaging', 'macosx', 'dmg_background.png')

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
window_rect = ((600, 200), (350, 525))

# 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 = 100
scroll_position = (0, 0)
#label_pos = 'bottom' # or 'right'
text_size = 12
icon_size = 72