From 501ccdf0d8a0f040919967b1013b7b067c378cfa Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Tue, 23 Apr 2019 23:30:39 +0900
Subject: [PATCH 1/2] Build package for 32bit using electron-builder
---
package.json | 47 +++++++++++++++++++++++++++++++++++++++--------
1 file changed, 39 insertions(+), 8 deletions(-)
diff --git a/package.json b/package.json
index 8ce9a080..6e893a06 100644
--- a/package.json
+++ b/package.json
@@ -25,8 +25,8 @@
"build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",
"build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js",
"build:mac": "node .electron-vue/build.js && electron-builder --mac --x64",
- "build:linux": "node .electron-vue/build.js && electron-builder --linux --x64",
- "build:windows": "node .electron-vue/build.js && electron-builder --win --x64",
+ "build:linux": "node .electron-vue/build.js && electron-builder --linux",
+ "build:windows": "node .electron-vue/build.js && electron-builder --win",
"build:mas": "npm run build:clean && npm run pack && electron-packager ./ 'Whalebird' --platform=mas --arch=x64 --electron-version=4.0.8 --asar.unpackDir='build/sounds' --out=packages --ignore='^/src' --ignore='^/test' --ignore='^/.electron-vue' --ignore='^/.envrc' --ignore='^/packages' --ignore='^/plist' --ignore='^/static' --ignore='^/whalebird.db' --ignore='^/screenshot.png' --prune=true --icon=./build/icons/icon.icns --overwrite --app-bundle-id=org.whalebird.desktop --app-version=$npm_package_config_appVersion --build-version=$npm_package_config_buildVersion --extend-info='./plist/team.plist' --osx-sign --app-category-type=public.app-category.social-networking",
"dev": "node .electron-vue/dev-runner.js",
"e2e": "npm run pack && mocha test/e2e",
@@ -44,7 +44,7 @@
"build": {
"productName": "Whalebird",
"appId": "org.whalebird.desktop",
- "artifactName": "${productName}-${version}-${os}.${ext}",
+ "artifactName": "${productName}-${version}-${os}-${arch}.${ext}",
"directories": {
"output": "build"
},
@@ -79,7 +79,15 @@
},
"win": {
"icon": "build/icons/icon.ico",
- "target": "nsis"
+ "target": [
+ {
+ "target": "nsis",
+ "arch": [
+ "x64",
+ "ia32"
+ ]
+ }
+ ]
},
"nsis": {
"oneClick": false,
@@ -88,10 +96,33 @@
"linux": {
"icon": "build/icons",
"target": [
- "deb",
- "rpm",
- "snap",
- "tar.bz2"
+ {
+ "target": "deb",
+ "arch": [
+ "x64",
+ "ia32"
+ ]
+ },
+ {
+ "target": "rpm",
+ "arch": [
+ "x64",
+ "ia32"
+ ]
+ },
+ {
+ "target": "tar.bz2",
+ "arch": [
+ "x64",
+ "ia32"
+ ]
+ },
+ {
+ "target": "snap",
+ "arch": [
+ "x64"
+ ]
+ }
],
"category": "Network"
}
From cde33ae616231f727b03fb3d1fc81be813303f23 Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Wed, 24 Apr 2019 09:07:50 +0900
Subject: [PATCH 2/2] Fix Makefile to build both x64 and ia32
---
Makefile | 17 +++++++++++------
package.json | 13 +++----------
2 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/Makefile b/Makefile
index fbea260a..5953b3b2 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
VERSION = 1.0.0
-all: install mac linux windows
+all: install mac linux win32 win64
install: package.json
npm install
@@ -13,12 +13,17 @@ mac:
linux:
npm run build:linux
- mv build/Whalebird-${VERSION}-linux.deb build/Whalebird-${VERSION}-linux-x64.deb
- mv build/Whalebird-${VERSION}-linux.rpm build/Whalebird-${VERSION}-linux-x64.rpm
- mv build/Whalebird-${VERSION}-linux.tar.bz2 build/Whalebird-${VERSION}-linux-x64.tar.bz2
+ mv build/Whalebird-${VERSION}-linux-amd64.deb build/Whalebird-${VERSION}-linux-x64.deb
+ mv build/Whalebird-${VERSION}-linux-x86_64.rpm build/Whalebird-${VERSION}-linux-x64.rpm
+ mv build/Whalebird-${VERSION}-linux-i386.deb build/Whalebird-${VERSION}-linux-ia32.deb
+ mv build/Whalebird-${VERSION}-linux-i686.rpm build/Whalebird-${VERSION}-linux-ia32.rpm
-windows:
- npm run build:windows
+win32:
+ npm run build:win32
+ mv build/Whalebird-${VERSION}-win.exe build/Whalebird-${VERSION}-windows-ia32.exe
+
+win64:
+ npm run build:win64
mv build/Whalebird-${VERSION}-win.exe build/Whalebird-${VERSION}-windows-x64.exe
clean:
diff --git a/package.json b/package.json
index 6e893a06..ad9df70e 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,8 @@
"build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js",
"build:mac": "node .electron-vue/build.js && electron-builder --mac --x64",
"build:linux": "node .electron-vue/build.js && electron-builder --linux",
- "build:windows": "node .electron-vue/build.js && electron-builder --win",
+ "build:win32": "node .electron-vue/build.js && electron-builder --win --ia32",
+ "build:win64": "node .electron-vue/build.js && electron-builder --win --x64",
"build:mas": "npm run build:clean && npm run pack && electron-packager ./ 'Whalebird' --platform=mas --arch=x64 --electron-version=4.0.8 --asar.unpackDir='build/sounds' --out=packages --ignore='^/src' --ignore='^/test' --ignore='^/.electron-vue' --ignore='^/.envrc' --ignore='^/packages' --ignore='^/plist' --ignore='^/static' --ignore='^/whalebird.db' --ignore='^/screenshot.png' --prune=true --icon=./build/icons/icon.icns --overwrite --app-bundle-id=org.whalebird.desktop --app-version=$npm_package_config_appVersion --build-version=$npm_package_config_buildVersion --extend-info='./plist/team.plist' --osx-sign --app-category-type=public.app-category.social-networking",
"dev": "node .electron-vue/dev-runner.js",
"e2e": "npm run pack && mocha test/e2e",
@@ -79,15 +80,7 @@
},
"win": {
"icon": "build/icons/icon.ico",
- "target": [
- {
- "target": "nsis",
- "arch": [
- "x64",
- "ia32"
- ]
- }
- ]
+ "target": "nsis"
},
"nsis": {
"oneClick": false,