2018-12-13 17:59:47 +01:00
|
|
|
const path = require('path')
|
|
|
|
|
|
2018-10-11 14:59:21 +02:00
|
|
|
/**
|
|
|
|
|
* This is used for launching electron:
|
2019-02-05 15:15:05 +01:00
|
|
|
* 1. copied to app-desktop/build from make.js
|
2018-10-11 14:59:21 +02:00
|
|
|
* 2. copied to app-desktop/build/dist from dist.js (DesktopBuilder)
|
|
|
|
|
*/
|
|
|
|
|
|
2018-12-13 17:59:47 +01:00
|
|
|
module.exports = function (nameSuffix, version, targetUrl, iconPath, sign) {
|
2019-08-12 10:08:14 +02:00
|
|
|
return {
|
|
|
|
|
"name": "tutanota-desktop" + nameSuffix,
|
|
|
|
|
"main": "./src/desktop/DesktopMain.js",
|
|
|
|
|
"version": version,
|
|
|
|
|
"author": "Tutao GmbH",
|
|
|
|
|
"description": "The desktop client for Tutanota, the secure e-mail service.",
|
|
|
|
|
"scripts": {
|
|
|
|
|
"start": "electron ."
|
|
|
|
|
},
|
|
|
|
|
"tutao-config": {
|
2019-09-05 12:16:25 +02:00
|
|
|
"pubKeyUrl": nameSuffix === '-test'
|
|
|
|
|
? "https://raw.githubusercontent.com/tutao/tutanota/master/tutao-pub-test.pem"
|
|
|
|
|
: "https://raw.githubusercontent.com/tutao/tutanota/master/tutao-pub.pem",
|
2019-08-12 10:08:14 +02:00
|
|
|
"pollingInterval": 1000 * 60 * 60 * 3, // 3 hours
|
|
|
|
|
"preloadjs": "./src/desktop/preload.js",
|
|
|
|
|
"desktophtml": "./desktop.html",
|
|
|
|
|
"iconName": "logo-solo-red.png",
|
|
|
|
|
"fileManagerTimeout": 30000,
|
|
|
|
|
// true if this version checks its updates. use to prevent local builds from checking sigs.
|
|
|
|
|
"checkUpdateSignature": sign || !!process.env.JENKINS,
|
|
|
|
|
"appUserModelId": "de.tutao.tutanota" + nameSuffix,
|
|
|
|
|
"initialSseConnectTimeoutInSeconds": 60,
|
|
|
|
|
"maxSseConnectTimeoutInSeconds": 2400,
|
|
|
|
|
"defaultDesktopConfig": {
|
|
|
|
|
"heartbeatTimeoutInSeconds": 30,
|
|
|
|
|
"defaultDownloadPath": null,
|
|
|
|
|
"enableAutoUpdate": true,
|
|
|
|
|
"runAsTrayApp": true,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"dependencies": {
|
|
|
|
|
"electron-updater": "4.1.2",
|
|
|
|
|
"chalk": "2.4.2",
|
|
|
|
|
"electron-localshortcut": "3.1.0",
|
|
|
|
|
"fs-extra": "7.0.1",
|
|
|
|
|
"bluebird": "3.5.2",
|
|
|
|
|
"node-forge": "0.8.3",
|
|
|
|
|
"winreg": "1.2.4"
|
|
|
|
|
},
|
|
|
|
|
"build": {
|
|
|
|
|
"electronVersion": "4.1.4",
|
|
|
|
|
"icon": iconPath,
|
|
|
|
|
"appId": "de.tutao.tutanota" + nameSuffix,
|
|
|
|
|
"productName": nameSuffix.length > 0
|
|
|
|
|
? nameSuffix.slice(1) + " Tutanota Desktop"
|
|
|
|
|
: "Tutanota Desktop",
|
|
|
|
|
"artifactName": "${name}-${os}.${ext}",
|
|
|
|
|
"protocols": [
|
|
|
|
|
{
|
|
|
|
|
"name": "Mailto Links",
|
|
|
|
|
"schemes": [
|
|
|
|
|
"mailto"
|
|
|
|
|
],
|
|
|
|
|
"role": "Editor"
|
|
|
|
|
}
|
|
|
|
|
],
|
2019-09-05 13:53:12 +02:00
|
|
|
"forceCodeSigning": sign || !!process.env.JENKINS,
|
2019-08-12 10:08:14 +02:00
|
|
|
"publish": {
|
|
|
|
|
"provider": "generic",
|
|
|
|
|
"url": targetUrl,
|
|
|
|
|
"channel": "latest",
|
|
|
|
|
"publishAutoUpdate": true
|
|
|
|
|
},
|
|
|
|
|
"directories": {
|
|
|
|
|
"output": "installers"
|
|
|
|
|
},
|
|
|
|
|
"extraResources": {
|
|
|
|
|
"from": path.dirname(iconPath),
|
|
|
|
|
"to": "./icons/"
|
|
|
|
|
},
|
|
|
|
|
"win": {
|
|
|
|
|
"publisherName": "Tutao GmbH",
|
|
|
|
|
"sign": sign
|
|
|
|
|
? "./buildSrc/winsigner.js"
|
|
|
|
|
: undefined,
|
|
|
|
|
"signingHashAlgorithms": [
|
|
|
|
|
"sha256"
|
|
|
|
|
],
|
|
|
|
|
"target": [
|
|
|
|
|
{
|
|
|
|
|
"target": "nsis",
|
|
|
|
|
"arch": "x64"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"nsis": {
|
|
|
|
|
"oneClick": false, "perMachine": false,
|
|
|
|
|
"createStartMenuShortcut": true,
|
|
|
|
|
"allowElevation": true,
|
|
|
|
|
"allowToChangeInstallationDirectory": true
|
|
|
|
|
},
|
|
|
|
|
"mac": {
|
|
|
|
|
"icon": path.join(path.dirname(iconPath), "logo-solo-red.png.icns"),
|
|
|
|
|
"extendInfo": {
|
|
|
|
|
"LSUIElement": 1 //hide dock icon on startup
|
|
|
|
|
},
|
|
|
|
|
"target": [
|
|
|
|
|
{
|
2019-08-20 14:09:13 +02:00
|
|
|
"target": "zip",
|
2019-08-12 10:08:14 +02:00
|
|
|
"arch": "x64"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"linux": {
|
|
|
|
|
"icon": path.join(path.dirname(iconPath), "icon/"),
|
|
|
|
|
"synopsis": "Tutanota Desktop Client",
|
|
|
|
|
"category": "Network",
|
|
|
|
|
"desktop": {
|
|
|
|
|
"StartupWMClass": "tutanota-desktop" + nameSuffix
|
|
|
|
|
},
|
|
|
|
|
"target": [
|
|
|
|
|
{
|
|
|
|
|
"target": "AppImage",
|
|
|
|
|
"arch": "x64"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-02-27 17:57:08 +01:00
|
|
|
}
|
2019-04-02 13:49:38 +02:00
|
|
|
|