Qortal UI - Main Code Repository A User Interface for the Qortal Blockchain Project. Truly decentralized web hosting, application hosting, communications, data storage, and full infrastructure for the future global decentralized digital world.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
873 B

3 years ago
const path = require('path')
const shell = require("shelljs")
3 years ago
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)
}
}
)
3 years ago
}
async function doLinux(context) {
console.log("Running doLinux ==> ")
3 years ago
const { targets, appOutDir } = context
3 years ago
targets.forEach(async target => {
if (!["appimage", "snap"].includes(target.name.toLowerCase())) {
await runShellCommand(appOutDir)
}
})
3 years ago
}
async function afterPack(context) {
console.log("Running AfterPack")
3 years ago
const electronPlatformName = context.electronPlatformName.toLowerCase()
3 years ago
if (electronPlatformName.includes("linux")) {
await doLinux(context)
}
3 years ago
}
module.exports = afterPack