[GnomeMeeting-devel-list] Win32 cross-compilation : the howto



Hi,

notice that it's not working correctly yet, but the sooner I'll have other eyeballs (and hopefully brains...) going over it, the better.

Attached to this mail is a step-by-step guide how I got gnomemeeting successfully work... crashing on win32, from executables built on a GNU/Linux box.

Snark
** Setting up the right environment

export CC=i586-mingw32msvc-cc
export CXX=i586-mingw32msvc-c++
export LD=i586-mingw32msvc-ld
export NM=i586-mingw32msvc-nm
export AR=i586-mingw32msvc-ar
export RANLIB=i586-mingw32msvc-ranlib
export DLLTOOL=i586-mingw32msvc-dlltool
export DLLWRAP=i586-mingw32msvc-dllwrap
export OBJDUMP=i586-mingw32msvc-objdump
export WINDRES=i586-mingw32msvc-windres
export AS=i586-mingw32msvc-as
export CFLAGS=-I$HOME/Gnomemeeting/Cross/windows/include
export CXXFLAGS=-I$HOME/Gnomemeeting/Cross/windows/include
export LDFLAGS=-L$HOME/Gnomemeeting/Cross/windows/lib
export PKG_CONFIG_PATH=$HOME/Gnomemeeting/Cross/windows/lib/pkgconfig

** Installing a POSIX regex library
(this is needed for both OpenLDAP and gnomemeeting -- although gnomemeeting's
configure.in doesn't check for it [I think I'm the bad boy *g*])
Take regex.c, regexec.c, regex.h, regex_internal.c, regex_internal.h,
regcomp.c, alloca_.h and alloca.c from savannah's gnulib's cvs (all LGPL so
it's ok licence-wise)
Rename alloca_.h to alloca.h
$ $CC -c -I. regex.c
$ $CC -c -I. alloca.c
$ $AR r libregex.a regex.o alloca.o
$ cp regex.h $HOME/Gnomemeeting/Cross/windows/include
$ cp libregex.a $HOME/Gnomemeeting/Cross/windows/lib


** Installing OpenLDAP
openldap-2.3.7.tgz
Edit libraries/liblutil/Makefile.in and replace "windres" by "$(WINDRES)" (!),
then :
$ ./configure --with-cyrus-sasl=no --enable-bdb=no --enable-hdb=no --prefix=$HOME/Gnomemeeting/Cross/windows --host=mingw32
$ make depend
Then go in libraries/liblber and do:
$ make
$ make install
After that, go libraries/libldap and libraries/libldap_r and do:
$ make
you will have to add "../../libraries/liblutil/liblutil.a" to the final linking
command or it will fail (!)
$ cp .lib/lib* $HOME/Gnomemeeting/Cross/windows/lib
Finally, go in include and do
$ make install


** Compiling pwlib
$ cp -R ptlib_win32 pwlib
$ cp -R ptlib_unix/* pwlib
$ cd pwlib
$ rm configure.exe configure configure.ac Makefile.in

put the provided configure.ac, Makefile.am and pwlib.pc.in in place, then :

$ aclocal-1.9
$ autoheader
$ libtoolize --force
$ touch NEWS README AUTHORS ChangeLog
$ automake-1.9 -a -c
$ autoconf
$ ./configure --prefix=$HOME/Gnomemeeting/Cross/windows --host=mingw32
$ make
$ make install

** Compiling libogg

$ ./configure --prefix=$HOME/Gnomemeeting/Cross/windows --host=mingw32
$ make

** Compiling libspeex

$ ./configure --prefix=$HOME/Gnomemeeting/Cross/windows --host=mingw32
$ make

** Compiling opal

put the provided configure.ac, opal.pc.in and Makefile.am in place, then :

$ aclocal-1.9
$ libtoolize
$ touch NEWS README AUTHORS ChangeLog
$ automake-1.9 -a -c
$ autoconf
$ ./configure --prefix=$HOME/Gnomemeeting/Cross/windows --host=mingw32
$ make
$ make install

** Installing the necessary gtk files
 unzip all zips

edit all *.pc files in $HOME/Gnomemeeting/Cross/windows/lib/pkgconfig, and replace the "prefix=..." lines with "prefix=/home/whatever/Gnomemeeting/Cross/windows" (don't use ${HOME} in there)

** Compiling libxml2

$ ./configure --prefix=$HOME/Gnomemeeting/Cross/windows --host=mingw32
$ make
$ make install

** Compiling gnomemeeting

apply the patch that will make pwlib & opal detected through pkg-config, and
removes all tests that fail when cross-compiling (AC_CHECK_FILE for example...)

$ ./autogen.sh --disable-gnome --disable-sdl --with-ldap_dir=$HOME/Gnomemeeting/Cross/windows --host=mingw32
$ make

** Fitting things together

create a Gnomemeeting directory, containing the following :
$ ls -R Gnomemeeting/
Gnomemeeting/:
etc
gnomemeeting.exe
gnomemeeting.schemas
iconv.dll
intl.dll
lib
libatk-1.0-0.dll
libgdk_pixbuf-2.0-0.dll
libgdk-win32-2.0-0.dll
libglib-2.0-0.dll
libgmodule-2.0-0.dll
libgobject-2.0-0.dll
libgthread-2.0-0.dll
libgtk-win32-2.0-0.dll
liblber.dll
libldap.dll
libldap_r.dll
libpango-1.0-0.dll
libpangowin32-1.0-0.dll
libxml2-2.dll

Gnomemeeting/etc:
gtk-2.0
pango

Gnomemeeting/etc/gtk-2.0:
gdk-pixbuf.loaders
gtk.immodules

Gnomemeeting/etc/pango:
pango.aliases
pango.modules

Gnomemeeting/lib:
gtk-2.0
pango

Gnomemeeting/lib/gtk-2.0:
2.4.0

Gnomemeeting/lib/gtk-2.0/2.4.0:
immodules
loaders

Gnomemeeting/lib/gtk-2.0/2.4.0/immodules:
im-am-et.dll
im-cedilla.dll
im-cyrillic-translit.dll
im-ime.dll
im-inuktitut.dll
im-ipa.dll
im-thai-broken.dll
im-ti-er.dll
im-ti-et.dll
im-viqr.dll

Gnomemeeting/lib/gtk-2.0/2.4.0/loaders:
libpixbufloader-ani.dll
libpixbufloader-bmp.dll
libpixbufloader-gif.dll
libpixbufloader-ico.dll
libpixbufloader-jpeg.dll
libpixbufloader-pcx.dll
libpixbufloader-png.dll
libpixbufloader-pnm.dll
libpixbufloader-ras.dll
libpixbufloader-tga.dll
libpixbufloader-tiff.dll
libpixbufloader-wbmp.dll
libpixbufloader-xbm.dll
libpixbufloader-xpm.dll

Gnomemeeting/lib/pango:
1.4.0

Gnomemeeting/lib/pango/1.4.0:
modules

Gnomemeeting/lib/pango/1.4.0/modules:
pango-arabic-fc.dll
pango-basic-fc.dll
pango-basic-win32.dll
pango-hangul-fc.dll
pango-hebrew-fc.dll
pango-indic-fc.dll
pango-khmer-fc.dll
pango-syriac-fc.dll
pango-thai-fc.dll
pango-tibetan-fc.dll

put everything in a .zip, ship it to a win32 box, unpack to obtain a brand-new
C:\Gnomemeeting\ (I insist on the location for now : this is where gnomemeeting
expects to find its schemas... I'll remove as many such assumptions as possible
later !)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]