diff --git a/README.md b/README.md index 498137db..aca2a2a8 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ AI Agent workspace for coding and knowledge work [![GitHub release](https://img.shields.io/github/v/release/GCWing/BitFun?style=flat-square&color=blue)](https://github.com/GCWing/BitFun/releases) [![Website](https://img.shields.io/badge/Website-openbitfun.com-6f42c1?style=flat-square)](https://openbitfun.com/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow?style=flat-square)](https://github.com/GCWing/BitFun/blob/main/LICENSE) -[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS-blue?style=flat-square)](https://github.com/GCWing/BitFun) +[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-blue?style=flat-square)](https://github.com/GCWing/BitFun) @@ -89,7 +89,7 @@ The project is built with Rust + TypeScript for cross-platform reuse, keeping yo | Form Factor | Supported Platforms | Status | |---|---|---| -| **Desktop** | Windows, macOS | ✅ Supported (Tauri) | +| **Desktop** | Windows, macOS, Linux | ✅ Supported (Tauri) | | **Remote Control** | Mobile browser, Telegram, Feishu | ✅ Supported | --- @@ -124,6 +124,29 @@ pnpm run desktop:build For more details, see the [Chinese Contributing Guide](./CONTRIBUTING_CN.md). +### Linux Build + +#### Prerequisites + +Install system dependencies: + +```bash +# Debian/Ubuntu +sudo apt install libwebkit2gtk-4.1-dev build-essential libgtk-3-dev \ + libayatana-appindicator3-dev librsvg2-dev patchelf +``` + +See [docs/linux-setup.md](docs/linux-setup.md) for other distributions (Arch, Fedora, etc.). + +#### Build + +```bash +pnpm install +pnpm run desktop:build:linux +``` + +Output will be in `src/apps/desktop/target/release/bundle/` (`.deb`, `.rpm`, `.AppImage`). + --- ## Contributing diff --git a/docs/linux-setup.md b/docs/linux-setup.md new file mode 100644 index 00000000..50b34a4a --- /dev/null +++ b/docs/linux-setup.md @@ -0,0 +1,66 @@ +# Linux Development Setup + +## System Requirements + +### Debian/Ubuntu + +```bash +sudo apt update +sudo apt install -y \ + libwebkit2gtk-4.1-dev \ + build-essential \ + curl \ + wget \ + file \ + libxdo-dev \ + libssl-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + pkg-config \ + libglib2.0-dev \ + libgtk-3-dev \ + patchelf +``` + +### Arch Linux + +```bash +sudo pacman -S --needed \ + webkit2gtk-4.1 \ + base-devel \ + curl \ + wget \ + file \ + openssl \ + appmenu-gtk-module \ + libappindicator-gtk3 \ + librsvg \ + xdotool +``` + +### Fedora + +```bash +sudo dnf check-update +sudo dnf install \ + webkit2gtk4.1-devel \ + openssl-devel \ + curl \ + wget \ + file \ + libappindicator-gtk3-devel \ + librsvg2-devel \ + libxdo-devel +sudo dnf group install "c-development" +``` + +## Verify Installation + +After installing dependencies, verify with: + +```bash +# Check pkg-config can find webkit2gtk-4.1 +pkg-config --modversion webkit2gtk-4.1 + +# Expected output: version number (e.g., 2.44.0) +``` diff --git a/package.json b/package.json index b9d534a6..3bdf60c6 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,10 @@ "desktop:build:nsis": "cross-env-shell CI=true \"cd src/apps/desktop && tauri build --bundles nsis\"", "desktop:build:arm64": "cross-env-shell CI=true \"cd src/apps/desktop && tauri build --target aarch64-apple-darwin --bundles dmg\"", "desktop:build:x86_64": "cross-env-shell CI=true \"cd src/apps/desktop && tauri build --target x86_64-apple-darwin --bundles dmg\"", + "desktop:build:linux": "cross-env-shell CI=true 'cd src/apps/desktop && tauri build'", + "desktop:build:linux:deb": "cross-env-shell CI=true 'cd src/apps/desktop && tauri build --bundles deb'", + "desktop:build:linux:rpm": "cross-env-shell CI=true 'cd src/apps/desktop && tauri build --bundles rpm'", + "desktop:build:linux:appimage": "cross-env-shell CI=true 'cd src/apps/desktop && tauri build --bundles appimage'", "installer:build": "pnpm --dir BitFun-Installer run installer:build", "installer:build:fast": "pnpm --dir BitFun-Installer run installer:build:fast", "installer:build:only": "pnpm --dir BitFun-Installer run installer:build:only", @@ -68,5 +72,8 @@ "typescript": "~5.8.3", "vite": "^7.0.4" }, - "packageManager": "pnpm@10.15.0+sha512.486ebc259d3e999a4e8691ce03b5cac4a71cbeca39372a9b762cb500cfdf0873e2cb16abe3d951b1ee2cf012503f027b98b6584e4df22524e0c7450d9ec7aa7b" + "packageManager": "pnpm@10.15.0+sha512.486ebc259d3e999a4e8691ce03b5cac4a71cbeca39372a9b762cb500cfdf0873e2cb16abe3d951b1ee2cf012503f027b98b6584e4df22524e0c7450d9ec7aa7b", + "dependencies": { + "pnpm": "^10.32.1" + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e6bf037f..98c0d8b3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,10 @@ settings: importers: .: + dependencies: + pnpm: + specifier: ^10.32.1 + version: 10.32.1 devDependencies: '@tauri-apps/cli': specifier: ^2.10.0 @@ -3694,6 +3698,11 @@ packages: placeholder-loading@0.7.0: resolution: {integrity: sha512-C9M9dra5nZF/qfFF0trA3dZTQ2j6qxxoAnqWcyF+bKWhoTQIiCYIptj9BTTuihdQjm9M/vIbbYtTEvvT+8etEg==} + pnpm@10.32.1: + resolution: {integrity: sha512-pwaTjw6JrBRWtlY+q07fHR+vM2jRGR/FxZeQ6W3JGORFarLmfWE94QQ9LoyB+HMD5rQNT/7KnfFe8a1Wc0jyvg==} + engines: {node: '>=18.12'} + hasBin: true + pointer-tracker@2.5.3: resolution: {integrity: sha512-LiJUeIbzk4dXq678YeyrZ++mdY17q4n/2sBHfU9wIuvmSzdiPgMvmvWN2g8mY4J7YwYOIrqrZUWP/MfFHVwYtg==} @@ -8681,6 +8690,8 @@ snapshots: placeholder-loading@0.7.0: {} + pnpm@10.32.1: {} + pointer-tracker@2.5.3: {} points-on-curve@0.2.0: {} diff --git a/src/apps/desktop/tauri.conf.json b/src/apps/desktop/tauri.conf.json index 38db91f1..4bdb3914 100644 --- a/src/apps/desktop/tauri.conf.json +++ b/src/apps/desktop/tauri.conf.json @@ -13,10 +13,19 @@ "targets": "all", "icon": [ "icons/icon.icns", - "icons/icon.ico" + "icons/icon.ico", + "icons/icon.png" ], "resources": { "../../mobile-web/dist": "mobile-web/dist" + }, + "linux": { + "deb": { + "depends": [ + "libwebkit2gtk-4.1-0", + "libgtk-3-0" + ] + } } }, "app": {