Font module error when using pygame2exe

前端 未结 2 807
野的像风
野的像风 2021-01-20 18:08

I used Pygame2exe from the Pygame website and that got rid of the problem with the .dlls but there\'s still an error that remains.
The only font I\'m using

相关标签:
2条回答
  • 2021-01-20 19:12

    Your problem looks like very similar to this one : http://thadeusb.com/weblog/2009/4/15/pygame_font_and_py2exe

    Try to add "sdl_ttf.dll" to the list of system dlls like this :

    origIsSystemDLL = py2exe.build_exe.isSystemDLL # save the orginal before we edit it
    def isSystemDLL(pathname):
        # checks if the freetype and ogg dll files are being included
        if os.path.basename(pathname).lower() in ("libfreetype-6.dll", "libogg-0.dll", "sdl_ttf.dll"):
                return 0
        return origIsSystemDLL(pathname) # return the orginal function
    py2exe.build_exe.isSystemDLL = isSystemDLL # override the default function with this one
    
    0 讨论(0)
  • 2021-01-20 19:12

    Looks like the pygame.font module is missing. Did you pack it?

    0 讨论(0)
提交回复
热议问题