mirror of
https://github.com/tgeorgiadis/quiver-launcher.git
synced 2026-11-22 21:50:52 -05:00
Don't offer a release's source archives ("…-sources.zip") as the app (#479)
A file named like ffmpeg-sources.zip names no system, so on Linux it came before the Windows build, and the player was offered only those archives. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9ee65b7ef4
commit
c8abc1db20
2 files changed
+15
-1
No files matched your search
@@ -37,6 +37,20 @@ test("falls back to unplaced files, and to Windows builds on Linux", () => {
|
||||
expect(bestAssets([asset("Game-win64.zip", "windows")], "linux", "x64")).toHaveLength(1);
|
||||
});
|
||||
|
||||
test("never offers a release's source archives, so Linux falls back to the Windows build", () => {
|
||||
// openjade's release: its libraries' sources name no system, which put them ahead of the Windows build on Linux.
|
||||
const files = [
|
||||
asset("ffmpeg-sources.zip", "unknown", "unknown"),
|
||||
asset("openal-sources.zip", "unknown", "unknown"),
|
||||
asset("ffmpeg-android-sources.zip", "android", "unknown"),
|
||||
asset("openjade-arm64.apk", "android", "arm64"),
|
||||
asset("openjade-windows-x64.zip", "windows"),
|
||||
];
|
||||
expect(bestAssets(files, "linux", "x64").map((a) => a.filename)).toEqual(["openjade-windows-x64.zip"]);
|
||||
expect(bestAssets(files, "macos", "arm64")).toEqual([]);
|
||||
expect(installable(files, "linux").map((a) => a.filename)).toEqual(["openjade-windows-x64.zip"]);
|
||||
});
|
||||
|
||||
test("takes files a host names without an extension, after ones that have one", () => {
|
||||
// GitLab names a release's files as their links are titled.
|
||||
const gitlab = asset("Game-v0.9.2-Windows-RelWithDebInfo", "windows", "unknown");
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { Asset, Os } from "@quiverlauncher/api";
|
||||
|
||||
/** Checksums, signatures, symbols and source archives: never the app itself. */
|
||||
const AUXILIARY =
|
||||
/\.(json|sha\d*|md5|sig|asc|minisig|pdb|txt)$|(^|[._-])(checksums?|sha\d*sums?|source|src|debug|symbols)([._-]|$)/i;
|
||||
/\.(json|sha\d*|md5|sig|asc|minisig|pdb|txt)$|(^|[._-])(checksums?|sha\d*sums?|sources?|src|debug|symbols)([._-]|$)/i;
|
||||
/** What the launcher can install, best first. */
|
||||
const FORMATS = [
|
||||
/\.zip$/i,
|
||||
|
||||
Reference in new issue
Block a user