As I stated earlier in gupnp on win32 I’m currently porting the gupnp stack to windows. At first I tried an approach of developing on Linux, running autogen there and copying the whole tree to a Windows share, run ./configure and make there an see what breaks (or works)
After a while this gets quite annoying, so I tried to setup a complete build environment on Windows; you need:
Basic tools
- You’ll need an editor, of course
Basic win32 build environment
- mingw
- msys
- msysDTK
Install mingw, msys and msysDTK as advised on the mingw homepage. For mingw choose the Proposed version.
Additional updates
- bash (http://sourceforge.net/project/downloading.php?group_id=2435&filename=bash-3.1-MSYS-1.0.11-1.tar.bz2&a=23696311)
- gawk (http://sourceforge.net/project/downloading.php?group_id=2435&filename=gawk-3.1.5-MSYS-1.0.11-1.tar.bz2&a=71570014)
- an updated autoconf (from http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=67879; use version 2.61. Also make sure you do not update automake; this did no work for me)
- an updated m4 (http://downloads.sourceforge.net/mingw/m4-1.4.7-MSYS.tar.bz2)
- libtool (http://sourceforge.net/project/downloading.php?group_id=2435&filename=libtool1.5-1.5.25a-1-bin.tar.bz2&a=8701769)
Gtk/Gnome libs and build dependencies
Extract this anywhere you like, just make sure you can access it from your mingw environment (/opt/gtk e.g.). Navigate to /opt/gtk/share/icons, copy the gnome directory to higcolor. Change the theme name in file highcolor/index.theme to highcolor. Otherwise the gupnp-tools (mainly the two control points) will not work.
Chain up everything
- I decided to put all gupnp stuff in another directory (
/opt/gupnp) - Move the old libtool.m4 and ltdl.m4 out of the way (
/share/aclocal) - create
/share/aclocal/dirlistand add/usr/local/aclocalas well as/opt/gtk/share/aclocalthere - For libtool to work properly you need a file command. There’s no need for a full-blown implementation. The fake file available at http://trac.nexusformat.org/code/browser/trunk/file.MinGW is sufficient.
- Create a
.profilefile containing the following lines:export PKG_CONFIG_PATH=/opt/gtk/lib/pkgconfig:/opt/gupnp/lib/pkgconfig:$PKG_CONFIG_PATH export LD_LIBRARY_PATH=/opt/gtk/lib:/opt/gupnp/lib:$LD_LIBRARY_PATH export PATH=/opt/gtk/bin:/opt/gupnp/bin:$PATH
Additional dependencies
- libxml2: There is an official win32 build of this available at http://www.zlatkovic.com/libxml.en.html. Unfortunatly it is missing the import libraries and pkg-config file for usw with mingw. Follow the instructions on http://www.go-evolution.org/Building_Evolution_on_Windows#libxml2 to create those. pexports is available here: http://www.emmestech.com/software/pexports-0.43/download_pexports.html
- iconv: Download iconv from here: http://www.gtk.org/download-windows.html. I chose win_iconv.
- gnome-icon-theme: download both packages from here: http://ftp.gnome.org/pub/GNOME/binaries/win32/gnome-icon-theme/2.24/. Extract them to
/opt/gtk. Navigate to/opt/gtk/share/iconsand copygnometohighcolor. In thehighcolordirectory change index.theme in section[Icon Theme]the keyNametohighcolor. You can remove all the other translations if you like. This is necessary for the gupnp control points to run later
Building the GUPnP stack
GUPnP for windows currently only exists as git branches on github. There is no release and no ready-to-build tarball. So you will need Git for windows. I’m using msysgit (http://code.google.com/p/msysgit/).
For the steps now follwowing make sure you’re not in a directory containing spaces. There seems to be a (minor) problem with autoconf if you do. So let’s get started. First package is easy:
- libsoup: Download latest release from here: http://ftp.gnome.org/pub/GNOME/sources/libsoup/2.26/libsoup-2.26.1.tar.bz2. Just run ./configure –prefix /opt/gupnp. Before calling make you unfortunately need to modify the generated Makefiles. They include the option -Wmissing-include-dirs which the gcc used by mingw does not understand. After you removed them, just go ahead and call make && make install
- gssdp: use git to get a copy from github:
git clone git://github.com/phako/gssdp-win32.git
autogen.sh --prefix=/opt/gupnp && make && make install - gupnp:
git clone git://github.com/phako/gupnp-win32.git
autogen.sh --prefix=/opt/gupnp && make && make install - gupnp-av:
git clone git://github.com/phako/gupnp-av.git
autogen.sh --prefix=/opt/gupnp && make && make install - gupnp-tools:
git clone git://githup.com/phako/gupnp-tools.git
autogen.sh --prefix=/opt/gupnp && make && make install
Using VS 2005/2008
I’m currently in the progress of defining solutions, projects and property pages for the GUPnP stack to be able to compile it (and even more important debug it) from within Visual Studio. A tiny preview of that can be seen here.