[OTR-users] Re: gaim-otr-3.0.1.exe - please test
Ian Goldberg
ian at cypherpunks.ca
Mon Nov 20 19:19:29 EST 2006
On Mon, Nov 20, 2006 at 06:07:49PM -0600, Jiang Bian wrote:
> Hello,
> Could you write a little about how to cross-compile the GAIM-otr and
> post those scripts on the website?
> I am interested in it and I am not a expert on cross compilation.
This is what I did (on Ubuntu). Could someone else please try it, and let me
know how robust these directions are?
# apt-get install wine mingw32
That puts windows includes, libs, etc under /usr/i586-mingw32msvc/
I had a copy of libgpg-error.a and libgcrypt.a (mingw-compiled)
from before; I put them in /usr/i586-mingw32msvc/lib and also
gcrypt-module.h, gcrypt.h, and gpg-error.h in
/usr/i586-mingw32msvc/include . I don't remember it being tricky at all to
compile them under mingw, though.
Configure, build, and install libotr according to the INSTALL file.
Get glib and gtk for windows from, for example,
http://gnome.mirrors.pair.com/GNOME/binaries/win32/glib/2.10/glib-2.10.3.zip
http://gnome.mirrors.pair.com/GNOME/binaries/win32/glib/2.10/glib-dev-2.10.3.ziphttp://gnome.mirrors.pair.com/GNOME/binaries/win32/gtk+/2.10/gtk+-2.10.6.zip
http://gnome.mirrors.pair.com/GNOME/binaries/win32/gtk+/2.10/gtk+-dev-2.10.6.zip
Unzip them into /usr/i586-mingw32msvc/ .
Use wine to install gaim2b5. Copy libgaim.dll and gtkgaim.dll into
/usr/i586-mingw32msvc/lib .
Grab the source for gaim2b5 and put the following header files into
/usr/i586-mingw32msvc/include/gaim/ :
account.h gtkconn.h gtkwin32dep.h
accountopt.h gtkconv.h idle.h
blist.h gtkconvwin.h imgstore.h
buddyicon.h gtkdebug.h log.h
cipher.h gtkdialogs.h mime.h
circbuffer.h gtkdnd-hints.h network.h
cmds.h gtkdocklet.h notify.h
connection.h gtkeventloop.h ntlm.h
conversation.h gtkexpander.h plugin.h
core.h gtkft.h pluginpref.h
dbus-bindings.h gtkgaim.h pounce.h
dbus-define-api.h gtkidle.h prefs.h
dbus-gaim.h gtkimhtml.h privacy.h
dbus-maybe.h gtkimhtmltoolbar.h proxy.h
dbus-server.h gtklog.h prpl.h
dbus-useful.h gtkmenutray.h request.h
debug.h gtknickcolors.h roomlist.h
desktopitem.h gtknotify.h savedstatuses.h
dnsquery.h gtkplugin.h server.h
dnssrv.h gtkpluginpref.h signals.h
eggtrayicon.h gtkpounce.h sound.h
eventloop.h gtkprefs.h sslconn.h
ft.h gtkprivacy.h status.h
gaimcombobox.h gtkrequest.h stringref.h
gaim.h gtkroomlist.h stun.h
gaimstock.h gtksavedstatuses.h upnp.h
gtkaccount.h gtksession.h util.h
gtkblist.h gtksound.h value.h
gtkcelllayout.h gtksourceiter.h version.h
gtkcellrendererexpander.h gtkstatusbox.h whiteboard.h
gtkcellrendererprogress.h gtkthemes.h xmlnode.h
gtkcellview.h gtkutils.h
gtkcellviewmenuitem.h gtkwhiteboard.h
Apply this patch to the gaim-otr source (until I actually check it in):
Index: Makefile.mingw
===================================================================
RCS file: /cvsroot/otr/gaim-otr/Makefile.mingw,v
retrieving revision 1.5
diff -u -r1.5 Makefile.mingw
--- Makefile.mingw 2 Nov 2005 22:04:47 -0000 1.5
+++ Makefile.mingw 21 Nov 2006 00:15:41 -0000
@@ -4,7 +4,7 @@
GAIM_OTR_VERSION = 3.0.0
# Replace this with the path to the GAIM headers
-GAIM_SOURCE ?= /usr/include/gaim
+GAIM_SOURCE ?= /usr/i586-mingw32msvc/include/gaim
# If you don't have pkg-config, put the appropriate -I entry on the next line
GTK_HDRS ?= `pkg-config --cflags glib-2.0 gtk+-2.0`
@@ -26,9 +26,8 @@
LIBOTRLIBDIR = /usr/i586-mingw32msvc/lib
TARGET = gaim-otr.dll
LDFLAGS = -Wl,--enable-auto-image-base
-LDLIBS = $(LIBOTRLIBDIR)/libotr.a -lgtk-win32-2.0-0 -latk-1.0-0 -lpango-1.0-0 \
- -lglib-2.0-0 -lgdk_pixbuf-2.0-0 -lgdk-win32-2.0-0 -lgobject-2.0-0 \
- -lgaim -lgcrypt -lgpg-error
+LDLIBS = $(LIBOTRLIBDIR)/libotr.a -lgtk-win32-2.0 -lglib-2.0 -lgdk_pixbuf-2.0 \
+ -lgobject-2.0 -lgaim -lgtkgaim -lgcrypt -lgpg-error
else
FPIC = -fPIC
LDFLAGS = -module -avoid-version
Index: gtk-dialog.c
===================================================================
RCS file: /cvsroot/otr/gaim-otr/gtk-dialog.c,v
retrieving revision 1.10
diff -u -r1.10 gtk-dialog.c
--- gtk-dialog.c 18 Dec 2005 18:33:48 -0000 1.10
+++ gtk-dialog.c 21 Nov 2006 00:15:42 -0000
@@ -30,7 +30,7 @@
#if GAIM_MAJOR_VERSION < 2
#include "stock.h"
#else
-#include "gtkstock.h"
+#include "gaimstock.h"
#endif
#include "plugin.h"
#include "notify.h"
Then just "make -f Makefile.mingw", and it all builds cleanly.
- Ian
More information about the OTR-users
mailing list