aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.js
diff options
context:
space:
mode:
authorLibravatar vantezzen <hello@vantezzen.io>2019-11-25 10:49:34 +0100
committerLibravatar vantezzen <hello@vantezzen.io>2019-11-25 10:49:34 +0100
commitc3a8d26cf4d7ffe3642cdc962e51e367885a9c12 (patch)
tree34d8cf9c8311165a81542d035079a91aa09ff3a6 /src/index.js
parentBump version number (diff)
parentBump version number (diff)
downloadferdium-app-c3a8d26cf4d7ffe3642cdc962e51e367885a9c12.tar.gz
ferdium-app-c3a8d26cf4d7ffe3642cdc962e51e367885a9c12.tar.zst
ferdium-app-c3a8d26cf4d7ffe3642cdc962e51e367885a9c12.zip
Merge branch 'develop'v5.4.0
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/index.js b/src/index.js
index 87aa6357b..12ea7f646 100644
--- a/src/index.js
+++ b/src/index.js
@@ -9,9 +9,16 @@ import fs from 'fs-extra';
9import path from 'path'; 9import path from 'path';
10import windowStateKeeper from 'electron-window-state'; 10import windowStateKeeper from 'electron-window-state';
11 11
12if (process.platform === 'win32') { 12// Set app directory before loading user modules
13 app.setPath('appData', process.env.LOCALAPPDATA); 13if (process.env.FERDI_APPDATA_DIR != null) {
14 app.setPath('userData', path.join(process.env.LOCALAPPDATA, app.getName())); 14 app.setPath('appData', process.env.FERDI_APPDATA_DIR);
15 app.setPath('userData', path.join(app.getPath('appData')));
16} else if (process.env.PORTABLE_EXECUTABLE_DIR != null) {
17 app.setPath('appData', process.env.PORTABLE_EXECUTABLE_DIR, `${app.getName()}AppData`);
18 app.setPath('userData', path.join(app.getPath('appData'), `${app.getName()}AppData`));
19} else if (process.platform === 'win32') {
20 app.setPath('appData', process.env.APPDATA);
21 app.setPath('userData', path.join(app.getPath('appData'), app.getName()));
15} 22}
16 23
17if (isDevMode) { 24if (isDevMode) {
@@ -32,6 +39,7 @@ import handleDeepLink from './electron/deepLinking';
32import { isPositionValid } from './electron/windowUtils'; 39import { isPositionValid } from './electron/windowUtils';
33import { appId } from './package.json'; // eslint-disable-line import/no-unresolved 40import { appId } from './package.json'; // eslint-disable-line import/no-unresolved
34import './electron/exception'; 41import './electron/exception';
42import './sentry';
35 43
36import { 44import {
37 DEFAULT_APP_SETTINGS, 45 DEFAULT_APP_SETTINGS,
@@ -166,6 +174,7 @@ const createWindow = () => {
166 webPreferences: { 174 webPreferences: {
167 nodeIntegration: true, 175 nodeIntegration: true,
168 webviewTag: true, 176 webviewTag: true,
177 preload: path.join(__dirname, 'sentry.js'),
169 }, 178 },
170 }); 179 });
171 180