mirror of
https://github.com/finos/SymphonyElectron.git
synced 2026-07-29 15:55:55 -05:00
Merge pull request #224 from danielgronberg/danielgronbergmaster
RTC-2648: Added arguments for allowing multi instance and custom data dir
This commit is contained in:
@@ -64,4 +64,6 @@ In order to achieve those goals Symphony is participating and working in close c
|
||||
- Remote logging is enabled for local and production cases and are sent to the backend server via the remote objects
|
||||
|
||||
## Misc notes
|
||||
If desiring to run against server without proper cert use cmd line option: --ignore-certificate-errors
|
||||
- If desiring to run against server without proper cert use cmd line option: --ignore-certificate-errors
|
||||
- To start additional instance with custom data directory (if you want seperate user) use cmd line options: --multiInstance --userDataPath=<path to data dir>
|
||||
- if directory doesn't exist, it will be created
|
||||
|
||||
+10
-2
@@ -66,8 +66,10 @@ const shouldQuit = app.makeSingleInstance((argv) => {
|
||||
processProtocolAction(argv);
|
||||
});
|
||||
|
||||
// quit if another instance is already running, ignore for dev env
|
||||
if (!isDevEnv && shouldQuit) {
|
||||
let allowMultiInstance = getCmdLineArg(process.argv, '--multiInstance', true) || isDevEnv;
|
||||
|
||||
// quit if another instance is already running, ignore for dev env or if app was started with multiInstance flag
|
||||
if (!allowMultiInstance && shouldQuit) {
|
||||
app.quit();
|
||||
}
|
||||
|
||||
@@ -155,6 +157,12 @@ function setupThenOpenMainWindow() {
|
||||
// allows installer to launch app and set appropriate global / user config params.
|
||||
let hasInstallFlag = getCmdLineArg(process.argv, '--install', true);
|
||||
let perUserInstall = getCmdLineArg(process.argv, '--peruser', true);
|
||||
let customDataArg = getCmdLineArg(process.argv, '--userDataPath=', false);
|
||||
|
||||
if (customDataArg && customDataArg.split('=').length > 1) {
|
||||
let customDataFolder = customDataArg.split('=')[1];
|
||||
app.setPath('userData', customDataFolder);
|
||||
}
|
||||
if (!isMac && hasInstallFlag) {
|
||||
getConfigField('launchOnStartup')
|
||||
.then(setStartup)
|
||||
|
||||
Reference in New Issue
Block a user