intertwingle the 0.1.1.x and 0.1.2.x changelog entries
[tor.git] / doc / tor-win32-mingw-creation.txt
blob6e9916a8512cb01a5632c23df01f81fb68ba4ea8
1 ## Instructions for building Tor with MinGW (http://www.mingw.org/)
2 ##
4 Stage One:  Download and Install MinGW.
5 ---------------------------------------
7 Download mingw:
8 http://prdownloads.sf.net/mingw/MinGW-5.0.3.exe?download
10 Download msys:
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 ----------------------------------------------
23 Download openssl:
24 http://www.openssl.org/source/openssl-0.9.8d.tar.gz
26 Extract openssl:
27 Copy the openssl tarball into the "tor-mingw" directory.
28 Type "cd tor-mingw/"
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.
35 Type "rm -rf ./test"
36 Type "cd crypto/"
37 Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
38 Type "cd ../ssl/"
39 Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;
40 Type "cd .."
41 Type "cp *.h include/openssl/"
42 # The next steps can take up to 30 minutes to complete.
43 Type "make"
44 Type "make install"
46 Alternatively:
47 Download the pre-compiled openssl for win32.
48 Install and proceed.
51 Stage Three:  Download, extract, compile zlib
52 ---------------------------------------------
54 Download zlib source:
55 http://www.zlib.net/zlib-1.2.3.tar.gz
57 Extract zlib:
58 Copy the zlib tarball into the "tor-mingw" directory
59 Type "cd tor-mingw/"
60 Type "tar zxf zlib-1.2.3.tar.gz"
62 CHOICE:
64 Make zlib.a:
65 Type "cd tor-mingw/zlib-1.2.3/"
66 Type "./configure"
67 Type "make"
68 Type "make install"
70 OR 
72 Make zlib1.dll:
73 Type "cd tor-mingw/zlib-1.2.3/"
74 Type "./configure"
75 Type "make -f win32/Makefile.gcc"
77 Done.
80 Stage Four: Download, extract, and patch libevent-1.1b.
81 ------------------------------------------------------
83 Download libevent-1.1b:
84 http://www.monkey.org/~provos/libevent/
86 Copy the libevent tarball into the "tor-mingw" directory.
87 Type "cd tor-mingw"
89 Extract libevent: 
90 Type "tar zxf libevent-1.1b.tar.gz"
92 Download the libevent-1.1b-mingw.diff from 
93 http://cvs.seul.org/viewcvs/viewcvs.cgi/tor/trunk/Win32Build/mingw/libevent-1.1b-mingw.diff?rev=8456&root=tor&view=log
94 Copy the libevent-1.1b diff into the libevent-1.1b directory.
95 Type "patch -p0 < libevent-1.1b-mingw.diff"
97 Type "aclocal && autoheader && automake && autoconf".
98 There may be WARNING messages.  There will be no output if all runs successfuly.
100 Type "./configure --enable-static --disable-shared"
101 Type "make"
102 Type "make install"
104 Stage Five:  Build Tor
105 ----------------------
107 Download the current Tor alpha release from http://tor.eff.org/download.html.
108 Copy the Tor tarball into the "tor-mingw" directory.
109 Extract Tor:
110 Type "tar zxf latest-tor-alpha.tar.gz"
112 cd tor-<version>
113 Type "./configure --enable-static --disable-shared"
114 Type "make"
116 You now have a tor.exe in src/or/.  This is Tor.
117 You now have a tor_resolve.exe in src/tools/.