kms electron

This commit is contained in:
2024-01-10 16:26:45 +01:00
parent 1f1dc65a97
commit 6790fe5ef6
14 changed files with 217 additions and 108 deletions

11
main.js
View File

@@ -1,5 +1,5 @@
// Modules to control application life and create native browser window
const { app, BrowserWindow, Menu } = require("electron");
const { app, BrowserWindow, Menu, ipcMain } = require("electron");
const path = require("path");
const serve = require("electron-serve");
const loadURL = serve({ directory: "public" });
@@ -15,6 +15,13 @@ function isDev() {
return !app.isPackaged;
}
function registerIPCPipes() {
ipcMain.handle("ezpplauncher:login", (e, args) => {
console.log(args);
return "yes";
});
}
function createWindow() {
setupTitlebar();
@@ -50,6 +57,8 @@ function createWindow() {
loadURL(mainWindow);
}
registerIPCPipes();
// Uncomment the following line of code when app is ready to be packaged.
// loadURL(mainWindow);