支持插件开发者模式

This commit is contained in:
muwoo
2021-12-09 11:46:06 +08:00
parent fc7e3e91bd
commit b3a00c88ad
19 changed files with 264 additions and 88 deletions

View File

@@ -1,5 +0,0 @@
const APP_FINDER_PATH = process.platform === 'darwin' ? ['/System/Applications', '/Applications', '/System/Library/PreferencePanes'] : []
export {
APP_FINDER_PATH
}

View File

@@ -0,0 +1,8 @@
import { app } from "electron";
import path from "path";
const appPath = app.getPath("cache");
const PLUGIN_INSTALL_DIR = path.join(appPath, "./rubick-plugins");
export { PLUGIN_INSTALL_DIR };

View File

@@ -0,0 +1,8 @@
import { remote } from "electron";
import path from "path";
const appPath = remote.app.getPath("cache");
const PLUGIN_INSTALL_DIR = path.join(appPath, "./rubick-plugins");
export { PLUGIN_INSTALL_DIR };