From ef11300ffebc99547474cf0e5a6fb248e5e969f3 Mon Sep 17 00:00:00 2001 From: Subhamoy Biswas Date: Wed, 8 Oct 2025 22:37:58 +0530 Subject: [PATCH] ci: added linux arm64 builds --- .github/workflows/release.yml | 6 +- CHANGELOG.md | 2 +- README.md | 11 ++- .../binaries/aria2c-aarch64-unknown-linux-gnu | 3 + .../binaries/deno-aarch64-unknown-linux-gnu | 3 + .../binaries/ffmpeg-aarch64-unknown-linux-gnu | 3 + .../ffprobe-aarch64-unknown-linux-gnu | 3 + .../binaries/yt-dlp-aarch64-unknown-linux-gnu | 3 + src-tauri/tauri.linux-aarch64.conf.json | 68 +++++++++++++++++++ ...conf.json => tauri.linux-x86_64.conf.json} | 8 +-- 10 files changed, 101 insertions(+), 9 deletions(-) create mode 100644 src-tauri/binaries/aria2c-aarch64-unknown-linux-gnu create mode 100644 src-tauri/binaries/deno-aarch64-unknown-linux-gnu create mode 100644 src-tauri/binaries/ffmpeg-aarch64-unknown-linux-gnu create mode 100644 src-tauri/binaries/ffprobe-aarch64-unknown-linux-gnu create mode 100644 src-tauri/binaries/yt-dlp-aarch64-unknown-linux-gnu create mode 100644 src-tauri/tauri.linux-aarch64.conf.json rename src-tauri/{tauri.linux.conf.json => tauri.linux-x86_64.conf.json} (80%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c501dec..5e63309 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,9 @@ jobs: - platform: 'macos-latest' args: '--target x86_64-apple-darwin --config ./src-tauri/tauri.macos-x86_64.conf.json' - platform: 'ubuntu-22.04' - args: '' + args: '--target x86_64-unknown-linux-gnu --config ./src-tauri/tauri.linux-x86_64.conf.json' + - platform: 'ubuntu-22.04-arm' + args: '--target aarch64-unknown-linux-gnu --config ./src-tauri/tauri.linux-aarch64.conf.json' - platform: 'windows-latest' args: '' runs-on: ${{ matrix.platform }} @@ -28,7 +30,7 @@ jobs: lfs: true - name: 🛠️ Install dependencies - if: matrix.platform == 'ubuntu-22.04' + if: matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-22.04-arm' run: | sudo apt-get update sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf diff --git a/CHANGELOG.md b/CHANGELOG.md index cc71833..698b9f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,4 +24,4 @@ > 🪟 Windows x86_64 binary also works on ARM64 (Windows on ARM) devices with emulation (Not planning to release native Windows ARM64 build anytime soon as, x86_64 one works fine on ARM64 without noticeable performance impact) -> ⚠️ MacOS ARM64 binary downloads are experimental and may not open on Apple Silicon Macs if downloaded from browser (You will get 'Damaged File' error) it's because the binaries are not signed (signing MacOS binaries requires 99$/year Apple Developer Account subscription, which I can't afford RN!) and Apple Silicon Macs don't allow unsigned apps (downloaded from browser) to be installed on the system. If you want to use NeoDLP on your Apple Silicon Macs, you can simply use the command line [Curl-Bash Installer](https://neodlp.neosubhamoy.com/download) (Recommended) -OR- [compile it from source](https://github.com/neosubhamoy/neodlp?tab=readme-ov-file#%EF%B8%8F-contributing--building-from-source) in your Mac \ No newline at end of file +> ⚠️ MacOS ARM64 binary downloads are experimental and may not open on Apple Silicon Macs if downloaded from browser (You will get 'Damaged File' error) it's because the binaries are not signed (signing MacOS binaries requires 99$/year Apple Developer Account subscription, which I can't afford RN!) and Apple Silicon Macs don't allow unsigned apps (downloaded from browser) to be installed on the system. If you want to use NeoDLP on your Apple Silicon Macs, you can simply use the command line [Curl-Bash Installer](https://neodlp.neosubhamoy.com/download) (Recommended) -OR- [compile it from source](https://github.com/neosubhamoy/neodlp?tab=readme-ov-file#%EF%B8%8F-contributing--building-from-source) in your Mac diff --git a/README.md b/README.md index 17aa74a..611fa40 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ After installing the extension you can do the following directly from the browse | Arch\OS | Windows | Linux | MacOS | | :---- | :---- | :---- | :---- | | x86_64 | ✅ [Download](https://github.com/neosubhamoy/neodlp/releases/latest) | ✅ [Download](https://github.com/neosubhamoy/neodlp/releases/latest) | ✅ [Download](https://github.com/neosubhamoy/neodlp/releases/latest) | -| ARM64 | ✅ Emulation | ❌ N/A | ✅ [Download](https://github.com/neosubhamoy/neodlp/releases/latest) | +| ARM64 | ✅ Emulation | ✅ [Download](https://github.com/neosubhamoy/neodlp/releases/latest) | ✅ [Download](https://github.com/neosubhamoy/neodlp/releases/latest) | > 📌 **NOTE:** x86_64 Windows binary also works on ARM64 (Windows on ARM) devices with emulation (Not planning to release native Windows ARM64 build anytime soon as, x86_64 one works fine on ARM64 without noticeable performance impact) @@ -113,10 +113,17 @@ Want to be part of this? Feel free to contribute...!! Pull Requests are always w 5. Run development / build process > ⚠️ **IMPORTANT:** Make sure to run the build command once before running the dev command for the first time to avoid compile time errors ```code -# for windows and linux users +# for windows users npm run tauri dev # for development npm run tauri build # for production build +# for linux users +npm run tauri dev -- --config "./src-tauri/tauri.linux-aarch64.conf.json" # for ARM64 devices, development +npm run tauri build -- --config "./src-tauri/tauri.linux-aarch64.conf.json" # for ARM64 devices, production build + +npm run tauri dev -- --config "./src-tauri/tauri.linux-x86_64.conf.json" # for x64 devices, development +npm run tauri build -- --config "./src-tauri/tauri.linux-x86_64.conf.json" # for x64 devices, production build + # for macOS users (based on cpu architecture) npm run tauri dev -- --config "./src-tauri/tauri.macos-aarch64.conf.json" # for apple silicon macs, development npm run tauri build -- --config "./src-tauri/tauri.macos-aarch64.conf.json" # for apple silicon macs, production build diff --git a/src-tauri/binaries/aria2c-aarch64-unknown-linux-gnu b/src-tauri/binaries/aria2c-aarch64-unknown-linux-gnu new file mode 100644 index 0000000..6a6aa64 --- /dev/null +++ b/src-tauri/binaries/aria2c-aarch64-unknown-linux-gnu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9397aac0de54c8c15b8166486eb80bfe27937bd6d6b6af4bb8383b155213bec1 +size 6100888 diff --git a/src-tauri/binaries/deno-aarch64-unknown-linux-gnu b/src-tauri/binaries/deno-aarch64-unknown-linux-gnu new file mode 100644 index 0000000..5aacf9f --- /dev/null +++ b/src-tauri/binaries/deno-aarch64-unknown-linux-gnu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0716e9b52129cb0e43aa33064f641788650a2162681780590ec67dbca419d74f +size 103264328 diff --git a/src-tauri/binaries/ffmpeg-aarch64-unknown-linux-gnu b/src-tauri/binaries/ffmpeg-aarch64-unknown-linux-gnu new file mode 100644 index 0000000..36d1063 --- /dev/null +++ b/src-tauri/binaries/ffmpeg-aarch64-unknown-linux-gnu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e085bde1b47b05d41b23d3f60526067894ba92ce7eba1668c38d460a37c9bb2 +size 137315712 diff --git a/src-tauri/binaries/ffprobe-aarch64-unknown-linux-gnu b/src-tauri/binaries/ffprobe-aarch64-unknown-linux-gnu new file mode 100644 index 0000000..af67c5a --- /dev/null +++ b/src-tauri/binaries/ffprobe-aarch64-unknown-linux-gnu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b22c9ad49225bf133ccbb9e2a6494ba2b8c83f4c0514b24e06bdb2c6d6fa7427 +size 137124736 diff --git a/src-tauri/binaries/yt-dlp-aarch64-unknown-linux-gnu b/src-tauri/binaries/yt-dlp-aarch64-unknown-linux-gnu new file mode 100644 index 0000000..04dbf92 --- /dev/null +++ b/src-tauri/binaries/yt-dlp-aarch64-unknown-linux-gnu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45213ee9e85de7ecc4ea4edd4862dbf8cd8899d109c469500b1434ac47f80474 +size 37262312 diff --git a/src-tauri/tauri.linux-aarch64.conf.json b/src-tauri/tauri.linux-aarch64.conf.json new file mode 100644 index 0000000..7a90d81 --- /dev/null +++ b/src-tauri/tauri.linux-aarch64.conf.json @@ -0,0 +1,68 @@ +{ + "identifier": "com.neosubhamoy.neodlp", + "build": { + "beforeDevCommand": "cargo build --target=aarch64-unknown-linux-gnu --manifest-path=./src-tauri/msghost/Cargo.toml && node makeFilesExecutable.js && npm run dev", + "beforeBuildCommand": "cargo build --release --target=aarch64-unknown-linux-gnu --manifest-path=./src-tauri/msghost/Cargo.toml && node makeFilesExecutable.js && npm run build", + "devUrl": "http://localhost:1420", + "frontendDist": "../dist" + }, + "app": { + "windows": [ + { + "title": "NeoDLP", + "width": 1067, + "height": 605, + "visible": false + } + ], + "security": { + "csp": null, + "capabilities": [ + "default", + "shell-scope" + ] + } + }, + "bundle": { + "active": true, + "targets": ["deb", "rpm"], + "createUpdaterArtifacts": true, + "licenseFile": "../LICENSE", + "icon": [ + "icons/32x32.png", + "icons/128x128.png", + "icons/128x128@2x.png", + "icons/icon.icns", + "icons/icon.ico" + ], + "externalBin": [ + "binaries/yt-dlp", + "binaries/ffmpeg", + "binaries/ffprobe", + "binaries/aria2c", + "binaries/deno" + ], + "linux": { + "deb": { + "files": { + "/etc/opt/chrome/native-messaging-hosts/com.neosubhamoy.neodlp.json": "./resources/msghost-manifest/linux/chrome.json", + "/etc/chromium/native-messaging-hosts/com.neosubhamoy.neodlp.json": "./resources/msghost-manifest/linux/chrome.json", + "/usr/lib/mozilla/native-messaging-hosts/com.neosubhamoy.neodlp.json": "./resources/msghost-manifest/linux/firefox.json", + "/usr/bin/neodlp-msghost": "./target/aarch64-unknown-linux-gnu/release/neodlp-msghost", + "/etc/xdg/autostart/neodlp-autostart.desktop": "./resources/autostart/linux/autostart.desktop" + } + }, + "rpm": { + "epoch": 0, + "release": "1", + "files": { + "/etc/opt/chrome/native-messaging-hosts/com.neosubhamoy.neodlp.json": "./resources/msghost-manifest/linux/chrome.json", + "/etc/chromium/native-messaging-hosts/com.neosubhamoy.neodlp.json": "./resources/msghost-manifest/linux/chrome.json", + "/usr/lib/mozilla/native-messaging-hosts/com.neosubhamoy.neodlp.json": "./resources/msghost-manifest/linux/firefox.json", + "/usr/bin/neodlp-msghost": "./target/aarch64-unknown-linux-gnu/release/neodlp-msghost", + "/etc/xdg/autostart/neodlp-autostart.desktop": "./resources/autostart/linux/autostart.desktop" + } + } + } + } +} diff --git a/src-tauri/tauri.linux.conf.json b/src-tauri/tauri.linux-x86_64.conf.json similarity index 80% rename from src-tauri/tauri.linux.conf.json rename to src-tauri/tauri.linux-x86_64.conf.json index aeed98a..4c82997 100644 --- a/src-tauri/tauri.linux.conf.json +++ b/src-tauri/tauri.linux-x86_64.conf.json @@ -1,8 +1,8 @@ { "identifier": "com.neosubhamoy.neodlp", "build": { - "beforeDevCommand": "cargo build --manifest-path=./src-tauri/msghost/Cargo.toml && node makeFilesExecutable.js && npm run dev", - "beforeBuildCommand": "cargo build --release --manifest-path=./src-tauri/msghost/Cargo.toml && node makeFilesExecutable.js && npm run build", + "beforeDevCommand": "cargo build --target=x86_64-unknown-linux-gnu --manifest-path=./src-tauri/msghost/Cargo.toml && node makeFilesExecutable.js && npm run dev", + "beforeBuildCommand": "cargo build --release --target=x86_64-unknown-linux-gnu --manifest-path=./src-tauri/msghost/Cargo.toml && node makeFilesExecutable.js && npm run build", "devUrl": "http://localhost:1420", "frontendDist": "../dist" }, @@ -48,7 +48,7 @@ "/etc/opt/chrome/native-messaging-hosts/com.neosubhamoy.neodlp.json": "./resources/msghost-manifest/linux/chrome.json", "/etc/chromium/native-messaging-hosts/com.neosubhamoy.neodlp.json": "./resources/msghost-manifest/linux/chrome.json", "/usr/lib/mozilla/native-messaging-hosts/com.neosubhamoy.neodlp.json": "./resources/msghost-manifest/linux/firefox.json", - "/usr/bin/neodlp-msghost": "./target/release/neodlp-msghost", + "/usr/bin/neodlp-msghost": "./target/x86_64-unknown-linux-gnu/release/neodlp-msghost", "/etc/xdg/autostart/neodlp-autostart.desktop": "./resources/autostart/linux/autostart.desktop" } }, @@ -59,7 +59,7 @@ "/etc/opt/chrome/native-messaging-hosts/com.neosubhamoy.neodlp.json": "./resources/msghost-manifest/linux/chrome.json", "/etc/chromium/native-messaging-hosts/com.neosubhamoy.neodlp.json": "./resources/msghost-manifest/linux/chrome.json", "/usr/lib/mozilla/native-messaging-hosts/com.neosubhamoy.neodlp.json": "./resources/msghost-manifest/linux/firefox.json", - "/usr/bin/neodlp-msghost": "./target/release/neodlp-msghost", + "/usr/bin/neodlp-msghost": "./target/x86_64-unknown-linux-gnu/release/neodlp-msghost", "/etc/xdg/autostart/neodlp-autostart.desktop": "./resources/autostart/linux/autostart.desktop" } }