mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-24 02:27:52 -06:00
refactor: share CLI options and default paths
core.paths holds the default database, platforms, emulators and bios paths, core.cli declares the options built on them (add_repo_inputs) and the --emulator/--system modes verify and generate_pack share. model.targets.target_scope answers --target for a command line, model.profiles.no_profile_for_systems the system with no emulator. tests/sources.declared_options reads the options a script declares through either form.
This commit is contained in:
1 parent
348d5b51c3
commit
cf03dcb2ef
50 files changed
+260
-405
No files matched your search
+2
-7
@@ -29,12 +29,10 @@ from pathlib import Path
|
||||
|
||||
sys.path.insert(0, os.path.dirname(__file__))
|
||||
from core.hashing import compute_hashes
|
||||
from core.cli import require_directory
|
||||
from core.cli import add_repo_inputs, require_directory
|
||||
from core.artifacts import write_text_atomic
|
||||
from model.nodedup import in_nodedup_dir
|
||||
|
||||
DEFAULT_BIOS_DIR = "bios"
|
||||
|
||||
|
||||
def path_priority(path: str) -> tuple:
|
||||
"""Lower score = better candidate to keep as canonical.
|
||||
@@ -353,10 +351,7 @@ def main() -> None:
|
||||
parser.add_argument(
|
||||
"--dry-run", action="store_true", help="Preview without deleting"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--bios-dir", default=DEFAULT_BIOS_DIR,
|
||||
help="BIOS collection directory (default: %(default)s)",
|
||||
)
|
||||
add_repo_inputs(parser, "bios")
|
||||
args = parser.parse_args()
|
||||
require_directory(args.bios_dir)
|
||||
|
||||
|
||||
Reference in new issue
Block a user