@@ -8,24 +8,12 @@ if [ -z "$VERSION" ]; then
88 exit 1
99fi
1010
11- # Build Electron Linux 64bit (x64)
12- echo " Building for Electron $VERSION on Linux x64..."
13- node-pre-gyp configure --target=$VERSION --arch=x64 --dist-url=https://electronjs.org/headers --module_name=electron-printer --module_path=../lib/
14- node-pre-gyp build package --runtime=electron --target=$VERSION --target_arch=x64 --build-from-source
11+ declare -a linux_archs=(" x64" " ia32" " arm" " arm64" )
1512
16- # Build Electron Linux 32bit (ia32)
17- echo " Building for Electron $VERSION on Linux ia32..."
18- node-pre-gyp configure --target=$VERSION --arch=ia32 --dist-url=https://electronjs.org/headers --module_name=electron-printer --module_path=../lib/
19- node-pre-gyp build package --runtime=electron --target=$VERSION --target_arch=ia32 --build-from-source
20-
21- # Build Electron Linux ARM 32bit (armv7l) for Raspberry Pi 2/3/4 (32-bit OS)
22- echo " Building for Electron $VERSION on Linux arm..."
23- node-pre-gyp configure --target=$VERSION --arch=arm --dist-url=https://electronjs.org/headers --module_name=electron-printer --module_path=../lib/
24- node-pre-gyp build package --runtime=electron --target=$VERSION --target_arch=arm --build-from-source
25-
26- # Build Electron Linux ARM 64bit (arm64) for Raspberry Pi 3/4/5 (64-bit OS)
27- echo " Building for Electron $VERSION on Linux arm64..."
28- node-pre-gyp configure --target=$VERSION --arch=arm64 --dist-url=https://electronjs.org/headers --module_name=electron-printer --module_path=../lib/
29- node-pre-gyp build package --runtime=electron --target=$VERSION --target_arch=arm64 --build-from-source
13+ for arch in " ${linux_archs[@]} " ; do
14+ echo " Building for Electron $VERSION on Linux $arch ..."
15+ npx node-pre-gyp configure --target=$VERSION --arch=$arch --dist-url=https://electronjs.org/headers --module_name=node-printer --module_path=../lib/
16+ npx node-pre-gyp build package --runtime=electron --target=$VERSION --target_arch=$arch --build-from-source
17+ done
3018
3119echo " Done."
0 commit comments