On Tue, Aug 17, 2010 at 10:45 AM, Patrick Wasp <patrickw...@gmail.com> wrote: > Hi, > Thanks for the reply. > I'm using cx_freeze 4.2 for python 2.6. I'm using the GTK bundle from here > ( http://www.gtk.org/download-windows.html ) v2.20. It is in C:\gtk and the > bin and lib folders are added to my system path. I have also installed all > the things for pygtk to work on windows from here > ( http://www.pygtk.org/downloads.html ). > here is my test program: test.py > > import gtk > window = gtk.Window() > window.set_title("PyGTK Test Window") > window.connect("destroy", gtk.main_quit) > window.show_all() > gtk.main() > > When I double click on test.py, a window pops up. When I run cx_freeze with > the following command: > > cxfreeze test.py --target-dir test2 -s > > I get the following error: > > Missing modules: > ? unix imported from gio
Probably not a problem. This is stating that there is an import of the "unix" module somewhere inside the "gio" module -- but its likely inside a conditional statement. The best thing to do if you're concerned is to go to the offending module and look for the import statement and see if it affects you. Based on the name and the fact that you are running on Windows its a good guess that there is a condition for non-Windows platforms. > The 'test2' folder now contains the following files: > > 08/17/2010 12:19 PM 207,872 atk.pyd > 08/17/2010 12:19 PM 72,192 bz2.pyd > 08/17/2010 12:19 PM 66,048 cairo._cairo.pyd > 08/17/2010 12:23 PM 0 files.txt > 08/17/2010 12:19 PM 538,484 freetype6.dll > 08/17/2010 12:19 PM 194,048 gio._gio.pyd > 08/17/2010 12:19 PM 54,784 glib._glib.pyd > 08/17/2010 12:19 PM 110,592 gobject._gobject.pyd > 08/17/2010 12:19 PM 1,836,544 gtk._gtk.pyd > 08/17/2010 12:19 PM 158,347 libatk-1.0-0.dll > 08/17/2010 12:19 PM 946,905 libcairo-2.dll > 08/17/2010 12:19 PM 143,096 libexpat-1.dll > 08/17/2010 12:19 PM 279,059 libfontconfig-1.dll > 08/17/2010 12:19 PM 890,541 libgdk-win32-2.0-0.dll > 08/17/2010 12:19 PM 260,985 libgdk_pixbuf-2.0-0.dll > 08/17/2010 12:19 PM 704,583 libgio-2.0-0.dll > 08/17/2010 12:19 PM 1,202,136 libglib-2.0-0.dll > 08/17/2010 12:19 PM 32,256 libgmodule-2.0-0.dll > 08/17/2010 12:19 PM 317,511 libgobject-2.0-0.dll > 08/17/2010 12:19 PM 40,198 libgthread-2.0-0.dll > 08/17/2010 12:19 PM 4,887,231 libgtk-win32-2.0-0.dll > 08/17/2010 12:19 PM 339,073 libpango-1.0-0.dll > 08/17/2010 12:19 PM 95,193 libpangocairo-1.0-0.dll > 08/17/2010 12:19 PM 687,426 libpangoft2-1.0-0.dll > 08/17/2010 12:19 PM 102,930 libpangowin32-1.0-0.dll > 08/17/2010 12:19 PM 219,305 libpng14-14.dll > 08/17/2010 12:19 PM 111,104 pango.pyd > 08/17/2010 12:19 PM 15,872 pangocairo.pyd > 08/17/2010 12:19 PM 2,129,920 python26.dll > 08/17/2010 12:19 PM 12,800 select.pyd > 08/17/2010 12:19 PM 1,447,693 test.exe > 08/17/2010 12:19 PM 586,752 unicodedata.pyd > 08/17/2010 12:19 PM 77,876 zlib1.dll > 33 File(s) 18,769,356 bytes > 2 Dir(s) 13,615,874,048 bytes free > > The resulting executable runs on the computer it was written on but when I > try to run it on a computer without python/gtk it gives an error about not > having gio. Right. What is the precise error that you are getting? If it is a missing module you can use includes = [] to specify additional modules to include in the result. This is needed for some modules that do dynamic imports or imports from within C modules. This is determined by trial and error or examination of the source code in question. I have done this sort of thing for a fair number of modules already and that information is encoded in the 'hooks' in cx_Freeze. If you discover what this is, please let me know and I'll do the same for this case. > Using a distutils setup script produces similar results, although I'm not > sure how to use the distutils commands to 'copy-dependent-files'. Copying dependent files is the default so there is nothing to do if you want that behaviour -- and I would suggest that most (if not all) times you do. > from cx_Freeze import setup, Executable > setup( > name = "test", > version = "0.1", > description = "the typical 'test' script", > executables = [Executable("test.py")]) > > Also a command prompt window pops up behind the program window. This isn't > so important, but is there a way to not show that command prompt window? This is an easy one. Use the base "Win32GUI". See the wxPython sample in the cx_Freeze distribution for an example of how to do that. > Thanks for your help. You're welcome. Anthony ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ cx-freeze-users mailing list cx-freeze-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cx-freeze-users