This document explains building giFT using Microsoft Visual Studio 6.0.
Table of Contents
A small notice to begin with. The windows port may not always be up to date with the rest of giFT and hence you are on your own when building giFT on windows. Do not ask for support or even binaries of giFT on windows!
It is also important that you do not make windows binaries of giFT available. giFT/OpenFT is currently in a state which would make it crumble under the influx of the large number of users which a binary release for windows would most likely cause. If we think that giFT/OpenFT can handle a sufficient number of users we will make binaries for windows available.
This guide describes how to build giFT on the command line. The Visual Studio IDE is not maintained and most likely won't work.
You should create an empty directory in which the build environment will be set up. This directory will be referred to as "/" within this document.
It is assumed that you are going to make a debug build. To turn debugging off (not recommended) added RELEASE=1 to all nmake invocations.
Before you can build giFT at the command line, make sure you have the following environmental variables defined:
PATH=C:\Program Files\Microsoft Visual Studio\VC98\Bin:%PATH%
LIB=C:\Program Files\Microsoft Visual Studio\VC98\Lib:%LIB% INCLUDE=C:\Program Files\Microsoft Visual Studio\VC98\Include:%INCLUDE%
First you will need to download the latest giFT tarball from http://gift.sourceforge.net/download.php. Or optionally get it from cvs.
Extract giFT to /giFT and proceed with installing the third party libraries.
There are a few third party libraries which you will need to build giFT
Zlib is used in several places by giFT, OpenFT and Gnutella.
Get http://prdownloads.sourceforge.net/libpng/zlib114.zip and extract it to /zlib. Copy /giFT/win32/zlib.mak to /zlib and run:
> cd /zlib > nmake /f zlib.mak
OpenFT uses libdb for efficient data storage and access. If you want to function as a SEARCH node (a node that handles searches for other nodes) you'll need libdb. This document assumes you are using version 4.1.x.
Get http://www.sleepycat.com/update/snapshot/db-4.1.25.zip and extract it to /libdb. Follow the instructions in /libdb/docs/ref/build_win/intro.html to build both the Release and Debug DLL.
Meta data from Ogg Vorbis files is extracted using libvorbis.
Get http://www.vorbis.com/files/1.0/windows/OggVorbis-win32sdk-1.0.zip and extract it to /vorbis. No further steps are required.
libxml2 is used by Gnutella for meta data support. You can skip his step if you don't want to compile Gnutella with meta data support. This is not recommended however.
Get ftp://xmlsoft.org/libxml2-2.6.4.tar.gz and extract it to /libxml2. The libxml2 configure script is written in JScript so make sure this works on your box (it should by default on all newer versions of windows). Go to /libxml2/win32 and run:
> cscript configure.js ftp=no http=no html=no catalog=no docb=no iconv=no valid=no xml_debug=no reader=no writer=no walker=no pattern=no compiler=msvc static=no schemas=no "cruntime=/MDd" > nmake /f Makefile.msvc
Change to the giFT dir and build giFT using the following commands:
> cd /giFT > nmake /f Makefile.msvc ZLIB=1 VORBIS=1 LIBDB=1 win32-dist
In order for giFT to do anything usefull you will need one or more network plugins which giFT uses to connect to different filesharing networks.
OpenFT is the primary network used with giFT
Download the latest OpenFT tarball from http://gift.sourceforge.net/download.php. Or optionally get it from cvs.
Extract OpenFT to /OpenFT and run
> cd /OpenFT > nmake /f Makefile.msvc ZLIB=1 LIBDB=1 win32-dist
The Gnutella plugin allows giFT to participate in the gnutella network.
Download the latest Gnutella tarball from http://gift.sourceforge.net/download.php. Or optionally get it from cvs.
Extract Gnutella to /Gnutella and run
> cd /Gnutella > nmake /f Makefile.msvc ZLIB=1 LIBXML2=1 win32-dist
giFT-FastTrack is a plugin for connecting to the FastTrack network (Kazaa, imesh, etc.).
Download the latest giFT-FastTrack tarball from http://developer.berlios.de/projects/gift-fasttrack. Or optionally get it from cvs.
Extract giFT-FastTrack to /FastTrack and run
> cd /FastTrack > nmake /f Makefile.msvc win32-dist
This step will build a self extracting installer for giFT using the files in /win32-dist. If you do not build the installer you will have to set up a suitable environment for giFT to run in yourself.
Get Nullsoft's Scriptable Install System from http://nsis.sourceforge.net and install it on your system.
Execute the following commands to build the installer:
> cd /win32-dist > perl nsisprep.pl > MakeNSIS.exe gift.nsi
Use the resulting package giFT-x.x.x.exe to install giFT on your machine.
giFT keeps a logfile giftd.log which contains information about both giFT and OpenFT (and any other plugins). This file is created on startup, so don't restart giFT immediately when it crashes, but check the log and report the problem.
If you want to learn about the interface protocol (that clients use to connect to giFT) read the Interface Protocol documentation. Please check other client projects first before starting your own.
See the contact page for more information about the preferable ways to ask for help and/or contact us.