Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Thumbs.db

# ── Build artifacts ───────────────────────────────────────
tools/vytdl-cli/vYtDL
tools/vytdl-cli/bin/*.zip
tools/contentforge-cli/contentforge
*.exe
*.mp4
Expand All @@ -20,6 +21,8 @@ dist/
.next/
.turbo/
*.tsbuildinfo
.task/
downloadeds/*

# ── Tauri / Rust ──────────────────────────────────────────
**/src-tauri/target/
Expand Down
1 change: 0 additions & 1 deletion .task/checksum/cli-build

This file was deleted.

1 change: 0 additions & 1 deletion .task/checksum/contentforge-build

This file was deleted.

4 changes: 2 additions & 2 deletions .vscode-desktop/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
{
"label": "desktop:check",
"type": "shell",
"command": "python3",
"args": ["scripts/build-desktop.py", "check"],
"command": "task",
"args": ["-d", "apps/vytdl-desktop", "check"],
"options": { "cwd": "${workspaceFolder}" }
}
]
Expand Down
11 changes: 7 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,13 @@ Located in `tools/vytdl-cli/scripts/`:
- `build.ps1` - Cross-build helper for macOS/Linux/Windows targets on PowerShell

Located in `scripts/`:
- `start-desktop.sh` - Mac/Linux desktop startup
- `start-desktop.ps1` - Windows desktop startup
- `start-desktop.py` - Cross-platform desktop launcher
- `vytdl-launcher.py` - Python launcher (dev/build/clean/schedule)
- `download-yt-dlp-binaries.py` - Download yt-dlp binaries for bundling
- `bootstrap-ytdlp-dev.sh` - Bootstrap yt-dlp dev resources from system PATH

Desktop dev/build is driven by Task (`apps/vytdl-desktop/Taskfile.yml`):
- `task -d apps/vytdl-desktop dev` - Start desktop app in dev mode
- `task -d apps/vytdl-desktop build` / `bundle` - Production build
- Root shortcuts: `task desktop:dev` / `desktop:build` / `desktop:bundle` / `desktop:check`

Download wrapper scripts validate `yt-dlp`/`youtube-dl` availability before running.

Expand Down
30 changes: 12 additions & 18 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,58 +61,52 @@ tasks:
cmds:
- go install -trimpath -ldflags "-s -w" .

# ── Desktop App (via Python scripts) ─────────────────────
# ── Desktop App (via apps/vytdl-desktop Taskfile) ────────
desktop:check:
desc: Check desktop build dependencies (Node, pnpm, Rust)
dir: "{{.DESKTOP_DIR}}"
cmds:
- "{{.PYTHON}} scripts/build-desktop.py check"
- task -d apps/vytdl-desktop check

desktop:install:
desc: Install desktop Node dependencies
dir: "{{.DESKTOP_DIR}}"
cmds:
- pnpm install
- task -d apps/vytdl-desktop install

desktop:yt-dlp:
desc: Download yt-dlp binaries for production bundling
dir: "{{.DESKTOP_DIR}}"
cmds:
- "{{.PYTHON}} scripts/download-yt-dlp-binaries.py"

desktop:bootstrap-ytdlp:
desc: Bootstrap yt-dlp dev resources from system PATH (fallback)
dir: "{{.DESKTOP_DIR}}"
cmds:
- bash scripts/bootstrap-ytdlp-dev.sh

desktop:dev:
desc: Start desktop app in development mode
dir: "{{.DESKTOP_DIR}}"
deps: [desktop:bootstrap-ytdlp]
cmds:
- "{{.PYTHON}} scripts/build-desktop.py dev"
- task -d apps/vytdl-desktop dev
interactive: true

desktop:dev:fast:
desc: Start desktop dev mode (skip pnpm install)
dir: "{{.DESKTOP_DIR}}"
desc: Start desktop dev mode (install auto-skips when up to date)
deps: [desktop:bootstrap-ytdlp]
cmds:
- "{{.PYTHON}} scripts/build-desktop.py dev --skip-deps"
- task -d apps/vytdl-desktop dev
interactive: true

