diff --git a/main.js b/main.js new file mode 100644 index 0000000..02b5c25 --- /dev/null +++ b/main.js @@ -0,0 +1,34 @@ +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(); + } +}); diff --git a/package.json b/package.json new file mode 100644 index 0000000..c44522b --- /dev/null +++ b/package.json @@ -0,0 +1,33 @@ +{ + "name": "project-ss", + "version": "1.0.0", + "description": "Project SS - Steam App", + "main": "main.js", + "scripts": { + "start": "electron .", + "build:win": "electron-builder --win --x64" + }, + "build": { + "appId": "com.example.projectss", + "productName": "Project SS", + "directories": { + "output": "dist" + }, + "files": [ + "main.js", + "src/**/*", + "assets/**/*", + "package.json" + ], + "nsis": { + "oneClick": false, + "allowToChangeInstallationDirectory": true + }, + "win": { + "target": "nsis" + } + }, + "keywords": [], + "author": "", + "license": "ISC" +}