Fix JVM extractor: asarUnpack for class/jar files, add unpacked path candidate, default to jvm mode
Build and Release / build (push) Has been cancelled

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 <noreply@anthropic.com>
This commit is contained in:
Sucukdeluxe
2026-03-03 02:19:26 +01:00
co-authored by Claude Opus 4.6
parent b712282f62
commit 02b136dac7
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -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"),