2010-02-11 04:50:23 +01:00
|
|
|
##
|
2006-09-12 04:58:33 +02:00
|
|
|
## Instructions for building Tor with MinGW (http://www.mingw.org/)
|
|
|
|
##
|
2006-09-11 05:46:00 +02:00
|
|
|
|
|
|
|
Stage One: Download and Install MinGW.
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
Download mingw:
|
2010-02-11 04:50:23 +01:00
|
|
|
http://prdownloads.sf.net/mingw/MinGW-5.1.6.exe?download
|
2006-09-12 04:58:33 +02:00
|
|
|
|
|
|
|
Download msys:
|
2010-02-11 04:50:23 +01:00
|
|
|
http://prdownloads.sf.net/ming/MSYS-1.0.11.exe?download
|
2006-09-11 05:46:00 +02:00
|
|
|
|
2010-02-11 04:50:23 +01:00
|
|
|
Install MinGW and MSYS.
|
2006-09-11 05:46:00 +02:00
|
|
|
|
2010-02-11 04:50:23 +01:00
|
|
|
Open an MSYS window. Extract mingw-autoconf-2.5-2.64-1-mingw32-bin.tar.gz
|
2010-02-11 06:24:23 +01:00
|
|
|
to /c/MinGW/.
|
2007-03-18 14:47:08 +01:00
|
|
|
|
2010-02-11 04:50:23 +01:00
|
|
|
Make sure your PATH includes C:\MinGW\bin. You can verify this by right
|
|
|
|
clicking on "My Computer", choose "Properties", choose "Advanced",
|
2010-02-11 06:24:23 +01:00
|
|
|
choose "Environment Variables", select PATH.
|
2006-09-12 04:58:33 +02:00
|
|
|
|
2006-09-23 21:17:08 +02:00
|
|
|
Create a directory called "tor-mingw".
|
|
|
|
|
2006-09-12 04:58:33 +02:00
|
|
|
Stage Two: Download, extract, compile openssl
|
|
|
|
----------------------------------------------
|
|
|
|
|
|
|
|
Download openssl:
|
2010-02-11 04:50:23 +01:00
|
|
|
http://www.openssl.org/source/openssl-0.9.8l.tar.gz
|
2006-09-12 04:58:33 +02:00
|
|
|
|
|
|
|
Extract openssl:
|
2006-09-23 21:17:08 +02:00
|
|
|
Copy the openssl tarball into the "tor-mingw" directory.
|
|
|
|
Type "cd tor-mingw/"
|
2010-02-11 04:50:23 +01:00
|
|
|
Type "tar zxf openssl-0.9.8l.tar.gz"
|
2008-12-04 20:04:24 +01:00
|
|
|
(Note: There are many symlink errors because Windows doesn't support
|
|
|
|
symlinks. You can ignore these errors.)
|
2006-09-23 21:17:08 +02:00
|
|
|
|
|
|
|
Make openssl libraries:
|
2010-02-11 04:50:23 +01:00
|
|
|
Type "cd tor-mingw/openssl-0.9.8l/"
|
2007-08-19 05:51:46 +02:00
|
|
|
Type "./Configure -no-idea -no-rc5 -no-mdc2 mingw"
|
2006-09-23 21:17:08 +02:00
|
|
|
Edit Makefile and remove the "test:" and "tests:" sections.
|
|
|
|
Type "rm -rf ./test"
|
|
|
|
Type "cd crypto/"
|
|
|
|
Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
|
|
|
|
Type "cd ../ssl/"
|
2007-10-08 04:24:07 +02:00
|
|
|
Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
|
2006-09-23 21:17:08 +02:00
|
|
|
Type "cd .."
|
|
|
|
Type "cp *.h include/openssl/"
|
2009-01-30 00:21:37 +01:00
|
|
|
Type "cp fips/fips.h include/openssl/"
|
2006-09-23 21:17:08 +02:00
|
|
|
# The next steps can take up to 30 minutes to complete.
|
|
|
|
Type "make"
|
|
|
|
Type "make install"
|
2006-09-12 04:58:33 +02:00
|
|
|
|
2006-09-11 05:46:00 +02:00
|
|
|
|
2006-09-12 04:58:33 +02:00
|
|
|
Stage Three: Download, extract, compile zlib
|
|
|
|
---------------------------------------------
|
|
|
|
|
|
|
|
Download zlib source:
|
|
|
|
http://www.zlib.net/zlib-1.2.3.tar.gz
|
|
|
|
|
|
|
|
Extract zlib:
|
2006-09-23 21:17:08 +02:00
|
|
|
Copy the zlib tarball into the "tor-mingw" directory
|
|
|
|
Type "cd tor-mingw/"
|
|
|
|
Type "tar zxf zlib-1.2.3.tar.gz"
|
|
|
|
|
|
|
|
CHOICE:
|
|
|
|
|
|
|
|
Make zlib.a:
|
|
|
|
Type "cd tor-mingw/zlib-1.2.3/"
|
|
|
|
Type "./configure"
|
|
|
|
Type "make"
|
|
|
|
Type "make install"
|
|
|
|
|
2006-09-12 04:58:33 +02:00
|
|
|
Done.
|
|
|
|
|
|
|
|
|
2008-12-29 04:46:50 +01:00
|
|
|
Stage Four: Download, extract, and compile libevent
|
2006-09-11 05:46:00 +02:00
|
|
|
------------------------------------------------------
|
|
|
|
|
2008-12-29 04:46:50 +01:00
|
|
|
Download the latest libevent release:
|
2006-09-11 05:46:00 +02:00
|
|
|
http://www.monkey.org/~provos/libevent/
|
|
|
|
|
2006-09-23 21:17:08 +02:00
|
|
|
Copy the libevent tarball into the "tor-mingw" directory.
|
|
|
|
Type "cd tor-mingw"
|
2006-09-11 05:46:00 +02:00
|
|
|
|
2007-08-18 19:00:07 +02:00
|
|
|
Extract libevent.
|
2006-09-11 05:46:00 +02:00
|
|
|
|
2006-09-23 21:17:08 +02:00
|
|
|
Type "./configure --enable-static --disable-shared"
|
|
|
|
Type "make"
|
|
|
|
Type "make install"
|
2006-09-12 04:58:33 +02:00
|
|
|
|
|
|
|
Stage Five: Build Tor
|
|
|
|
----------------------
|
|
|
|
|
2008-12-29 04:46:50 +01:00
|
|
|
Download the current Tor alpha release source code from https://torproject.org/download.html.
|
2006-09-23 21:17:08 +02:00
|
|
|
Copy the Tor tarball into the "tor-mingw" directory.
|
|
|
|
Extract Tor:
|
|
|
|
Type "tar zxf latest-tor-alpha.tar.gz"
|
2006-09-12 04:58:33 +02:00
|
|
|
|
2006-09-23 21:17:08 +02:00
|
|
|
cd tor-<version>
|
2007-11-02 03:40:03 +01:00
|
|
|
Type "./configure"
|
2006-09-23 21:17:08 +02:00
|
|
|
Type "make"
|
2006-09-11 05:46:00 +02:00
|
|
|
|
2006-09-22 17:08:05 +02:00
|
|
|
You now have a tor.exe in src/or/. This is Tor.
|
2007-12-25 20:02:12 +01:00
|
|
|
You now have a tor-resolve.exe in src/tools/.
|
2007-03-18 14:47:08 +01:00
|
|
|
|
|
|
|
Stage Six: Build the installer
|
|
|
|
-------------------------------
|
|
|
|
|
|
|
|
Install the latest NSIS:
|
|
|
|
http://nsis.sourceforge.net/Download
|
|
|
|
|
|
|
|
Run the package script in contrib:
|
|
|
|
From the Tor build directory above, run:
|
|
|
|
"./contrib/package_nsis-mingw.sh"
|
|
|
|
|
|
|
|
The resulting Tor installer executable is in ./win_tmp/.
|
|
|
|
|