feat: native host bridge integration — C++ bridge, Rust SHM, JS routing, build scripts, docs

- native_bridge/: InstrumentEngineManager multi-channel, sample-accurate, CC/program/pitchbend, transport, Vst3Instrument stub (HAVE_VST3SDK)
- src-tauri: shm.rs, bridge spawn + audio pump + health monitor, open_vst_gui, externalBin, commands
- app: UnifiedMidiRouter, NativeBridgeService, bridgeAudioNode, audioRoutingEngine, Plugin Manager UI, Bridge/WASM indicator, set_position sync
- build: 3 ps1 (force-added, build/ ignored), verify_bundle --check-bridge, CI workflow
- docs: TASKS.md, TEST_NOTES.md (Windows verify checklist), install/report updates
This commit is contained in:
locpham
2026-08-11 23:37:29 +07:00
parent aae0b05473
commit c3368d0a91
37 changed files with 2970 additions and 80 deletions
+28
View File
@@ -302,3 +302,31 @@ Tất cả 7 task trong kế hoạch đã hoàn thành:
7. ✅ Kiểm thử hệ thống
**Hệ thống SonicForge Studio đã sẵn sàng sử dụng! 🎉**
---
## 🆕 Bản 1.2 — Bản Desktop Windows (Tauri v2 + 2 sidecar)
> Report trên là môi trường **Docker/server** (dev). Từ bản 1.2, bản phát hành
> desktop là **Tauri v2 shell + 2 sidecar** — xem `DESKTOP_INSTALL_PLAN.md` §5.2.
- **Sidecar 1** `daw_engine.exe` (FastAPI/PyInstaller onedir, port 8000-8010):
bundle.resources → `src-tauri/resources/daw_engine/`; `SF_PARENT_PID` để
watchdog tự thoát khi Tauri đóng.
- **Sidecar 2** `daw_vst_bridge.exe` (C++ Native Host Bridge): vcpkg
(fluidsynth/sfizz) + vst3sdk submodule; `bundle.externalBin`
`src-tauri/binaries/daw_vst_bridge-x86_64-pc-windows-msvc.exe`; trao đổi qua
shared memory `SonicForge_DAW_IPC` (struct 11160 bytes — sync
SharedMemoryIPC.h ↔ src-tauri/src/shm.rs ↔ tests/shm_selfcheck.cpp).
- **IPC control**: LOAD/TRANSPORT(panic|play|set_position)/OPEN_GUI(HWND) qua
SHM control queue; MIDI 0x9/0x8/0xB/0xC/0xE + sampleOffset.
- **API mới**: `GET /api/v1/bridge/status`, `POST /api/v1/bridge/load`,
`GET /api/v1/bridge/log`.
- **Build 1 lệnh**: `build/scripts/build_windows.ps1` (7 bước: kill → pip →
frontend → engine → copy → bridge → vc_redist → tauri build NSIS+MSI);
verify: `tools/verify_bundle.py --check-bridge`.
- **YC runtime**: VC++ 2015-2022 Redistributable cho cả 2 sidecar (NSIS hook
tự cài; MSI không chạy hooks → cài thủ công).
- **Trạng thái**: code + selfcheck SHM pass trên Linux; chưa build trên
Windows (thiếu rustc/CMake-MSVC tại máy dev) — chạy `test_standalone.ps1`
trên máy Windows sau khi cài.