-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·63 lines (57 loc) · 1.68 KB
/
build.sh
File metadata and controls
executable file
·63 lines (57 loc) · 1.68 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
#!/bin/bash
set -e
echo "Building Key察..."
swift build -c release
echo "Creating app bundle..."
rm -rf "Key察.app"
mkdir -p "Key察.app/Contents/MacOS"
mkdir -p "Key察.app/Contents/Resources"
cp .build/release/Keysatsu "Key察.app/Contents/MacOS/Keysatsu"
cat > "Key察.app/Contents/Info.plist" << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>Keysatsu</string>
<key>CFBundleIconFile</key>
<string>AppIcon</string>
<key>CFBundleIdentifier</key>
<string>com.hoichan.keysatsu</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Key察</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>12.0</string>
<key>LSUIElement</key>
<true/>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2024 hoichan. All rights reserved.</string>
</dict>
</plist>
EOF
# アイコンを生成
echo "Generating app icon..."
swift generate_icon.swift
cd "Key察.app/Contents/Resources"
iconutil -c icns AppIcon.iconset -o AppIcon.icns
rm -rf AppIcon.iconset
cd ../../..
echo ""
echo "Done! Key察.app created."
echo ""
echo "To install:"
echo " cp -r Key察.app /Applications/"
echo ""
echo "Then grant Accessibility permission in System Settings."