Re: [pygame] py2exe and pygame font causes segfaults
On Tue, Dec 30, 2008 at 1:11 PM, Ian Mallett wrote: > Using the pygame default font in py2exe doesn't work for some reason. > You'll have to include the file in your distribution yourself and use > pygame.font.Font(). Also remember to include *all* your data files in the > distr folder py2exe makes too. > > Ian > I heard about that, so before I posted I copied the ttf file into a subdirectory relative my main.py script. ( its in ./data/ttf/freesandsbold.ttf ) And code: self.font_path = os.path.join('.', 'data','ttf','freesansbold.ttf') self.font = pygame.font.Font(self.font_path, 18) And I get the parachute in my first post. -- Jake
Re: [pygame] py2exe and pygame font causes segfaults
Because the Font path is in the Python/lib/site-packages/pygame dir, so if Python isn't installed the font doesn't exist =) On Tue, Dec 30, 2008 at 1:11 PM, Ian Mallett wrote: > Using the pygame default font in py2exe doesn't work for some reason. > You'll have to include the file in your distribution yourself and use > pygame.font.Font(). Also remember to include *all* your data files in the > distr folder py2exe makes too. > > Ian > -- - pymike "Python eggs me on."
Re: [pygame] py2exe and pygame font causes segfaults
Using the pygame default font in py2exe doesn't work for some reason. You'll have to include the file in your distribution yourself and use pygame.font.Font(). Also remember to include *all* your data files in the distr folder py2exe makes too. Ian
[pygame] py2exe and pygame font causes segfaults
I have a game that I want to package using py2exe. I compile it, and seems fine, but I run it and I get: """ Fatal Python error: (pygame parachute) Segmentation Fault This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. """ However, if I run it as normal python script, it works fine. [ If I rename the freesansbold.ttf to something else, it end with "IOError: unable to read font filename" as expected. ] So I set a boolean to toggle all font creation/blits/etc... -- If it is off, the .exe runs fine. If it is on, it fails with above error. If I run python script , it runs fine with text on. Any ideas? -- Jake