mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-07-28 12:41:23 +00:00
build
config
img
lib
locales
qortal-ui-core
qortal-ui-crypto
qortal-ui-plugins
scripts
add-debian-apt-repo.sh
afterPack.js
notarize.js
uninstall-debian-conf.sh
snap
.editorconfig
.eslintrc.json
.gitattributes
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE
README.md
build-setup.js
build.bat
build.js
build.sh
electron-builder.yml
electron.js
install-dependencies.sh
package.json
push-updates-with-travis-build.sh
run_server.bat
server.js
set-up-snap.sh
update-package-json.js
watch-inline.js
watch.js
46 lines
1014 B
JavaScript
46 lines
1014 B
JavaScript
const path = require('path')
|
|
const shell = require("shelljs");
|
|
|
|
const runShellCommand = (appOutDir) => {
|
|
|
|
shell.exec(
|
|
`chmod 4755 ${path.join(appOutDir, "chrome-sandbox")}`,
|
|
|
|
function (code, stdout, stderr) {
|
|
console.log('runShellCommand ==> Exit code:', code);
|
|
if (stderr) {
|
|
console.log('runShellCommand ==> Program stderr:', stderr);
|
|
}
|
|
});
|
|
}
|
|
|
|
async function doLinux(context) {
|
|
|
|
console.log("Running doLinux ==> ");
|
|
|
|
const { targets, appOutDir } = context
|
|
|
|
targets.forEach(async target => {
|
|
|
|
if (!["appimage", "snap"].includes(target.name.toLowerCase())) {
|
|
|
|
await runShellCommand(appOutDir)
|
|
}
|
|
});
|
|
}
|
|
|
|
async function afterPack(context) {
|
|
|
|
console.log("Running AfterPack");
|
|
|
|
const electronPlatformName = context.electronPlatformName.toLowerCase();
|
|
|
|
if (electronPlatformName.includes("linux")) {
|
|
await doLinux(context);
|
|
return;
|
|
}
|
|
|
|
}
|
|
|
|
module.exports = afterPack
|