2 ## Instructions for building Tor with MinGW (http://www.mingw.org/)
5 Stage One: Download and Install MinGW.
6 ---------------------------------------
9 http://prdownloads.sf.net/mingw/MinGW-5.1.6.exe?download
12 http://prdownloads.sf.net/ming/MSYS-1.0.11.exe?download
15 http://sourceforge.net/projects/mingw/files/MSYS%20Supplementary%20Tools/msysDTK-1.0.1/msysDTK-1.0.1.exe/download
17 Install MinGW, msysDTK, and MSYS in that order.
19 Make sure your PATH includes C:\MinGW\bin. You can verify this by right
20 clicking on "My Computer", choose "Properties", choose "Advanced",
21 choose "Environment Variables", select PATH.
25 Create a directory called "tor-mingw".
27 Stage Two: Download, extract, compile openssl
28 ----------------------------------------------
31 http://www.openssl.org/source/openssl-0.9.8l.tar.gz
34 Copy the openssl tarball into the "tor-mingw" directory.
36 Type "tar zxf openssl-0.9.8l.tar.gz"
37 (Note: There are many symlink errors because Windows doesn't support
38 symlinks. You can ignore these errors.)
40 Make openssl libraries:
41 Type "cd tor-mingw/openssl-0.9.8l/"
42 Type "./Configure -no-idea -no-rc5 -no-mdc2 mingw"
43 Edit Makefile and remove the "test:" and "tests:" sections.
46 Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
48 Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
50 Type "cp *.h include/openssl/"
51 Type "find ./fips -type f -name "*.h" -exec cp {} include/openssl/ \;"
52 # The next steps can take up to 30 minutes to complete.
57 Stage Three: Download, extract, compile zlib
58 ---------------------------------------------
61 http://www.zlib.net/zlib-1.2.3.tar.gz
64 Copy the zlib tarball into the "tor-mingw" directory
66 Type "tar zxf zlib-1.2.3.tar.gz"
71 Type "cd tor-mingw/zlib-1.2.3/"
79 Stage Four: Download, extract, and compile libevent
80 ------------------------------------------------------
82 Download the latest libevent release:
83 http://www.monkey.org/~provos/libevent/
85 Copy the libevent tarball into the "tor-mingw" directory.
90 Type "./configure --enable-static --disable-shared"
95 ----------------------
97 Download the current Tor alpha release source code from https://torproject.org/download.html.
98 Copy the Tor tarball into the "tor-mingw" directory.
100 Type "tar zxf latest-tor-alpha.tar.gz"
106 You now have a tor.exe in src/or/. This is Tor.
107 You now have a tor-resolve.exe in src/tools/.
109 Stage Six: Build the installer
110 -------------------------------
112 Install the latest NSIS:
113 http://nsis.sourceforge.net/Download
115 Run the package script in contrib:
116 From the Tor build directory above, run:
117 "./contrib/package_nsis-mingw.sh"
119 The resulting Tor installer executable is in ./win_tmp/.