Installers for all platforms and related fixes #1

Merged
LeoVasanko merged 38 commits from installer into main 2026-09-23 17:41:21 +00:00
Showing only changes of commit 59d2f157eb - Show all commits
+14 -3
View File
@@ -216,11 +216,22 @@ def fetch_vpk() -> Path:
def _dotnet() -> str: def _dotnet() -> str:
"""Resolve the dotnet host, preferring DOTNET_ROOT (a plain `dotnet` may """Resolve the dotnet host with an SDK/modern runtime.
resolve to a runtime-only installation without the SDK/runtime we need)."""
A plain `dotnet` may resolve to a runtime-only installation (e.g.
C:\\Program Files\\dotnet), and long-running services (CI runners) may
carry a stale environment without DOTNET_ROOT or scoop paths — so probe
known locations explicitly.
"""
candidates = []
root = os.environ.get("DOTNET_ROOT") root = os.environ.get("DOTNET_ROOT")
if root: if root:
exe = Path(root) / ("dotnet.exe" if sys.platform == "win32" else "dotnet") candidates.append(Path(root))
if sys.platform == "win32":
candidates.append(Path(r"C:\ProgramData\scoop\apps\dotnet-sdk\current"))
exe_name = "dotnet.exe" if sys.platform == "win32" else "dotnet"
for base in candidates:
exe = base / exe_name
if exe.exists(): if exe.exists():
return str(exe) return str(exe)
return "dotnet" return "dotnet"