-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
65 lines (51 loc) · 2.29 KB
/
Copy pathjustfile
File metadata and controls
65 lines (51 loc) · 2.29 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# this is all macOS
signing_identity := "Developer ID Application: Moritz Brödel (7P73434GLV)"
bundle_path := "target/dx/GroupCtrl/bundle/macos/macos"
app_path := bundle_path / "GroupCtrl.app"
zip_path := bundle_path / "GroupCtrl.zip"
arm := "aarch64-apple-darwin"
intel := "x86_64-apple-darwin"
test: (bundle arm)
rm -rf /Applications/GroupCtrl.app
cp -r {{ app_path }} /Applications
release: icon (build arm) (rename-dmg "Arm") (build intel) (rename-dmg "Intel")
shasum -a 256 target/*.dmg
build arch: (bundle arch)
just sign notarize dmg # force repeat execution
bundle arch:
dx bundle --release --package-types macos --target {{ arch }}
just patch-plist
# Dioxus bug
patch-plist:
plutil -insert LSUIElement -bool true {{ app_path }}/Contents/Info.plist
sign:
codesign --force --options runtime --sign "{{ signing_identity }}" {{ app_path }}
notarize:
ditto -c -k --keepParent {{ app_path }} {{ zip_path }}
xcrun notarytool submit {{ zip_path }} --keychain-profile dev --wait
xcrun stapler staple {{ app_path }}
dmg:
create-dmg {{ app_path }} target --overwrite || { echo "run: npm install -g create-dmg"; exit 1; }
version := `sed -nE 's/^version = "(.*)"/\1/p' Cargo.toml`
rename-dmg arch:
mv "target/GroupCtrl {{ version }}.dmg" "target/GroupCtrl-{{ version }}-{{ arch }}.dmg"
[working-directory('assets/icons')]
icon-dev:
# generate outlined versions that don't depend on system font
inkscape icon-dev.svg --export-text-to-path --export-type=svg --export-filename=icon.svg
inkscape tray-icon-dev.svg --export-text-to-path --export-type=svg --export-filename=tray-icon.svg
[working-directory('assets/icons')]
icon:
rsvg-convert tray-icon.svg | magick png:- tray-icon.rgba
mkdir -p icon.iconset
for size in 16 32 128 256 512; do \
rsvg-convert -w $size icon.svg -o icon.iconset/icon_${size}x${size}.png; \
rsvg-convert -w $((size*2)) icon.svg -o icon.iconset/icon_${size}x${size}@2x.png; \
done
iconutil -c icns icon.iconset --output icon.icns
rm -rf icon.iconset
[working-directory('assets')]
screenshot:
cp screenshot.png screenshot.bak.png
magick screenshot.png -channel A -threshold 99% +channel -trim +repage screenshot.png
magick screenshot.png -bordercolor transparent -border 50x25 screenshot.png