Files
ProjectSS/main.js
2026-04-02 22:14:21 +09:00

35 lines
764 B
JavaScript

const { app, BrowserWindow } = require('electron');
const path = require('path');
function createWindow() {
const mainWindow = new BrowserWindow({
width: 1280,
height: 720,
// 스팀 게임처럼 보이도록 기본 메뉴바 숨김
autoHideMenuBar: true,
webPreferences: {
nodeIntegration: true,
contextIsolation: false
}
});
// src/index.html 경로를 메인 화면으로 설정
mainWindow.loadFile(path.join(__dirname, 'src', '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();
}
});