|
19 | 19 | for root, dirs, files in os.walk(GAMES_DIR): |
20 | 20 | for file in files: |
21 | 21 | file_path = os.path.join(root, file) |
22 | | - # Archive name should be relative to keep structure |
23 | | - # We want them at root of zip so: 3800340.lua |
| 22 | + # Archive name should be relative - flatten to root of zip |
24 | 23 | zipf.write(file_path, os.path.basename(file_path)) |
25 | | - # Note: The original code expected LUA_FILES_DIR to contain the files. |
26 | | - # We are flattening it here or keeping structure? |
27 | | - # Original structure: All Games Files/3800340.lua |
28 | | - # If we flatten, extraction is simpler. Let's flatten. |
29 | 24 |
|
30 | 25 | print("Starting build process...") |
31 | 26 |
|
|
35 | 30 | '--onefile', |
36 | 31 | '--noconsole', |
37 | 32 | '--clean', |
38 | | - '--collect-all=ttkbootstrap', # Important for themes |
39 | | - '--add-data=games_data.zip;.', # Bundle the zip, not the folder |
40 | | - '--add-data=logo.ico;.', # Bundle icon for runtime use |
41 | | - '--icon=logo.ico' # Set EXE file icon |
| 33 | + # PyQt6 collection |
| 34 | + '--collect-all=PyQt6', |
| 35 | + '--hidden-import=PyQt6.QtCore', |
| 36 | + '--hidden-import=PyQt6.QtGui', |
| 37 | + '--hidden-import=PyQt6.QtWidgets', |
| 38 | + # Bundle data files |
| 39 | + '--add-data=games_data.zip;.', |
| 40 | + '--add-data=logo.ico;.', |
| 41 | + # Set EXE file icon |
| 42 | + '--icon=logo.ico' |
42 | 43 | ]) |
43 | 44 |
|
44 | 45 | print("Build complete. Executable is in 'dist' folder.") |
0 commit comments