mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-07-31 14:11:45 +00:00
Update UI
Refactor and added new functioms
This commit is contained in:
@@ -1,45 +1,39 @@
|
||||
const path = require('path')
|
||||
const shell = require("shelljs");
|
||||
const shell = require("shelljs")
|
||||
|
||||
const runShellCommand = (appOutDir) => {
|
||||
shell.exec(
|
||||
`chmod 4755 ${path.join(appOutDir, "chrome-sandbox")}`,
|
||||
|
||||
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);
|
||||
}
|
||||
});
|
||||
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 ==> ")
|
||||
|
||||
console.log("Running doLinux ==> ");
|
||||
const { targets, appOutDir } = context
|
||||
|
||||
const { targets, appOutDir } = context
|
||||
|
||||
targets.forEach(async target => {
|
||||
|
||||
if (!["appimage", "snap"].includes(target.name.toLowerCase())) {
|
||||
|
||||
await runShellCommand(appOutDir)
|
||||
}
|
||||
});
|
||||
targets.forEach(async target => {
|
||||
if (!["appimage", "snap"].includes(target.name.toLowerCase())) {
|
||||
await runShellCommand(appOutDir)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
async function afterPack(context) {
|
||||
console.log("Running AfterPack")
|
||||
|
||||
console.log("Running AfterPack");
|
||||
|
||||
const electronPlatformName = context.electronPlatformName.toLowerCase();
|
||||
|
||||
if (electronPlatformName.includes("linux")) {
|
||||
await doLinux(context);
|
||||
|
||||
}
|
||||
const electronPlatformName = context.electronPlatformName.toLowerCase()
|
||||
|
||||
if (electronPlatformName.includes("linux")) {
|
||||
await doLinux(context)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = afterPack
|
||||
module.exports = afterPack
|
@@ -1,20 +1,21 @@
|
||||
require('dotenv').config();
|
||||
const { notarize } = require('@electron/notarize');
|
||||
require('dotenv').config()
|
||||
const { notarize } = require('@electron/notarize')
|
||||
|
||||
exports.default = async function notarizing(context) {
|
||||
const { electronPlatformName, appOutDir } = context;
|
||||
if (electronPlatformName !== 'darwin') {
|
||||
return;
|
||||
}
|
||||
const { electronPlatformName, appOutDir } = context
|
||||
|
||||
const appName = context.packager.appInfo.productFilename;
|
||||
if (electronPlatformName !== 'darwin') {
|
||||
return
|
||||
}
|
||||
|
||||
return await notarize({
|
||||
appBundleId: 'org.qortal.QortalUI',
|
||||
appPath: `${appOutDir}/${appName}.app`,
|
||||
tool: "notarytool",
|
||||
teamId: process.env.APPLETEAMID,
|
||||
appleId: process.env.APPLEID,
|
||||
appleIdPassword: process.env.APPLEIDPASS,
|
||||
});
|
||||
};
|
||||
const appName = context.packager.appInfo.productFilename
|
||||
|
||||
return await notarize({
|
||||
appBundleId: 'org.qortal.QortalUI',
|
||||
appPath: `${appOutDir}/${appName}.app`,
|
||||
tool: "notarytool",
|
||||
teamId: process.env.APPLETEAMID,
|
||||
appleId: process.env.APPLEID,
|
||||
appleIdPassword: process.env.APPLEIDPASS
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user