You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Java provisioning (slice 2): install a Temurin JRE when none fits (#39)
* Java provisioning (slice 2): install a Temurin JRE when none fits
When no compatible Java is installed, the args editor's warning now carries an
"Install Java N" button that downloads a Temurin (Adoptium) JRE into the app's
own dir and pins it as the server's Java -- so a server can run on a machine
that has the wrong Java, or none.
- shared/javaProvision.ts: pure Adoptium shaping -- adoptiumTarget() maps
platform/arch (win32->windows, x64->x64, arm64->aarch64, else decline),
adoptiumAssetsUrl() builds the v3 assets endpoint (link + published SHA256 in
one response), pickAdoptiumPackage() throws rather than proceed on a
half-answer, isZipPackage() gates extraction. Plus the JavaInstallProgress type.
- core/archive.ts: extractZipSafe() -- adm-zip behind the same zip-slip guard
worlds.ts uses, kept standalone so this can be reverted without touching worlds.
- core/javaProvision.ts: installJava() -- fetch assets, verify SHA256 as it
streams (net.downloadFile), extract, probe, then move into place with an
atomic rename staged on the destination filesystem so an interrupted install
never leaves a half-tree for the scanner. _resetJavaCache() after.
- IPC java:install + evt:java-install-progress; register handler audits the
install (source panel, action java.install) like server.create.
- ArgsEditor: the needs-install warning becomes an Install button with live
phase/percent; on success it pins javaPath + rescans. EN/TR in lockstep.
- MSMS_SMOKE_JAVA section 7 pins the os/arch mapping, URL segments, and that an
empty or checksum-less assets response throws instead of downloading blind.
Verified against the live Adoptium v3 assets response shape. The end-to-end
download/extract is not exercised in this env (network + a large binary) -- the
pure shaping and guards are; disclosed in the PR.
Closes#36, closes#37
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Review fix: clearer message when a platform can't auto-install
Self-review of slice 2: installJava throws unsupported-platform /
unsupported-package on mac/linux (tar.gz) or an odd arch, but the renderer
showed one generic "check your connection and try again" toast -- misleading,
since retrying never helps. Distinguish it: on an /unsupported/ error, tell the
user auto-install isn't available for their OS and to set a path by hand
(args.javaInstallUnsupported, EN+TR). Also renamed the local handler off the
window.msms.installJava name it shadowed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Fix: persist javaPath on install, not just in form state
Advisor review caught the important one: runInstall ended with
set('javaPath', ...) which only updates local form state, so the JRE it just
downloaded was NOT saved unless the user then clicked Save -- while the toast
said "now selected for this server". That silently reintroduces the exact
failure this feature exists to fix (the next launch picks the wrong Java again).
Persist it immediately with updateServer(id, { java: { ...server.java, javaPath }})
-- spreading the *saved* server.java so an unrelated unsaved form edit isn't
committed alongside it.
Hardening: stage the download under a fixed name (jre.zip) instead of the
API-supplied package name, so an external string is never a path component.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: src/renderer/src/locales/tr.ts
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -278,7 +278,15 @@ const tr: typeof en = {
278
278
javaRisky: 'Minecraft {{mc}}, Java {{min}} için yapıldı. Java {{java}} o dönemin sunucu yazılımlarını sık sık bozar; Java {{max}} ve altı daha güvenli.',
279
279
javaUse: 'Java {{major}} kullan',
280
280
javaSwitchHint: 'Uyumlu bir Java {{major}} zaten kurulu — tek tıkla kullan.',
281
-
javaNeedInstall: 'Minecraft {{mc}} için uyumlu Java {{major}} kurulu değil.'
281
+
javaNeedInstall: 'Minecraft {{mc}} için uyumlu Java {{major}} kurulu değil.',
282
+
javaInstall: 'Java {{major}} kur',
283
+
javaInstalled: 'Java {{major}} kuruldu — bu sunucu için seçildi.',
284
+
javaInstallFailed: 'Java kurulamadı. Bağlantını kontrol edip tekrar dene.',
285
+
javaInstallUnsupported: 'Otomatik kurulum işletim sistemin için henüz yok — Java yolunu elle ayarla.',
0 commit comments