Some checks failed
Research feed publisher tests / test (push) Failing after 3s
Release / Pre-flight checks (push) Failing after 0s
Release / Research Edition — patch and packaging smoke tests (push) Has been skipped
Release / Build Qt artifacts (false, 22, ubuntu-22.04, 3.9, ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')) }}, false, false) (push) Has been skipped
Release / Build Qt artifacts (false, 22, ubuntu-22.04, 3.9, false, false, false) (push) Has been skipped
Release / Build Qt artifacts (manylinux_2_28 — glibc 2.28 ABI floor) (22, 3.9) (push) Has been skipped
Release / Generate release notes (push) Has been skipped
Release / Create dev release tag (push) Has been skipped
CodeQL / Analyze (javascript) (push) Failing after 1s
CodeQL / Analyze (python) (push) Failing after 1s
Release / Build Qt artifacts (false, 22, windows-latest, 3.9, false, false, false) (push) Has been cancelled
Release / Build Tauri artifacts (false, 22, macos-15-intel, 3.9, false, false, false) (push) Has been cancelled
Release / Build Tauri artifacts (false, 22, macos-latest, 3.9, false, false, false) (push) Has been cancelled
Release / Build Tauri artifacts (false, 22, ubuntu-24.04, 3.9, ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')) }}, false, false) (push) Has been cancelled
Release / Build Tauri artifacts (false, 22, ubuntu-24.04, 3.9, false, false, false) (push) Has been cancelled
Release / Build Tauri artifacts (false, 22, ubuntu-24.04-arm, 3.9, false, false, false) (push) Has been cancelled
Release / Build Tauri artifacts (false, 22, windows-latest, 3.9, false, false, false) (push) Has been cancelled
Release / Build Qt artifacts (false, 22, macos-15-intel, 3.9, false, false, false) (push) Has been cancelled
Release / Build Qt artifacts (false, 22, macos-latest, 3.9, false, false, false) (push) Has been cancelled
Release / Publish draft release (push) Has been cancelled
142 lines
3.5 KiB
Python
142 lines
3.5 KiB
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import unicode_literals
|
|
|
|
import plistlib
|
|
import os.path
|
|
|
|
# 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 ..............................................................
|
|
|
|
application = defines.get('app', 'dist/ActivityWatch.app')
|
|
appname = os.path.basename(application)
|
|
|
|
def icon_from_app(app_path):
|
|
plist_path = os.path.join(app_path, 'Contents', 'Info.plist')
|
|
with open(plist_path, "rb") as f:
|
|
plist = plistlib.load(f)
|
|
icon_name = plist['CFBundleIconFile']
|
|
icon_root,icon_ext = os.path.splitext(icon_name)
|
|
if not icon_ext:
|
|
icon_ext = '.icns'
|
|
icon_name = icon_root + icon_ext
|
|
return os.path.join(app_path, 'Contents', 'Resources', icon_name)
|
|
|
|
# .. Basics ....................................................................
|
|
|
|
# Uncomment to override the output filename
|
|
# filename = 'test.dmg'
|
|
|
|
# Uncomment to override the output volume name
|
|
# volume_name = 'Test'
|
|
|
|
# Volume format (see hdiutil create -help)
|
|
format = defines.get('format', 'UDBZ')
|
|
|
|
# Volume size
|
|
size = defines.get('size', None)
|
|
|
|
# Files to include
|
|
files = [ application ]
|
|
|
|
# Symlinks to create
|
|
symlinks = { 'Applications': '/Applications' }
|
|
|
|
# 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
|
|
#
|
|
#icon = '/path/to/icon.icns'
|
|
badge_icon = icon_from_app(application)
|
|
|
|
# Where to put the icons
|
|
icon_locations = {
|
|
appname: (140, 120),
|
|
'Applications': (500, 120)
|
|
}
|
|
|
|
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 = ((100, 100), (640, 280))
|
|
|
|
default_view = 'icon-view'
|
|
|
|
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 = 16
|
|
icon_size = 128
|
|
|
|
# .. List view configuration ...................................................
|
|
|
|
# Column names are as follows:
|
|
#
|
|
# name
|
|
# date-modified
|
|
# date-created
|
|
# date-added
|
|
# date-last-opened
|
|
# size
|
|
# kind
|
|
# label
|
|
# version
|
|
# comments
|
|
#
|
|
list_icon_size = 16
|
|
list_text_size = 12
|
|
list_scroll_position = (0, 0)
|
|
list_sort_by = 'name'
|
|
list_use_relative_dates = True
|
|
list_calculate_all_sizes = False,
|
|
list_columns = ('name', 'date-modified', 'size', 'kind', 'date-added')
|
|
list_column_widths = {
|
|
'name': 300,
|
|
'date-modified': 181,
|
|
'date-created': 181,
|
|
'date-added': 181,
|
|
'date-last-opened': 181,
|
|
'size': 97,
|
|
'kind': 115,
|
|
'label': 100,
|
|
'version': 75,
|
|
'comments': 300,
|
|
}
|
|
|
|
list_column_sort_directions = {
|
|
'name': 'ascending',
|
|
'date-modified': 'descending',
|
|
'date-created': 'descending',
|
|
'date-added': 'descending',
|
|
'date-last-opened': 'descending',
|
|
'size': 'descending',
|
|
'kind': 'ascending',
|
|
'label': 'ascending',
|
|
'version': 'ascending',
|
|
'comments': 'ascending',
|
|
}
|
|
|