From b8f7880a78d3105451d931b9cbea8e723ba1341e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=98=D0=B0=D0=BD=20=D0=93=D0=B5=D0=BE?= =?UTF-8?q?=D1=80=D0=B3=D0=B8=D0=B5=D0=B2=D1=81=D0=BA=D0=B8?= Date: Thu, 15 Aug 2019 01:50:47 +0200 Subject: [PATCH 1/3] introduce linux arm64 support --- bin/package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/package.js b/bin/package.js index c41239cb..86751e88 100755 --- a/bin/package.js +++ b/bin/package.js @@ -175,7 +175,7 @@ const linux = { platform: 'linux', // Build ia32 and x64 binaries. - arch: ['ia32', 'x64'] + arch: ['ia32', 'x64', 'arm64'] // Note: Application icon for Linux is specified via the BrowserWindow `icon` option. } From cfde3ee85d4676c0b238eb7a038b51664727417d Mon Sep 17 00:00:00 2001 From: Julen Garcia Leunda Date: Sun, 15 Sep 2019 19:34:16 +0200 Subject: [PATCH 2/3] Add buble compiler target chrome version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c957b40b..c4645049 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "url": "git://github.com/webtorrent/webtorrent-desktop.git" }, "scripts": { - "build": "buble src --output build", + "build": "buble src --target chrome:71 --output build", "clean": "node ./bin/clean.js", "gh-release": "gh-release", "install-system-deps": "brew install fakeroot dpkg", From 39d04c4b2af0662b8c731103dd05f56200832705 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Sun, 15 Sep 2019 12:30:30 -0700 Subject: [PATCH 3/3] Add linux arm64 build (Fixes for PR #1650) --- bin/package.js | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/bin/package.js b/bin/package.js index 6cb22c2a..5f401658 100755 --- a/bin/package.js +++ b/bin/package.js @@ -485,11 +485,18 @@ function buildLinux (cb) { const tasks = [] buildPath.forEach(function (filesPath) { + let destArch = filesPath.split('-').pop() + + // Linux convention for 'x64' is 'amd64' + if (destArch === 'x64') { + destArch = 'amd64' + } + if (argv.package === 'deb' || argv.package === 'all') { - tasks.push((cb) => packageDeb(filesPath, cb)) + tasks.push((cb) => packageDeb(filesPath, destArch, cb)) } if (argv.package === 'zip' || argv.package === 'all') { - tasks.push((cb) => packageZip(filesPath, cb)) + tasks.push((cb) => packageZip(filesPath, destArch, cb)) } }) series(tasks, cb) @@ -497,16 +504,16 @@ function buildLinux (cb) { cb(err) }) - function packageDeb (filesPath, cb) { + function packageDeb (filesPath, destArch, cb) { // Create .deb file for Debian-based platforms - console.log('Linux: Creating deb...') + console.log(`Linux: Creating ${destArch} deb...`) const installer = require('electron-installer-debian') const options = { src: filesPath + '/', dest: DIST_PATH, - arch: 'amd64', + arch: destArch, bin: 'WebTorrent', icon: { '48x48': path.join(config.STATIC_PATH, 'linux/share/icons/hicolor/48x48/apps/webtorrent-desktop.png'), @@ -519,22 +526,22 @@ function buildLinux (cb) { installer(options).then( () => { - console.log('Linux: Created deb.') + console.log(`Linux: Created ${destArch} deb.`) cb(null) }, (err) => cb(err) ) } - function packageZip (filesPath, cb) { + function packageZip (filesPath, destArch, cb) { // Create .zip file for Linux - console.log('Linux: Creating zip...') + console.log(`Linux: Creating ${destArch} zip...`) const inPath = path.join(DIST_PATH, path.basename(filesPath)) - const outPath = path.join(DIST_PATH, BUILD_NAME + '-linux.zip') + const outPath = path.join(DIST_PATH, `${BUILD_NAME}-linux-${destArch}.zip`) zip.zipSync(inPath, outPath) - console.log('Linux: Created zip.') + console.log(`Linux: Created ${destArch} zip.`) cb(null) } }