feat: add Windows ARM64 support with x64-baseline CLI workaround (#2537)

* feat: add Windows ARM64 support with x64-baseline CLI workaround

Windows ARM64 native opencode.exe fails with a Bun FFI/TinyCC dlopen
error (anomalyco/opencode#19130). As a temporary workaround:

- Bundle x64-baseline OpenCode CLI on ARM64 instead of native ARM64
  (prepare-opencode-cli.mjs, env-runtime.js)
- Disable OpenCode self-upgrade on ARM64 in server, VS Code, and UI
  (upgrade-capability.js, opencode-upgrade-runtime.ts, useUIStore.ts,
  OpenCodeCliSettings.tsx, search.ts, SettingsView.tsx, platform.ts)
- Add ARM64 Windows cross-compile builds to release and smoke workflows
  (release.yml, release-desktop-smoke.yml)
- Refactor Windows latest.yml to use combine-electron-manifests pattern
  matching macOS, since two arches now produce per-arch manifests

The CI ARM64 build itself is permanent; only the x64-baseline CLI
bundling and upgrade disablement are temporary and should be reverted
when the upstream issue is resolved.

* fix(desktop): select Windows updater by architecture

---------

Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
This commit is contained in:
Howon Lee
2026-07-30 20:07:08 +03:00
committed by GitHub
co-authored by Bohdan Triapitsyn
parent 5792a3d2e2
commit 09f0c64839
18 changed files with 206 additions and 30 deletions
+8
View File
@@ -16,6 +16,7 @@ import { resolveManagedOpenCodeCwd } from './opencode-cwd.mjs';
import { sanitizeRuntimeRequestHeaders } from './runtime-request-headers.mjs';
import { assertUpdaterCapability } from './updater-capability.mjs';
import { checkForDesktopUpdate } from './updater-check.mjs';
import { resolveUpdaterChannel } from './updater-channel.mjs';
import { resolveUpdaterFeed } from './updater-feed.mjs';
import {
buildLinuxInstalledApps,
@@ -2927,10 +2928,17 @@ const setupAutoUpdater = () => {
const testBuild = typeof __OPENCHAMBER_UPDATER_E2E_BUILD__ !== 'undefined'
&& __OPENCHAMBER_UPDATER_E2E_BUILD__ === true;
const feed = resolveUpdaterFeed({ testBuild });
const updaterChannel = feed.provider === 'github'
? resolveUpdaterChannel({ platform: process.platform, architecture: process.arch })
: null;
if (updaterChannel) {
autoUpdater.channel = updaterChannel;
}
autoUpdater.setFeedURL(feed);
log.info('[electron] updater feed configured', {
provider: feed.provider,
target: feed.provider === 'github' ? `${feed.owner}/${feed.repo}` : feed.url,
channel: updaterChannel || 'latest',
});
autoUpdater.on('download-progress', (progress) => {