renpy / pygame_sdl2

Reimplementation of portions of the pygame API using SDL2.
GNU Lesser General Public License v2.1
326 stars 64 forks source link

Fix frozen programs crash due to missing json import #98

Closed MyreMylar closed 3 months ago

MyreMylar commented 6 years ago

If you try to freeze a pygame_sdl2 program right now using PyInstaller you get a crash on windows (and presumably other platforms) with a json import error. Adding an 'import json' fixes this crash and lets pygame_sdl2 support PyInstaller.

While I was in here I added two lines of optional imports for the render module in the same pattern as the other optional import modules - since they seemed to be missing. These are not essential to fix the crash and can be removed if they aren't wanted for some reason.

MyreMylar commented 6 years ago

This is for issue #94.

Remusforte commented 6 years ago

I added these 4 lines to my local pygame_sdl2 code and can confirm that it does indeed resolve the PyInstaller crash (related to missing JSON import) in Windows! Good job! This should be brought into the main code set, unless it's creating some conflict somewhere else.

renpytom commented 3 months ago

Closing this, as building pygame_sdl2 outside of Ren'Py is no longer supported.