From dd682f32e0b70d963eb1940350c14913cfc692e0 Mon Sep 17 00:00:00 2001 From: Kyoung5seo Date: Thu, 2 Apr 2026 22:14:21 +0900 Subject: [PATCH] =?UTF-8?q?Electron=20=EB=8D=B0=EC=8A=A4=ED=81=AC=ED=83=91?= =?UTF-8?q?=20=EC=95=B1=20=ED=99=98=EA=B2=BD=EC=9D=84=20=EA=B5=AC=EC=B6=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 34 ++++++++++++++++++++++++++++++++++ package.json | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 main.js create mode 100644 package.json 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" +}