build: commit compiled native bridge + libs + app shell into install/ — daw_engine (~1.8GB) built locally via build_install.ps1
This commit is contained in:
@@ -41,5 +41,9 @@ app/storage/soundfonts/
|
|||||||
# build-time vendor trees & accidental artifacts (never commit)
|
# build-time vendor trees & accidental artifacts (never commit)
|
||||||
native_bridge/vcpkg_installed/
|
native_bridge/vcpkg_installed/
|
||||||
native_bridge/sfizz-src/
|
native_bridge/sfizz-src/
|
||||||
|
|
||||||
|
# install/ portable package: chi commit 3 binary nho (bridge/lib/app);
|
||||||
|
# daw_engine/ ~1.8GB tu build bang build_install.ps1
|
||||||
|
install/daw_engine/
|
||||||
app/static/js/_diag.txt
|
app/static/js/_diag.txt
|
||||||
src-tauri/resources/daw_engine" && cp -r*
|
src-tauri/resources/daw_engine" && cp -r*
|
||||||
|
|||||||
@@ -75,6 +75,25 @@ docker-compose up -d --build
|
|||||||
|
|
||||||
Mở trình duyệt và truy cập: **http://localhost:8000**
|
Mở trình duyệt và truy cập: **http://localhost:8000**
|
||||||
|
|
||||||
|
### 📦 Portable Install — thư mục `install/`
|
||||||
|
|
||||||
|
`install/` là bản portable chạy thẳng (không cần cài đặt): `install/sonicforge-daw.exe`.
|
||||||
|
|
||||||
|
| Thành phần | Vai trò | Trạng thái |
|
||||||
|
|---|---|---|
|
||||||
|
| `daw_vst_bridge.exe` | Native host bridge (C++, nối DAW ↔ VSTi qua shared memory) | **commit sẵn** (~1.4MB) |
|
||||||
|
| `libfluidsynth-3.dll` | FluidSynth runtime (SF2/SF3) | **commit sẵn** (~0.5MB) |
|
||||||
|
| `sonicforge-daw.exe` | Tauri app shell | **commit sẵn** (~10MB) |
|
||||||
|
| `daw_engine/` | Python engine (PyInstaller onedir) — ~1.8GB (tensorflow/torch/cv2) | **KHÔNG commit** — tự build |
|
||||||
|
|
||||||
|
3 binary C++/Tauri commit sẵn để người pull không cần toolchain (VS + vcpkg + vst3sdk submodule + sfizz-src). Phần `daw_engine/` quá nặng cho git — build bằng script có sẵn:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
powershell -ExecutionPolicy Bypass -File build_install.ps1
|
||||||
|
```
|
||||||
|
|
||||||
|
Script build frontend (`node build.mjs`) + engine (`pyinstaller engine.spec`) rồi copy vào `install/daw_engine/`. Muốn build lại cả bridge/app từ source: `powershell -ExecutionPolicy Bypass -File build_windows.ps1` (ra installer NSIS/MSI, không phải portable).
|
||||||
|
|
||||||
## 📁 Cấu Trúc Dự Án
|
## 📁 Cấu Trúc Dự Án
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
# build_install.ps1 - Build install/ (portable package) tu source, Windows
|
||||||
|
# Chay: powershell -ExecutionPolicy Bypass -File build_install.ps1
|
||||||
|
#
|
||||||
|
# install/ = portable package (chay truc tiep, khong can cai dat):
|
||||||
|
# daw_vst_bridge.exe native host bridge (C++) - DA COMMIT san
|
||||||
|
# libfluidsynth-3.dll FluidSynth runtime - DA COMMIT san
|
||||||
|
# sonicforge-daw.exe Tauri app shell - DA COMMIT san
|
||||||
|
# daw_engine/ Python engine (PyInstaller onedir, ~1.8GB)
|
||||||
|
# - KHONG commit -> script nay tu build
|
||||||
|
#
|
||||||
|
# 3 binary C++/Tauri da commit de nguoi pull khong can toolchain
|
||||||
|
# (VS2019/2022 + vcpkg + vst3sdk submodule + sfizz-src). Chay lai
|
||||||
|
# build_windows.ps1 neu muon build lai bridge/app tu source.
|
||||||
|
# LUU Y: file nay chi dung ky tu ASCII (PowerShell 5.1).
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
Set-Location $PSScriptRoot
|
||||||
|
|
||||||
|
Write-Host "== [1/4] Kill tien trinh cu =="
|
||||||
|
Get-Process -Name "daw_engine","sonicforge-daw","daw_vst_bridge" -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
|
||||||
|
Start-Sleep -Milliseconds 500
|
||||||
|
|
||||||
|
Write-Host "== [2/4] Frontend bundle (app.jsx -> app.precompiled.js) =="
|
||||||
|
npm install --no-audit --no-fund
|
||||||
|
if (-not (Test-Path "node_modules\@babel\standalone")) {
|
||||||
|
npm install @babel/standalone --no-audit --no-fund
|
||||||
|
}
|
||||||
|
node build.mjs
|
||||||
|
|
||||||
|
Write-Host "== [3/4] Build daw_engine.exe (PyInstaller onedir) =="
|
||||||
|
python -m pip install -r requirements.txt pyinstaller pywin32
|
||||||
|
pyinstaller engine.spec --clean --noconfirm
|
||||||
|
if (-not (Test-Path "dist\daw_engine\daw_engine.exe")) {
|
||||||
|
Write-Host "ERROR: dist\daw_engine\daw_engine.exe khong ton tai" -ForegroundColor Red
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
python tools\verify_bundle.py
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Host "ERROR: bundle thieu asset" -ForegroundColor Red
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "== [4/4] Copy vao install\ =="
|
||||||
|
New-Item -ItemType Directory -Force "install" | Out-Null
|
||||||
|
if (Test-Path "install\daw_engine") { Remove-Item -Recurse -Force "install\daw_engine" }
|
||||||
|
Copy-Item "dist\daw_engine\*" "install\daw_engine\" -Recurse -Force
|
||||||
|
# 3 binary (bridge/lib/app) da commit san trong install/ - khong ghi de,
|
||||||
|
# neu user da build lai bridge/app thi tu copy vao day.
|
||||||
|
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host "== DONE =="
|
||||||
|
Write-Host " install\daw_engine\daw_engine.exe (moi build)"
|
||||||
|
Write-Host " install\daw_vst_bridge.exe (commit san)"
|
||||||
|
Write-Host " install\libfluidsynth-3.dll (commit san)"
|
||||||
|
Write-Host " install\sonicforge-daw.exe (commit san)"
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host "Chay: install\sonicforge-daw.exe"
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user