Oops; remove extraneous comma.
[tor/rransom.git] / doc / tor-win32-mingw-creation.txt
blobc56b105417463543be22ced15ce397639d5d738f
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.1.4.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 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
22 directory.
24 Create a directory called "tor-mingw".
26 Stage Two:  Download, extract, compile openssl
27 ----------------------------------------------
29 Download openssl:
30 http://www.openssl.org/source/openssl-0.9.8g.tar.gz
32 Extract openssl:
33 Copy the openssl tarball into the "tor-mingw" directory.
34 Type "cd tor-mingw/"
35 Type "tar zxf openssl-0.9.8g.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.8g/"
41 Type "./Configure -no-idea -no-rc5 -no-mdc2 mingw"
42 Edit Makefile and remove the "test:" and "tests:" sections.
43 Type "rm -rf ./test"
44 Type "cd crypto/"
45 Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
46 Type "cd ../ssl/"
47 Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
48 Type "cd .."
49 Type "cp *.h include/openssl/"
50 # The next steps can take up to 30 minutes to complete.
51 Type "make"
52 Type "make install"
54 Alternatively:
55 Download the pre-compiled openssl for win32.
56 Install and proceed.
59 Stage Three:  Download, extract, compile zlib
60 ---------------------------------------------
62 Download zlib source:
63 http://www.zlib.net/zlib-1.2.3.tar.gz
65 Extract zlib:
66 Copy the zlib tarball into the "tor-mingw" directory
67 Type "cd tor-mingw/"
68 Type "tar zxf zlib-1.2.3.tar.gz"
70 CHOICE:
72 Make zlib.a:
73 Type "cd tor-mingw/zlib-1.2.3/"
74 Type "./configure"
75 Type "make"
76 Type "make install"
78 OR 
80 Make zlib1.dll:
81 Type "cd tor-mingw/zlib-1.2.3/"
82 Type "./configure"
83 Type "make -f win32/Makefile.gcc"
85 Done.
88 Stage Four: Download, extract, and compile libevent-1.3e
89 ------------------------------------------------------
91 Download the libevent 1.4.7-stable release:
92 http://www.monkey.org/~provos/libevent/
94 Copy the libevent tarball into the "tor-mingw" directory.
95 Type "cd tor-mingw"
97 Extract libevent.
99 Type "./configure --enable-static --disable-shared"
100 Type "make"
101 Type "make install"
103 Stage Five:  Build Tor
104 ----------------------
106 Download the current Tor alpha release from https://www.torproject.org/download.html.
107 Copy the Tor tarball into the "tor-mingw" directory.
108 Extract Tor:
109 Type "tar zxf latest-tor-alpha.tar.gz"
111 cd tor-<version>
112 Type "./configure"
113 Type "make"
115 You now have a tor.exe in src/or/.  This is Tor.
116 You now have a tor-resolve.exe in src/tools/.
118 Stage Six:  Build the installer
119 -------------------------------
121 Install the latest NSIS:
122 http://nsis.sourceforge.net/Download
124 Run the package script in contrib:
125 From the Tor build directory above, run:
126 "./contrib/package_nsis-mingw.sh"
128 The resulting Tor installer executable is in ./win_tmp/.