Top-level imports; catch only expected exceptions
release / gui-build (linux, bash) (push) Successful in 56s
release / gui-build (windows, cmd) (push) Failing after 1m37s
release / gui-build (macos, bash) (push) Failing after 13m21s

velopack/tracerite/fastapi-vue are always available in the GUI build, so
drop the in-function import guards. The update checker now catches only
RuntimeError (not a Velopack install: dev/portable) and OSError
(network). Build script and PyInstaller spec use platformdirs for the
persistent tool cache.
This commit is contained in:
2026-09-23 00:44:10 +00:00
parent 50420984f1
commit e514829737
3 changed files with 23 additions and 47 deletions
+2 -5
View File
@@ -31,6 +31,7 @@ import zipfile
from pathlib import Path
import setuptools_scm
from platformdirs import user_cache_path
# BtbN automated builds always publish a 'latest' tag with this asset.
_FFMPEG_URL = (
@@ -46,11 +47,7 @@ _ASSETS_DIR = _REPO_ROOT / "mediahive" / "assets"
def _build_cache_dir() -> Path:
"""Return the persistent cross-build cache dir for downloaded tools (CI wipes build/)."""
if sys.platform == "win32":
base = os.environ.get("LOCALAPPDATA") or (Path.home() / "AppData" / "Local")
return Path(base) / "mediahive-build"
base = os.environ.get("XDG_CACHE_HOME") or (Path.home() / ".cache")
return Path(base) / "mediahive-build"
return user_cache_path("mediahive-build")
_FFMPEG_STAGING = _build_cache_dir() / "ffmpeg"