1 ## Instructions for building Tor with MinGW (http://www.mingw.org/)
4 Stage One: Download and Install MinGW.
5 ---------------------------------------
8 http://prdownloads.sf.net/mingw/MinGW-5.1.4.exe?download
11 http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe?download
13 Download the mingw developer tool kit:
14 http://prdownloads.sf.net/mingw/msysDTK-1.0.1.exe?download
16 Download the mingw autoconf-2.59 update:
17 http://prdownloads.sf.net/mingw/msys-autoconf-2.59.tar.bz2?download
19 Install mingw, msys and mingw-dtk. Extract msys-autoconf-2.59.tar.bz2 into
20 your mingw install location. For example, if you installed mingw into
21 /c/mingw/1.0/ you want to extract msys-autoconf-2.59.tar.bz2 into this
24 Create a directory called "tor-mingw".
26 Stage Two: Download, extract, compile openssl
27 ----------------------------------------------
30 http://www.openssl.org/source/openssl-0.9.8k.tar.gz
33 Copy the openssl tarball into the "tor-mingw" directory.
35 Type "tar zxf openssl-0.9.8k.tar.gz"
36 (Note: There are many symlink errors because Windows doesn't support
37 symlinks. You can ignore these errors.)
39 Make openssl libraries:
40 Type "cd tor-mingw/openssl-0.9.8k/"
41 Type "./Configure -no-idea -no-rc5 -no-mdc2 mingw"
42 Edit Makefile and remove the "test:" and "tests:" sections.
45 Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
47 Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
49 Type "cp *.h include/openssl/"
50 Type "cp fips/fips.h include/openssl/"
51 # The next steps can take up to 30 minutes to complete.
56 Download the pre-compiled openssl for win32 from
57 http://gnuwin32.sourceforge.net/packages/openssl.htm
61 Stage Three: Download, extract, compile zlib
62 ---------------------------------------------
65 http://www.zlib.net/zlib-1.2.3.tar.gz
68 Copy the zlib tarball into the "tor-mingw" directory
70 Type "tar zxf zlib-1.2.3.tar.gz"
75 Type "cd tor-mingw/zlib-1.2.3/"
83 Type "cd tor-mingw/zlib-1.2.3/"
85 Type "make -f win32/Makefile.gcc"
90 Stage Four: Download, extract, and compile libevent
91 ------------------------------------------------------
93 Download the latest libevent release:
94 http://www.monkey.org/~provos/libevent/
96 Copy the libevent tarball into the "tor-mingw" directory.
101 Type "./configure --enable-static --disable-shared"
105 Stage Five: Build Tor
106 ----------------------
108 Download the current Tor alpha release source code from https://torproject.org/download.html.
109 Copy the Tor tarball into the "tor-mingw" directory.
111 Type "tar zxf latest-tor-alpha.tar.gz"
117 You now have a tor.exe in src/or/. This is Tor.
118 You now have a tor-resolve.exe in src/tools/.
120 Stage Six: Build the installer
121 -------------------------------
123 Install the latest NSIS:
124 http://nsis.sourceforge.net/Download
126 Run the package script in contrib:
127 From the Tor build directory above, run:
128 "./contrib/package_nsis-mingw.sh"
130 The resulting Tor installer executable is in ./win_tmp/.