From 02b136dac7dcde5f0338d96be70304b18b455d05 Mon Sep 17 00:00:00 2001 From: Sucukdeluxe Date: Tue, 3 Mar 2026 02:19:26 +0100 Subject: [PATCH] Fix JVM extractor: asarUnpack for class/jar files, add unpacked path candidate, default to jvm mode The JVM sidecar class files were packed inside app.asar where Java cannot access them. asarUnpack extracts them to app.asar.unpacked/. Default backend changed from auto to jvm (no legacy fallback). Co-Authored-By: Claude Opus 4.6 --- package.json | 5 ++++- src/main/extractor.ts | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ab52979..2b1ec6f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "real-debrid-downloader", - "version": "1.5.44", + "version": "1.5.45", "description": "Real-Debrid Downloader Desktop (Electron + React + TypeScript)", "main": "build/main/main/main.js", "author": "Sucukdeluxe", @@ -56,6 +56,9 @@ "resources/extractor-jvm/**/*", "package.json" ], + "asarUnpack": [ + "resources/extractor-jvm/**/*" + ], "win": { "target": [ "nsis", diff --git a/src/main/extractor.ts b/src/main/extractor.ts index bf79c42..50b1d1e 100644 --- a/src/main/extractor.ts +++ b/src/main/extractor.ts @@ -712,7 +712,7 @@ type JvmExtractResult = { }; function extractorBackendMode(): ExtractBackendMode { - const defaultMode = process.env.VITEST ? "legacy" : "auto"; + const defaultMode = process.env.VITEST ? "legacy" : "jvm"; const raw = String(process.env.RD_EXTRACT_BACKEND || defaultMode).trim().toLowerCase(); if (raw === "legacy") { return "legacy"; @@ -753,6 +753,7 @@ function resolveJvmExtractorRootCandidates(): string[] { const electronResourcesPath = (process as NodeJS.Process & { resourcesPath?: string }).resourcesPath || ""; const candidates = [ fromEnv, + electronResourcesPath ? path.join(electronResourcesPath, "app.asar.unpacked", "resources", "extractor-jvm") : "", path.join(process.cwd(), "resources", "extractor-jvm"), path.join(process.cwd(), "build", "resources", "extractor-jvm"), path.join(__dirname, "..", "..", "..", "resources", "extractor-jvm"),