Files
desktop/lib/main/ipcs/ipcRuntime.ts
2026-03-20 16:46:23 +02:00

13 lines
417 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { app, ipcMain } from "electron";
import path from "path";
/**
* Получить директорию с ресурсами приложения
*/
ipcMain.handle('runtime:get-resources', () => {
const isDev = !app.isPackaged && process.env['ELECTRON_RENDERER_URL'];
if(isDev){
return path.join(process.cwd(), "resources")
}
return path.join(process.resourcesPath, "resources");
});