From 068de2cb23a231d285d0bf18005e2f8561aedece Mon Sep 17 00:00:00 2001 From: locpham Date: Sat, 22 Aug 2026 04:13:12 +0000 Subject: [PATCH] docs(wiki): ghi nhan DEPLOY tu dong Windows + ket qua verify cuoi (44 FX, 5 instrument) --- wiki.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wiki.md b/wiki.md index 067af69..f142909 100644 --- a/wiki.md +++ b/wiki.md @@ -9,6 +9,15 @@ - **Các file ảnh hưởng:** `app/core/vst_engine.py`, `app/api/v1/plugins.py`, `app/static/js/app.jsx`, `app/static/js/app.precompiled.js` (rebuild babel, LF), `app/templates/index.html` (?v=202608220330), `tests/test_vst_engine.py` (+4 test cache TTL/invalidate/no-bridge), `dist/daw_engine/_internal/app/static/js/app.precompiled.js` + `templates/index.html` (sync). - **Ghi chú/Test:** pytest: 121 passed, 2 failed (pre-existing — thiếu ffmpeg/fx_vst_bridge trên máy dev Linux, fail cả trước khi sửa). Probe lại trên máy Windows sau deploy: `/plugins/fx` phải trả 44 plugin KHÔNG cần refresh; `/available` phải LOẠI FX khỏi vst_instruments. Package deploy: `/workspace/deploy_fx_fix/` (4 file + deploy.ps1) hoặc `deploy_fx_fix.zip`. ⚠️ Máy 192.168.1.24 chạy SOURCE (uvicorn, ?v=202608212200) → copy 4 file vào `C:\Users\locpham\SonicForgeStudio` + restart engine + hard refresh browser. +### [2026-08-22] Task: DEPLOY tự động lên máy Windows 192.168.1.24 (qua SSH key /workspace/.ssh/id_ed25519) + rebuild PyInstaller +- **Phát hiện:** máy chạy BUNDLE exe (frozen — storage ở `%APPDATA%\SonicForgeDAW\storage`, bundle đầy đủ ở `C:\Users\locpham\SonicForgeStudio\install\daw_engine\` + đang chạy từ `src-tauri\target\release\daw_engine\daw_engine.exe`). Backend fix nằm trong exe → bắt buộc rebuild PyInstaller. +- **Cách SSH:** key tại `/workspace/.ssh/id_ed25519` (user locpham) — trước đó bỏ sót vì chỉ kiểm tra `~/.ssh`. +- **Quy trình deploy (tự động qua SSH + schtasks — Start-Process qua SSH chết theo session):** + 1. `git pull` (branch standalone-shm-bridge) → 2. `node build.mjs` → 3. `pyinstaller engine.spec --clean --noconfirm` (~35s, log `C:\Users\locpham\pyinstaller_buildN.log`) → 4. kill daw_engine → 5. `Copy-Item dist\daw_engine\* src-tauri\target\release\daw_engine\ -Recurse -Force` → 6. `schtasks /run /tn SFEngineFix` (task trỏ tới exe) → 7. verify HTTP 8000. +- **Kết quả verify cuối (sau 6 vòng build):** `GET /api/v1/plugins/fx` (KHÔNG refresh) → **44 VST FX** (trước: 0, cache kẹt []). `GET /api/v1/plugins/available` → **5 instrument** (trước: 93, toàn FX bị xếp nhầm): SE-DRUMS, SE-PERRCS, DSK Asian DreamZ, Bridger64, Qin_RV_x64 — hết Ozone/Neutron/iZotope. Frontend `?v=202608220330`. +- **Các fix bổ sung phát hiện khi deploy (3 commit):** (a) `_scan_plugins`/`_scan_vst_in_dirs` bỏ qua file .dll bên trong folder .vst3; (b) bỏ qua .dll trong thư mục đã có file .vst3 (iZotope cài .vst3 + module .dll cùng thư mục); (c) `/available` chặn iZotope VST2 legacy (`Steinberg\VSTPlugins\iZotope\iZ*.dll`) theo tên normalized (bỏ prefix iZ) + quy tắc iZotope không sản xuất VST instrument. +- **Lưu ý:** Tauri shell (`sonicforge-daw.exe`) bị kill trong quá trình deploy — engine hiện chạy standalone port 8000 (UI web OK); muốn cửa sổ desktop đầy đủ → chạy lại `sonicforge-daw.exe`. + ### [2026-08-10] Task: Thực thi fix (phiên có tool) — mastering ON mặc định, âm sai instrument, Carla alive check - **Tóm tắt thay đổi:** (1) **Mastering FX bật ON mặc định**: `masteringSettings` khởi tạo `masterConnected: true` — MIDI item/preview được xử lí qua mastering FX ngay khi chạy app (không cần bật/tắt power). Kèm `ensureMasteringRouting()` + `refreshCarlaStatus()` gọi ở đầu `startTrackPlayback`/`startLocalTrackPlayback`/`schedulePianoRollMidi`.