# Build Layout — vị trí chuẩn (ổn định qua build & đổi code) ## Canonical outputs (đều gitignored, tái tạo từ build) | Vị trí | Nội dung | Nguồn | |---|---|---| | `src-tauri/binaries/` | Sidecars + DLL runtime | `build/scripts/build_native_bridge.ps1` | | `src-tauri/binaries/daw_vst_bridge-x86_64-pc-windows-msvc.exe` | Instrument bridge (VSTi + SF2/SF3/SFZ, SHM realtime, control 1-6) | CMake `daw_vst_bridge` | | `src-tauri/binaries/fx_vst_bridge-x86_64-pc-windows-msvc.exe` | FX bridge (VST3 FX: `--render-fx`, `--scan`, `--open-fx-gui`, `--fx-gui`) | CMake `fx_vst_bridge` | | `src-tauri/binaries/libfluidsynth-3.dll`, `jpeg62.dll` | Runtime DLL (fluidsynth, libjpeg-turbo) | vcpkg manifest install | | `src-tauri/resources/daw_engine/` | Python engine đã đóng băng (PyInstaller) | `build/scripts/build_windows.ps1` → `dist/daw_engine` | ## External (shared, không nằm trong repo) | Vị trí | Nội dung | |---|---| | `%USERPROFILE%\vcpkg` | vcpkg.exe + package cache (fluidsynth, libjpeg-turbo, pkgconf) | | `%USERPROFILE%\vcpkg\packages\libjpeg-turbo_x64-windows\bin\jpeg62.dll` | Fallback nguồn jpeg62.dll khi manifest chưa tái tạo | ## Dev-time resolution (Python) `app/core/native_render.py`: - `find_bridge_exe()` — `SF_BRIDGE_PATH` → frozen (`_MEIPASS`/`exe_dir`) → `src-tauri/binaries/` → `install/` (legacy). Instrument bridge. - `find_fx_bridge_exe()` — `SF_FX_BRIDGE_PATH` → cùng chuỗi. FX bridge. Tauri sidecar rename: `binaries/daw_vst_bridge` (externalBin) → `daw_vst_bridge-x86_64-pc-windows-msvc.exe` — cả hai dạng đều được tìm. ## Build ```powershell # Native bridges (C++): vcpkg manifest + sfizz + CMake → src-tauri/binaries build/scripts/build_native_bridge.ps1 # Full desktop (engine PyInstaller + bridges + Tauri NSIS/MSI) build/scripts/build_windows.ps1 ``` `build/scripts/` là tracked (dù `build/` gitignored) — không xoá `build/` wholesale. ## Split bridges - `daw_vst_bridge` — VSTi instruments, VST2 (.dll) + VST3 (.vst3), native GUI qua SHM control 4 (`OPEN_GUI`), SF2/SF3/SFZ (fluidsynth/sfizz), realtime FX chain in-process (control 6 `SET_FX_CHAIN`). - `fx_vst_bridge` — VST3 FX only. One-shot: `--scan `, `--render-fx --in --out`, `--open-fx-gui ` (cửa sổ rời), `--fx-gui ` (embed + HTTP `SF_FXGUI_PORT`). Không SHM, không fluidsynth/sfizz. VST2 FX không hỗ trợ (VST2 không introspect được — xem là instrument; ponytail: thêm AEffect hosting khi có nhu cầu).