1 # -*- coding: utf-8 -*-
2 from __future__ import unicode_literals
7 # Example settings file for dmgbuild
9 # Adapted from https://raw.githubusercontent.com/al45tair/dmgbuild/master/examples/settings.py
11 # Use like this: dmgbuild -s settings.py "Test Volume" test.dmg
13 # You can actually use this file for your own application (not just TextEdit)
16 # dmgbuild -s settings.py -D app=/path/to/My.app "My Application" MyApp.dmg
18 # .. Useful stuff ..............................................................
20 ws_version = '@PROJECT_VERSION@'
21 ws_volname = 'Wireshark ' + ws_version
22 ws_srcdir = '@CMAKE_SOURCE_DIR@'
23 ws_bindir = '@CMAKE_BINARY_DIR@'
24 ws_app = 'Wireshark.app'
25 ws_readme = 'Read me first.html'
26 ws_donate = 'Donate to the Wireshark Foundation.html'
27 ws_install_chmodbpf = 'Install ChmodBPF.pkg'
28 ws_uninstall_chmodbpf = 'Uninstall ChmodBPF.pkg'
29 ws_install_path_helper = 'Add Wireshark to the system path.pkg'
30 ws_uninstall_path_helper = 'Remove Wireshark from the system path.pkg'
32 # .. Basics ....................................................................
34 # Uncomment to override the output filename
35 # filename = ws_volname + ' Intel 64.dmg'
37 # Uncomment to override the output volume name
38 # volume_name = 'Wireshark ' + ws_version
40 # From the hdiutil man page:
41 # UDZO - UDIF zlib-compressed image
42 # UDBZ - UDIF bzip2-compressed image (Mac OS X 10.4+ only)
43 # ULFO - UDIF lzfse-compressed image (OS X 10.11+ only)
44 # ULMO - UDIF lzma-compressed image (macOS 10.15+ only)
45 # Volume format (see hdiutil create -help)
47 # A test with the following bundles resulted in the following .dmg sizes,
48 # measured with `du -sm`:
53 # 51 Wireshark 3.7.0 Intel 64.dmg
54 # 81 Wireshark dSYM 3.7.0 Intel 64.dmg
57 # 51 Wireshark 3.7.0 Intel 64.dmg
58 # 81 Wireshark dSYM 3.7.0 Intel 64.dmg
61 # 40 Wireshark 3.7.0 Intel 64.dmg
62 # 50 Wireshark dSYM 3.7.0 Intel 64.dmg
64 # https://developer.apple.com/forums/thread/128166
65 # currently (Jan 2023) says to use UDZO
66 format = defines.get('format', 'UDZO')
68 # Compression level (if relevant)
76 os.path.join(ws_bindir, 'run', ws_app),
77 os.path.join(ws_bindir, 'packaging', 'macosx', 'wireshark', ws_readme),
78 os.path.join(ws_bindir, 'packaging', 'macosx', 'wireshark', ws_donate),
79 os.path.join(ws_bindir, 'run', ws_app, 'Contents', 'Resources', 'Extras', ws_install_chmodbpf),
80 os.path.join(ws_bindir, 'run', ws_app, 'Contents', 'Resources', 'Extras', ws_uninstall_chmodbpf),
81 os.path.join(ws_bindir, 'run', ws_app, 'Contents', 'Resources', 'Extras', ws_install_path_helper),
82 os.path.join(ws_bindir, 'run', ws_app, 'Contents', 'Resources', 'Extras', ws_uninstall_path_helper),
87 'Applications': '/Applications',
92 # You can either define icon, in which case that icon file will be copied to the
93 # image, *or* you can define badge_icon, in which case the icon file you specify
94 # will be used to badge the system's Removable Disk icon
96 badge_icon = os.path.join(ws_srcdir, 'packaging', 'macosx', 'wsiconvol.icns')
97 #badge_icon = icon_from_app(application)
99 # Window position in ((x, y), (w, h)) format
100 window_rect = ((600, 200), (360, 550))
102 # Where to put the icons
105 'Applications': (250, 64),
106 ws_readme: ( 80, 180),
107 ws_donate: (250, 180),
108 ws_install_chmodbpf: ( 80, 296),
109 ws_uninstall_chmodbpf: (250, 296),
110 ws_install_path_helper: ( 80, 402),
111 ws_uninstall_path_helper: (250, 402),
114 # .. Window configuration ......................................................
118 # This is a STRING containing any of the following:
120 # #3344ff - web-style RGB color
121 # #34f - web-style RGB color, short form (#34f == #3344ff)
122 # rgb(1,0,0) - RGB color, each value is between 0 and 1
123 # hsl(120,1,.5) - HSL (hue saturation lightness) color
124 # hwb(300,0,0) - HWB (hue whiteness blackness) color
125 # cmyk(0,1,0,0) - CMYK color
126 # goldenrod - X11/SVG named color
127 # builtin-arrow - A simple built-in background with a blue arrow
128 # /foo/bar/baz.png - The path to an image file
130 # The hue component in hsl() and hwb() may include a unit; it defaults to
131 # degrees ('deg'), but also supports radians ('rad') and gradians ('grad'
134 # Other color components may be expressed either in the range 0 to 1, or
135 # as percentages (e.g. 60% is equivalent to 0.6).
136 background = os.path.join(ws_srcdir, 'packaging', 'macosx', 'dmg_background.png')
138 show_status_bar = False
139 show_tab_view = False
145 # Select the default view; must be one of
152 default_view = 'icon-view'
154 # General view configuration
155 show_icon_preview = False
157 # Set these to True to force inclusion of icon/list view settings (otherwise
158 # we only include settings for the default view)
159 include_icon_view_settings = 'auto'
160 include_list_view_settings = 'auto'
162 # .. Icon view configuration ...................................................
167 scroll_position = (0, 0)
168 #label_pos = 'bottom' # or 'right'