Skip to content

Compiling for Windows

dm0- edited this page Feb 26, 2013 · 6 revisions
Clone this wiki locally

This page outlines how to build the Pidgin Window Merge plugin with MinGW to be used on Microsoft Windows.

These instructions are written for the GNU/Linux distribution Fedora. The build dependencies were rebuilt on Fedora 18; use at least that version for best results. If you do not have Fedora installed, the least intrusive way to build this plugin would be to download a Fedora Live CD image. Note the ISO can be burned to a disc, installed to a USB stick, or run virtually. This will allow you to run the following steps without installing anything to your hard drives.

The commands given here are all to be copied and pasted into a terminal displaying a bash prompt. You can open a terminal by navigating the Applications/System Tools menus or by pressing Alt+F2 and entering gnome-terminal.

Only run this if you are using a Live CD. It will disable system updates. The reason to disable system updates is that a while after a Fedora release, enough package updates could be downloaded as dependencies to use all the available writable storage (default 512MiB) and freeze the Live CD. If you have Fedora installed on a hard drive, this will not happen to you so don't run this step.

su -c 'sed -i -e s/enabled=1/enabled=0/ /etc/yum.repos.d/fedora-updates.repo' -

Installing Build Dependencies

A few MinGW libraries are required to easily build Pidgin plugins for Windows that are not yet included in Fedora repositories. Choose one of the following two methods to install them. Note this section only needs to be completed once (for persistent installations); skip to the next section for subsequent builds.

The Fast Way

This method will use pre-built RPMs so that only the plugin itself remains to be compiled. Manually download and install the packages by pasting the following lines into the terminal.

curl -LO
curl -LO
curl -LO
su -c "yum -y install '$PWD'/mingw32-*.noarch.rpm" -

The Long Way

These MinGW libraries can also be built from source. This is useful if you need to specify a different version of one of the projects or if you just don't trust installing binaries from strangers. First, install some packages for RPM development.

su -c 'yum -y install redhat-rpm-config rpmdevtools yum-utils' -

Download pre-configured source RPMs for GtkSpell and Pidgin libraries.

curl -LO
curl -LO

Since GtkSpell is required by Pidgin, it will be built and installed first. The following commands will retrieve its dependencies, build the RPM, and install it.

su -c "yum-builddep -y '$PWD'/mingw-gtkspell-2.0.16-2.fc18.src.rpm" -
rpmbuild --rebuild mingw-gtkspell-2.0.16-2.fc18.src.rpm
su -c "yum -y install '$(rpm -E %_rpmdir/noarch)'/mingw32-gtkspell-2.0.16-*.rpm" -

Run similar commands to build Pidgin's libraries. Note that two RPMs will actually be created and installed: one for libpurple and one for libpidgin.

su -c "yum-builddep -y '$PWD'/mingw-pidgin-2.10.7-1.fc18.src.rpm" -
rpmbuild --rebuild mingw-pidgin-2.10.7-1.fc18.src.rpm
su -c "yum -y install '$(rpm -E %_rpmdir/noarch)'/mingw32-lib{purple,pidgin}-2.10.7-*.rpm" -

Building Window Merge

Only run either this or the following step. If you want to build a released version of the plugin, enter the following commands.

curl -L | tar -xz
cd window_merge-0.3

Only run either this or the previous step. If you want to build the latest code on GitHub, run the following to download and prepare everything.

su -c 'yum -y install git libtool' -
git clone
cd window_merge
mkdir m4
autoreconf -fi

The easiest way to compile with MinGW is to use the distribution's packaging macro to run the configure script. Once it is configured, the plugin can be built with the standard make command.

rpm -E %mingw32_configure | bash
make clean all

The finished plugin should be located at .libs/window_merge.dll from the current directory. If you retrieved the source with git, you can run one more optional step to create an installation wizard.

su -c 'yum -y install mingw32-nsis' -
makensis pidgin-window_merge.nsi

An EXE file should have been created in the current directory. This file can be executed on the Windows system instead of manually installing the bare DLL, if desired.

Installing Window Merge in Windows

How to get the plugin's DLL file to your Windows installation will depend on how you are running Fedora. You could enter the following command to open the file browser.

nautilus .libs

It should display hard drives on the side bar, which you could potentially use to access your Windows installation. The file window_merge.dll can simply be dragged into the appropriate disk. If all else fails, the file can be uploaded to the web from Fedora and later downloaded to Windows.

Once window_merge.dll is available on your Windows installation, it should be placed in your Application Data\.purple\plugins or AppData\.purple\plugins folder in your home directory, depending on which version of Windows you are using. You also may need to create the plugins folder if it doesn't exist.

If everything went successfully, you should now see Window Merge in your Pidgin plugin list.

Something went wrong with that request. Please try again.