Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

Commit bb4225d

Browse files
committed
downloading java
1 parent 13773c7 commit bb4225d

4 files changed

Lines changed: 2 additions & 7 deletions

File tree

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"dependencies": {
2222
"child_process": "^1.0.2",
2323
"electron-is-dev": "^2.0.0",
24-
"electron-updater": "^5.3.0",
2524
"os": "^0.1.2",
2625
"path": "^0.12.7"
2726
},

src/java.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const { platform } = require("os")
22
const { runSync, getDirectory } = require("./util")
33
const { join } = require("path")
4-
const { mkdirSync, existsSync, rmSync, writeFile, writeFileSync } = require("fs")
4+
const { mkdirSync, existsSync, rmSync, writeFileSync } = require("fs")
55

66
const log = (...data) => console.log('[Java Download] ' + data)
77

src/main.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@ const { platform } = require('os')
22
const { app, ipcMain } = require('electron')
33
const { openWindow } = require('./gui/gui');
44
const { exit } = require('process');
5-
const { autoUpdater } = require('electron-updater');
65
const electronIsDev = require('electron-is-dev');
76
const { getSimpleClientVersions, launch } = require('./minecraft');
87
const { openAuthWindow, getAccounts } = require('./auth');
98

109
if (!electronIsDev) {
11-
autoUpdater.allowPrerelease = true;
12-
autoUpdater.autoDownload = true;
13-
autoUpdater.autoInstallOnAppQuit = true;
1410
}
1511

1612
if (platform() == 'win32' || platform() == 'linux') {

src/minecraft.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ async function downloadVersion(version, dir, statusCallback) {
121121
log(`Successfully downloaded ${version.minecraft_version}/${version.minecraft_version}.json`)
122122
}
123123
const minecraftVersionMeta = JSON.parse(readFileSync(join(minecraftVersionDir, `${version.minecraft_version}.json`)))
124-
if (!getJavaVersion()) {
124+
if (!getJavaVersion() || parseInt(getJavaVersion().split('.')) < 17) {
125125
statusCallback('downloading_java_starting')
126126
if (downloadJava(minecraftVersionMeta.javaVersion.component)) {
127127
statusCallback('downloading_java_done')

0 commit comments

Comments
 (0)