-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_app.sh
More file actions
executable file
·39 lines (31 loc) · 1.26 KB
/
Copy pathbuild_app.sh
File metadata and controls
executable file
·39 lines (31 loc) · 1.26 KB
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
#!/bin/bash
# Build Murmur.app (py2app alias mode) and sign it with a stable identity so
# macOS Accessibility permission persists across rebuilds.
#
# Usage:
# ./build_app.sh
#
# Requires: py2app in the venv (pip install py2app) and a code-signing identity
# named "Murmur Code Signing" in your login keychain. See README (Building) for
# how to create the self-signed certificate the first time.
set -euo pipefail
cd "$(dirname "$0")"
IDENTITY="Murmur Code Signing"
echo "==> Cleaning previous build"
rm -rf build dist
echo "==> Building Murmur.app (py2app, alias mode)"
./venv/bin/python setup.py py2app -A
echo "==> Installing bundle at project root"
rm -rf Murmur.app
mv dist/Murmur.app Murmur.app
echo "==> Signing with '$IDENTITY'"
if ! security find-identity -p codesigning | grep -q "$IDENTITY"; then
echo "ERROR: signing identity '$IDENTITY' not found in your keychain." >&2
echo "See the 'Building from source' section of README.md to create it." >&2
exit 1
fi
codesign --force -s "$IDENTITY" Murmur.app
codesign --verify --verbose=2 Murmur.app
echo "==> Registering with LaunchServices"
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f "$PWD/Murmur.app"
echo "==> Done. Double-click Murmur.app to launch."