tor-win32-mingw-creation.txt 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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.1.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 autoconf-2.59 update:
  12. http://prdownloads.sf.net/mingw/msys-autoconf-2.59.tar.bz2?download
  13. Install mingw, msys and mingw-dtk. Extract msys-autoconf-2.59.tar.bz2 into
  14. your mingw install location. For example, if you installed mingw into
  15. /c/mingw/1.0/ you want to extract msys-autoconf-2.59.tar.bz2 into this
  16. directory.
  17. Create a directory called "tor-mingw".
  18. Stage Two: Download, extract, compile openssl
  19. ----------------------------------------------
  20. Download openssl:
  21. http://www.openssl.org/source/openssl-0.9.8g.tar.gz
  22. Extract openssl:
  23. Copy the openssl tarball into the "tor-mingw" directory.
  24. Type "cd tor-mingw/"
  25. Type "tar zxf openssl-0.9.8g.tar.gz"
  26. Make openssl libraries:
  27. Type "cd tor-mingw/openssl-0.9.8g/"
  28. Type "./Configure -no-idea -no-rc5 -no-mdc2 mingw"
  29. Edit Makefile and remove the "test:" and "tests:" sections.
  30. Type "rm -rf ./test"
  31. Type "cd crypto/"
  32. Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
  33. Type "cd ../ssl/"
  34. Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
  35. Type "cd .."
  36. Type "cp *.h include/openssl/"
  37. # The next steps can take up to 30 minutes to complete.
  38. Type "make"
  39. Type "make install"
  40. Alternatively:
  41. Download the pre-compiled openssl for win32.
  42. Install and proceed.
  43. Stage Three: Download, extract, compile zlib
  44. ---------------------------------------------
  45. Download zlib source:
  46. http://www.zlib.net/zlib-1.2.3.tar.gz
  47. Extract zlib:
  48. Copy the zlib tarball into the "tor-mingw" directory
  49. Type "cd tor-mingw/"
  50. Type "tar zxf zlib-1.2.3.tar.gz"
  51. CHOICE:
  52. Make zlib.a:
  53. Type "cd tor-mingw/zlib-1.2.3/"
  54. Type "./configure"
  55. Type "make"
  56. Type "make install"
  57. OR
  58. Make zlib1.dll:
  59. Type "cd tor-mingw/zlib-1.2.3/"
  60. Type "./configure"
  61. Type "make -f win32/Makefile.gcc"
  62. Done.
  63. Stage Four: Download, extract, and compile libevent-1.3e
  64. ------------------------------------------------------
  65. Download the libevent 1.3e release:
  66. http://www.monkey.org/~provos/libevent/
  67. Copy the libevent tarball into the "tor-mingw" directory.
  68. Type "cd tor-mingw"
  69. Extract libevent.
  70. Type "./configure --enable-static --disable-shared"
  71. Type "make"
  72. Type "make install"
  73. Stage Five: Build Tor
  74. ----------------------
  75. Download the current Tor alpha release from https://www.torproject.org/download.html.
  76. Copy the Tor tarball into the "tor-mingw" directory.
  77. Extract Tor:
  78. Type "tar zxf latest-tor-alpha.tar.gz"
  79. cd tor-<version>
  80. Type "./configure"
  81. Type "make"
  82. You now have a tor.exe in src/or/. This is Tor.
  83. You now have a tor_resolve.exe in src/tools/.
  84. Stage Six: Build the installer
  85. -------------------------------
  86. Install the latest NSIS:
  87. http://nsis.sourceforge.net/Download
  88. Run the package script in contrib:
  89. From the Tor build directory above, run:
  90. "./contrib/package_nsis-mingw.sh"
  91. The resulting Tor installer executable is in ./win_tmp/.