gabelmoo has a new IP address.
[tor/rransom.git] / doc / tor-win32-mingw-creation.txt
blobe3fcaeacb3acdde85787e64d098ce422188ccd8e
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"
37 Make openssl libraries:
38 Type "cd tor-mingw/openssl-0.9.8g/"
39 Type "./Configure -no-idea -no-rc5 -no-mdc2 mingw"
40 Edit Makefile and remove the "test:" and "tests:" sections.
41 Type "rm -rf ./test"
42 Type "cd crypto/"
43 Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
44 Type "cd ../ssl/"
45 Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
46 Type "cd .."
47 Type "cp *.h include/openssl/"
48 # The next steps can take up to 30 minutes to complete.
49 Type "make"
50 Type "make install"
52 Alternatively:
53 Download the pre-compiled openssl for win32.
54 Install and proceed.
57 Stage Three:  Download, extract, compile zlib
58 ---------------------------------------------
60 Download zlib source:
61 http://www.zlib.net/zlib-1.2.3.tar.gz
63 Extract zlib:
64 Copy the zlib tarball into the "tor-mingw" directory
65 Type "cd tor-mingw/"
66 Type "tar zxf zlib-1.2.3.tar.gz"
68 CHOICE:
70 Make zlib.a:
71 Type "cd tor-mingw/zlib-1.2.3/"
72 Type "./configure"
73 Type "make"
74 Type "make install"
76 OR 
78 Make zlib1.dll:
79 Type "cd tor-mingw/zlib-1.2.3/"
80 Type "./configure"
81 Type "make -f win32/Makefile.gcc"
83 Done.
86 Stage Four: Download, extract, and compile libevent-1.3e
87 ------------------------------------------------------
89 Download the libevent 1.3e release:
90 http://www.monkey.org/~provos/libevent/
92 Copy the libevent tarball into the "tor-mingw" directory.
93 Type "cd tor-mingw"
95 Extract libevent.
97 Type "./configure --enable-static --disable-shared"
98 Type "make"
99 Type "make install"
101 Stage Five:  Build Tor
102 ----------------------
104 Download the current Tor alpha release from https://www.torproject.org/download.html.
105 Copy the Tor tarball into the "tor-mingw" directory.
106 Extract Tor:
107 Type "tar zxf latest-tor-alpha.tar.gz"
109 cd tor-<version>
110 Type "./configure"
111 Type "make"
113 You now have a tor.exe in src/or/.  This is Tor.
114 You now have a tor-resolve.exe in src/tools/.
116 Stage Six:  Build the installer
117 -------------------------------
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/.