Skip to content

fix: Enable x64 and arm64 cross-platform builds and fix installer CPU arch detection#15

Open
postEntropy wants to merge 1 commit intoselimaj-dev:masterfrom
postEntropy:fix-multiarch-build-and-url
Open

fix: Enable x64 and arm64 cross-platform builds and fix installer CPU arch detection#15
postEntropy wants to merge 1 commit intoselimaj-dev:masterfrom
postEntropy:fix-multiarch-build-and-url

Conversation

@postEntropy
Copy link

@postEntropy postEntropy commented Mar 21, 2026

Description

Users with x86_64 machines were encountering an Exec format error when trying to install and run the application using installer.sh.

The Problem

  • The GitHub Actions workflow (ubuntu-latest) implicitly runs on an arm64 runner in some setups (or vice-versa), causing electron-builder to produce only arm64 binaries.
  • The installer.sh hard-coded the AppImage URL to a generic linear-linux-${VERSION}.AppImage, downloading the ARM binary regardless of the host machine's architecture.

The Solution

  1. GitHub Actions Workflow (release.yml)
    • Explicitly separate builds for --x64 and --arm64.
    • Store the artifacts in an intermediate dist-final directory before releasing, avoiding electron-builder's default behavior, which cleans the dist folder on each consecutive build command.
  2. Installation Script (installer.sh)
    • Added ARCH=$(uname -m) to detect the host architecture upon installation.
    • Using x86_64 or aarch64, the script now successfully routes download requests to Linear-${VERSION}.AppImage or Linear-${VERSION}-arm64.AppImage.
    • Also addressed a minor output error by removing the redundant and conflicting chown/chmod of /opt/Linear/chrome-sandbox at the end of the script, since the sandbox root is already perfectly handled a few lines earlier inside ${INSTALL_DIR}/squashfs-root/chrome-sandbox.

Testing instructions

I have built the artifacts locally simulating Linux x64 using npx electron-builder --linux AppImage deb --x64.
Running APPIMAGE_URL="file:///path/to/local/Linear-0.2.4.AppImage" ./installer.sh installs flawlessly, creates the Desktop entry, and opens the application successfully on x86_64.

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