Using the pygame2exe script that you linked, you need to add the list of extra includes ['pyttsx.drivers.sapi5', 'win32com.gen_py.C866CA3A-32F7-11D2-9602-00C04F8EE628x0x5x4']
to the setup options used - it looks like you can do that by overriding or changing self.extra_scripts = []
in BuildExe
. You then also need to do something similar with your typelibs
, thought it looks like pygame2exe doesnt support that directly.
The easiest thing for you to do would probably be to take a local copy of the pygame2exe and then modify the BuildExe class to add your specific options to this:
From:
options = {'py2exe': {'optimize': 2, 'bundle_files': 1, 'compressed': True, \
'excludes': self.exclude_modules, 'packages': self.extra_modules, \
'dll_excludes': self.exclude_dll,
'includes': self.extra_scripts} },
To (this might need further tweaking:
options = {'py2exe': {'optimize': 2, 'bundle_files': 1, 'compressed': True, \
'excludes': self.exclude_modules, 'packages': self.extra_modules, \
'dll_excludes': self.exclude_dll,
'includes': self.extra_scripts + ['pyttsx.drivers.sapi5', 'win32com.gen_py.C866CA3A-32F7-11D2-9602-00C04F8EE628x0x5x4'],
'typelibs': [('{C866CA3A-32F7-11D2-9602-00C04F8EE628}', 0, 5, 4)]
}},
Let me know how you get on!