mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-04-18 23:02:33 -05:00
fix: generate manifest aliases for grouped platforms
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
"platform": "batocera",
|
"platform": "batocera",
|
||||||
"display_name": "Batocera",
|
"display_name": "Batocera",
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"generated": "2026-03-28T17:44:03Z",
|
"generated": "2026-03-28T17:57:00Z",
|
||||||
"base_destination": "bios",
|
"base_destination": "bios",
|
||||||
"detect": [
|
"detect": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"platform": "bizhawk",
|
"platform": "bizhawk",
|
||||||
"display_name": "BizHawk",
|
"display_name": "BizHawk",
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"generated": "2026-03-28T17:44:07Z",
|
"generated": "2026-03-28T17:57:04Z",
|
||||||
"base_destination": "Firmware",
|
"base_destination": "Firmware",
|
||||||
"detect": [
|
"detect": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"platform": "emudeck",
|
"platform": "emudeck",
|
||||||
"display_name": "EmuDeck",
|
"display_name": "EmuDeck",
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"generated": "2026-03-28T17:44:09Z",
|
"generated": "2026-03-28T17:57:05Z",
|
||||||
"base_destination": "bios",
|
"base_destination": "bios",
|
||||||
"detect": [
|
"detect": [
|
||||||
{
|
{
|
||||||
|
|||||||
7735
install/lakka.json
Normal file
7735
install/lakka.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
|||||||
"platform": "recalbox",
|
"platform": "recalbox",
|
||||||
"display_name": "Recalbox",
|
"display_name": "Recalbox",
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"generated": "2026-03-28T17:46:06Z",
|
"generated": "2026-03-28T17:57:49Z",
|
||||||
"base_destination": "bios",
|
"base_destination": "bios",
|
||||||
"detect": [
|
"detect": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"platform": "retroarch",
|
"platform": "retroarch",
|
||||||
"display_name": "RetroArch",
|
"display_name": "RetroArch",
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"generated": "2026-03-28T17:45:52Z",
|
"generated": "2026-03-28T17:57:43Z",
|
||||||
"base_destination": "system",
|
"base_destination": "system",
|
||||||
"detect": [
|
"detect": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"platform": "retrobat",
|
"platform": "retrobat",
|
||||||
"display_name": "RetroBat",
|
"display_name": "RetroBat",
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"generated": "2026-03-28T17:46:13Z",
|
"generated": "2026-03-28T17:57:54Z",
|
||||||
"base_destination": "bios",
|
"base_destination": "bios",
|
||||||
"detect": [
|
"detect": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"platform": "retrodeck",
|
"platform": "retrodeck",
|
||||||
"display_name": "RetroDECK",
|
"display_name": "RetroDECK",
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"generated": "2026-03-28T17:46:19Z",
|
"generated": "2026-03-28T17:58:00Z",
|
||||||
"base_destination": "",
|
"base_destination": "",
|
||||||
"detect": [
|
"detect": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"platform": "romm",
|
"platform": "romm",
|
||||||
"display_name": "RomM",
|
"display_name": "RomM",
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"generated": "2026-03-28T17:46:24Z",
|
"generated": "2026-03-28T17:58:04Z",
|
||||||
"base_destination": "bios",
|
"base_destination": "bios",
|
||||||
"detect": [
|
"detect": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1585,6 +1585,10 @@ def main():
|
|||||||
if args.manifest:
|
if args.manifest:
|
||||||
registry_path = os.path.join(args.platforms_dir, "_registry.yml")
|
registry_path = os.path.join(args.platforms_dir, "_registry.yml")
|
||||||
os.makedirs(args.output_dir, exist_ok=True)
|
os.makedirs(args.output_dir, exist_ok=True)
|
||||||
|
registry: dict = {}
|
||||||
|
if os.path.exists(registry_path):
|
||||||
|
with open(registry_path) as _rf:
|
||||||
|
registry = yaml.safe_load(_rf) or {}
|
||||||
for group_platforms, representative in groups:
|
for group_platforms, representative in groups:
|
||||||
print(f"\nGenerating manifest for {representative}...")
|
print(f"\nGenerating manifest for {representative}...")
|
||||||
try:
|
try:
|
||||||
@@ -1600,6 +1604,21 @@ def main():
|
|||||||
json.dump(manifest, f, indent=2)
|
json.dump(manifest, f, indent=2)
|
||||||
print(f" {out_path}: {manifest['total_files']} files, "
|
print(f" {out_path}: {manifest['total_files']} files, "
|
||||||
f"{manifest['total_size']} bytes")
|
f"{manifest['total_size']} bytes")
|
||||||
|
# Create aliases for grouped platforms (e.g., lakka → retroarch)
|
||||||
|
for alias_plat in group_platforms:
|
||||||
|
if alias_plat != representative:
|
||||||
|
alias_path = os.path.join(args.output_dir, f"{alias_plat}.json")
|
||||||
|
alias_manifest = dict(manifest)
|
||||||
|
alias_manifest["platform"] = alias_plat
|
||||||
|
alias_cfg = load_platform_config(alias_plat, args.platforms_dir)
|
||||||
|
alias_manifest["display_name"] = alias_cfg.get("platform", alias_plat)
|
||||||
|
alias_registry = registry.get("platforms", {}).get(alias_plat, {})
|
||||||
|
alias_install = alias_registry.get("install", {})
|
||||||
|
alias_manifest["detect"] = alias_install.get("detect", [])
|
||||||
|
alias_manifest["standalone_copies"] = alias_install.get("standalone_copies", [])
|
||||||
|
with open(alias_path, "w") as f:
|
||||||
|
json.dump(alias_manifest, f, indent=2)
|
||||||
|
print(f" {alias_path}: alias of {representative}")
|
||||||
except (FileNotFoundError, OSError, yaml.YAMLError) as e:
|
except (FileNotFoundError, OSError, yaml.YAMLError) as e:
|
||||||
print(f" ERROR: {e}")
|
print(f" ERROR: {e}")
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user