except ImportError, message:
raise SystemExit, "Unable to load module. %s" % message
+
+origIsSystemDLL = py2exe.build_exe.isSystemDLL
+def isSystemDLL(pathname):
+ if os.path.basename(pathname).lower() in ["sdl_ttf.dll"]:
+ return 0
+ return origIsSystemDLL(pathname)
+py2exe.build_exe.isSystemDLL = isSystemDLL
+
+
class pygame2exe(py2exe.build_exe.py2exe): #This hack make sure that pygame default font is copied: no need to modify code for specifying default font
def copy_extensions(self, extensions):
#Get pygame default font
if os.path.isdir(self.dist_dir): #Erase previous destination dir
shutil.rmtree(self.dist_dir)
+ if os.path.isdir('build'): #Clean up build dir
+ shutil.rmtree('build')
+
+
#Use the default pygame icon, if none given
if self.icon_file == None:
path = os.path.split(pygame.__file__)[0]
else:
extra_datas.append(('.', [data]))
+
setup(
cmdclass = {'py2exe': pygame2exe},
version = self.project_version,