From b185b40161e7cea49926e61fd8647f6045f34483 Mon Sep 17 00:00:00 2001 From: Elysia Date: Sat, 31 Jan 2026 10:40:11 +0800 Subject: [PATCH] build: add arm64 architecture support --- .github/workflows/build.yml | 3 ++- electron-builder.yml | 2 +- src/modeuls/processInstall.ts | 2 +- src/vite-env.d.ts | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b5de3d8..28da0399 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,6 +42,7 @@ jobs: matrix: os: [ubuntu-latest] package: [deb, rpm] + architecture: [x64, arm64] include: - package: deb docker_image: "debian:12" @@ -76,7 +77,7 @@ jobs: npm install - name: Build Release Files - run: ${{ matrix.package == 'deb' && 'npm run build:deb' || matrix.package == 'rpm' && 'npm run build:rpm' }} + run: ${{ matrix.package == 'deb' && 'npm run build:deb -- --${{ matrix.architecture }}' || matrix.package == 'rpm' && 'npm run build:rpm -- --${{ matrix.architecture }}' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/electron-builder.yml b/electron-builder.yml index 5c436f2e..0e2fd118 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -1,7 +1,7 @@ appId: "store.spark-app.apm" asar: true productName: "apm-app-store" -artifactName: "apm-app-store_${version}_${os}.${ext}" +artifactName: "apm-app-store_${version}_${os}_${arch}.${ext}" directories: output: "release/${version}" files: diff --git a/src/modeuls/processInstall.ts b/src/modeuls/processInstall.ts index 55ba7ba3..574469c9 100644 --- a/src/modeuls/processInstall.ts +++ b/src/modeuls/processInstall.ts @@ -20,7 +20,7 @@ export const handleInstall = () => { name: currentApp.value.Name, pkgname: currentApp.value.Pkgname, version: currentApp.value.Version, - icon: `${APM_STORE_BASE_URL}/${APM_STORE_ARCHITECTURE()}/${currentApp.value._category}/${currentApp.value.Pkgname}/icon.png`, + icon: `${APM_STORE_BASE_URL}/${window.apm_store.arch}/${currentApp.value._category}/${currentApp.value.Pkgname}/icon.png`, status: 'queued', progress: 0, downloadedSize: 0, diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts index 788532e7..5bab384c 100644 --- a/src/vite-env.d.ts +++ b/src/vite-env.d.ts @@ -9,4 +9,5 @@ declare module '*.vue' { interface Window { // expose in the `electron/preload/index.ts` ipcRenderer: import('electron').IpcRenderer + apm_store: any }