build: bundle aria2c and dependencies via dylibbundler for zero-config distribution

This commit is contained in:
nimbold
2026-06-02 06:18:38 +03:30
parent cba94a7415
commit b91f6abdb0
3 changed files with 25 additions and 8 deletions
+3
View File
@@ -41,6 +41,9 @@ jobs:
uname -a
swift --version
- name: Install dependencies
run: brew install aria2 dylibbundler
- name: Build app bundle
env:
MARKETING_VERSION: ${{ steps.version.outputs.version }}
+6 -8
View File
@@ -67,13 +67,11 @@ Firelink leverages `aria2c` under the hood as its core download engine. Unlike s
## 🛠️ Requirements & Setup
### 1. Install Dependencies
Ensure you have **Homebrew** and the **Swift toolchain** installed:
```bash
brew install aria2
```
- **OS Support:** macOS 14.0 or newer (built natively for Apple Silicon)
- **Toolchain:** Xcode 15+ / Swift 6.0 toolchain
### 1. Requirements
- **OS Support:** macOS 14.0 or newer (built natively for Apple Silicon).
- **Engine:** `aria2c` is fully packaged and bundled internally for a true Zero-Config experience. No external installations are required.
*For Developers:* If you are building the project from source, you must have the **Swift 6.0 toolchain** (Xcode 15+) installed.
### 2. Build & Run
Run the application directly via the terminal:
@@ -103,7 +101,7 @@ git push origin v0.1.0
## 🗺️ Roadmap
- [ ] **Data Persistence:** Store history, column layout preferences, and active queues across restarts.
- [ ] **Zero-Config Setup:** Automatically bundle and configure `aria2c` inside the `.app` bundle.
- [x] **Zero-Config Setup:** Automatically bundle and configure `aria2c` inside the `.app` bundle.
- [ ] **Bandwidth Limits:** Add global and per-download speed caps and calendar schedules.
- [ ] **Browser Extensions:** Capture links directly from Safari, Chrome, and Firefox.
- [ ] **Advanced Transfer Features:** Checksum validation, cookie/header ingestion, and smart mirror failovers.
+16
View File
@@ -20,6 +20,22 @@ mkdir -p "$MACOS_DIR" "$RESOURCES_DIR"
cp ".build/$CONFIGURATION/$APP_NAME" "$MACOS_DIR/$APP_NAME"
cp "$ROOT_DIR/Resources/$ICON_NAME.icns" "$RESOURCES_DIR/$ICON_NAME.icns"
ARIA2C_PATH=$(which aria2c || true)
if [[ -n "$ARIA2C_PATH" && -x "$ARIA2C_PATH" ]]; then
echo "Bundling aria2c from $ARIA2C_PATH..."
cp "$ARIA2C_PATH" "$RESOURCES_DIR/aria2c"
if ! command -v dylibbundler &> /dev/null; then
echo "Installing dylibbundler..."
brew install dylibbundler
fi
FRAMEWORKS_DIR="$CONTENTS_DIR/Frameworks"
dylibbundler -od -b -x "$RESOURCES_DIR/aria2c" -d "$FRAMEWORKS_DIR" -p "@executable_path/../Frameworks/"
else
echo "WARNING: aria2c not found! It will not be bundled. Please install it first."
fi
cat > "$CONTENTS_DIR/Info.plist" <<PLIST
<?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">