tor/doc/tor-win32-mingw-creation.txt

119 lines
3.0 KiB
Plaintext
Raw Normal View History

##
## Instructions for building Tor with MinGW (http://www.mingw.org/)
##
Stage One: Download and Install MinGW.
---------------------------------------
Download mingw:
http://prdownloads.sf.net/mingw/MinGW-5.1.6.exe?download
Download msys:
http://prdownloads.sf.net/ming/MSYS-1.0.11.exe?download
Install MinGW and MSYS.
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/.
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.
Create a directory called "tor-mingw".
Stage Two: Download, extract, compile openssl
----------------------------------------------
Download openssl:
http://www.openssl.org/source/openssl-0.9.8l.tar.gz
Extract openssl:
Copy the openssl tarball into the "tor-mingw" directory.
Type "cd tor-mingw/"
Type "tar zxf openssl-0.9.8l.tar.gz"
(Note: There are many symlink errors because Windows doesn't support
symlinks. You can ignore these errors.)
Make openssl libraries:
Type "cd tor-mingw/openssl-0.9.8l/"
Type "./Configure -no-idea -no-rc5 -no-mdc2 mingw"
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/"
Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
Type "cd .."
Type "cp *.h include/openssl/"
Type "cp fips/fips.h include/openssl/"
# The next steps can take up to 30 minutes to complete.
Type "make"
Type "make install"
Stage Three: Download, extract, compile zlib
---------------------------------------------
Download zlib source:
http://www.zlib.net/zlib-1.2.3.tar.gz
Extract zlib:
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"
Done.
Stage Four: Download, extract, and compile libevent
------------------------------------------------------
Download the latest libevent release:
http://www.monkey.org/~provos/libevent/
Copy the libevent tarball into the "tor-mingw" directory.
Type "cd tor-mingw"
Extract libevent.
Type "./configure --enable-static --disable-shared"
Type "make"
Type "make install"
Stage Five: Build Tor
----------------------
Download the current Tor alpha release source code from https://torproject.org/download.html.
Copy the Tor tarball into the "tor-mingw" directory.
Extract Tor:
Type "tar zxf latest-tor-alpha.tar.gz"
cd tor-<version>
Type "./configure"
Type "make"
You now have a tor.exe in src/or/. This is Tor.
You now have a tor-resolve.exe in src/tools/.
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/.