From 600bb71fb1fe0f949e3c1a140952d279a6f6c906 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Tue, 20 Oct 2026 03:20:01 +0200 Subject: [PATCH] fix: copy Azahar and Flycast files on macOS too --standalone-copies named Linux and Windows folders for Azahar's aes_keys.txt and boot9.bin and Flycast's dc_boot.bin and dc_nvmem.bin, and nothing for macOS, where both emulators read a fixed folder: ~/Library/Application Support/Azahar/sysdata (common_paths.h:36,61) and ~/Library/Application Support/Flycast/data (osx-main.mm:83-101). A test now requires a macOS folder on every copy. --- platforms/_registry.yml | 12 ++++++++++++ tests/test_install.py | 19 +++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/platforms/_registry.yml b/platforms/_registry.yml index 52924999..d8ef431d 100644 --- a/platforms/_registry.yml +++ b/platforms/_registry.yml @@ -43,6 +43,9 @@ _standalone_copies: &standalone_copies - $HOME/.var/app/org.azahar_emu.Azahar/data/azahar-emu/sysdata windows: - '%APPDATA%\Azahar\sysdata' + # common_paths.h:36,61 (azahar 987f1840). + darwin: + - $HOME/Library/Application Support/Azahar/sysdata - file: Citra/sysdata/boot9.bin targets: linux: @@ -50,6 +53,9 @@ _standalone_copies: &standalone_copies - $HOME/.var/app/org.azahar_emu.Azahar/data/azahar-emu/sysdata windows: - '%APPDATA%\Azahar\sysdata' + # common_paths.h:36,61 (azahar 987f1840). + darwin: + - $HOME/Library/Application Support/Azahar/sysdata # DuckStation (PS1) - pattern: 'scph*.bin' targets: @@ -149,6 +155,9 @@ _standalone_copies: &standalone_copies - $HOME/.var/app/org.flycast.Flycast/data/flycast windows: - '%APPDATA%\flycast\data' + # shell/apple/emulator-osx/emulator-osx/osx-main.mm:83-101 (flycast 6bb0fc3e). + darwin: + - $HOME/Library/Application Support/Flycast/data - file: dc/dc_nvmem.bin targets: linux: @@ -156,6 +165,9 @@ _standalone_copies: &standalone_copies - $HOME/.var/app/org.flycast.Flycast/data/flycast windows: - '%APPDATA%\flycast\data' + # shell/apple/emulator-osx/emulator-osx/osx-main.mm:83-101 (flycast 6bb0fc3e). + darwin: + - $HOME/Library/Application Support/Flycast/data platforms: retroarch: diff --git a/tests/test_install.py b/tests/test_install.py index be0b9bd1..7c5eb0af 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -3000,5 +3000,24 @@ class NoFallbackOutsideWhatAPlatformReads(unittest.TestCase): self.assertIn("--dest", err.getvalue()) +class EveryStandaloneCopyNamesItsMacFolder(unittest.TestCase): + """--standalone-copies copied Azahar's keys and Flycast's boot ROM on + Linux and Windows and silently skipped them on macOS, where both + emulators read a fixed Application Support folder.""" + + def test_each_copy_has_a_darwin_target(self): + import yaml + + registry = yaml.safe_load( + (Path(__file__).resolve().parents[1] / "platforms" / "_registry.yml").read_text() + ) + missing = [ + entry.get("file") or entry.get("pattern") + for entry in registry["_standalone_copies"] + if entry.get("targets") and "darwin" not in entry["targets"] + ] + self.assertEqual(missing, []) + + if __name__ == "__main__": unittest.main()