mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-25 19:08:51 -06:00
refactor: move pack library code into packs/
This commit is contained in:
1 parent
4d4052a8ab
commit
0b532366d0
167 files changed
+14476
-13882
No files matched your search
+1
-48
@@ -31,52 +31,10 @@ sys.path.insert(0, os.path.dirname(__file__))
|
||||
from core.hashing import compute_hashes
|
||||
from core.cli import require_directory
|
||||
from core.artifacts import write_text_atomic
|
||||
from model.nodedup import _in_nodedup_dir
|
||||
|
||||
DEFAULT_BIOS_DIR = "bios"
|
||||
|
||||
# Directories where deduplication must NOT be applied.
|
||||
NODEDUP_DIRS = {
|
||||
"RPG Maker",
|
||||
"ScummVM",
|
||||
# A zoneinfo tree is addressed by zone name and its aliases are equal
|
||||
# files by design: US/Samoa is Pacific/Midway.
|
||||
"tzdata",
|
||||
# VICE data is addressed by machine directory: C64, C64DTV and SCPU64
|
||||
# share one keymap, C64 and CBM-II one palette. With the copies removed
|
||||
# the name step served the C128 keymap to all of them.
|
||||
"c64-emu",
|
||||
# PinMAME reads a sound-only parent (gts80s) as its own archive, equal
|
||||
# byte for byte to the base set. Folding them into the clone map would
|
||||
# key gts1.zip twice, once for MAME's set and once for PinMAME's.
|
||||
"PinMAME",
|
||||
# BBK dictionary ROMs are addressed by model directory, and the OS ROM
|
||||
# the A4988 folder needs is the one the gam4980 core is given.
|
||||
"BBK",
|
||||
# Engine data trees read by path: one sound or one sprite sits under
|
||||
# several characters, campaigns or episodes, and each copy is opened
|
||||
# where it lies.
|
||||
"C-Dogs SDL",
|
||||
"Ikemen GO",
|
||||
"Theme Hospital",
|
||||
"TheXTech",
|
||||
# Aleph One opens each scenario's Physics Models and the Splitwolf mod
|
||||
# tree its sounds and maps by path: Marathon 2 and Infinity share one
|
||||
# Standard.phyA, lwmp/ repeats 182 files across its levels.
|
||||
"Bungie",
|
||||
"splitwolf",
|
||||
# CatacombGL reads each game's folder by name and compares sizes only:
|
||||
# the Armageddon and Apocalypse intro shapes SHP1, SHP9 to SHP13 are the
|
||||
# Abyss shareware bytes under the retail names, and each game opens
|
||||
# its own copy.
|
||||
"Softdisk",
|
||||
# MAME's support trees (hash, plugins) are read by path as a whole, and
|
||||
# two MAME versions share most of their software lists byte for byte.
|
||||
"mame",
|
||||
# The Tyrian 2.1 distribution ships netset.pcx and tyrset.pcx with the
|
||||
# same bytes, and EmuELEC places both names under ports/opentyrian/.
|
||||
"opentyrian",
|
||||
}
|
||||
|
||||
|
||||
def path_priority(path: str) -> tuple:
|
||||
"""Lower score = better candidate to keep as canonical.
|
||||
@@ -90,11 +48,6 @@ def path_priority(path: str) -> tuple:
|
||||
return (is_variant, is_mame, is_arcade, len(parts), path)
|
||||
|
||||
|
||||
def _in_nodedup_dir(path: str) -> bool:
|
||||
parts = Path(path).parts
|
||||
return any(nodedup in parts for nodedup in NODEDUP_DIRS)
|
||||
|
||||
|
||||
def _is_mame_dir(path: str) -> bool:
|
||||
"""Check if a path is in a MAME-specific directory."""
|
||||
parts = Path(path).parts
|
||||
|
||||
Reference in new issue
Block a user