diff options
author | vantezzen <hello@vantezzen.io> | 2019-11-25 10:49:34 +0100 |
---|---|---|
committer | vantezzen <hello@vantezzen.io> | 2019-11-25 10:49:34 +0100 |
commit | c3a8d26cf4d7ffe3642cdc962e51e367885a9c12 (patch) | |
tree | 34d8cf9c8311165a81542d035079a91aa09ff3a6 /src/index.js | |
parent | Bump version number (diff) | |
parent | Bump version number (diff) | |
download | ferdium-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.js | 15 |
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'; | |||
9 | import path from 'path'; | 9 | import path from 'path'; |
10 | import windowStateKeeper from 'electron-window-state'; | 10 | import windowStateKeeper from 'electron-window-state'; |
11 | 11 | ||
12 | if (process.platform === 'win32') { | 12 | // Set app directory before loading user modules |
13 | app.setPath('appData', process.env.LOCALAPPDATA); | 13 | if (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 | ||
17 | if (isDevMode) { | 24 | if (isDevMode) { |
@@ -32,6 +39,7 @@ import handleDeepLink from './electron/deepLinking'; | |||
32 | import { isPositionValid } from './electron/windowUtils'; | 39 | import { isPositionValid } from './electron/windowUtils'; |
33 | import { appId } from './package.json'; // eslint-disable-line import/no-unresolved | 40 | import { appId } from './package.json'; // eslint-disable-line import/no-unresolved |
34 | import './electron/exception'; | 41 | import './electron/exception'; |
42 | import './sentry'; | ||
35 | 43 | ||
36 | import { | 44 | import { |
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 | ||