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");
});