2023-07-28 02:32:18 +02:00
|
|
|
import { app, BrowserWindow } from "electron";
|
2023-07-29 14:29:14 +02:00
|
|
|
import path = require("path");
|
|
|
|
/* import ffmpegPath = require("ffmpeg-static"); */
|
2023-07-28 02:46:49 +02:00
|
|
|
|
2023-07-28 02:32:18 +02:00
|
|
|
const createWindow = () => {
|
|
|
|
const win = new BrowserWindow({
|
|
|
|
width: 800,
|
|
|
|
height: 600,
|
2023-07-29 14:29:14 +02:00
|
|
|
webPreferences: {
|
|
|
|
preload: path.join(__dirname, "preload.js"),
|
|
|
|
},
|
2023-07-28 02:32:18 +02:00
|
|
|
});
|
|
|
|
|
2023-07-29 15:30:41 +02:00
|
|
|
win.loadFile(path.join(path.resolve(__dirname, ".."), "pages", "index.html"));
|
2023-07-28 02:32:18 +02:00
|
|
|
};
|
2023-07-29 15:30:41 +02:00
|
|
|
|
2023-07-28 02:32:18 +02:00
|
|
|
app.whenReady().then(() => {
|
|
|
|
createWindow();
|
2023-07-29 14:29:14 +02:00
|
|
|
|
|
|
|
app.on("activate", () => {
|
|
|
|
if (BrowserWindow.getAllWindows().length === 0) createWindow();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
app.on("window-all-closed", () => {
|
|
|
|
if (process.platform !== "darwin") app.quit();
|
2023-07-28 02:32:18 +02:00
|
|
|
});
|