Converting PyGTK to exe

回眸只為那壹抹淺笑 提交于 2020-01-03 02:42:31

问题


I've been looking around for hours now. The only thing that makes sense to me is http://fnch.users.sourceforge.net/portablepygtkwindows.html But it takes up >40MB of space and it is too big for me.

Other tutorials are either too complicated for me to go through them or the results I obtained didn't work.

I've tried py2exe but the import gtk fails.

I've tried pyinstaller. The GTK files were included but not the glade file.

I would wish to have it all in a single standalone .exe. But now my priority is to have it properly working in windows without Python. Any effort to help is much appreciated.


回答1:


Some instructions on py2exe and pygtk are available. You should be able to have your whole program in a single exe file, but not the GTK library, which will need to be copied:

Once that's done, you'll need to copy the etc, lib and share directories from your GTK+ install (not the pygtk install) to the dist dir py2exe created.

Looks you can also ship data files with pyinstaller.



来源:https://stackoverflow.com/questions/13799317/converting-pygtk-to-exe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!