Pygame Font Not Working After Py2exe
I have this code that works fine when I convert it to an .exe with py2exe, except when it tries to load text on the screen. It comes up with the error: C:\Users\Slinky\Desktop\dist
Solution 1:
I have the same problem,the reason is that py2exe regards the SDL_ttf.dll file as a system owned dll and excludes it from the distribution package. You can add this code on your setup.py
origIsSystemDLL = py2exe.build_exe.isSystemDLL
def isSystemDLL(pathname):
ifos.path.basename(pathname).lower() in ["sdl_ttf.dll"]:
return0return origIsSystemDLL(pathname)
py2exe.build_exe.isSystemDLL = isSystemDLL
also you can vist http://thadeusb.com/weblog/2009/4/15/pygame_font_and_py2exe for more infomation
Post a Comment for "Pygame Font Not Working After Py2exe"