build: bundle native_host bridges + fluidsynth runtime vao installer (build_windows.ps1 [4b/6], SF_RESOURCE_DIR fallback, tauri resources native_host)
This commit is contained in:
@@ -23,8 +23,12 @@ import numpy as np
|
||||
|
||||
from app.config import settings
|
||||
|
||||
_NATIVE_DIR = os.getenv("SONICFORGE_NATIVE_DIR") or os.path.join(
|
||||
settings.BASE_DIR, "native_host", "build", "Release")
|
||||
_RES_DIR = os.getenv("SF_RESOURCE_DIR")
|
||||
_NATIVE_DIR = (
|
||||
os.getenv("SONICFORGE_NATIVE_DIR")
|
||||
or (os.path.join(_RES_DIR, "native_host") if _RES_DIR else None)
|
||||
or os.path.join(settings.BASE_DIR, "native_host", "build", "Release")
|
||||
)
|
||||
|
||||
_ERR = None
|
||||
_LOCK = threading.Lock()
|
||||
|
||||
@@ -11,7 +11,11 @@ def _ensure_fluidsynth_runtime() -> None:
|
||||
if os.name != "nt":
|
||||
return
|
||||
root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
candidates = [
|
||||
candidates = []
|
||||
res_dir = os.getenv("SF_RESOURCE_DIR")
|
||||
if res_dir:
|
||||
candidates.append(os.path.join(res_dir, "native_host", "fluidsynth_runtime"))
|
||||
candidates += [
|
||||
os.path.join(root, "native_host", "build", "Release", "fluidsynth_runtime"),
|
||||
os.path.join(root, "native_host", "fluidsynth_runtime"),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user