jrfoell / campfire-libpurple

A Campfire protocol plugin for libpurple (Pidgin)
48 stars 16 forks source link

Cross-compilation #15

Open mikeknoop opened 12 years ago

mikeknoop commented 12 years ago

Ever cross-compiled this plugin? I'd like to take a stab at cross-compiling for Windows. I got it to compile on Ubuntu already.

jrfoell commented 12 years ago

I have not... I don't currently have a dev environment set up in Windows.

msteinert commented 12 years ago

First you have to cross-compile Pidgin (and it's dependencies). Once you have done that it shouldn't be too hard.

First, modify the Makefile, change all of the := to =. (this should probably go in as a patch) Then you can do something like this:

make CC=i586-mingw32msvc-cc \
     CFLAGS_PURPLE="-I/path/to/include/libpurple -I/path/to/include/glib-2.0" \
     LIBS_PURPLE="-L/path/to/lib -lpurple -lglib-2.0" \
     PLUGIN_DIR_PURPLE="/path/to/lib/purple-2" \
     DATA_ROOT_DIR_PURPLE="/path/to/share"

The /path/to parts will be replaced with the appropriate directory where the cross-compiled binaries reside. I might give this a shot this weekend if I have time. I don't have a Windows machine to test it on but if I get it to compile I can post the binaries for you to test out.

mikeknoop commented 12 years ago

I started down the path of cross-compiling Pidgin itself; some of the steps seem contradictory. For example, the Bonjour SDK dependency can only be installed via a Windows installer which clearly doesn't make any sense in a cross-platform build scenario (in a Linux env).

I may also try again this weekend. I ran out of steam a few days ago and opted for the camper_van solution of campfire -> IRC -> Pidgin which also works pretty well.

msteinert commented 12 years ago

It might be possible to leave out some of the Pidgin dependencies. When I configure Pidgin for my ancient RHEL5 box at work I usually leave out things I don't need (for example Bonjour). Really you just need libpurple & glib to compile the campfire-libpurple code.

jfoell commented 11 years ago

@mikeknoop I just built the plugin for the first time on Windows. I followed the instructions here: https://developer.pidgin.im/wiki/BuildingWinPidgin Besides the pidgin source, the only build dependencies I downloaded were: GTK+, gettext, Libxml2, and Cyrus SASL. I am using msys and MinGW.

cd path/to/pidgin-2.10.7/libpurple/protocols/
mkdir campfire
cp path/to/git/campfire-libpurple/*.c campfire
cp path/to/git/campfire-libpurple/Makefile.mingw campfire
cd campfire
make -f Makefile.mingw

...something like that. What are you cross compiling with? I guess I'd start here with WINE + MinGW? Have fun.

BTW: I did not build pidgin. I just used the windows installer for the latest pidgin and added my libcampfire.dll and campfire.png's after install.

jrfoell commented 11 years ago

If anyone is successful with a windows build, we should provide a DLL for download somewhere.

jfoell commented 11 years ago

We have one in the repo now. see: https://github.com/jrfoell/campfire-libpurple/issues/19 :)