From 9b75f8255d8a13cf711cb38cdeb770144587b019 Mon Sep 17 00:00:00 2001 From: bordun Date: Sat, 25 Apr 2020 00:13:22 +0200 Subject: [PATCH] package: move electron license to LICENSE.electron and put o-s-c gpl in LICENSE (#615) --- scripts/package.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/package.js b/scripts/package.js index e7690323..64d68a8a 100644 --- a/scripts/package.js +++ b/scripts/package.js @@ -1,7 +1,9 @@ const packager = require('electron-packager'), path = require('path'), appData = require('../app/package.json'), - safeFFMPEG = require('electron-packager-plugin-non-proprietary-codecs-ffmpeg').default + safeFFMPEG = require('electron-packager-plugin-non-proprietary-codecs-ffmpeg').default, + licensePath = path.resolve(__dirname + '/../LICENSE'), + fs = require('fs') var rpi = process.argv.includes('--old-rpi'), all = process.argv.includes('--all') @@ -19,7 +21,13 @@ packager({ ignore: /node_modules\/(serialport|uws)/, afterExtract: [safeFFMPEG], prune: false -}).then(()=>{ +}).then((appPaths)=>{ + + for (var appPath of appPaths) { + var electronLicensePath = path.join(appPath, 'LICENSE') + fs.copyFileSync(electronLicensePath, electronLicensePath + '.electron') + fs.copyFileSync(licensePath, electronLicensePath) + } console.warn('\x1b[36m%s\x1b[0m', '=> Build artifacts created in ' + path.resolve(__dirname + '/../dist'))