desktop:build:
desc: Build desktop app for production
dir: "{{.DESKTOP_DIR}}"
deps: [desktop:yt-dlp]
cmds:
- "{{.PYTHON}} scripts/build-desktop.py build"
- task -d apps/vytdl-desktop build

desktop:bundle:
desc: Build desktop app and create distributable package
dir: "{{.DESKTOP_DIR}}"
deps: [desktop:yt-dlp]
cmds:
- "{{.PYTHON}} scripts/build-desktop.py bundle"
- task -d apps/vytdl-desktop bundle

# ── ContentForge (via Go CLI + Python core) ──────────────
contentforge:env:
Expand Down Expand Up @@ -211,6 +205,6 @@ tasks:
echo " task contentforge:build"
echo " source packages/contentforge-core/scripts/cf-env.sh"
echo ""
echo " Direct Python (still supported):"
echo " cd vYtDL-desktop && python3 scripts/build-desktop.py dev"
echo " Desktop Taskfile (direct):"
echo " task -d apps/vytdl-desktop dev"
echo ""
2 changes: 1 addition & 1 deletion apps/contentforge-desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tauri-plugin-dialog = "2"
tauri-plugin-fs = "2"
tauri-plugin-store = "2"
tokio = { version = "1", features = ["full"] }
uuid = { version = "1", features = ["v4"] }
uuid = { version = "1", features = ["v4", "serde"] }
chrono = { version = "0.4", features = ["serde"] }
regex = "1"
sqlx = { version = "0.7", features = ["runtime-tokio", "sqlite", "chrono", "macros"] }
Expand Down
31 changes: 31 additions & 0 deletions apps/contentforge-desktop/src-tauri/REBUILD_PLAN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# ContentForge Rust Backend Rebuild 计划

## 目标
将 ContentForge 桌面端的 Rust 后端从 placeholder 实现重建为功能完整的生产级后端,参照 vYtDL-desktop 的架构模式。

## Stage 1: Database 层完善
- **文件**: `database.rs`
- **内容**: 添加所有 CRUD 方法(sessions, messages, assets, settings, pipeline_runs)
- **参考**: vYtDL-desktop/database.rs

## Stage 2: Pipeline Queue 实现
- **文件**: `pipeline_queue.rs` (新增)
- **内容**: 异步 Pipeline 执行队列管理器,支持并发控制和状态追踪
- **参考**: vYtDL-desktop/queue.rs

## Stage 3: Commands 实现
- **文件**: `commands.rs`
- **内容**: 实现所有 IPC 命令的实际逻辑
- **参考**: vYtDL-desktop/commands.rs

## Stage 4: Lib.rs 集成
- **文件**: `lib.rs`
- **内容**: 集成 queue manager,完善启动流程

## 依赖确认
- sqlx (已有)
- tokio (已有)
- uuid (已有)
- chrono (已有)
- serde (已有)
- tauri (已有)

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"default":{"identifier":"default","description":"enables the default permissions for ContentForge","local":true,"windows":["main"],"permissions":["core:default","dialog:default","dialog:allow-open","dialog:allow-confirm","fs:default",{"identifier":"fs:allow-read-dir","allow":[{"path":"$HOME/**"}]},{"identifier":"fs:allow-read-file","allow":[{"path":"$HOME/**"}]},{"identifier":"fs:allow-mkdir","allow":[{"path":"$HOME/**"}]},{"identifier":"fs:allow-exists","allow":[{"path":"$HOME/**"}]},{"identifier":"fs:allow-write-file","allow":[{"path":"$HOME/**"}]},{"identifier":"fs:allow-remove","allow":[{"path":"$HOME/**"}]},{"identifier":"fs:allow-rename","allow":[{"path":"$HOME/**"}]},"store:default","shell:allow-execute","shell:allow-spawn","shell:allow-kill","shell:allow-stdin-write",{"identifier":"shell:allow-open","allow":[{"url":"https://**"},{"url":"http://**"}]}]}}
Loading