feat: 1.1.1.2 hybrid Go installer (online 5.8M/offline 98M, выбор C:\ZernMC + ярлык ZernMC Launcher.lnk, uninstall.exe, DataDir ~/.zernmc) — hollow-ромбы, custom-сборки, моды с правами, ПКМ без Reload, sticky Играть, онбординг Config persist + /launcher/download/jre
This commit is contained in:
@@ -1798,6 +1798,21 @@ async def download_launcher_exe(request: Request = None):
|
||||
)
|
||||
|
||||
|
||||
@app.get("/launcher/download/jre")
|
||||
async def download_jre(request: Request):
|
||||
"""Download JRE zip for online installer (47M, Range supported)"""
|
||||
candidates = [
|
||||
BUILDS_DIR / ".." / "OpenJDK21U-jre_x64_windows_hotspot_21.0.6_7.zip", # /root/launcher/OpenJDK...
|
||||
Path(__file__).parent.parent / "OpenJDK21U-jre_x64_windows_hotspot_21.0.6_7.zip",
|
||||
Path("/root/launcher/OpenJDK21U-jre_x64_windows_hotspot_21.0.6_7.zip"),
|
||||
BUILDS_DIR / "jre.zip",
|
||||
]
|
||||
for p in candidates:
|
||||
pp = p.resolve()
|
||||
if pp.exists() and pp.is_file():
|
||||
return await send_file_async(pp, request, content_type="application/zip", cache=True)
|
||||
raise HTTPException(404, "JRE zip not found on server")
|
||||
|
||||
@app.get("/launcher/download/zip/{filename}")
|
||||
async def download_launcher_zip(filename: str, request: Request = None):
|
||||
"""Download specific launcher ZIP archive"""
|
||||
|
||||
Reference in New Issue
Block a user