From cdef63afa20f79f04041572750516aaa3c7696ea Mon Sep 17 00:00:00 2001 From: stoppedwumm Date: Mon, 7 Oct 2024 11:43:41 +0200 Subject: [PATCH] Add an index build --- binaries/dev.html | 4994 +++++++++++++++++++++++++++++++++++++++++++++ index.html | 5 +- index.js | 19 + preload.js | 1 + 4 files changed, 5017 insertions(+), 2 deletions(-) create mode 100644 binaries/dev.html diff --git a/binaries/dev.html b/binaries/dev.html new file mode 100644 index 0000000..1832255 --- /dev/null +++ b/binaries/dev.html @@ -0,0 +1,4994 @@ + + +Minecraft Indev + + + + + + + + + + \ No newline at end of file diff --git a/index.html b/index.html index 3b554aa..bbb70e4 100644 --- a/index.html +++ b/index.html @@ -24,7 +24,7 @@ display: flex; position: fixed; background-color: black; - width: 98%; + width: 100%; padding-top: 0%; } @@ -67,7 +67,8 @@

The only eaglercraft launcher existing

Start latest Version

This version runs an cached version of the game

Update your launcher regulary to get the latest version

- +
+

About Eaglercraft

Developed by a high school student because original Minecraft isn't free

All Java was translated to JavaScript and HTML

diff --git a/index.js b/index.js index 66a8a99..06efe6c 100644 --- a/index.js +++ b/index.js @@ -48,6 +48,7 @@ app.on('ready', () => { createFolder(path.join(homeDirectory, './eaglergrab')) createFolder(path.join(homeDirectory, './eaglergrab', 'versions')) copyFile(path.join(__dirname, 'binaries', "latest.html"), path.join(homeDirectory, './eaglergrab', 'versions', 'latest.html')) + copyFile(path.join(__dirname, 'binaries', "dev.html"), path.join(homeDirectory, './eaglergrab', 'versions', 'dev.html')) ipcMain.handle("start", () => { win.loadFile(path.join(homeDirectory, "./eaglergrab", "versions", "latest.html")) @@ -68,6 +69,24 @@ app.on('ready', () => { }) }) + ipcMain.handle("devbuild", () => { + win.loadFile(path.join(homeDirectory, "./eaglergrab", "versions", "dev.html")) + erun = true + win.on("close", (e) => { + e.preventDefault() + let copy = win + win = new BrowserWindow({ width: 800, height: 600, webPreferences: { preload: path.join(__dirname, 'preload.js') } }) + copy.destroy() + win.loadFile("index.html") + /* + if (erun) { + win = new BrowserWindow({ width: 800, height: 600, webPreferences: { preload: path.join(__dirname, 'preload.js') } }) + win.loadFile("index.html") + erun = false + } + */ + }) + }) win.loadFile('index.html') diff --git a/preload.js b/preload.js index 161074b..568ac77 100644 --- a/preload.js +++ b/preload.js @@ -2,4 +2,5 @@ const { contextBridge, ipcRenderer } = require('electron') contextBridge.exposeInMainWorld('electronAPI', { start: () => ipcRenderer.invoke('start'), + devbuild: () => ipcRenderer.invoke('devbuild'), }) \ No newline at end of file