tor-win32-mingw-creation.txt 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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.4.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. (Note: There are many symlink errors because Windows doesn't support
  27. symlinks. You can ignore these errors.)
  28. Make openssl libraries:
  29. Type "cd tor-mingw/openssl-0.9.8g/"
  30. Type "./Configure -no-idea -no-rc5 -no-mdc2 mingw"
  31. Edit Makefile and remove the "test:" and "tests:" sections.
  32. Type "rm -rf ./test"
  33. Type "cd crypto/"
  34. Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
  35. Type "cd ../ssl/"
  36. Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
  37. Type "cd .."
  38. Type "cp *.h include/openssl/"
  39. # The next steps can take up to 30 minutes to complete.
  40. Type "make"
  41. Type "make install"
  42. Alternatively:
  43. Download the pre-compiled openssl for win32.
  44. Install and proceed.
  45. Stage Three: Download, extract, compile zlib
  46. ---------------------------------------------
  47. Download zlib source:
  48. http://www.zlib.net/zlib-1.2.3.tar.gz
  49. Extract zlib:
  50. Copy the zlib tarball into the "tor-mingw" directory
  51. Type "cd tor-mingw/"
  52. Type "tar zxf zlib-1.2.3.tar.gz"
  53. CHOICE:
  54. Make zlib.a:
  55. Type "cd tor-mingw/zlib-1.2.3/"
  56. Type "./configure"
  57. Type "make"
  58. Type "make install"
  59. OR
  60. Make zlib1.dll:
  61. Type "cd tor-mingw/zlib-1.2.3/"
  62. Type "./configure"
  63. Type "make -f win32/Makefile.gcc"
  64. Done.
  65. Stage Four: Download, extract, and compile libevent-1.3e
  66. ------------------------------------------------------
  67. Download the libevent 1.4.7-stable release:
  68. http://www.monkey.org/~provos/libevent/
  69. Copy the libevent tarball into the "tor-mingw" directory.
  70. Type "cd tor-mingw"
  71. Extract libevent.
  72. Type "./configure --enable-static --disable-shared"
  73. Type "make"
  74. Type "make install"
  75. Stage Five: Build Tor
  76. ----------------------
  77. Download the current Tor alpha release from https://www.torproject.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"
  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/.
  86. Stage Six: Build the installer
  87. -------------------------------
  88. Install the latest NSIS:
  89. http://nsis.sourceforge.net/Download
  90. Run the package script in contrib:
  91. From the Tor build directory above, run:
  92. "./contrib/package_nsis-mingw.sh"
  93. The resulting Tor installer executable is in ./win_tmp/.