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.0.3.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 Install mingw, msys and mingw-dtk.
18 Create a directory called "tor-mingw".
20 Stage Two: Download, extract, compile openssl
21 ----------------------------------------------
24 http://www.openssl.org/source/openssl-0.9.8d.tar.gz
27 Copy the openssl tarball into the "tor-mingw" directory.
29 Type "tar zxf openssl-0.9.8d.tar.gz"
31 Make openssl libraries:
32 Type "cd tor-mingw/openssl-0.9.8d/"
33 Type "./Configure mingw"
34 Edit Makefile and remove the "test:" and "tests:" sections.
37 Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
39 Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;
41 Type "cp *.h include/openssl/"
42 # The next steps can take up to 30 minutes to complete.
47 Download the pre-compiled openssl for win32.
51 Stage Three: Download, extract, compile zlib
52 ---------------------------------------------
55 http://www.zlib.net/zlib-1.2.3.tar.gz
58 Copy the zlib tarball into the "tor-mingw" directory
60 Type "tar zxf zlib-1.2.3.tar.gz"
65 Type "cd tor-mingw/zlib-1.2.3/"
73 Type "cd tor-mingw/zlib-1.2.3/"
75 Type "make -f win32/Makefile.gcc"
80 Stage Four: Download, extract, and patch libevent-1.1b.
81 ------------------------------------------------------
83 Download libevent-1.3b:
84 http://www.monkey.org/~provos/libevent/
86 Copy the libevent tarball into the "tor-mingw" directory.
90 Type "tar zxf libevent-1.3b.tar.gz"
92 Type "./configure --enable-static --disable-shared"
93 --------------------libevent 1.3b only---------------------------------------
94 You need to manually edit the Makefile and remove all references to "sample".
95 libevent 1.3b won't compile in mingw currently due to issues in event_test.c.
96 Removing the "sample" directory and all references to it in Makefile create a
97 completely valid libevent library.
98 -----------------------------------------------------------------------------
102 Stage Five: Build Tor
103 ----------------------
105 Download the current Tor alpha release from http://tor.eff.org/download.html.
106 Copy the Tor tarball into the "tor-mingw" directory.
108 Type "tar zxf latest-tor-alpha.tar.gz"
111 Type "./configure --enable-static --disable-shared"
114 You now have a tor.exe in src/or/. This is Tor.
115 You now have a tor_resolve.exe in src/tools/.
117 Stage Six: Build installer
118 ---------------------------
119 Install the latest NSIS:
120 http://nsis.sourceforge.net/Download
122 Run the package script in contrib:
123 From the Tor build directory above, run:
124 "./contrib/package_nsis-mingw.sh"
126 The resulting Tor installer executable is in ./win_tmp/.