mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-25 10:58:52 -06:00
refactor: leave the commands their own code
This commit is contained in:
1 parent
1f8e106974
commit
27330be60a
17 files changed
+47
-72
No files matched your search
@@ -27,7 +27,6 @@ import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
from dataclasses import dataclass
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
sys.path.insert(0, os.path.dirname(__file__))
|
||||
from resolve.cores import resolve_platform_cores as _platform_cores
|
||||
@@ -76,17 +75,7 @@ from resolve import packfiles as packresolve
|
||||
from packs.datadirs import hold_data_dirs
|
||||
from model import region
|
||||
|
||||
from packs.extras import (
|
||||
_emulator_region_group as _emulator_region_group,
|
||||
)
|
||||
from packs.integrity import (
|
||||
_check_member_hash as _check_member_hash,
|
||||
_hash_matches as _hash_matches,
|
||||
_intentional_hash_exclusion as _intentional_hash_exclusion,
|
||||
verify_pack_against_platform,
|
||||
)
|
||||
# _OFFLINE is deliberately not re-exported: importing a value copies it, so a
|
||||
# facade name would keep saying False after set_offline() changed the flag.
|
||||
from packs.integrity import verify_pack_against_platform
|
||||
from resolve.packfiles import (
|
||||
ACCEPTED_HASHES,
|
||||
parse_hash_input,
|
||||
@@ -94,8 +83,6 @@ from resolve.packfiles import (
|
||||
lookup_hashes,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
pass
|
||||
from packs.archive import DamagedArchiveError
|
||||
from packs.platformpack import generate_split_packs
|
||||
from packs.datatrees import _MISSING_DATA_DIRS
|
||||
@@ -127,9 +114,6 @@ DEFAULT_OUTPUT_DIR = "dist"
|
||||
DEFAULT_BIOS_DIR = "bios"
|
||||
|
||||
|
||||
# Emulator/system mode pack generation
|
||||
|
||||
|
||||
def _json_artifact_kind(path: Path) -> str | None:
|
||||
""""manifest" for an install manifest, "targets" for a per-target core
|
||||
list, None for anything else. The two share their file names: install.py
|
||||
@@ -1497,9 +1481,6 @@ def _main(held: contextlib.ExitStack) -> None:
|
||||
_run_platform_mode(args, parser, held, db, zip_contents)
|
||||
|
||||
|
||||
# Manifest generation (JSON inventory for install.py)
|
||||
|
||||
|
||||
def _write_standalone_layouts(output_dir: str, platform: str, layouts: dict) -> str:
|
||||
"""install/standalone/<platform>.json, what --standalone reads beside the
|
||||
list. Its [dest, sha1] items take their download from that list."""
|
||||
@@ -1511,9 +1492,6 @@ def _write_standalone_layouts(output_dir: str, platform: str, layouts: dict) ->
|
||||
return path
|
||||
|
||||
|
||||
# Post-generation pack verification + manifest + SHA256SUMS
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
from core.cli import run_cli
|
||||
|
||||
|
||||
Reference in new issue
Block a user