Top-level imports; catch only expected exceptions
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:
+2
-5
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user