dsr/src/main.ts

27 lines
595 B
TypeScript
Raw Normal View History

2023-07-28 02:32:18 +02:00
import { app, BrowserWindow } from "electron";
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,
webPreferences: {
preload: path.join(__dirname, "preload.js"),
},
2023-07-28 02:32:18 +02:00
});
win.loadFile("../index.html");
};
app.whenReady().then(() => {
createWindow();
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
});