Setting up the APAF build System on Windows

This tutorial winn guide you through the installation of the apaf and its dependencies in a Windows environment.

Warning

This tutorial has been tested only on Windows XP sp3 and Windows 7.

Note

This tutorial will start assuming you are on a clean environment. If you have already installed Python, you may consider start reading further.

Install GnuPG

Install GnuPG as a tool to to verify the various software download:

http://files.gpg4win.org/Beta/gpg4win-2.1.1-34299-beta.exe

Install Python

Download Python 2.7 from http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi

Verify signature of application: http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi.asc

Install the software following the wizard.

Install Pip

cd C:Python27Scripts C:Python27Scripts> easy_install.exe pip

Install psutil

Required for txtorconn

Download from http://psutil.googlecode.com/files/psutil-0.4.1.win32-py2.7.exe

Install Zope.interface

Warning

Installing zope.interface with pip may lead to ImportError in building the APAF with py2exe.

Note

Tests on windows 7 show that, since easy_install behaves differently from pip.exe, using one instead of another during the setup of the environment may lead to problems afterwards when building the executable.

Install zope.interface using setuptools: ::
C:Python27Scripts> easy_install.exe zope.interface

Install Six

cd C:Python27Scripts C:Python27Scripts> pip.exe install six

Install pygeoip

cd C:Python27Scripts C:Python27Scripts> pip.exe install pygeoip

Install ipaddr

cd C:Python27Scripts C:Python27Scripts> pip.exe install ipaddr

Install pyYAML

cd C:Python27Scripts C:Python27Scripts> pip.exe install pyYAML

Install Git

Since github lets you download a simple .zip of the latest revision of your application, git is not indispensable. But certainly it will be comfortable to stay up to date with the software development

http://git-scm.com/download/win

Then open a new Git shell from Start>Git>Git Bash.

Install Txtorcon

Txtorcon is not avaible on the Python Package Index, so you need to install it manually with git.

Then install with pip: ::
cd C:Python27Scripts C:Python27Scripts> pip.exe install C:pathoftxtorcon

Install Apaf

Download Apaf from Github:

Install 7zip

Download http://downloads.sourceforge.net/sevenzip/7z920.exe and install following the wizard.

It will place 7z.exe in “c:Program Files7-Zip7z.exe”

Extract Tor binary

Download the latest version of Tor binaries for Windows.

Go to download page https://www.torproject.org/download/download.html.en and download “Expert Bundle”: https://www.torproject.org/dist/win32/tor-0.2.2.35-win32-1.exe

Now decompress the tor binary with 7zip and move it to contrib/ directory of APAF:

c:Program Files7-Zip7z.exe x tor-0.2.2.35-win32-1.exe tor.exe move tor.exe PATH_WHERE_IS_BUILD_ENVIRONMENT/contrib

Build Apaf Application

Here you are ready to use the apaf. To build the single .exe file, run

C:\path\of\user\APAF> C:\Python27\python.exe setup.py py2exe