tor-win32-mingw-creation.txt 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. ##
  2. ## Instructions for building Tor with MinGW (http://www.mingw.org/)
  3. ##
  4. Stage One: Download and Install MinGW.
  5. ---------------------------------------
  6. Download mingw:
  7. http://prdownloads.sf.net/mingw/MinGW-5.1.6.exe?download
  8. Download msys:
  9. http://prdownloads.sf.net/ming/MSYS-1.0.11.exe?download
  10. Install MinGW and MSYS.
  11. Open an MSYS window. Extract mingw-autoconf-2.5-2.64-1-mingw32-bin.tar.gz
  12. to /c/MinGW/.
  13. Make sure your PATH includes C:\MinGW\bin. You can verify this by right
  14. clicking on "My Computer", choose "Properties", choose "Advanced",
  15. choose "Environment Variables", select PATH.
  16. Create a directory called "tor-mingw".
  17. Stage Two: Download, extract, compile openssl
  18. ----------------------------------------------
  19. Download openssl:
  20. http://www.openssl.org/source/openssl-0.9.8l.tar.gz
  21. Extract openssl:
  22. Copy the openssl tarball into the "tor-mingw" directory.
  23. Type "cd tor-mingw/"
  24. Type "tar zxf openssl-0.9.8l.tar.gz"
  25. (Note: There are many symlink errors because Windows doesn't support
  26. symlinks. You can ignore these errors.)
  27. Make openssl libraries:
  28. Type "cd tor-mingw/openssl-0.9.8l/"
  29. Type "./Configure -no-idea -no-rc5 -no-mdc2 mingw"
  30. Edit Makefile and remove the "test:" and "tests:" sections.
  31. Type "rm -rf ./test"
  32. Type "cd crypto/"
  33. Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
  34. Type "cd ../ssl/"
  35. Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
  36. Type "cd .."
  37. Type "cp *.h include/openssl/"
  38. Type "cp fips/fips.h include/openssl/"
  39. # The next steps can take up to 30 minutes to complete.
  40. Type "make"
  41. Type "make install"
  42. Stage Three: Download, extract, compile zlib
  43. ---------------------------------------------
  44. Download zlib source:
  45. http://www.zlib.net/zlib-1.2.3.tar.gz
  46. Extract zlib:
  47. Copy the zlib tarball into the "tor-mingw" directory
  48. Type "cd tor-mingw/"
  49. Type "tar zxf zlib-1.2.3.tar.gz"
  50. CHOICE:
  51. Make zlib.a:
  52. Type "cd tor-mingw/zlib-1.2.3/"
  53. Type "./configure"
  54. Type "make"
  55. Type "make install"
  56. Done.
  57. Stage Four: Download, extract, and compile libevent
  58. ------------------------------------------------------
  59. Download the latest libevent release:
  60. http://www.monkey.org/~provos/libevent/
  61. Copy the libevent tarball into the "tor-mingw" directory.
  62. Type "cd tor-mingw"
  63. Extract libevent.
  64. Type "./configure --enable-static --disable-shared"
  65. Type "make"
  66. Type "make install"
  67. Stage Five: Build Tor
  68. ----------------------
  69. Download the current Tor alpha release source code from https://torproject.org/download.html.
  70. Copy the Tor tarball into the "tor-mingw" directory.
  71. Extract Tor:
  72. Type "tar zxf latest-tor-alpha.tar.gz"
  73. cd tor-<version>
  74. Type "./configure"
  75. Type "make"
  76. You now have a tor.exe in src/or/. This is Tor.
  77. You now have a tor-resolve.exe in src/tools/.
  78. Stage Six: Build the installer
  79. -------------------------------
  80. Install the latest NSIS:
  81. http://nsis.sourceforge.net/Download
  82. Run the package script in contrib:
  83. From the Tor build directory above, run:
  84. "./contrib/package_nsis-mingw.sh"
  85. The resulting Tor installer executable is in ./win_tmp/.