[pygtk] PyGTK on Windows Installer
John Pye
john.pye at student.unsw.edu.au
Tue Apr 4 07:17:37 WST 2006
Hi Alberto,
It's worth looking at how the Inkscape project does this. They have a
makefile that copies all the required DLLs from the Windows system
(c:\GTK or wherever) into the local directory. I think that there are a
few environment variables.
http://svn.sourceforge.net/viewcvs.cgi/inkscape/inkscape/trunk/
Once you have it all running from local DLLs (in the same directory as
the application) you should be able to package it all up using a tool
like NSIS etc, which is a really good way to make Windows installers.
You'll probably find that you can simply cut and paste from one of the
example installers:
http://nsis.sourceforge.net/Main_Page
We actually had a brief discussion about this on the list just a couple
of weeks ago:
Yann le Boulanger wrote:
> Here is how we do that in Gajim:
> http://trac.gajim.org/wiki/DevWindows
>
> we provide 2 binaries: one with GTK and one without GTK
Chris Lambacher wrote:
>On Fri, Mar 17, 2006 at 02:40:35PM +1100, John Pye wrote:
>
>
>>> I think that PyGTK's windows installer should include the GTK+
>>> libraries, somehow.
>>
>>
>I think that is probably going to be problematic.
>
>
>
>>>
>>> If anyone has a good example of how they go about this for their
>>> particular application, (py2exe, etc?) I'd really like to hear about it.
>>
>>
>
>We ship a (closed source) py2exe'd app and include the GTK library in the
>application's directory. Then we use InnoSetup as the installer app. When
>the application is run we detect that we are "frozen" and set some relevant
>environment variables (PATH, GTK_BASEPATH). We probably ship more of GTK than
>we actually need. The part that seems to take the most space (asside from the
>.dlls themselves) is the .mo translation files.
>
>This approach was based on information I got from the PyGTK faq and some
>Google searches.
>
>
Hope that helps
Cheers
JP
Alberto Ruiz wrote:
> Hi all,
>
> I need to set up a .zip file wich contains the following package ready
> to work (0for windows) after the unzip:
> * Python 2.4
> * Gtk+
> * libglade
> * PyGtk2.4 + PyGlade2.4
> * Gazpacho
>
> I installed the following packages over a clean Installation of
> windows (all in the same directory):
> Python 2.4 runtime for win32: http://python.org
> Gtk+ Runtime + libglade + glade for windows:
> http://gladewin32.sourceforge.net/modules/news/
> <http://gladewin32.sourceforge.net/modules/news/>
> PyGtk and PyCairo from Pygtk win32 ports:
> http://www.pcpm.ucl.ac.be/~gustin/win32_ports/
> <http://www.pcpm.ucl.ac.be/%7Egustin/win32_ports/>
> Gazpacho: http://gazpacho.sicem.biz/ <http://gazpacho.sicem.biz/>
>
>
> So, it's easy to understand that, for someone from the windows world,
> the process of setting up a full enviroment to work with PyGtk is
> really annoying. And most people give it up. I think that we should
> take care on how we distribute our framework so people could get it
> and use it more easily. I think that a lot of people are doing efforst
> out of the official sites and that work should be unified so people
> don't need to visit up to 5 sites to have their enviroment working.
>
> I was talking about this issue with #gazpacho guys, and we realized
> that we should discuse on this mailing list about the people behind
> the windows installers and know their opinions.
>
> Comments are really welcome.
More information about the pygtk
mailing list