feat: window.app add app path

This commit is contained in:
kangfenmao 2024-08-16 22:44:00 +08:00
parent 47a83fa67f
commit e43f7f87ab
2 changed files with 3 additions and 1 deletions

View File

@ -107,7 +107,8 @@ app.whenReady().then(() => {
// IPC // IPC
ipcMain.handle('get-app-info', () => ({ ipcMain.handle('get-app-info', () => ({
version: app.getVersion(), version: app.getVersion(),
isPackaged: app.isPackaged isPackaged: app.isPackaged,
appPath: app.getAppPath()
})) }))
ipcMain.handle('open-website', (_, url: string) => { ipcMain.handle('open-website', (_, url: string) => {

View File

@ -7,6 +7,7 @@ declare global {
getAppInfo: () => Promise<{ getAppInfo: () => Promise<{
version: string version: string
isPackaged: boolean isPackaged: boolean
appPath: string
}> }>
checkForUpdate: () => void checkForUpdate: () => void
openWebsite: (url: string) => void openWebsite: (url: string) => void