production-taskbar-client / src / main / ipc / infoChannel.js
infoChannel.js
Raw
import { app, ipcMain } from "electron";

export default function initInfoChannel() {
  ipcMain.handle("info", async (_event, { event, data }) => {
    if (event === "getAppVersion") return app.getVersion();
    if (event === "getAppPath") return app.getAppPath();
    if (event === "getPath") return app.getPath(data);
    return null;
  });
}