Prepeare for a multiplatform build

This commit is contained in:
Nick Denry 2020-05-13 18:23:33 +03:00
parent d0e5413988
commit 0d4cc9951d
5 changed files with 53 additions and 12 deletions

View File

@ -12,6 +12,10 @@ const settingsService = require(__dirname+'/modules/settings-service')
function initApp() { function initApp() {
createWindow() createWindow()
// Set Windows platform notifications
if (process.platform === 'win32') {
app.setAppUserModelId("com.denry.chimeverse");
}
} }
function createWindow () { function createWindow () {

View File

@ -57,7 +57,7 @@ menuService.createMenu = () => {
}, },
{ {
label: 'Quit', label: 'Quit',
accelerator: 'Command+Q', accelerator: 'CmdOrCtrl+Q',
click: () => { click: () => {
app.isQuitting = true app.isQuitting = true
app.quit() app.quit()

18
package-lock.json generated
View File

@ -1096,9 +1096,9 @@
} }
}, },
"electron-rebuild": { "electron-rebuild": {
"version": "1.10.1", "version": "1.11.0",
"resolved": "https://registry.npmjs.org/electron-rebuild/-/electron-rebuild-1.10.1.tgz", "resolved": "https://registry.npmjs.org/electron-rebuild/-/electron-rebuild-1.11.0.tgz",
"integrity": "sha512-KSqp0Xiu7CCvKL2aEdPp/vNe2Rr11vaO8eM/wq9gQJTY02UjtAJ3l7WLV7Mf8oR+UJReJO8SWOWs/FozqK8ggA==", "integrity": "sha512-cn6AqZBQBVtaEyj5jZW1/LOezZZ22PA1HvhEP7asvYPJ8PDF4i4UFt9be4i9T7xJKiSiomXvY5Fd+dSq3FXZxA==",
"dev": true, "dev": true,
"requires": { "requires": {
"colors": "^1.3.3", "colors": "^1.3.3",
@ -2144,9 +2144,9 @@
} }
}, },
"mime": { "mime": {
"version": "2.4.4", "version": "2.4.5",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.5.tgz",
"integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==", "integrity": "sha512-3hQhEUF027BuxZjQA3s7rIv/7VCQPa27hN9u9g87sEkWaKwQPuXOkVKtOeiyUrnWqTDiOs8Ed2rwg733mB0R5w==",
"dev": true "dev": true
}, },
"mime-db": { "mime-db": {
@ -3427,9 +3427,9 @@
} }
}, },
"tslib": { "tslib": {
"version": "1.11.1", "version": "1.12.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.12.0.tgz",
"integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", "integrity": "sha512-5rxCQkP0kytf4H1T4xz1imjxaUUPMvc5aWp0rJ/VMIN7ClRiH1FwFvBt8wOeMasp/epeUnmSW6CixSIePtiLqA==",
"dev": true "dev": true
}, },
"tunnel-agent": { "tunnel-agent": {

View File

@ -4,7 +4,12 @@
"description": "Jabber/XMPP client based on Converse.js and Electron", "description": "Jabber/XMPP client based on Converse.js and Electron",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {
"start": "electron ." "postinstall": "electron-builder install-app-deps",
"start": "electron .",
"pack": "build --dir",
"dist": "build",
"dist:win64": "build --platform win --arch x64",
"dist:linux64deb": "build --platform linux --arch x64"
}, },
"repository": "https://github.com/nick-denry/Chimeverse", "repository": "https://github.com/nick-denry/Chimeverse",
"keywords": [ "keywords": [
@ -15,7 +20,7 @@
"Electron", "Electron",
"OMEMO" "OMEMO"
], ],
"author": "Nick Denry", "author": "Nick Denry <nick@denry.ru>",
"license": "GPL-3.0", "license": "GPL-3.0",
"devDependencies": { "devDependencies": {
"electron": "^4.2.12", "electron": "^4.2.12",
@ -31,5 +36,37 @@
"keytar": "^4.13.0", "keytar": "^4.13.0",
"n": "^6.5.1", "n": "^6.5.1",
"open-iconic": "^1.1.1" "open-iconic": "^1.1.1"
},
"build": {
"appId": "com.denry.chimeverse",
"productName": "Chimeverse",
"mac": {
"category": "public.app-category.social-networking",
"icon": "resources/images/logo.icns",
"target": "dmg"
},
"dmg": {
"contents": [
{
"x": 110,
"y": 150
},
{
"x": 240,
"y": 150,
"type": "link",
"path": "/Applications"
}
]
},
"linux": {
"target": [
"deb"
]
},
"win": {
"target": "nsis",
"icon": "resources/images/logo.ico"
}
} }
} }

BIN
resources/images/logo.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB