FEAT: cài đặt các thư viện để chuẩn bị build exe trên window
This commit is contained in:
@@ -2925,3 +2925,37 @@
|
||||
- **FIX (app.jsx effect follow):** `const playing = isPlaying || !!st.isPlaying` — follow khi piano roll play LẪN main play; deps thêm `st.isPlaying`.
|
||||
- **Các file ảnh hưởng:** `app/static/js/app.jsx`, `app/templates/index.html` (?v=202608070950), `wiki.md`. Rebuild precompiled (build PASS).
|
||||
- **Ghi chú/Test:** hard refresh → PIANO ROLL → play (tab) → playhead ở giữa + notes trôi trái; stop → về đầu.
|
||||
|
||||
### [2026-08-08 08:15] Task: Desktop VST3/AU — scan + Plugin Manager (branch desktop-alone, spec 2026-08-08)
|
||||
- **Checkout:** branch `desktop-alone` ✓ — cài đặt tính năng VST plugin theo spec (scan/display/assign).
|
||||
- **Backend:**
|
||||
(1) `app/core/vst_scanner.py` — `NativePluginScanner.scan_directories(paths)` — quét .vst3 (mọi OS) + .component (macOS) → {id, name, type, format, category, vendor, path, is_instrument, has_native_gui} — đọc vendor từ Info.plist (best-effort).
|
||||
(2) `app/api/v1/desktop_plugins.py` — `POST /api/v1/desktop/plugins/scan` (router prefix /api/v1/desktop — đúng spec) — nhận custom_directories/scan_formats/force_rescan → response {status, os, scanned_directories, total_found, plugins[]}; thư mục mặc định theo OS (Linux /opt/daw_engine/vst3+~/.vst3; Windows %ProgramFiles%\Common Files\VST3; macOS /Library/Audio/Plug-Ins/Components).
|
||||
(3) `app/main.py` — include desktop_plugins_router.
|
||||
- **Frontend (app.jsx):** nút "🔌 Quét VST Directory…" (cuối instrument dropdown) → PluginManager Modal: input path + [Scan] (spinner/Scanning…) + list plugin (tên/path/format) → click plugin → `setTrackInstrumentWithUndo(trackId, plugin_id, "Name (VST3)")` (label track cập nhật) + đóng modal. Giữ instrumentDropdownTrackId khi mở modal (không null).
|
||||
- **Các file ảnh hưởng:** app/core/vst_scanner.py, app/api/v1/desktop_plugins.py, app/main.py, app/static/js/app.jsx, app/templates/index.html (?v=202608080815), wiki.md. Build precompiled PASS.
|
||||
- **Ghi chú/Test:** python test scanner (2 plugin giả OK). E2E: mở track instrument dropdown → Quét VST Directory → nhập /opt/daw_engine/vst3 → Scan → chọn plugin → label track thành "🎵 Name (VST3)".
|
||||
|
||||
### [2026-08-08 08:20] Task: VST3 — ĐỒNG BỘ state + render đúng tiếng (spec 2 điểm then chốt)
|
||||
- **User chỉ ra 2 điểm:** (A) synth_engine phải đầy đủ {type, plugin_id, plugin_name, format, plugin_path}; (B) render dùng `pedalboard.load_plugin(plugin_path)`.
|
||||
- **A — Frontend (app.jsx):**
|
||||
(1) `setTrackInstrumentWithProgram` — thêm param `vstMeta` ({plugin_name, format, plugin_path}) — synth_engine vst3 → spread đủ 5 field theo spec (isVstInstrument: id vst3_/au_ hoặc vstMeta.format).
|
||||
(2) `setTrackInstrumentWithUndo` — nhận + truyền vstMeta.
|
||||
(3) Dropdown VST + PluginManager modal — gọi với vstMeta (plugin_name/format/plugin_path từ item scan).
|
||||
(4) API `/available` (`vst_engine.list_available`) — vst_instruments thêm `path` + id chuẩn `vst3_<name>`.
|
||||
- **B — Backend:**
|
||||
(1) `vst_engine.load_vst` — NHẬN PATH trực tiếp (đuôi .vst3/.so/.component hoặc chứa dấu / hoặc \ → os.path.exists → VST3Plugin(path)) — fallback tên cũ.
|
||||
(2) `render_engine` — đọc `se.plugin_path` → `load_vst(vst_path or instrument_id)` — nhánh Pedalboard render (đã có — midi_messages + Pedalboard([vst])) giờ load đúng plugin.
|
||||
- **Các file ảnh hưởng:** app/core/vst_engine.py, app/core/render_engine.py, app/static/js/app.jsx, app/templates/index.html (?v=202608080820), wiki.md. Build PASS (plugin_path ×3) + ast OK.
|
||||
- **Ghi chú/Test:** chọn VST (dropdown hoặc modal) → track.synth_engine = {type:'vst3', plugin_id, plugin_name, format, plugin_path} → Render/Bounce → render_engine load VST3 qua pedalboard theo path → WAV đúng tiếng plugin (cần pedalboard cài + plugin thật ở path).
|
||||
|
||||
### [2026-08-08 08:30] Task: Windows .exe installer — packaging theo spec (PyInstaller + Tauri v2 sidecar)
|
||||
- **Spec 08-27:** Dual-Process Desktop — (1) daw_engine.exe (PyInstaller — FastAPI bind localhost:8000) + (2) Tauri v2 shell (WebView2) — sidecar — NSIS/MSI installer.
|
||||
- **Môi trường hiện tại = Linux → KHÔNG build .exe trực tiếp** → tạo ĐỦ file build + CI workflow (windows-latest) → artifact .exe tải xuống.
|
||||
- **Đã tạo:**
|
||||
(1) `main.py` (root entry — uvicorn 127.0.0.1:8000 + auto-open browser).
|
||||
(2) `engine.spec` (spec — collect pedalboard/soundfile/fluidsynth DLL + static/templates/storage datas + hiddenimports; console=False; upx).
|
||||
(3) `src-tauri/` — tauri.conf.json (window url=http://127.0.0.1:8000, externalBin daw_engine, targets nsis+msi), Cargo.toml (tauri 2 + tauri-plugin-shell), build.rs, src/main.rs, src/lib.rs (spawn sidecar + kill khi window destroyed — theo spec), capabilities/default.json (shell:allow-spawn/open), icons (32/128 png + icon.ico — tools/mkicons.py).
|
||||
(4) `.github/workflows/windows-build.yml` — windows-latest: python 3.11 + node + rust → pip deps → Babel precompile → pyinstaller engine.spec → copy sidecar (daw_engine-x86_64-pc-windows-msvc.exe) → npx tauri build → upload artifact (NSIS .exe + MSI + daw_engine.exe).
|
||||
- **Các file ảnh hưởng:** main.py, engine.spec, src-tauri/*, .github/workflows/windows-build.yml, tools/mkicons.py, wiki.md.
|
||||
- **Ghi chú/Test:** push lên GitHub (branch desktop-alone) → Actions → workflow_dispatch (hoặc tag v*) → tải artifact "SonicForgeDAW-windows" → chạy setup.exe trên máy Windows (test: daw_engine xuất hiện Task Manager, /docs mở, VST3 scan, Export WAV).
|
||||
|
||||
Reference in New Issue
Block a user