mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 13:48:02 +00:00
feat: updates
This commit is contained in:
parent
08abf8229f
commit
fb21405bf9
33 changed files with 699 additions and 361 deletions
17
packages/main/preload.ts
Normal file
17
packages/main/preload.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import logger from './logger'
|
||||
import path from 'path'
|
||||
import { app } from 'electron'
|
||||
import fs from 'fs'
|
||||
|
||||
const isDev = !app.isPackaged
|
||||
|
||||
if (isDev) {
|
||||
const devUserDataPath = path.resolve(process.cwd(), './tmp/userData')
|
||||
try {
|
||||
fs.statSync(devUserDataPath)
|
||||
} catch (e) {
|
||||
fs.mkdirSync(devUserDataPath)
|
||||
}
|
||||
app.setPath('appData', devUserDataPath)
|
||||
}
|
||||
logger.info(`[index] userData path: ${app.getPath('userData')}`)
|
||||
Loading…
Add table
Add a link
Reference in a new issue