diff options
author | 2019-10-20 17:50:08 +0700 | |
---|---|---|
committer | 2019-10-20 17:50:08 +0700 | |
commit | a2d7d1e368a822422a1c88b0d8a514a1cf0dab41 (patch) | |
tree | cc289228f45941bc91c120b369baef98d364a0d3 | |
parent | #105 FiLimit AppVor artifacts collection to tags/master (diff) | |
download | ferdium-app-a2d7d1e368a822422a1c88b0d8a514a1cf0dab41.tar.gz ferdium-app-a2d7d1e368a822422a1c88b0d8a514a1cf0dab41.tar.zst ferdium-app-a2d7d1e368a822422a1c88b0d8a514a1cf0dab41.zip |
#87 Try using LOCALAPPDATA for win32 portable version
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | src/index.js | 9 |
2 files changed, 7 insertions, 8 deletions
@@ -38,7 +38,7 @@ You can find the installers in the [latest release](https://github.com/getferdi/ | |||
38 | - [x] Add CTRL+← and CTRL+→ shortcuts and menu options to go back and forward in the service browsing history([#39](https://github.com/getferdi/ferdi/issues/39)) | 38 | - [x] Add CTRL+← and CTRL+→ shortcuts and menu options to go back and forward in the service browsing history([#39](https://github.com/getferdi/ferdi/issues/39)) |
39 | - [x] Add option to show a browser-like navigation bar on all services | 39 | - [x] Add option to show a browser-like navigation bar on all services |
40 | - [x] Add option to change accent color | 40 | - [x] Add option to change accent color |
41 | - [x] Add "`FERDI_APPDATA_DIR`" env variable to set a custom path for storing all data | 41 | - [x] Add "`LOCALAPPDATA`" env variable to set a custom path for storing all data |
42 | - [x] Add Process Manager to find services using a lot of resources | 42 | - [x] Add Process Manager to find services using a lot of resources |
43 | - [x] Add "npm run prepare-code" command for development to lint and beautify code | 43 | - [x] Add "npm run prepare-code" command for development to lint and beautify code |
44 | - [x] Add button to open darkmode.css for a service | 44 | - [x] Add button to open darkmode.css for a service |
@@ -54,7 +54,6 @@ You can find the installers in the [latest release](https://github.com/getferdi/ | |||
54 | 54 | ||
55 | ### Preparations | 55 | ### Preparations |
56 | 56 | ||
57 | |||
58 | #### Clone repository with submodule | 57 | #### Clone repository with submodule |
59 | 58 | ||
60 | ```bash | 59 | ```bash |
@@ -147,6 +146,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d | |||
147 | 146 | ||
148 | <!-- markdownlint-enable --> | 147 | <!-- markdownlint-enable --> |
149 | <!-- prettier-ignore-end --> | 148 | <!-- prettier-ignore-end --> |
149 | |||
150 | <!-- ALL-CONTRIBUTORS-LIST:END --> | 150 | <!-- ALL-CONTRIBUTORS-LIST:END --> |
151 | 151 | ||
152 | <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> | 152 | <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> |
@@ -159,6 +159,6 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d | |||
159 | 159 | ||
160 | This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! | 160 | This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! |
161 | 161 | ||
162 | |||
163 | ## Backers via OpenCollective | 162 | ## Backers via OpenCollective |
163 | |||
164 | <a href="https://opencollective.com/getferdi#backers" target="_blank"><img src="https://opencollective.com/getferdi/backers.svg?width=890"></a> | 164 | <a href="https://opencollective.com/getferdi#backers" target="_blank"><img src="https://opencollective.com/getferdi/backers.svg?width=890"></a> |
diff --git a/src/index.js b/src/index.js index 4d7215d5e..d13ab35a0 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -9,12 +9,11 @@ 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 | // Set app directory before loading user modules | 12 | if (process.platform == "win32") { |
13 | if (process.env.FERDI_APPDATA_DIR || process.env.PORTABLE_EXECUTABLE_DIR) { | 13 | app.setPath("appData", process.env.LOCALAPPDATA); |
14 | const appDataPath = process.env.FERDI_APPDATA_DIR || process.env.PORTABLE_EXECUTABLE_DIR; | 14 | app.setPath("userData", path.join(process.env.LOCALAPPDATA, app.getName())); |
15 | app.setPath('appData', appDataPath); | ||
16 | app.setPath('userData', path.join(app.getPath('appData'), app.getName())); | ||
17 | } | 15 | } |
16 | |||
18 | if (isDevMode) { | 17 | if (isDevMode) { |
19 | app.setPath('userData', path.join(app.getPath('appData'), `${app.getName()}Dev`)); | 18 | app.setPath('userData', path.join(app.getPath('appData'), `${app.getName()}Dev`)); |
20 | } | 19 | } |