--- /dev/null
+Building Tor with MSVC.\r
+=======================\r
+\r
+NOTE: This is not the preferred method for building Tor on windows: we use\r
+mingw for our packages.\r
+\r
+Last updated 9 September 2014.\r
+\r
+\r
+Requirements:\r
+-------------\r
+\r
+ * Visual Studio 2010\r
+ http://go.microsoft.com/fwlink/?LinkId=323467\r
+ * CMake 2.8.12.2\r
+ http://www.cmake.org/download/\r
+ * Perl 5.16\r
+ http://www.activestate.com/activeperl/downloads\r
+ * Latest stable OpenSSL tarball\r
+ https://www.openssl.org/source/\r
+ * Zlib 1.2.8 tarball\r
+ http://zlib.net/\r
+ * Libevent 2.1 tarball\r
+ https://github.com/libevent/libevent/releases\r
+\r
+Make sure you check signatures on all these packages!\r
+\r
+Steps:\r
+------\r
+\r
+Building OpenSSL from source as a shared library:\r
+\r
+ cd <openssl source dir>\r
+ perl Configure VC-WIN32\r
+ perl util\mkfiles.pl >MINFO\r
+ perl util\mk1mf.pl no-asm dll VC-WIN32 >32dll.mak\r
+ perl util\mkdef.pl 32 libeay > ms\libeay32.def\r
+ perl util\mkdef.pl 32 ssleay > ms\ssleay32.def\r
+ nmake -f 32dll.mak\r
+\r
+Making OpenSSL final package:\r
+\r
+ Create <openssl final package dir>, I'd recommend using a name like <openssl source dir>-vc10.\r
+\r
+ Copy the following directories and files to their respective locations\r
+ <openssl source dir>\inc32\openssl => <openssl final package dir>\include\openssl\r
+ <openssl source dir>\out32dll\libeay32.lib => <openssl final package dir>\lib\libeay32.lib\r
+ <openssl source dir>\out32dll\ssleay32.lib => <openssl final package dir>\lib\ssleay32.lib\r
+ <openssl source dir>\out32dll\libeay32.dll => <openssl final package dir>\bin\libeay32.dll\r
+ <openssl source dir>\out32dll\openssl.exe => <openssl final package dir>\bin\openssl.exe\r
+ <openssl source dir>\out32dll\ssleay32.dll => <openssl final package dir>\bin\ssleay32.dll\r
+\r
+Building Zlib from source:\r
+\r
+ cd <zlib source dir>\r
+ nmake -f win32/Makefile.msc\r
+\r
+Building libevent:\r
+\r
+ cd <libevent source dir>\r
+ mkdir build && cd build\r
+ SET OPENSSL_ROOT_DIR=<openssl final package dir>\r
+ cmake -G "NMake Makefiles" .. -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="/MT /Zi /O2 /Ob1 /D NDEBUG" -DZLIB_LIBRARY:FILEPATH="<zlib source dir>\zdll.lib" -DZLIB_INCLUDE_DIR:PATH="<zlib source dir>"\r
+ nmake event\r
+\r
+Building Tor:\r
+\r
+ Create a dir above tor source dir named build-alpha and two subdirs include and lib.\r
+\r
+ Your build tree should now be similar to this one:\r
+ * build-alpha\r
+ - include\r
+ - lib\r
+ * <libevent source dir>\r
+ - build\r
+ - cmake\r
+ - ...\r
+ * <openssl source dir>\r
+ - ...\r
+ - ms\r
+ - util\r
+ - ...\r
+ * <openssl final package dir>\r
+ - bin\r
+ - include\r
+ - lib\r
+ * <tor source dir>\r
+ - ...\r
+ - src\r
+ - ...\r
+ * <zlib source dir>\r
+ - ...\r
+ - win32\r
+ - ...\r
+\r
+ Copy the following dirs and files to the following locations:\r
+ <openssl final package dir>\include\openssl => build-alpha\include\openssl\r
+ <libevent source dir>\include => build-alpha\include\r
+ <libevent source dir>\WIN32-Code\nmake\event2 => build-alpha\include\event2\r
+ <zlib source dir>\z*.h => build-alpha\include\z*.h\r
+\r
+ Now copy the following files to the followin locations:\r
+\r
+ <libevent source dir>\build\lib\event.lib => build-alpha\lib\libevent.lib\r
+ <openssl final package dir>\lib\libeay32.lib => build-alpha\lib\libcrypto.lib\r
+ <openssl final package dir>\lib\ssleay32.lib => build-alpha\lib\libssl.lib\r
+ <zlib source dir>\zdll.lib => build-alpha\lib\libz.lib\r
+\r
+ And we are now ready for the build process:\r
+\r
+ cd <tor source dir>\r
+ nmake -f Makefile.nmake\r
+\r
+ After the above process is completed there should be a tor.exe in <tor source dir>\src\or\r
+\r
+ Copy tor.exe to desired location and also copy zlib1.dll, libeay32.dll and ssleay32.dll from built zlib and openssl packages\r