Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix(website): keep the Windows download on the x64 installer

EtienneLescotef408f405288
diff --git a/website/src/lib/release.test.ts b/website/src/lib/release.test.ts
index 8d436b8a1..9d20a75d2 100644
--- a/website/src/lib/release.test.ts
+++ b/website/src/lib/release.test.ts
@@ -46,6 +46,11 @@ test("the 1.7.0 .dmg names still resolve", () => {
assert.equal(findAsset(old, "macIntel")?.name, "Openscreen-Mac-x64-1.7.0.dmg");
});
+test("windows takes the x64 installer once a release also ships an arm64 one", () => {
+ const both = release("Openscreen.Setup.2.1.0-arm64.exe", "Openscreen.Setup.2.1.0-x64.exe");
+ assert.equal(findAsset(both, "windows")?.name, "Openscreen.Setup.2.1.0-x64.exe");
+});
+
test("a missing asset or a failed lookup gives null, which the page turns into /releases/latest", () => {
assert.equal(findAsset(release("Openscreen.Setup.1.11.0.exe"), "macArm"), null);
assert.equal(findAsset(null, "windows"), null);
diff --git a/website/src/lib/release.ts b/website/src/lib/release.ts
index 23c1416de..3dae770c2 100644
--- a/website/src/lib/release.ts
+++ b/website/src/lib/release.ts
@@ -40,7 +40,9 @@ export type AppLanguage = { lang: string; name: string };
export const ASSET_PATTERNS = {
macArm: /mac.*(arm64|apple-silicon).*\.dmg$/i,
macIntel: /mac.*(x64|intel).*\.dmg$/i,
- windows: /\.exe$/i,
+ // The x64 installer. A release also carries an -arm64.exe, which an x64 PC cannot run;
+ // Windows on ARM runs the x64 one under emulation.
+ windows: /^(?!.*arm64).*\.exe$/i,
deb: /\.deb$/i,
rpm: /\.rpm$/i,
pacman: /\.pacman$/i,