-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathinfinity_arcade.spec
More file actions
123 lines (111 loc) · 3.23 KB
/
infinity_arcade.spec
File metadata and controls
123 lines (111 loc) · 3.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# -*- mode: python ; coding: utf-8 -*-
import os
from pathlib import Path
# Get the base directory - use current working directory instead of __file__
base_dir = Path(os.getcwd())
def find_pygame_binaries():
"""Find pygame DLLs automatically - works in any environment."""
binaries = []
try:
import pygame
pygame_dir = Path(pygame.__file__).parent
# SDL2 DLL names that pygame needs
required_dlls = [
'SDL2.dll',
'SDL2_image.dll',
'SDL2_mixer.dll',
'SDL2_ttf.dll'
]
# Find all DLLs in pygame directory
for dll_file in pygame_dir.glob('*.dll'):
binaries.append((str(dll_file), '.'))
print(f"Including pygame DLL: {dll_file.name}")
print(f"Found {len(binaries)} pygame DLLs")
return binaries
except ImportError:
print("Warning: pygame not found, no DLLs will be included")
return []
# Get pygame DLLs automatically
pygame_binaries = find_pygame_binaries()
a = Analysis(
['src/infinity_arcade/main.py'],
pathex=[str(base_dir)],
binaries=pygame_binaries,
datas=[
# Include static files and templates
('src/infinity_arcade/static', 'infinity_arcade/static'),
('src/infinity_arcade/templates', 'infinity_arcade/templates'),
('src/infinity_arcade/builtin_games', 'infinity_arcade/builtin_games'),
],
hiddenimports=[
'uvicorn.lifespan.on',
'uvicorn.lifespan.off',
'uvicorn.protocols.websockets.auto',
'uvicorn.protocols.websockets.websockets_impl',
'uvicorn.protocols.http.auto',
'uvicorn.protocols.http.h11_impl',
'uvicorn.loops.auto',
'uvicorn.loops.asyncio',
'fastapi',
'fastapi.routing',
'fastapi.staticfiles',
'fastapi.templating',
'jinja2',
'pygame',
'pygame._sdl2',
'pygame._sdl2.audio',
'pygame._sdl2.controller',
'pygame._sdl2.mixer',
'pygame._sdl2.sdl2',
'pygame._sdl2.touch',
'pygame._sdl2.video',
'httpx',
'httpx._client',
'httpx._config',
'httpx._models',
'httpx._types',
'httpx._auth',
'httpx._exceptions',
'httpcore',
'httpcore._sync',
'httpcore._async',
'h11',
'h2',
'certifi',
'charset_normalizer',
'idna',
'sniffio',
],
hookspath=[],
hooksconfig={},
runtime_hooks=['hook_pygame.py'],
excludes=['SDL3'], # Explicitly exclude SDL3 to avoid conflicts
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=None,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=None)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='InfinityArcade',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True, # Show console window for debugging
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon='img/icon.ico'
)
# Copyright (c) 2025 AMD