2 Star 0 Fork 0

CoderMeow/minecraft-launcher

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.js 638 Bytes
一键复制 编辑 原始数据 按行查看 历史
Toby_lai 提交于 2024-02-03 19:54 +08:00 . initial commit
const { app, BrowserWindow } = require('electron/main')
const path = require('node:path')
const SOURCE_DIR = path.join(__dirname, 'sources')
function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
// preload: path.join(__dirname, 'preload.js')
}
})
win.loadFile(path.join(SOURCE_DIR,'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()
}
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
NodeJS
1
https://gitee.com/codemiao08/minecraft-launcher.git
git@gitee.com:codemiao08/minecraft-launcher.git
codemiao08
minecraft-launcher
minecraft-launcher
master

搜索帮助