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
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Users with
x86_64machines were encountering anExec format errorwhen trying to install and run the application usinginstaller.sh.The Problem
ubuntu-latest) implicitly runs on anarm64runner in some setups (or vice-versa), causingelectron-builderto produce onlyarm64binaries.installer.shhard-coded the AppImage URL to a genericlinear-linux-${VERSION}.AppImage, downloading the ARM binary regardless of the host machine's architecture.The Solution
release.yml)--x64and--arm64.dist-finaldirectory before releasing, avoidingelectron-builder's default behavior, which cleans thedistfolder on each consecutive build command.installer.sh)ARCH=$(uname -m)to detect the host architecture upon installation.x86_64oraarch64, the script now successfully routes download requests toLinear-${VERSION}.AppImageorLinear-${VERSION}-arm64.AppImage.chown/chmodof/opt/Linear/chrome-sandboxat 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
x64usingnpx electron-builder --linux AppImage deb --x64.Running
APPIMAGE_URL="file:///path/to/local/Linear-0.2.4.AppImage" ./installer.shinstalls flawlessly, creates the Desktop entry, and opens the application successfully onx86_64.