mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 10:03:33 +00:00
set custom userData path for dev
This commit is contained in:
parent
6463ea937b
commit
90afa11f20
1 changed files with 8 additions and 1 deletions
|
|
@ -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();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue