tor-win32-mingw-creation.txt 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. ## Instructions for building Tor with MinGW (http://www.mingw.org/)
  2. ##
  3. Stage One: Download and Install MinGW.
  4. ---------------------------------------
  5. Download mingw:
  6. http://prdownloads.sf.net/mingw/MinGW-5.0.3.exe?download
  7. Download msys:
  8. http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe?download
  9. Download the mingw developer tool kit:
  10. http://prdownloads.sf.net/mingw/msysDTK-1.0.1.exe?download
  11. Download the mingw win32api:
  12. http://prdownloads.sf.net/mingw/w32api-3.6.tar.gz?download
  13. Install mingw, msys and mingw-dtk.
  14. Create a directory called "tor-mingw".
  15. Stage Two: Download, extract, compile openssl
  16. ----------------------------------------------
  17. Download openssl:
  18. http://www.openssl.org/source/openssl-0.9.8c.tar.gz
  19. Extract openssl:
  20. Copy the openssl tarball into the "tor-mingw" directory.
  21. Type "cd tor-mingw/"
  22. Type "tar zxf openssl-0.9.8c.tar.gz"
  23. Make openssl libraries:
  24. Type "cd tor-mingw/openssl-0.9.8c/"
  25. Type "./Configure mingw"
  26. Edit Makefile and remove the "test:" and "tests:" sections.
  27. Type "rm -rf ./test"
  28. Type "cd crypto/"
  29. Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
  30. Type "cd ../ssl/"
  31. Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;
  32. Type "cd .."
  33. Type "cp *.h include/openssl/"
  34. # The next steps can take up to 30 minutes to complete.
  35. Type "make"
  36. Type "make install"
  37. Alternatively:
  38. Download the pre-compiled openssl for win32.
  39. Install and proceed.
  40. Stage Three: Download, extract, compile zlib
  41. ---------------------------------------------
  42. Download zlib source:
  43. http://www.zlib.net/zlib-1.2.3.tar.gz
  44. Extract zlib:
  45. Copy the zlib tarball into the "tor-mingw" directory
  46. Type "cd tor-mingw/"
  47. Type "tar zxf zlib-1.2.3.tar.gz"
  48. CHOICE:
  49. Make zlib.a:
  50. Type "cd tor-mingw/zlib-1.2.3/"
  51. Type "./configure"
  52. Type "make"
  53. Type "make install"
  54. OR
  55. Make zlib1.dll:
  56. Type "cd tor-mingw/zlib-1.2.3/"
  57. Type "./configure"
  58. Type "make -f win32/Makefile.gcc"
  59. Done.
  60. Stage Four: Download, extract, and patch libevent-1.1b.
  61. ------------------------------------------------------
  62. Download libevent-1.1b:
  63. http://www.monkey.org/~provos/libevent/
  64. Copy the libevent tarball into the "tor-mingw" directory.
  65. Type "cd tor-mingw"
  66. Extract libevent:
  67. Type "tar zxf libevent-1.1b.tar.gz"
  68. Download the libevent-1.1b-mingw.diff from
  69. http://cvs.seul.org/viewcvs/viewcvs.cgi/tor/trunk/Win32Build/mingw/libevent-1.1b-mingw.diff?rev=8456&root=tor&view=log
  70. Copy the libevent-1.1b diff into the libevent-1.1b directory.
  71. Type "patch -p0 < libevent-1.1b-mingw.diff"
  72. Type "aclocal && autoheader && automake && autoconf".
  73. There may be WARNING messages. There will be no output if all runs successfuly.
  74. Type "./configure --enable-static --disable-shared"
  75. Type "make"
  76. Type "make install"
  77. Stage Five: Build Tor
  78. ----------------------
  79. Download the current Tor alpha release from http://tor.eff.org/download.html.
  80. Copy the Tor tarball into the "tor-mingw" directory.
  81. Extract Tor:
  82. Type "tar zxf latest-tor-alpha.tar.gz"
  83. cd tor-<version>
  84. Type "./configure --enable-static --disable-shared"
  85. Type "make"
  86. You now have a tor.exe in src/or/. This is Tor.
  87. You now have a tor_resolve.exe in src/tools/.