mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-13 13:33:52 -06:00
feat: install files into retrobat emulator folders
RetroBat's Pico8 generator runs pico8.exe from AppConfig.GetFullPath: the emulatorLauncher.cfg key, else the first existing of four folders of the RetroBat install. The registry describes that search (emulators_directory) and the manifest writes such a file as root: emulators. The installer places it only when the BIOS folder sits beside RetroBat's launcher config and the config does not move the folder, and names it no_emulators_directory otherwise. Packs skip it as they skip root: roms. The PICO-8 0.2.7 Windows build (pico8.exe, SDL2.dll) is collected from the archive.org copy of pico-8_0.2.7_windows.zip, its pico8.dat being the 0.2.7 one already held.
This commit is contained in:
1 parent
f47c8b8e5a
commit
c8fe8d914d
16 files changed
+329
-79
No files matched your search
+13
-9
@@ -38,6 +38,7 @@ import slots
|
||||
sys.path.insert(0, os.path.dirname(__file__))
|
||||
from hashing import parse_md5_list
|
||||
from common import (
|
||||
OUTER_ROOTS,
|
||||
_foreign_tree,
|
||||
_owner_tokens,
|
||||
platform_arg,
|
||||
@@ -596,7 +597,7 @@ def find_undeclared_files(
|
||||
# of its own: two cores reading hiscore.dat there read
|
||||
# two files.
|
||||
("save", core_save_folder(profile)) if save_root
|
||||
else ("roms",) if f.get("root") == "roms"
|
||||
else (f["root"],) if f.get("root") in OUTER_ROOTS
|
||||
# In the emulator's own folder: no other core reads it.
|
||||
else ("emulator", emu_name) if f.get("unplaced") else None,
|
||||
)
|
||||
@@ -609,9 +610,9 @@ def find_undeclared_files(
|
||||
# Nor does it answer for one read below the roms directory.
|
||||
verdict = _candidate_verdict(
|
||||
f, fname, is_standalone, include_all,
|
||||
{} if save_root or f.get("root") == "roms" else declared_names,
|
||||
{} if save_root or f.get("root") in OUTER_ROOTS else declared_names,
|
||||
dest, folded_slots,
|
||||
None if save_root or f.get("root") == "roms" else declared_contents,
|
||||
None if save_root or f.get("root") in OUTER_ROOTS else declared_contents,
|
||||
)
|
||||
if verdict == "settled":
|
||||
seen_files.add(seen_key)
|
||||
@@ -772,9 +773,10 @@ def find_undeclared_files(
|
||||
entry["layout_path"] = f["layout_path"]
|
||||
if f.get("unplaced"):
|
||||
entry["unplaced"] = f["unplaced"]
|
||||
elif f.get("root") == "roms":
|
||||
# Read below the roms directory (ROCKNIX's roms/pico-8).
|
||||
entry["root"] = "roms"
|
||||
elif f.get("root") in OUTER_ROOTS:
|
||||
# Read below the roms directory (ROCKNIX's roms/pico-8)
|
||||
# or in an emulator folder (RetroBat's emulators/pico8).
|
||||
entry["root"] = f["root"]
|
||||
elif launcher_layer and not save_root:
|
||||
launcher_candidates.append((emu_name, is_standalone, f, entry))
|
||||
if duplicate:
|
||||
@@ -885,6 +887,7 @@ def find_exclusion_notes(
|
||||
_UNPLACED_REASONS = {
|
||||
"outside_bios_folder": "read in a folder the platform keeps outside the BIOS tree",
|
||||
"no_roms_directory": "read below a roms folder the platform's registry does not name",
|
||||
"no_emulators_directory": "read in an emulator folder the platform's registry does not describe",
|
||||
"no_platform_slug": "no platform slug for its system",
|
||||
"below_platform_folder": "below the folder the platform lists",
|
||||
"no_save_directory": "read below a save directory the platform keeps in no fixed place",
|
||||
@@ -908,11 +911,12 @@ def _mark_unplaced(config: dict, undeclared: list[dict], profiles: dict) -> None
|
||||
reason = unplaced.get(
|
||||
(u.get("emulator", ""), u.get("name", ""), u.get("path") or "")
|
||||
)
|
||||
if not reason and u.get("root") == "roms":
|
||||
if not reason and u.get("root") in OUTER_ROOTS:
|
||||
# The pack is extracted into the BIOS folder: the installer
|
||||
# writes this file into the roms folder, the pack cannot.
|
||||
# writes this file into the roms or emulator folder, the pack
|
||||
# cannot.
|
||||
u["in_pack"] = False
|
||||
u["omitted"] = "read below the roms folder, which only the installer reaches"
|
||||
u["omitted"] = f"read below the {u['root']} folder, which only the installer reaches"
|
||||
continue
|
||||
if reason:
|
||||
u["in_pack"] = False
|
||||
|
||||
Reference in new issue
Block a user