Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

fix(desktop): use NSIS-compatible Windows archive filters

Sean Ferguson94556a2e9770
diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml
index e50f6300..e258efda 100644
--- a/.github/workflows/release-desktop.yml
+++ b/.github/workflows/release-desktop.yml
@@ -195,8 +195,8 @@ jobs:
fail-fast: false
matrix:
include:
- - { os: windows-latest, arch: x64, target: x86_64-pc-windows-msvc, unpacked: win-unpacked }
- - { os: windows-11-arm, arch: arm64, target: aarch64-pc-windows-msvc, unpacked: win-arm64-unpacked }
+ - { os: windows-latest, arch: x64, target: x86_64-pc-windows-msvc }
+ - { os: windows-11-arm, arch: arm64, target: aarch64-pc-windows-msvc }
runs-on: ${{ matrix.os }}
defaults:
run:
@@ -231,8 +231,24 @@ jobs:
npm run dist:win:main -- --${{ matrix.arch }} --publish never
cd dist
sha256sum codync-windows-${{ matrix.arch }}.exe > codync-windows-${{ matrix.arch }}.exe.sha256
+ - name: Install and verify native executables
+ shell: powershell
+ run: |
+ $ErrorActionPreference = 'Stop'
+ $installer = Join-Path $PWD 'apps\desktop\dist\codync-windows-${{ matrix.arch }}.exe'
+ $installation = Join-Path $env:LOCALAPPDATA 'Programs\codync-desktop'
+ $process = Start-Process -FilePath $installer -ArgumentList '/S','/currentuser',('/D='+$installation) -Wait -PassThru
+ if ($process.ExitCode -ne 0) { throw "Installer failed: $($process.ExitCode)" }
+ $expectedMachine = if ('${{ matrix.arch }}' -eq 'arm64') { 0xaa64 } else { 0x8664 }
+ foreach ($name in @('Codync.exe','resources\codync-host.exe','resources\codync-hostw.exe')) {
+ $bytes = [IO.File]::ReadAllBytes((Join-Path $installation $name))
+ $offset = [BitConverter]::ToInt32($bytes,60)
+ $machine = [BitConverter]::ToUInt16($bytes,$offset+4)
+ if ($machine -ne $expectedMachine) { throw "Wrong installed architecture: $name" }
+ }
+ "CODYNC_INSTALLED_RESOURCES=$installation\resources" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
- name: Smoke test the bundled host
- working-directory: apps/desktop/dist/${{ matrix.unpacked }}/resources
+ working-directory: ${{ env.CODYNC_INSTALLED_RESOURCES }}
run: |
./codync-host.exe --version
CODYNC_HOME="$RUNNER_TEMP/codync" ./codync-host.exe serve --port 19333 &
diff --git a/apps/desktop/electron-builder.yml b/apps/desktop/electron-builder.yml
index 59d2879e..ac5fc7b7 100644
--- a/apps/desktop/electron-builder.yml
+++ b/apps/desktop/electron-builder.yml
@@ -6,6 +6,7 @@
# build/native/CodyncScreen.app macOS screen helper (Xcode `Screen` target, with cua-driver inside)
# build/native/cua-driver.exe Windows: the computer-use driver and its UI Automation helper
beforePack: tools/verify-build.cjs
+afterPack: tools/windows-archive.cjs
appId: com.pokai.Codync
productName: Codync
copyright: ""
diff --git a/apps/desktop/tools/windows-archive.cjs b/apps/desktop/tools/windows-archive.cjs
new file mode 100644
index 00000000..22ca916b
--- /dev/null
+++ b/apps/desktop/tools/windows-archive.cjs
@@ -0,0 +1,5 @@
+// NSIS's bundled decoder skips executable blocks using modern 7z ARM64/BCJ2 filters.
+// Use its supported single-stream BCJ filter for both release and local Windows installers.
+module.exports = (context) => {
+ if (context.electronPlatformName === 'win32') process.env.ELECTRON_BUILDER_7Z_FILTER = 'BCJ'
+}
diff --git a/docs/guides/windows-testing.md b/docs/guides/windows-testing.md
index 2d1e0de7..6d6e013e 100644
--- a/docs/guides/windows-testing.md
+++ b/docs/guides/windows-testing.md
@@ -12,10 +12,13 @@ locks and Windows runs them in parallel too. A test that fails and then passes o
reported as FLAKY instead of failing the run: fix it rather than lean on the retry.
Desktop release CI builds x64 on `windows-latest` and ARM64 on `windows-11-arm`, then smoke-tests
-each bundled host. Installers, checksums and blockmaps use `codync-windows-<arch>.exe` names.
+each installed host after running the installer and checking the native app/host executable headers.
+Installers, checksums and blockmaps use `codync-windows-<arch>.exe` names.
Both builds contribute to one `latest.yml` update feed, uploaded only after both installers;
electron-updater selects the file matching the installed app's architecture. The pinned computer-use
driver and UI Automation helper remain x64 and run through Prism on ARM64 Windows 11.
+Windows packaging forces the supported BCJ archive filter: the bundled NSIS decoder silently skips
+executables compressed with modern 7z ARM64 filters, even when the installer reports success.
For a manual CI check, dispatch **Release desktop** with `windows_only` enabled to build both
Windows architectures without requiring Mac signing secrets or running Linux packaging.