fix: case-sensitive packs for linux platforms, remove empty bios placeholder

This commit is contained in:
Abdessamad Derraz
2026-03-27 12:58:08 +01:00
parent a117b13b49
commit 181248b6db
5 changed files with 23 additions and 26 deletions

View File

@@ -1,6 +1,6 @@
{ {
"generated_at": "2026-03-26T12:17:17Z", "generated_at": "2026-03-27T11:57:57Z",
"total_files": 6748, "total_files": 6747,
"total_size": 5505760050, "total_size": 5505760050,
"files": { "files": {
"520d3d1b5897800af47f92efd2444a26b7a7dead": { "520d3d1b5897800af47f92efd2444a26b7a7dead": {
@@ -573,16 +573,6 @@
"crc32": "665cd50f", "crc32": "665cd50f",
"adler32": "39cd4d98" "adler32": "39cd4d98"
}, },
"da39a3ee5e6b4b0d3255bfef95601890afd80709": {
"path": "bios/Apple/Apple II/disk2-13boot.rom",
"name": "disk2-13boot.rom",
"size": 0,
"sha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
"md5": "d41d8cd98f00b204e9800998ecf8427e",
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"crc32": "00000000",
"adler32": "00000001"
},
"afd060e6f35faf3bb0146fa889fc787adf56330a": { "afd060e6f35faf3bb0146fa889fc787adf56330a": {
"path": "bios/Apple/Apple II/disk2-13seq.rom", "path": "bios/Apple/Apple II/disk2-13seq.rom",
"name": "disk2-13seq.rom", "name": "disk2-13seq.rom",
@@ -67543,7 +67533,6 @@
"ba89edf2729a28a17cd9e0f7a0ac9a39": "bc32bc0e8902946663998f56aea52be597d9e361", "ba89edf2729a28a17cd9e0f7a0ac9a39": "bc32bc0e8902946663998f56aea52be597d9e361",
"8f7ee14ccca8ae3dd8c759497af3f09b": "799e2fc90d6bfd8cb74e331e04d5afd36f2f21a1", "8f7ee14ccca8ae3dd8c759497af3f09b": "799e2fc90d6bfd8cb74e331e04d5afd36f2f21a1",
"d3bef2755267a941f264fb5b288e3076": "e8c40d3a44a41a9b6b5dd3a993d7057b3bfb4086", "d3bef2755267a941f264fb5b288e3076": "e8c40d3a44a41a9b6b5dd3a993d7057b3bfb4086",
"d41d8cd98f00b204e9800998ecf8427e": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
"4f80448507cf43ab40c17ac08d89e278": "afd060e6f35faf3bb0146fa889fc787adf56330a", "4f80448507cf43ab40c17ac08d89e278": "afd060e6f35faf3bb0146fa889fc787adf56330a",
"5f1be0c1cdff26f5956eef9643911886": "bc39fbd5b9a8d2287ac5d0a42e639fc4d3c2f9d4", "5f1be0c1cdff26f5956eef9643911886": "bc39fbd5b9a8d2287ac5d0a42e639fc4d3c2f9d4",
"c835eab06842e3c1d6e2e7dc19289828": "a57f14469867ce0d0865995a645b69f41a0ea718", "c835eab06842e3c1d6e2e7dc19289828": "a57f14469867ce0d0865995a645b69f41a0ea718",
@@ -74405,9 +74394,6 @@
"e8c40d3a44a41a9b6b5dd3a993d7057b3bfb4086", "e8c40d3a44a41a9b6b5dd3a993d7057b3bfb4086",
"5ba8555f716bd48834858d8a7f42810ab7293b12" "5ba8555f716bd48834858d8a7f42810ab7293b12"
], ],
"disk2-13boot.rom": [
"da39a3ee5e6b4b0d3255bfef95601890afd80709"
],
"disk2-13seq.rom": [ "disk2-13seq.rom": [
"afd060e6f35faf3bb0146fa889fc787adf56330a" "afd060e6f35faf3bb0146fa889fc787adf56330a"
], ],
@@ -95646,7 +95632,6 @@
"de7ddf29": "bc32bc0e8902946663998f56aea52be597d9e361", "de7ddf29": "bc32bc0e8902946663998f56aea52be597d9e361",
"4f923a35": "799e2fc90d6bfd8cb74e331e04d5afd36f2f21a1", "4f923a35": "799e2fc90d6bfd8cb74e331e04d5afd36f2f21a1",
"665cd50f": "e8c40d3a44a41a9b6b5dd3a993d7057b3bfb4086", "665cd50f": "e8c40d3a44a41a9b6b5dd3a993d7057b3bfb4086",
"00000000": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
"d34eb2ff": "afd060e6f35faf3bb0146fa889fc787adf56330a", "d34eb2ff": "afd060e6f35faf3bb0146fa889fc787adf56330a",
"b72a2c70": "bc39fbd5b9a8d2287ac5d0a42e639fc4d3c2f9d4", "b72a2c70": "bc39fbd5b9a8d2287ac5d0a42e639fc4d3c2f9d4",
"6105d2ee": "a57f14469867ce0d0865995a645b69f41a0ea718", "6105d2ee": "a57f14469867ce0d0865995a645b69f41a0ea718",

View File

@@ -7,6 +7,7 @@ base_destination: system
cores: all_libretro cores: all_libretro
hash_type: sha1 hash_type: sha1
verification_mode: existence verification_mode: existence
case_insensitive_fs: true
systems: systems:
3do: 3do:
files: files:

View File

@@ -5,6 +5,7 @@ source: "https://raw.githubusercontent.com/RetroBat-Official/emulatorlauncher/ma
base_destination: bios base_destination: bios
hash_type: md5 hash_type: md5
verification_mode: md5 verification_mode: md5
case_insensitive_fs: true
cores: cores:
- 81 - 81
- a5200 - a5200

View File

@@ -250,11 +250,16 @@ def generate_pack(
zip_path = os.path.join(output_dir, zip_name) zip_path = os.path.join(output_dir, zip_name)
os.makedirs(output_dir, exist_ok=True) os.makedirs(output_dir, exist_ok=True)
# Case-insensitive dedup only for platforms targeting Windows/macOS.
# Linux-only platforms (Batocera, Recalbox, RetroDECK, Lakka, RomM)
# are case-sensitive and may have distinct files like DISK.ROM vs disk.rom.
case_insensitive = config.get("case_insensitive_fs", False)
total_files = 0 total_files = 0
missing_files = [] missing_files = []
user_provided = [] user_provided = []
seen_destinations: set[str] = set() seen_destinations: set[str] = set()
seen_lower: set[str] = set() # case-insensitive dedup for Windows/macOS seen_lower: set[str] = set() # only used when case_insensitive=True
# Per-file status: worst status wins (missing > untested > ok) # Per-file status: worst status wins (missing > untested > ok)
file_status: dict[str, str] = {} file_status: dict[str, str] = {}
file_reasons: dict[str, str] = {} file_reasons: dict[str, str] = {}
@@ -293,7 +298,7 @@ def generate_pack(
full_dest = dest full_dest = dest
dedup_key = full_dest dedup_key = full_dest
already_packed = dedup_key in seen_destinations or dedup_key.lower() in seen_lower already_packed = dedup_key in seen_destinations or (case_insensitive and dedup_key.lower() in seen_lower)
storage = file_entry.get("storage", "embedded") storage = file_entry.get("storage", "embedded")
@@ -301,7 +306,8 @@ def generate_pack(
if already_packed: if already_packed:
continue continue
seen_destinations.add(dedup_key) seen_destinations.add(dedup_key)
seen_lower.add(dedup_key.lower()) if case_insensitive:
seen_lower.add(dedup_key.lower())
file_status.setdefault(dedup_key, "ok") file_status.setdefault(dedup_key, "ok")
instructions = file_entry.get("instructions", "Please provide this file manually.") instructions = file_entry.get("instructions", "Please provide this file manually.")
instr_name = f"INSTRUCTIONS_{file_entry['name']}.txt" instr_name = f"INSTRUCTIONS_{file_entry['name']}.txt"
@@ -326,7 +332,8 @@ def generate_pack(
else: else:
zf.write(tmp_path, full_dest) zf.write(tmp_path, full_dest)
seen_destinations.add(dedup_key) seen_destinations.add(dedup_key)
seen_lower.add(dedup_key.lower()) if case_insensitive:
seen_lower.add(dedup_key.lower())
file_status.setdefault(dedup_key, "ok") file_status.setdefault(dedup_key, "ok")
total_files += 1 total_files += 1
else: else:
@@ -401,7 +408,8 @@ def generate_pack(
if already_packed: if already_packed:
continue continue
seen_destinations.add(dedup_key) seen_destinations.add(dedup_key)
seen_lower.add(dedup_key.lower()) if case_insensitive:
seen_lower.add(dedup_key.lower())
extract = file_entry.get("extract", False) extract = file_entry.get("extract", False)
if extract and local_path.endswith(".zip"): if extract and local_path.endswith(".zip"):
@@ -437,7 +445,7 @@ def generate_pack(
if full_dest in seen_destinations: if full_dest in seen_destinations:
continue continue
# Skip case-insensitive duplicates (Windows/macOS FS safety) # Skip case-insensitive duplicates (Windows/macOS FS safety)
if full_dest.lower() in seen_lower: if full_dest.lower() in seen_lower and case_insensitive:
continue continue
local_path, status = resolve_file(fe, db, bios_dir, zip_contents) local_path, status = resolve_file(fe, db, bios_dir, zip_contents)
@@ -449,7 +457,8 @@ def generate_pack(
else: else:
zf.write(local_path, full_dest) zf.write(local_path, full_dest)
seen_destinations.add(full_dest) seen_destinations.add(full_dest)
seen_lower.add(full_dest.lower()) if case_insensitive:
seen_lower.add(full_dest.lower())
core_count += 1 core_count += 1
total_files += 1 total_files += 1
@@ -479,10 +488,11 @@ def generate_pack(
src = os.path.join(root, fname) src = os.path.join(root, fname)
rel = os.path.relpath(src, local_path) rel = os.path.relpath(src, local_path)
full = f"{dd_prefix}/{rel}" full = f"{dd_prefix}/{rel}"
if full in seen_destinations or full.lower() in seen_lower: if full in seen_destinations or full.lower() in seen_lower and case_insensitive:
continue continue
seen_destinations.add(full) seen_destinations.add(full)
seen_lower.add(full.lower()) if case_insensitive:
seen_lower.add(full.lower())
zf.write(src, full) zf.write(src, full)
total_files += 1 total_files += 1