Require system .NET SDK; cache vpk/ffmpeg persistently
Per-build downloads of the dotnet runtime (~80 MB) were slow and flaky (IncompleteRead killed a CI run). The .NET SDK is now a build-host prerequisite; vpk and ffmpeg download once into a user-level cache (~/.cache/mediahive-build, %LOCALAPPDATA%\mediahive-build) that survives the per-run build dir.
This commit is contained in:
+11
-2
@@ -5,8 +5,9 @@
|
||||
# pyinstaller --noconfirm --clean scripts/MediaHive.spec
|
||||
#
|
||||
# Or use the build script (recommended—handles versioning and packaging):
|
||||
# uv run scripts/winbuild.py
|
||||
# uv run scripts/guibuild.py
|
||||
|
||||
import os
|
||||
import sys
|
||||
import mediahive.winmain
|
||||
import mediahive.server
|
||||
@@ -20,7 +21,15 @@ _frontend_build = _pkg / "frontend-build"
|
||||
_logo_webp = _pkg / "assets" / "mediahive.webp"
|
||||
_icon_win = _pkg / "assets" / "mediahive.ico"
|
||||
_icon_mac = _pkg / "assets" / "mediahive.icns"
|
||||
_tools_dir = Path(SPECPATH).parent / "build" / "ffmpeg"
|
||||
# ffmpeg staging lives in the persistent build cache (same logic as
|
||||
# scripts/guibuild.py); fall back to the legacy build/ffmpeg location.
|
||||
if sys.platform == "win32":
|
||||
_cache_base = Path(os.environ.get("LOCALAPPDATA", Path.home() / "AppData" / "Local"))
|
||||
else:
|
||||
_cache_base = Path(os.environ.get("XDG_CACHE_HOME", Path.home() / ".cache"))
|
||||
_tools_dir = _cache_base / "mediahive-build" / "ffmpeg"
|
||||
if not _tools_dir.exists():
|
||||
_tools_dir = Path(SPECPATH).parent / "build" / "ffmpeg"
|
||||
_tool_names = ["ffmpeg.exe"] if sys.platform == "win32" else ["ffmpeg"]
|
||||
|
||||
_binaries = []
|
||||
|
||||
Reference in New Issue
Block a user