Play Windows games on Apple Silicon Macs. Free, open-source app that installs the official Battle.net, Steam, Epic and GOG launchers and lists your games in one library.
HTML apple-siliconbattle-netcrossover-alternatived3dmetaldiablo-ii-resurrecteddxmtea-appepic-gamesgame-porting-toolkitgogmac-gamingmacosmacos-gamingrockstar-gamessteamubisoft-connectwhisky-alternativewindows-gameswinewine-wrapper
Diablo Immortal shows in the library and starts from Play (#231)
Mikek8cc21a7cde93
diff --git a/scripts/game-library.py b/scripts/game-library.pyindex a69d01312e7..f47f5ec14d9 100644--- a/scripts/game-library.py+++ b/scripts/game-library.py@@ -80,6 +80,9 @@ BNET = {'s2': ('StarCraft II', 'S2'), 's1': ('StarCraft: Remastered', 'S1'),'w3': ('Warcraft III', 'W3'), 'hs_beta': ('Hearthstone', 'WTCG'),'heroes': ('Heroes of the Storm', 'Hero'), 'prometheus': ('Overwatch 2', 'Pro'),+ # Without its code Play only opened Battle.net (the game then needs Battle.net's own Play button).+ # ANBS seen 2026-11-26: a cold Battle.net logged LaunchBinary: uid=anbs 13 s after signing in.+ 'anbs': ('Diablo Immortal', 'ANBS'),}MAX_METADATA = 16 * 1024 * 1024@@ -331,13 +334,16 @@ class Library:# An Agent record can outlive an uninstall or partial download.# A game moved to another drive (scripts/game-storage.py) stays listed while unplugged.unplugged = location.is_symlink() and not location.exists()- if not unplugged and not (location / '.build.info').is_file(): continue+ # Diablo Immortal has no .build.info; Battle.net leaves .product.db in every finished install.+ if not unplugged and not any((location / mark).is_file() for mark in ('.build.info', '.product.db')): continuetitle, code = BNET.get(uid.casefold(), (location.name, None))arguments = ['--exec=launch ' + code] if code else []art = first_file(sorted(location.glob('*.ico')))if not art:executables = [p for p in location.glob('*.exe') if not any(word in p.name.lower() for word in ('launcher', 'uninstall', 'error', 'crash'))]executables.sort(key=lambda p: p.stat().st_size, reverse=True)+ # A game whose only exe at the top is its launcher (Diablo Immortal) takes the icon from that.+ executables = executables or sorted(location.glob('*Launcher.exe'))for exe in executables[:4]:art = executable_icon(exe, self.base / 'library-artwork')if art: breakdiff --git a/tests/test_library.py b/tests/test_library.pyindex 0ff1b545b9d..e4c4c85c7cc 100644--- a/tests/test_library.py+++ b/tests/test_library.py@@ -74,6 +74,20 @@ class LibraryTests(unittest.TestCase):ids = [g['id'] for g in self.lib.scan()['games']]self.assertEqual(ids, ['steam:123'])+ def test_diablo_immortal_starts_from_play(self):+ self.bnet(uid='anbs', folder='Diablo Immortal')+ # Its folder has .product.db and no .build.info.+ folder = self.base / 'bottle/drive_c/Games/Diablo Immortal'+ (folder / '.build.info').rename(folder / '.product.db')+ result = self.lib.scan()+ self.assertEqual([g['title'] for g in result['games']], ['Diablo Immortal'])+ self.assertEqual(self.lib.command('battlenet:anbs')[-2:], ['battlenet', '--exec=launch ANBS'])++ def test_a_battle_net_folder_with_neither_mark_is_not_a_game(self):+ self.bnet(uid='anbs', folder='Diablo Immortal')+ (self.base / 'bottle/drive_c/Games/Diablo Immortal/.build.info').unlink()+ self.assertEqual(self.lib.scan()['games'], [])+def test_four_platforms_and_launch_argv(self):self.steam(); self.epic(); self.bnet(); database = self.gog()before = database.read_bytes()