diff --git a/engine.spec b/engine.spec index 0f8c36b..40e7a4c 100644 --- a/engine.spec +++ b/engine.spec @@ -16,9 +16,22 @@ _SPEC_ROOT = os.path.abspath(SPECPATH) # root (dest '.') de find_bridge_exe (frozen: exe_dir = thu muc chua # sys.executable = dist/daw_engine) tu dong tim thay. Chi build tren Windows. if os.name == 'nt': - _bridge_dir = os.path.join(_SPEC_ROOT, 'native_bridge', 'build', 'Release') - for _b in ('daw_vst_bridge.exe', 'fx_vst_bridge.exe', 'jpeg62.dll', 'libfluidsynth-3.dll', 'plugin_host.exe'): - _bp = os.path.join(_bridge_dir, _b) + # 2 nguon build LECH NHAU (build_windows.ps1 [2]): exe tu MSBuild + # bridge-win\Release, DLL tu CMake build\Release. Truoc day engine.spec chi + # nhin build\Release -> bundle chua fx_vst_bridge.exe CU/HONG (282KB, + # --scan crash c0000409 ngay ca voi dir khong ton tai). Lay tung loai tu + # dung nguon, co fallback ve build\Release cho checkout cu. + _exe_dir = os.path.join(_SPEC_ROOT, 'native_bridge', 'build', 'bridge-win', 'Release') + _dll_dir = os.path.join(_SPEC_ROOT, 'native_bridge', 'build', 'Release') + if not os.path.isdir(_exe_dir): + print("WARN: khong thay bridge-win/Release - fallback ve build/Release (bridge co the cu)") + _exe_dir = _dll_dir + for _b in ('daw_vst_bridge.exe', 'fx_vst_bridge.exe', 'plugin_host.exe'): + _bp = os.path.join(_exe_dir, _b) + if os.path.exists(_bp): + binaries.append((_bp, '.')) + for _b in ('jpeg62.dll', 'libfluidsynth-3.dll'): + _bp = os.path.join(_dll_dir, _b) if os.path.exists(_bp): binaries.append((_bp, '.')) # G3: JUCE FX bridge (graph latency + processed samples) - bundle rieng vi