Windows Page

How to build the Windows installer

first you have to install packages described in Win32Env page plus py2exe

build or copy .mo files with poedit or from a linux box to po/LANG/LC_MESSAGES/gajim.mo

following step only for building Gajim with the GTK+ STATIC way:

Now you are ready, so in the Gajim folder run python setup_win32.py py2exe

You should have a gajim.exe in dist folder.

If you want to build the installer, install inno setup and open gajim.iss with it. There you can build the installer.

following step only for building Gajim with GTK+ included:

Before running py2exe, follow these steps:

in src/gajim.py and src/history_manager.py add under the import os:

paths = os.environ['PATH']
list_ = paths.split(';')
new_list = []
for p in list_:
	if p.find('gtk') < 0 and p.find('GTK') < 0:
		new_list.append(p)
new_list.insert(0, 'gtk/lib')
new_list.insert(0, 'gtk/bin')
os.environ['PATH'] = ';'.join(new_list)
os.environ['GTK_BASEPATH'] = 'gtk'

then create a folder called gtk in gajim folder, and copy etc, bin, lib, share/locale/the_one_you_need, share/themes/Default folder from %GTK_BASE% to that folder.

You can now run python setup_win32.py py2exe

Finaly to create the installer, add this line to gajim.iss under Source: "gtk\*"; DestDir?: "{app}\src\gtk"; Flags: recursesubdirs:

Source: "gtk\*"; DestDir: "{app}\src\gtk"; Flags: recursesubdirs
Source: "gtk\bin\xmlparse.dll"; DestDir: "{app}\src"
Source: "gtk\bin\xmltok.dll"; DestDir: "{app}\src"

Note: the last 2 lines are here to workarround DLL version problem, see #2821.

Tips for running the SVN version

(Putting this here after talking with asterix, a normal user shouldn't probably mess with gajim.py? This is more of a "poweruser" tip. Feel free to move this elsewhere if you don't want the tip here.)

You can run Gajim directly from source under Windows, but without a commandline that would take up precious task bar space. The procedure should not involve a small change to gajim.py, if you set up the shortcut correctly; thanks for the help, dkirov.

  • Right-click your desktop, and select "New/Shortcut"
  • Browse to your pythonw.exe. Click Next.
  • Use "Gajim" as the name for this shortcut. Click Finish.
  • Right-click the new shortcut, and select Properties
    • Target: \PATH-To\Python25\pythonw.exe gajim.py
    • Start in: \PATH-To\Gajim\src
    • Click Change Icon..., select \PATH-To\Gajim\data\pixmaps\gajim.ico
    • Click OK

Double-clicking the newly-created link should run Gajim without any commandline window now! Updates to subversion should not affect this shortcut, either.