feat: window.app add app path
This commit is contained in:
parent
47a83fa67f
commit
e43f7f87ab
@ -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) => {
|
||||||
|
|||||||
1
src/preload/index.d.ts
vendored
1
src/preload/index.d.ts
vendored
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user