mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
set custom userData path for dev
This commit is contained in:
+8
-1
@@ -100,6 +100,13 @@ const installExtensions = async () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const userDataPath = app.getPath('userData');
|
||||||
|
|
||||||
|
if (isDevelopment) {
|
||||||
|
const devUserDataPath = `${userDataPath}-dev`;
|
||||||
|
app.setPath('userData', devUserDataPath);
|
||||||
|
}
|
||||||
|
|
||||||
const RESOURCES_PATH = app.isPackaged
|
const RESOURCES_PATH = app.isPackaged
|
||||||
? path.join(process.resourcesPath, 'assets')
|
? path.join(process.resourcesPath, 'assets')
|
||||||
: path.join(__dirname, '../../assets');
|
: path.join(__dirname, '../../assets');
|
||||||
@@ -624,7 +631,7 @@ const FONT_HEADERS = [
|
|||||||
'font/woff2',
|
'font/woff2',
|
||||||
];
|
];
|
||||||
|
|
||||||
const singleInstance = app.requestSingleInstanceLock();
|
const singleInstance = isDevelopment ? true : app.requestSingleInstanceLock();
|
||||||
|
|
||||||
if (!singleInstance) {
|
if (!singleInstance) {
|
||||||
app.quit();
|
app.quit();
|
||||||
|
|||||||
Reference in New Issue
Block a user