Skip to content

Commit

Permalink
ci: progress on codesigning macOS builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Jun 23, 2021
1 parent 9ac2e2f commit 5e6ba5a
Show file tree
Hide file tree
Showing 6 changed files with 176 additions and 109 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ dist/ActivityWatch.dmg: dist/ActivityWatch.app
dmgbuild -s scripts/package/dmgbuild-settings.py -D app=dist/ActivityWatch.app "ActivityWatch" dist/ActivityWatch.dmg

dist/ActivityWatch.app: aw-qt/media/logo/logo.icns
pip install git+git://github.com/pyinstaller/pyinstaller.git@55c8855d9db0fa596ceb28505f3ee2f402ecd4da
pyinstaller --clean --noconfirm --windowed aw.spec
# 2021-06-23: Needs develop branch PyInstaller (has better macOS support, signing, etc)
pyinstaller --clean --noconfirm --windowed --codesign-identity 'XM9GC3SUL2' aw.spec

package:
mkdir -p dist/activitywatch
Expand Down
19 changes: 16 additions & 3 deletions aw.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ current_release = subprocess.run(
).stdout.strip()
print("bundling activitywatch version " + current_release)

entitlements_file = Path(".") / "scripts" / "package" / "entitlements.plist"
codesign_identity = "XM9GC3SUL2"

aw_core_path = Path(os.path.dirname(aw_core.__file__))
restx_path = Path(os.path.dirname(flask_restx.__file__))

Expand Down Expand Up @@ -153,6 +156,7 @@ aww_exe = EXE(
strip=False,
upx=True,
console=True,
codesign_identity=codesign_identity,
)
aww_coll = COLLECT(
aww_exe,
Expand All @@ -174,6 +178,7 @@ awa_exe = EXE(
strip=False,
upx=True,
console=True,
codesign_identity=codesign_identity,
)
awa_coll = COLLECT(
awa_exe,
Expand All @@ -196,6 +201,7 @@ aws_exe = EXE(
strip=False,
upx=True,
console=True,
codesign_identity=codesign_identity,
)
aws_coll = COLLECT(
aws_exe,
Expand All @@ -218,6 +224,7 @@ awq_exe = EXE(
upx=True,
icon=icon,
console=False if platform.system() == "Windows" else True,
codesign_identity=codesign_identity,
)
awq_coll = COLLECT(
awq_exe,
Expand All @@ -237,11 +244,17 @@ if platform.system() == "Darwin":
aws_coll,
name="ActivityWatch.app",
icon=icon,
bundle_identifier="ActivityWatch",
bundle_identifier="net.activitywatch.ActivityWatch",
# Not respected?
codesign_identity=codesign_identity,
entitlements_file=entitlements_file,
version=current_release.lstrip('v'),
info_plist={
"CFBundleExecutable": "MacOS/aw-qt",
"CFBundleIconFile": "logo.icns",
# TODO: Get the right version here
"CFBundleShortVersionString": current_release,
# This could be set to a more specific version string (including the commit id, for example)
"CFBundleVersion": current_release.lstrip('v'),
# Replaced by the 'version' kwarg above
#"CFBundleShortVersionString": current_release.lstrip('v'),
},
)
Loading

0 comments on commit 5e6ba5a

Please sign in to comment.