Skip to content

Build Windows x64 and arm64 installers with native tools#31

Merged
oahsiao merged 1 commit into
mainfrom
build/windows-x64-arm64
Jun 24, 2026
Merged

Build Windows x64 and arm64 installers with native tools#31
oahsiao merged 1 commit into
mainfrom
build/windows-x64-arm64

Conversation

@oahsiao

@oahsiao oahsiao commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

What

Release builds now produce two native Windows installers — x64 and ARM64 — instead of a single x64-only installer.

Installer Electron Bundled rg / fd cscope
M2_SCOUT-Setup-<ver>-x64.exe win32-x64 x86_64 (native) x64
M2_SCOUT-Setup-<ver>-arm64.exe win32-arm64 aarch64 (native) x64*

*cscope has no ARM64 Windows build, so the x64 binary is reused (runs under the Windows-on-ARM x64 emulation layer).

How

  • scripts/prepare-tools.js (new) — extracts the correct-architecture rg/fd/cscope out of the existing TOOLS/ZIP archives into build/tools/<arch>/ before packaging. The repo already shipped aarch64 archives, so no new binaries are committed.
  • package.json
    • extraFiles now copies build/tools/${arch}TOOLS, so each installer carries the matching CPU binaries.
    • dist builds x64 and arm64 NSIS in separate single-arch passes, yielding exactly two per-arch installers (no oversized ~158 MB combined installer).
    • pack builds both unpacked dirs; NSIS artifactName now includes ${arch}.
  • .github/workflows/release.yml — uploads both installers to the GitHub Release (globs all *Setup*.exe).
  • .github/workflows/build.yml — verifies both win-unpacked and win-arm64-unpacked layouts.
  • scripts/release.ps1 — reports all built installers.

Verification (local)

  • Both installers built: …-x64.exe (77.4 MB) and …-arm64.exe (81.0 MB).
  • PE machine-type inspection confirmed the arm64 bundle ships genuine ARM64 rg.exe/fd.exe (not x64).
  • npm test → all 5 self-tests pass.

Notes

  • No .gitignore change needed — build/tools/ is already covered by build/*.
  • The in-app tool updater can still fetch native aarch64 rg/fd at runtime, independent of the bundled versions.

Ship two per-architecture NSIS installers instead of one x64-only build.

- scripts/prepare-tools.js stages native rg/fd/cscope per arch from TOOLS/ZIP into build/tools/<arch> (x64 -> x86_64, arm64 -> aarch64; cscope stays x64 as no ARM64 build exists).

- package.json: extraFiles pulls build/tools/\ so each installer carries matching CPU binaries; dist builds x64 + arm64 in separate single-arch passes (two installers, no oversized combined one); NSIS artifactName includes \.

- release.yml uploads both installers; build.yml verifies both unpacked layouts.

Verified locally: x64 and arm64 installers built; PE machine-type check confirms arm64 bundle ships native ARM64 rg/fd. All self-tests pass.
@oahsiao oahsiao merged commit 1e5b05a into main Jun 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant