# Windows-only cx_freeze setup file, macOS may work but I've not tested it. import sys from cx_Freeze import setup, Executable import pygame from version import buildVersion if sys.version_info < (3, 0, 0): sys.exit("Python versions lower than 3 are not supported.") def is_64bit() -> bool: return sys.maxsize > 2**32 path = "" base = None if sys.platform == "win32": base = "Win32GUI" path = sys.path if is_64bit() == True: path.append(r"C:\Program Files (x86)\Windows Kits\10\Redist\10.0.22000.0\ucrt\DLLs\x64") elif is_64bit() == False: path.append(r"C:\Program Files (x86)\Windows Kits\10\Redist\10.0.22000.0\ucrt\DLLs\x86") print("Path = " + str(path)) includefiles = ["quirks", "smilies", "themes", "docs", "README.md", "LICENSE", "CHANGELOG.md", "PCskins.png", "Pesterchum.png"] build_exe_options = { # "includes": ['PyQt6.QtCore', # 'PyQt6.QtGui', # 'PyQt6.QtWidgets'], "excludes": ['collections.sys', 'collections._sre', 'collections._json', 'collections._locale', 'collections._struct', 'collections.array', 'collections._weakref', 'PyQt6.QtMultimedia', 'PyQt6.QtDBus', 'PyQt6.QtDeclarative', 'PyQt6.QtHelp', 'PyQt6.QtNetwork', 'PyQt6.QtSql', 'PyQt6.QtSvg', 'PyQt6.QtTest', 'PyQt6.QtWebKit', 'PyQt6.QtXml', 'PyQt6.QtXmlPatterns', 'PyQt6.phonon', 'PyQt6.QtAssistant', 'PyQt6.QtDesigner', 'PyQt6.QAxContainer', 'pygame.docs' # Hopefully we can just not have pygame at all at some point =3 # (when QtMultimedia stops relying on local codecs