-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-app.sh
More file actions
executable file
·72 lines (62 loc) · 1.76 KB
/
Copy pathbuild-app.sh
File metadata and controls
executable file
·72 lines (62 loc) · 1.76 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
66
67
68
69
70
71
72
#!/bin/bash
# Build CodexRouter as a macOS app bundle
set -e
APP_NAME="CodexRouter"
APP_DIR="build/${APP_NAME}.app"
CONTENTS_DIR="${APP_DIR}/Contents"
MACOS_DIR="${CONTENTS_DIR}/MacOS"
RESOURCES_DIR="${CONTENTS_DIR}/Resources"
echo "Building ${APP_NAME}..."
# Build the executable
swift build -c release
# Create app bundle structure
rm -rf build
mkdir -p "${MACOS_DIR}"
mkdir -p "${RESOURCES_DIR}"
# Copy executable
cp .build/release/CodexRouterApp "${MACOS_DIR}/${APP_NAME}"
# Create Info.plist
cat > "${CONTENTS_DIR}/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>CodexRouter</string>
<key>CFBundleIdentifier</key>
<string>com.codexrouter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>CodexRouter</string>
<key>CFBundleDisplayName</key>
<string>CodexRouter</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>14.0</string>
<key>LSUIElement</key>
<true/>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
EOF
# Create PkgInfo
echo -n "APPL????" > "${CONTENTS_DIR}/PkgInfo"
echo ""
echo "✅ App bundle created at: ${APP_DIR}"
echo ""
echo "To run:"
echo " open ${APP_DIR}"
echo ""
echo "To install to Applications:"
echo " cp -r ${APP_DIR} /Applications/"