mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
Merge remote-tracking branch 'upstream/master' into ELECTRON-308
This commit is contained in:
commit
d1d0f5f151
@ -16,6 +16,7 @@
|
|||||||
},
|
},
|
||||||
"customFlags": {
|
"customFlags": {
|
||||||
"authServerWhitelist": "",
|
"authServerWhitelist": "",
|
||||||
"authNegotiateDelegateWhitelist": ""
|
"authNegotiateDelegateWhitelist": "",
|
||||||
|
"disableGpu": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
34
js/main.js
34
js/main.js
@ -22,6 +22,10 @@ const { deleteIndexFolder } = require('./search/search.js');
|
|||||||
|
|
||||||
require('electron-dl')();
|
require('electron-dl')();
|
||||||
|
|
||||||
|
// ELECTRON-261: On Windows, due to gpu issues, we need to disable gpu
|
||||||
|
// to ensure screen sharing works effectively with multiple monitors
|
||||||
|
// https://github.com/electron/electron/issues/4380
|
||||||
|
|
||||||
//setting the env path child_process issue https://github.com/electron/electron/issues/7688
|
//setting the env path child_process issue https://github.com/electron/electron/issues/7688
|
||||||
shellPath()
|
shellPath()
|
||||||
.then((path) => {
|
.then((path) => {
|
||||||
@ -109,29 +113,37 @@ if (isMac) {
|
|||||||
* Sets chrome authentication flags in electron
|
* Sets chrome authentication flags in electron
|
||||||
*/
|
*/
|
||||||
function setChromeFlags() {
|
function setChromeFlags() {
|
||||||
|
|
||||||
log.send(logLevels.INFO, 'checking if we need to set custom chrome flags!');
|
log.send(logLevels.INFO, 'checking if we need to set custom chrome flags!');
|
||||||
|
|
||||||
// Read the config parameters synchronously
|
// Read the config parameters synchronously
|
||||||
let config = readConfigFileSync();
|
let config = readConfigFileSync();
|
||||||
|
|
||||||
// If we cannot find any config, just skip setting any flags
|
// If we cannot find any config, just skip setting any flags
|
||||||
if (config && config !== null && config.customFlags) {
|
if (config && config !== null && config.customFlags) {
|
||||||
|
|
||||||
log.send(logLevels.INFO, 'Chrome flags config found!');
|
log.send(logLevels.INFO, 'Chrome flags config found!');
|
||||||
|
|
||||||
// If we cannot find the authServerWhitelist config, move on
|
|
||||||
if (config.customFlags.authServerWhitelist && config.customFlags.authServerWhitelist !== "") {
|
if (config.customFlags.authServerWhitelist && config.customFlags.authServerWhitelist !== "") {
|
||||||
log.send(logLevels.INFO, 'Setting auth server whitelist flag');
|
log.send(logLevels.INFO, 'Setting auth server whitelist flag');
|
||||||
app.commandLine.appendSwitch('auth-server-whitelist', config.customFlags.authServerWhitelist);
|
app.commandLine.appendSwitch('auth-server-whitelist', config.customFlags.authServerWhitelist);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we cannot find the authNegotiateDelegateWhitelist config, move on
|
|
||||||
if (config.customFlags.authNegotiateDelegateWhitelist && config.customFlags.authNegotiateDelegateWhitelist !== "") {
|
if (config.customFlags.authNegotiateDelegateWhitelist && config.customFlags.authNegotiateDelegateWhitelist !== "") {
|
||||||
log.send(logLevels.INFO, 'Setting auth negotiate delegate whitelist flag');
|
log.send(logLevels.INFO, 'Setting auth negotiate delegate whitelist flag');
|
||||||
app.commandLine.appendSwitch('auth-negotiate-delegate-whitelist', config.customFlags.authNegotiateDelegateWhitelist);
|
app.commandLine.appendSwitch('auth-negotiate-delegate-whitelist', config.customFlags.authNegotiateDelegateWhitelist);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ELECTRON-261: Windows 10 Screensharing issues. We set chrome flags
|
||||||
|
// to disable gpu which fixes the black screen issue observed on
|
||||||
|
// multiple monitors
|
||||||
|
if (config.customFlags.disableGpu) {
|
||||||
|
log.send(logLevels.INFO, 'Setting disable gpu, gpu compositing and d3d11 flags to true');
|
||||||
|
app.commandLine.appendSwitch("disable-gpu", true);
|
||||||
|
app.commandLine.appendSwitch("disable-gpu-compositing", true);
|
||||||
|
app.commandLine.appendSwitch("disable-d3d11", true);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -212,7 +224,7 @@ function setupThenOpenMainWindow() {
|
|||||||
let hasInstallFlag = getCmdLineArg(process.argv, '--install', true);
|
let hasInstallFlag = getCmdLineArg(process.argv, '--install', true);
|
||||||
let perUserInstall = getCmdLineArg(process.argv, '--peruser', true);
|
let perUserInstall = getCmdLineArg(process.argv, '--peruser', true);
|
||||||
let customDataArg = getCmdLineArg(process.argv, '--userDataPath=', false);
|
let customDataArg = getCmdLineArg(process.argv, '--userDataPath=', false);
|
||||||
|
|
||||||
if (customDataArg && customDataArg.split('=').length > 1) {
|
if (customDataArg && customDataArg.split('=').length > 1) {
|
||||||
let customDataFolder = customDataArg.split('=')[1];
|
let customDataFolder = customDataArg.split('=')[1];
|
||||||
app.setPath('userData', customDataFolder);
|
app.setPath('userData', customDataFolder);
|
||||||
@ -343,4 +355,4 @@ function handleProtocolAction(uri) {
|
|||||||
// app is already open, so, just trigger the protocol action method
|
// app is already open, so, just trigger the protocol action method
|
||||||
protocolHandler.processProtocolAction(uri);
|
protocolHandler.processProtocolAction(uri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user