tutanota/buildSrc/electron-package-json-template.js

150 lines
3.9 KiB
JavaScript
Raw Normal View History

const path = require('path')
/**
* This is used for launching electron:
2019-02-05 15:15:05 +01:00
* 1. copied to app-desktop/build from make.js
* 2. copied to app-desktop/build/dist from dist.js (DesktopBuilder)
*/
module.exports = function (nameSuffix, version, targetUrl, iconPath, sign, notarize) {
2019-07-18 15:16:13 +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": {
"pubKeys": [
"-----BEGIN PUBLIC KEY-----\n"
+ "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhFrLW999Y/ODqGfGKSzh\n"
+ "7SFm6UgIj5scpb1r+KmEgVr/3zmd973+u2z5gG/wtayUbdVUGlzTgxqTE76BGTBR\n"
+ "szq932uTsPfjRbtbyjIOzfzPvkyAB1Ew91gQk5ubrO1VCbXAZyuFi7RxDibuklLO\n"
+ "lzHyjKyEIVTTdOqOTE+mg/vr41MxDW0X4nZw5MT1mIV/aYGeOSdtNdFsL69aR+d7\n"
+ "KufD43J60FUS9G0tf4KmyQInmGqC8MSXCO0SMwwEJZDxDzkBsSensKfS0HzIjCXS\n"
+ "or/Ahu6RwhEhjm7MyXbhiDyis+kGHSfatsO5KWWuZ4xgCEUO0L6vMQwr5M/qYOj1\n"
+ "7QIDAQAB\n"
+ "-----END PUBLIC KEY-----",
"key2"
],
2019-07-18 15:16:13 +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",
2019-10-01 10:26:22 +02:00
"node-forge": "0.9.1",
2019-07-18 15:16:13 +02:00
"winreg": "1.2.4",
2019-10-17 10:11:41 +02:00
"keytar": "4.13.0"
2019-07-18 15:16:13 +02:00
},
"build": {
"electronVersion": "6.0.12",
2019-07-18 15:16:13 +02:00
"icon": iconPath,
"appId": "de.tutao.tutanota" + nameSuffix,
"productName": nameSuffix.length > 0
? nameSuffix.slice(1) + " Tutanota Desktop"
: "Tutanota Desktop",
"artifactName": "${name}-${os}.${ext}",
"afterSign": notarize ? "buildSrc/notarize.js" : undefined,
2019-07-18 15:16:13 +02:00
"protocols": [
{
"name": "Mailto Links",
"schemes": [
"mailto"
],
"role": "Editor"
}
],
2019-09-05 13:53:12 +02:00
"forceCodeSigning": sign || !!process.env.JENKINS,
2019-07-18 15:16:13 +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": {
2019-10-17 10:11:41 +02:00
"hardenedRuntime": true,
"gatekeeperAssess": false,
"entitlements": "buildSrc/mac-entitlements.plist",
"entitlementsInherit": "buildSrc/mac-entitlements.plist",
2019-07-18 15:16:13 +02:00
"icon": path.join(path.dirname(iconPath), "logo-solo-red.png.icns"),
"extendInfo": {
"LSUIElement": 1 //hide dock icon on startup
},
"target": [
{
"target": "zip",
2019-07-18 15:16:13 +02:00
"arch": "x64"
},
{
"target": "dmg",
"arch": "x64"
2019-07-18 15:16:13 +02:00
}
]
},
"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