From c829b1158763dcfef330ecddaaff62a0cb5a2b91 Mon Sep 17 00:00:00 2001 From: AlphaX-Projects <77661270+AlphaX-Projects@users.noreply.github.com> Date: Tue, 4 Jul 2023 15:15:28 +0200 Subject: [PATCH] Bump version 4.2.3 --- electron-builder.yml | 204 ++++++++++++++----------------------------- electron.js | 41 +++++++-- package-lock.json | 4 +- package.json | 6 +- 4 files changed, 104 insertions(+), 151 deletions(-) diff --git a/electron-builder.yml b/electron-builder.yml index 20ca7f6f..5405e4cc 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -1,138 +1,66 @@ -appId: "org.qortal.QortalUI" -productName: "Qortal UI" -copyright: "Copyright © 2021 - 2023 Qortal" - -# forceCodeSigning: false - -# nodeGypRebuild: false - -compression: normal - -asar: true - -afterPack: "./scripts/afterPack.js" - -afterSign: "./scripts/notarize.js" - -files: - - from: "." - to: "." - filter: - - "electron.js" - - "img/" - - "node_modules/" - - "server.js" - - "package.json" - - "builtWWW/" - - "config/" - - "scripts/" - - "build/" - - "lib/*.js" - - "locales/*.json" - - "splash/" - - "crypto/" - - "core/" - - "plugins/" - -# Mac OS configuration -mac: - icon: "./img/icons/icns/256x256.icns" - hardenedRuntime: true - gatekeeperAssess: false - entitlements: "./build/entitlements.mac.plist" - entitlementsInherit: "./build/entitlements.mac.plist" - category: "public.app-category.utilities" - asarUnpack: "**/*.node" - target: - - { target: dmg } - - { target: pkg } - -# Config for OSX dmg -dmg: - sign: false - artifactName: "Qortal-Setup-macOS.${ext}" - icon: "./img/icons/icns/256x256.icns" - iconSize: 100 - contents: - - x: 130 - y: 220 - - x: 410 - y: 220 - type: "link" - path: "/Applications" - -# Config for OSX pkg -pkg: - artifactName: "Qortal-Setup-macOS.${ext}" - installLocation: "/Applications" - background: { - file: "./build/logo.png", - alignment: "bottomleft", - scaling: "none" - } - allowAnywhere: true - allowCurrentUserHome: true - allowRootDirectory: true - isVersionChecked: true - isRelocatable: false - overwriteAction: "upgrade" - -# Windows configuration -win: - legalTrademarks: "QORTAL.ORG" - icon: "./img/icons/ico/256x256.ico" - target: - - "nsis" - -# Config for the windows installer -nsis: - artifactName: "Qortal-Setup-win64.${ext}" - oneClick: false - perMachine: false - installerSidebar: "./img/win-installer-sidebar.bmp" - uninstallerSidebar: "./img/win-uninstaller-sidebar.bmp" - runAfterFinish: true - deleteAppDataOnUninstall: true - createDesktopShortcut: true - createStartMenuShortcut: true - -# Linux configuration -linux: - icon: "./img/icons/png/" - category: "Network" - packageCategory: "Network" - desktop: - StartupWMClass: qortal-ui - executableArgs: - - --no-sandbox - - '--js-flags="--max-old-space-size=3584"' - target: - - "deb" - - "AppImage" - - "snap" - - "rpm" - -deb: - artifactName: "Qortal-Setup-amd64.${ext}" - synopsis: "Qortal UI for Linux" - afterInstall: "./scripts/add-debian-apt-repo.sh" - afterRemove: "./scripts/uninstall-debian-conf.sh" - -appImage: - artifactName: "Qortal-Setup-amd64.${ext}" - -snap: - artifactName: "Qortal-Setup-amd64.${ext}" - synopsis: "Qortal UI for Linux" - -rpm: - artifactName: "Qortal-Setup-amd64.${ext}" - -directories: - output: dist - buildResources: "./build/" - -publish: - provider: github - owner: Qortal - repo: qortal-ui +appId: "org.qortal.QortalUI" +productName: "Qortal UI" +copyright: "Copyright © 2021 - 2023 Qortal" + +# forceCodeSigning: false + +# nodeGypRebuild: false + +compression: normal + +asar: true + +afterPack: "./scripts/afterPack.js" + +afterSign: "./scripts/notarize.js" + +files: + - from: "." + to: "." + filter: + - "electron.js" + - "img/" + - "node_modules/" + - "server.js" + - "package.json" + - "builtWWW/" + - "config/" + - "scripts/" + - "build/" + - "lib/*.js" + - "locales/*.json" + - "splash/" + - "crypto/" + - "core/" + - "plugins/" + +# Linux configuration +linux: + icon: "./img/icons/png/" + category: "Network" + packageCategory: "Network" + desktop: + StartupWMClass: qortal-ui + executableArgs: + - --no-sandbox + target: + - "deb" + - "AppImage" + +deb: + artifactName: "Qortal-Setup-arm64.${ext}" + synopsis: "Qortal UI for Linux" + afterInstall: "./scripts/add-debian-apt-repo.sh" + afterRemove: "./scripts/uninstall-debian-conf.sh" + +appImage: + artifactName: "Qortal-Setup-arm64.${ext}" + +directories: + output: dist + buildResources: "./build/" + +publish: + provider: github + owner: Qortal + repo: qortal-ui \ No newline at end of file diff --git a/electron.js b/electron.js index f6dd1040..eaa11846 100644 --- a/electron.js +++ b/electron.js @@ -1,4 +1,18 @@ -const { app, BrowserWindow, ipcMain, ipcRenderer, Menu, Notification, Tray, nativeImage, dialog, webContents, nativeTheme } = require('electron') +const { + app, + BrowserWindow, + ipcMain, + ipcRenderer, + Menu, + Notification, + Tray, + nativeImage, + dialog, + webContents, + nativeTheme, + crashReporter +} = require('electron') + const { autoUpdater } = require('electron-updater') const server = require('./server.js') const log = require('electron-log') @@ -13,31 +27,42 @@ const fetch = require('node-fetch') const execFile = require('child_process').execFile const exec = require('child_process').exec const spawn = require('child_process').spawn +const homePath = app.getPath('home') +const downloadPath = app.getPath('downloads') +const store = new Store() + +crashReporter.start({ + productName: 'Qortal-UI', + uploadToServer: false +}) const myMemory = os.totalmem() -app.commandLine.appendSwitch('enable-experimental-web-platform-features') if (myMemory > 16000000000) { app.commandLine.appendSwitch('js-flags', '--max-old-space-size=8192') log.info("Memory Size Is 16GB Using JS Memory Heap Size 8GB") } else if (myMemory > 12000000000) { app.commandLine.appendSwitch('js-flags', '--max-old-space-size=6144') log.info("Memory Size Is 12GB Using JS Memory Heap Size 6GB") -} else { +} else if (myMemory > 7000000000) { app.commandLine.appendSwitch('js-flags', '--max-old-space-size=4096') log.info("Memory Size Is 8GB Using JS Memory Heap Size 4GB") +} else { + app.commandLine.appendSwitch('js-flags', '--max-old-space-size=2048') + log.info("Memory Size Is 4GB Using JS Memory Heap Size 2GB") } + +app.commandLine.appendSwitch('enable-experimental-web-platform-features') +app.commandLine.appendSwitch('disable-renderer-backgrounding') +app.commandLine.appendSwitch('enable-gpu-rasterization', true) app.commandLine.appendSwitch('disable-http-cache') -app.disableHardwareAcceleration() +app.commandLine.appendSwitch('log-file', 'qortal-ui.log') +app.commandLine.appendSwitch('enable-logging') app.enableSandbox() electronDl() process.env['APP_PATH'] = app.getAppPath() -const homePath = app.getPath('home') -const downloadPath = app.getPath('downloads') -const store = new Store() - autoUpdater.autoDownload = false autoUpdater.autoInstallOnAppQuit = false autoUpdater.logger = log diff --git a/package-lock.json b/package-lock.json index 08e364ad..3b9b7aaf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "qortal-ui", - "version": "4.2.2", + "version": "4.2.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "qortal-ui", - "version": "4.2.2", + "version": "4.2.3", "license": "GPL-3.0", "dependencies": { "@hapi/hapi": "21.3.2", diff --git a/package.json b/package.json index 9d7b9154..ed0b13e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "qortal-ui", - "version": "4.2.2", + "version": "4.2.3", "description": "Qortal Project - decentralize the world - Data storage, communications, web hosting, decentralized trading, complete infrastructure for the future blockchain-based Internet", "keywords": [ "QORT", @@ -19,11 +19,11 @@ "dev": "node server.js", "prebuild": "node -p \"'export const UI_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > core/src/redux/app/version.js", "build-dev": "node --max-old-space-size=8192 build.js", - "build": "NODE_ENV=production node --max-old-space-size=8192 build.js", + "build": "NODE_ENV=production node build.js", "server": "NODE_ENV=production node --max-old-space-size=8192 server.js", "watch": "node --max-old-space-size=8192 watch.js", "watch-inline": "node --max-old-space-size=8192 watch-inline.js", - "start-electron": "NODE_ENV=production electron --js-flags=--max-old-space-size=8192 .", + "start-electron": "NODE_ENV=production electron .", "build-electron": "electron-builder build --publish never", "deploy-electron": "electron-builder build --win --publish never", "release": "NODE_ENV=production electron-builder build --publish never",