diff --git a/README.md b/README.md index 85e5970..316bff7 100644 --- a/README.md +++ b/README.md @@ -287,6 +287,8 @@ sudo service nginx reload Сборка только в среде Linux. Необходима версия node.js не ниже 16. +Для сборки linux-arm64 необходимо предварительно установить [QEMU](https://wiki.debian.org/QemuUserEmulation). + ```sh git clone https://github.com/bookpauk/inpx-web cd inpx-web diff --git a/build/prepkg.js b/build/prepkg.js index ce9f94a..ea91575 100644 --- a/build/prepkg.js +++ b/build/prepkg.js @@ -12,8 +12,8 @@ const publicDir = `${tmpDir}/public`; const outDir = `${distDir}/${platform}`; async function build() { - if (platform != 'linux' && platform != 'win' && platform != 'macos') - throw new Error(`Unknown platform: ${platform}`); + if (!platform) + throw new Error(`Please set platform`); await fs.emptyDir(outDir); diff --git a/build/release.js b/build/release.js index 3799773..85839d1 100644 --- a/build/release.js +++ b/build/release.js @@ -22,6 +22,7 @@ async function main() { await fs.emptyDir(outDir); await makeRelease('win'); await makeRelease('linux'); + await makeRelease('linux-arm64'); await makeRelease('macos'); } catch(e) { console.error(e); diff --git a/package.json b/package.json index d481b53..89cb0c2 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,11 @@ "dev": "nodemon --inspect --ignore server/.inpx-web --ignore client --exec 'node --expose-gc server --lib-dir=server/.inpx-web/lib'", "build:client": "webpack --config build/webpack.prod.config.js", "build:linux": "npm run build:client && node build/prepkg.js linux && pkg -t node16-linux-x64 -C GZip --options max-old-space-size=4096,expose-gc -o dist/linux/inpx-web .", + "build:linux-arm64": "npm run build:client && node build/prepkg.js linux-arm64 && pkg -t node16-linuxstatic-arm64 -C GZip --options max-old-space-size=4096,expose-gc -o dist/linux-arm64/inpx-web .", "build:win": "npm run build:client && node build/prepkg.js win && pkg -t node16-win-x64 -C GZip --options max-old-space-size=4096,expose-gc -o dist/win/inpx-web .", "build:macos": "npm run build:client && node build/prepkg.js macos && pkg -t node16-macos-x64 -C GZip --options max-old-space-size=4096,expose-gc -o dist/macos/inpx-web .", "build:client-dev": "webpack --config build/webpack.dev.config.js", - "build:all": "npm run build:linux && npm run build:win && npm run build:macos", + "build:all": "npm run build:linux && npm run build:win && npm run build:macos && npm run build:linux-arm64", "release": "npm run build:all && node build/release.js", "postinstall": "npm run build:client-dev" },