1# -*- coding: utf-8 -*- 2from __future__ import unicode_literals 3 4import biplist 5import os.path 6 7# 8# Example settings file for dmgbuild 9# 10# Adapted from https://raw.githubusercontent.com/al45tair/dmgbuild/master/examples/settings.py 11 12# Use like this: dmgbuild -s settings.py "Test Volume" test.dmg 13 14# You can actually use this file for your own application (not just TextEdit) 15# by doing e.g. 16# 17# dmgbuild -s settings.py -D app=/path/to/My.app "My Application" MyApp.dmg 18 19# .. Useful stuff .............................................................. 20 21ws_version = '@VERSION@' 22ws_volname = 'Wireshark ' + ws_version 23ws_srcdir = '@CMAKE_SOURCE_DIR@' 24ws_bindir = '@CMAKE_BINARY_DIR@' 25ws_app = 'Wireshark.app' 26ws_readme = 'Read me first.html' 27ws_install_chmodbpf = 'Install ChmodBPF.pkg' 28ws_uninstall_chmodbpf = 'Uninstall ChmodBPF.pkg' 29ws_install_path_helper = 'Add Wireshark to the system path.pkg' 30ws_uninstall_path_helper = 'Remove Wireshark from the system path.pkg' 31 32# .. Basics .................................................................... 33 34# Uncomment to override the output filename 35# filename = ws_volname + ' Intel 64.dmg' 36 37# Uncomment to override the output volume name 38# volume_name = 'Wireshark ' + ws_version 39 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# Volume format (see hdiutil create -help) 45format = defines.get('format', 'UDBZ') 46 47# Compression level (if relevant) 48compression_level = 9 49 50# Volume size 51size = None 52 53# Files to include 54files = [ 55 os.path.join(ws_bindir, 'run', ws_app), 56 os.path.join(ws_bindir, 'packaging', 'macosx', ws_readme), 57] 58 59# Symlinks to create 60symlinks = { 61 'Applications': '/Applications', 62 ws_install_chmodbpf: os.path.join(ws_app, 'Contents', 'Resources', 'Extras', ws_install_chmodbpf), 63 ws_uninstall_chmodbpf: os.path.join(ws_app, 'Contents', 'Resources', 'Extras', ws_uninstall_chmodbpf), 64 ws_install_path_helper: os.path.join(ws_app, 'Contents', 'Resources', 'Extras', ws_install_path_helper), 65 ws_uninstall_path_helper: os.path.join(ws_app, 'Contents', 'Resources', 'Extras', ws_uninstall_path_helper), 66 } 67 68# Volume icon 69# 70# You can either define icon, in which case that icon file will be copied to the 71# image, *or* you can define badge_icon, in which case the icon file you specify 72# will be used to badge the system's Removable Disk icon 73# 74badge_icon = os.path.join(ws_srcdir, 'packaging', 'macosx', 'wsiconvol.icns') 75#badge_icon = icon_from_app(application) 76 77# Where to put the icons 78icon_locations = { 79 ws_app: ( 80, 64), 80 'Applications': (240, 64), 81 ws_readme: (160, 170), 82 ws_install_chmodbpf: ( 80, 276), 83 ws_uninstall_chmodbpf: (250, 276), 84 ws_install_path_helper: ( 80, 382), 85 ws_uninstall_path_helper: (250, 382), 86 } 87 88# .. Window configuration ...................................................... 89 90# Background 91# 92# This is a STRING containing any of the following: 93# 94# #3344ff - web-style RGB color 95# #34f - web-style RGB color, short form (#34f == #3344ff) 96# rgb(1,0,0) - RGB color, each value is between 0 and 1 97# hsl(120,1,.5) - HSL (hue saturation lightness) color 98# hwb(300,0,0) - HWB (hue whiteness blackness) color 99# cmyk(0,1,0,0) - CMYK color 100# goldenrod - X11/SVG named color 101# builtin-arrow - A simple built-in background with a blue arrow 102# /foo/bar/baz.png - The path to an image file 103# 104# The hue component in hsl() and hwb() may include a unit; it defaults to 105# degrees ('deg'), but also supports radians ('rad') and gradians ('grad' 106# or 'gon'). 107# 108# Other color components may be expressed either in the range 0 to 1, or 109# as percentages (e.g. 60% is equivalent to 0.6). 110background = os.path.join(ws_srcdir, 'packaging', 'macosx', 'dmg_background.png') 111 112show_status_bar = False 113show_tab_view = False 114show_toolbar = False 115show_pathbar = False 116show_sidebar = False 117sidebar_width = 180 118 119# Window position in ((x, y), (w, h)) format 120window_rect = ((600, 200), (350, 525)) 121 122# Select the default view; must be one of 123# 124# 'icon-view' 125# 'list-view' 126# 'column-view' 127# 'coverflow' 128# 129default_view = 'icon-view' 130 131# General view configuration 132show_icon_preview = False 133 134# Set these to True to force inclusion of icon/list view settings (otherwise 135# we only include settings for the default view) 136include_icon_view_settings = 'auto' 137include_list_view_settings = 'auto' 138 139# .. Icon view configuration ................................................... 140 141arrange_by = None 142grid_offset = (0, 0) 143#grid_spacing = 100 144scroll_position = (0, 0) 145#label_pos = 'bottom' # or 'right' 146text_size = 12 147icon_size = 72 148