tor-win32-mingw-creation.txt 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. Install mingw, msys and mingw-dtk.
  12. Create a directory called "tor-mingw".
  13. Stage Two: Download, extract, compile openssl
  14. ----------------------------------------------
  15. Download openssl:
  16. http://www.openssl.org/source/openssl-0.9.8d.tar.gz
  17. Extract openssl:
  18. Copy the openssl tarball into the "tor-mingw" directory.
  19. Type "cd tor-mingw/"
  20. Type "tar zxf openssl-0.9.8d.tar.gz"
  21. Make openssl libraries:
  22. Type "cd tor-mingw/openssl-0.9.8d/"
  23. Type "./Configure mingw"
  24. Edit Makefile and remove the "test:" and "tests:" sections.
  25. Type "rm -rf ./test"
  26. Type "cd crypto/"
  27. Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
  28. Type "cd ../ssl/"
  29. Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;
  30. Type "cd .."
  31. Type "cp *.h include/openssl/"
  32. # The next steps can take up to 30 minutes to complete.
  33. Type "make"
  34. Type "make install"
  35. Alternatively:
  36. Download the pre-compiled openssl for win32.
  37. Install and proceed.
  38. Stage Three: Download, extract, compile zlib
  39. ---------------------------------------------
  40. Download zlib source:
  41. http://www.zlib.net/zlib-1.2.3.tar.gz
  42. Extract zlib:
  43. Copy the zlib tarball into the "tor-mingw" directory
  44. Type "cd tor-mingw/"
  45. Type "tar zxf zlib-1.2.3.tar.gz"
  46. CHOICE:
  47. Make zlib.a:
  48. Type "cd tor-mingw/zlib-1.2.3/"
  49. Type "./configure"
  50. Type "make"
  51. Type "make install"
  52. OR
  53. Make zlib1.dll:
  54. Type "cd tor-mingw/zlib-1.2.3/"
  55. Type "./configure"
  56. Type "make -f win32/Makefile.gcc"
  57. Done.
  58. Stage Four: Download, extract, and patch libevent-1.1b.
  59. ------------------------------------------------------
  60. Download libevent-1.3a:
  61. http://www.monkey.org/~provos/libevent/
  62. Copy the libevent tarball into the "tor-mingw" directory.
  63. Type "cd tor-mingw"
  64. Extract libevent:
  65. Type "tar zxf libevent-1.3a.tar.gz"
  66. Type "./configure --enable-static --disable-shared"
  67. --------------------libevent 1.3a only---------------------------------------
  68. You need to manually edit the Makefile and remove all references to "sample".
  69. libevent 1.3a won't compile in mingw currently due to issues in event_test.c.
  70. Removing the "sample" directory and all references to it in Makefile create a
  71. completely valid libevent library.
  72. -----------------------------------------------------------------------------
  73. Type "make"
  74. Type "make install"
  75. Stage Five: Build Tor
  76. ----------------------
  77. Download the current Tor alpha release from http://tor.eff.org/download.html.
  78. Copy the Tor tarball into the "tor-mingw" directory.
  79. Extract Tor:
  80. Type "tar zxf latest-tor-alpha.tar.gz"
  81. cd tor-<version>
  82. Type "./configure --enable-static --disable-shared"
  83. Type "make"
  84. You now have a tor.exe in src/or/. This is Tor.
  85. You now have a tor_resolve.exe in src/tools/.