Fix JVM extractor: asarUnpack for class/jar files, add unpacked path candidate, default to jvm mode
Some checks are pending
Build and Release / build (push) Waiting to run
Some checks are pending
Build and Release / build (push) Waiting to run
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:
parent
b712282f62
commit
02b136dac7
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "real-debrid-downloader",
|
"name": "real-debrid-downloader",
|
||||||
"version": "1.5.44",
|
"version": "1.5.45",
|
||||||
"description": "Real-Debrid Downloader Desktop (Electron + React + TypeScript)",
|
"description": "Real-Debrid Downloader Desktop (Electron + React + TypeScript)",
|
||||||
"main": "build/main/main/main.js",
|
"main": "build/main/main/main.js",
|
||||||
"author": "Sucukdeluxe",
|
"author": "Sucukdeluxe",
|
||||||
@ -56,6 +56,9 @@
|
|||||||
"resources/extractor-jvm/**/*",
|
"resources/extractor-jvm/**/*",
|
||||||
"package.json"
|
"package.json"
|
||||||
],
|
],
|
||||||
|
"asarUnpack": [
|
||||||
|
"resources/extractor-jvm/**/*"
|
||||||
|
],
|
||||||
"win": {
|
"win": {
|
||||||
"target": [
|
"target": [
|
||||||
"nsis",
|
"nsis",
|
||||||
|
|||||||
@ -712,7 +712,7 @@ type JvmExtractResult = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function extractorBackendMode(): ExtractBackendMode {
|
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();
|
const raw = String(process.env.RD_EXTRACT_BACKEND || defaultMode).trim().toLowerCase();
|
||||||
if (raw === "legacy") {
|
if (raw === "legacy") {
|
||||||
return "legacy";
|
return "legacy";
|
||||||
@ -753,6 +753,7 @@ function resolveJvmExtractorRootCandidates(): string[] {
|
|||||||
const electronResourcesPath = (process as NodeJS.Process & { resourcesPath?: string }).resourcesPath || "";
|
const electronResourcesPath = (process as NodeJS.Process & { resourcesPath?: string }).resourcesPath || "";
|
||||||
const candidates = [
|
const candidates = [
|
||||||
fromEnv,
|
fromEnv,
|
||||||
|
electronResourcesPath ? path.join(electronResourcesPath, "app.asar.unpacked", "resources", "extractor-jvm") : "",
|
||||||
path.join(process.cwd(), "resources", "extractor-jvm"),
|
path.join(process.cwd(), "resources", "extractor-jvm"),
|
||||||
path.join(process.cwd(), "build", "resources", "extractor-jvm"),
|
path.join(process.cwd(), "build", "resources", "extractor-jvm"),
|
||||||
path.join(__dirname, "..", "..", "..", "resources", "extractor-jvm"),
|
path.join(__dirname, "..", "..", "..", "resources", "extractor-jvm"),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user