1

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.

elwc
  • 1,197
  • 2
  • 15
  • 25

1 Answers1

4

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.

liberforce
  • 11,189
  • 37
  • 48
  • Seriously, thanks a bunch! I've managed to convert it into exe. I tried to compare with minty's answer here: http://stackoverflow.com/questions/112698/py2exe-generate-single-executable-file and I added `{'bundle_files': 1}`. It does convert it into just 4 files (good enough). However my program won't run. Changing bundle_files to 2 also won't run. But when bundle_files is 3 (default), it works again. What am I missing? – elwc Dec 12 '12 at 02:12
  • From that answer, `bundle_files = 2` should not run, as python interpreter is missing, but `bundle_files = 1` should. I've never used these tools, only googled a bit, so I can't really give you an explanation here... – liberforce Dec 12 '12 at 13:57