Build Windows installer with Velopack instead of WiX
release / gui-build (linux, bash) (push) Successful in 1m13s
release / gui-build (windows, cmd) (push) Failing after 1m34s
release / gui-build (macos, bash) (push) Successful in 1m13s

vpk runs on the machine's modern .NET runtime (WiX 3.11's .NET Framework
shim fails under the SYSTEM account) and produces a per-user Setup.exe
that needs no runtime on end-user machines.
This commit is contained in:
2026-09-22 23:11:30 +00:00
parent 6dee65b4c6
commit 3377702e98
3 changed files with 89 additions and 143 deletions
+4 -5
View File
@@ -67,14 +67,14 @@ def load_token() -> str:
# ZIP + dist helpers
# ---------------------------------------------------------------------------
# Matches MediaHive-1.2.3-win64.zip, MediaHive-1.2.3-win64.msi,
# Matches MediaHive-1.2.3-win64.zip, MediaHive-1.2.3-win64-setup.exe,
# MediaHive-1.2.3-macos-arm64.dmg, etc.
# Rejects dev/dirty versions like MediaHive-1.2.3.dev0+gabcd-win64.zip
_CLEAN_ARTIFACT_RE = re.compile(r"^MediaHive-(\d+(?:\.\d+)*)-([A-Za-z0-9._-]+)\.(?:zip|dmg|msi)$")
_CLEAN_ARTIFACT_RE = re.compile(r"^MediaHive-(\d+(?:\.\d+)*)-([A-Za-z0-9._-]+)\.(?:zip|dmg|exe)$")
def find_releasable_artifacts() -> list[tuple[Path, str, str]]:
"""Return (path, version, platform_tag) for clean-versioned ZIPs/DMGs/MSIs in build/."""
"""Return (path, version, platform_tag) for clean-versioned ZIPs/DMGs/EXEs in build/."""
build_dir = REPO_ROOT / "build"
results = []
for p in sorted(build_dir.glob("MediaHive-*")):
@@ -184,7 +184,6 @@ def upload_asset(
mime = {
".zip": "application/zip",
".dmg": "application/x-apple-diskimage",
".msi": "application/x-msi",
}.get(path.suffix, "application/octet-stream")
print(f"Uploading {path.name} ({size_mb:.1f} MB) ...")
with Path(path).open("rb") as fh:
@@ -230,7 +229,7 @@ def main() -> None:
artifacts = find_releasable_artifacts()
if not artifacts:
print(
"No clean-versioned ZIPs/DMGs/MSIs found in build/.\n"
"No clean-versioned ZIPs/DMGs/EXEs found in build/.\n"
"Run scripts/guibuild.py first.",
file=sys.stderr,
)