-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbundle.sh
More file actions
executable file
·46 lines (36 loc) · 1.18 KB
/
Copy pathbundle.sh
File metadata and controls
executable file
·46 lines (36 loc) · 1.18 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
#!/bin/bash
# Build and bundle BrowserRouter.app
set -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
APP_NAME="BrowserRouter"
BUNDLE_DIR="$PROJECT_DIR/build/$APP_NAME.app"
INSTALL_DIR="$HOME/Applications"
echo "Building $APP_NAME..."
cd "$PROJECT_DIR"
swift build -c release
echo "Creating app bundle..."
rm -rf "$BUNDLE_DIR"
mkdir -p "$BUNDLE_DIR/Contents/MacOS"
mkdir -p "$BUNDLE_DIR/Contents/Resources"
# Copy binary
cp ".build/release/$APP_NAME" "$BUNDLE_DIR/Contents/MacOS/"
# Copy Info.plist
cp "$PROJECT_DIR/$APP_NAME/Info.plist" "$BUNDLE_DIR/Contents/"
# Copy app icon
cp "$PROJECT_DIR/AppIcon.icns" "$BUNDLE_DIR/Contents/Resources/"
# Create PkgInfo
echo -n "APPL????" > "$BUNDLE_DIR/Contents/PkgInfo"
echo "Installing to $INSTALL_DIR..."
mkdir -p "$INSTALL_DIR"
rm -rf "$INSTALL_DIR/$APP_NAME.app"
cp -R "$BUNDLE_DIR" "$INSTALL_DIR/"
echo ""
echo "Done! $APP_NAME.app installed to $INSTALL_DIR"
echo ""
echo "Next steps:"
echo " 1. Open $INSTALL_DIR/$APP_NAME.app"
echo " 2. Go to System Settings → Desktop & Dock → Default web browser"
echo " 3. Select BrowserRouter from the dropdown"
echo ""
echo "Or run: open '$INSTALL_DIR/$APP_NAME.app'"