-
Notifications
You must be signed in to change notification settings - Fork 75
Description
I've spent some time poking at making a usable windows .exe file of my pygame_sdl2 project with PyInstaller. After a fair bit of fiddling around and learning the ropes I've found two issues so far:
-
The
jsonlibrary, is not included automatically by PyInstaller. I assume this is related to the way it is being dynamically imported somewhere in pygame_sdl2. Luckily it has a fairly easy fix in that you can just 'import json' in your own code and it will be included in your frozen distribution. It would be nice to make pygame_sdl2 handle this itself though. -
pygame_sdl2.fontfails to import at runtime after freezing. Googling around seems to suggest this can come from a missing .dll file, but I'm at a loss as to exactly what that could be as the error helpfully gives no specifics. I have the obvious SDL_ttf.dll and SDL2_ttf.dll in there. In case it helps here is a screenshot of all the dlls PyInstaller scoops up into it's distribution directory:
Of course it could be something else related to the font module and not dlls causing the import error.
However, if you remove all traces of pygame_sdl2 font from your application it appears to build and run fine. So we are so close to functional here!
