Prerequisites

  1. Microsoft Build Tools (https://visualstudio.microsoft.com/downloads/)
  2. Git for Windows (https://git-scm.com/download/win)
  3. CMake 2.8 or newer (http://www.cmake.org/cmake/resources/software.html)
  4. Python 2.x for Swiften build scripts (scons) (http://www.python.org)

Libraries

  1. Swiften library (http://swift.im/git/swift)
  2. Boost 1.48 or newer (http://boost.org/)
  3. Google ProtoBuf library (https://developers.google.com/protocol-buffers/)

Environment

To create spectrum build environment do:

  1. Create directory where we’ll install all dependencies, e.g. C:\env-msvc-x64. Create C:\env-msvc-x64\bin and add it to %PATH%. Assuming you have git, python and cmake in %PATH%, launch “Visual Studio 2010 command prompt” or “Visual Studio 2010(x64) command prompt”, depends on your target (Windows x86 or Windows x86_64).
  2. unpack and build boost libraries:

    bootstrap.bat b2.exe –without-mpi –without-python threading=multi variant=release link=shared runtime-link=shared address-model=64 –layout=system b2.exe –without-mpi –without-python threading=multi variant=release link=shared runtime-link=shared address-model=64 –layout=system install –prefix=C:\env-msvc-x64

  3. clone swift repository and build it. Don’t forget to point it to our env directory:

    git clone git://swift.im/swift cd swift echo boost_includedir=”c:/env-msvc-x64/include” > config.py echo boost_libdir=”c:/env-msvc-x64/lib” » config.py scons.bat Swiften debug=no optimize=yes SWIFTEN_INSTALLDIR=C:\env-msvc-x64 force_configure=1 scons.bat Swiften debug=no optimize=yes SWIFTEN_INSTALLDIR=C:\env-msvc-x64 C:\env-msvc-x64

  4. unpack and compile protobuf as described in its documentation.

Run extract_includes.bat in vsprojects/ directory and move resulting vsprojects/include/google/ directory to our C:\env-msvc-x64\include

Move protoc.exe to C:\env-msvc-x64\bin\ and libprotobuf.lib to C:\env-msvc-x64\lib

  1. Install gtkmm

Download installer from https://live.gnome.org/gtkmm/MSWindows and install gtkmm into C:\env-msvc-x64\

  1. Install libpurple headers

Download http://www.pidgin.im/download/source/ , extract it and copy libpurple directory in C:\env-msvc-x64\include

  1. You’re ready! :) Clone libtransport into C:\env-msvc-x64\libtransport (You must clone it into this directory, because libtransport will try to find the dependencies in ../lib and ../include)

Compile it as:

set CMAKE_INCLUDE_PATH=C:\env-msvc-x64\include
cmake . -G "NMake Makefiles" -DBOOST_INCLUDEDIR=../include/boost-1_49 -DBOOST_LIBRARYDIR=../lib -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=C:\env-msvc-x64 -DGIT_EXECUTABLE="c:\Program Files (x86)\git\bin\git.exe"
nmake