tor-win32-mingw-creation.txt 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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.8i.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.8i.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.8i/"
  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 from
  44. http://gnuwin32.sourceforge.net/packages/openssl.htm
  45. Install and proceed.
  46. Stage Three: Download, extract, compile zlib
  47. ---------------------------------------------
  48. Download zlib source:
  49. http://www.zlib.net/zlib-1.2.3.tar.gz
  50. Extract zlib:
  51. Copy the zlib tarball into the "tor-mingw" directory
  52. Type "cd tor-mingw/"
  53. Type "tar zxf zlib-1.2.3.tar.gz"
  54. CHOICE:
  55. Make zlib.a:
  56. Type "cd tor-mingw/zlib-1.2.3/"
  57. Type "./configure"
  58. Type "make"
  59. Type "make install"
  60. OR
  61. Make zlib1.dll:
  62. Type "cd tor-mingw/zlib-1.2.3/"
  63. Type "./configure"
  64. Type "make -f win32/Makefile.gcc"
  65. Done.
  66. Stage Four: Download, extract, and compile libevent
  67. ------------------------------------------------------
  68. Download the latest libevent release:
  69. http://www.monkey.org/~provos/libevent/
  70. Copy the libevent tarball into the "tor-mingw" directory.
  71. Type "cd tor-mingw"
  72. Extract libevent.
  73. Type "./configure --enable-static --disable-shared"
  74. Type "make"
  75. Type "make install"
  76. Stage Five: Build Tor
  77. ----------------------
  78. Download the current Tor alpha release source code from https://torproject.org/download.html.
  79. Copy the Tor tarball into the "tor-mingw" directory.
  80. Extract Tor:
  81. Type "tar zxf latest-tor-alpha.tar.gz"
  82. cd tor-<version>
  83. Type "./configure"
  84. Type "make"
  85. You now have a tor.exe in src/or/. This is Tor.
  86. You now have a tor-resolve.exe in src/tools/.
  87. Stage Six: Build the installer
  88. -------------------------------
  89. Install the latest NSIS:
  90. http://nsis.sourceforge.net/Download
  91. Run the package script in contrib:
  92. From the Tor build directory above, run:
  93. "./contrib/package_nsis-mingw.sh"
  94. The resulting Tor installer executable is in ./win_tmp/.