Skip to content

Commit 0365605

Browse files
author
Heejin
committed
Updated plugin directories again, because squirrel installer removes all plugins if user update app
1 parent 54acac8 commit 0365605

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

app/main-es6/worker/conf.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
const path = require('path');
44

5-
const HAIN_APPDATA = `${process.env.LOCALAPPDATA}/hain`;
6-
const LOCAL_STORAGE_DIR = `${HAIN_APPDATA}/localStorages`;
5+
const HAIN_USER_PATH = `${process.env.LOCALAPPDATA}/hain-user`;
6+
const LOCAL_STORAGE_DIR = `${HAIN_USER_PATH}/localStorages`;
77

88
const INTERNAL_PLUGIN_REPO = path.join(__dirname, '../plugins');
9-
const MAIN_PLUGIN_REPO = path.resolve(`${HAIN_APPDATA}/plugins`);
10-
const DEV_PLUGIN_REPO = path.resolve(`${HAIN_APPDATA}/devplugins`);
9+
const MAIN_PLUGIN_REPO = path.resolve(`${HAIN_USER_PATH}/plugins`);
10+
const DEV_PLUGIN_REPO = path.resolve(`${HAIN_USER_PATH}/devplugins`);
1111

1212
const PLUGIN_REPOS = [
1313
INTERNAL_PLUGIN_REPO,

docs/plugin-directories.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
There are two plugin directories for Hain:
44

5-
`MAIN_PLUGIN_REPO`: "`${process.env.LOCALAPPDATA}/hain/plugins`"
6-
`DEV_PLUGIN_REPO`: "`${process.env.LOCALAPPDATA}/hain/devplugins`"
5+
`MAIN_PLUGIN_REPO`: "`${process.env.LOCALAPPDATA}/hain-user/plugins`"
6+
`DEV_PLUGIN_REPO`: "`${process.env.LOCALAPPDATA}/hain-user/devplugins`"
77

8-
(e.g. C:\\Users\\John\\AppData\\Local\\hain\\...)
8+
(e.g. C:\\Users\\John\\AppData\\Local\\hain-user\\...)
99

1010
`MAIN_PLUGIN_REPO` is managed by hpm(hain-package-manager). so it's not safe to develop plugins.
1111
so, you should place your plugins to `DEV_PLUGIN_REPO` for the development.

0 commit comments

Comments
 (0)