tor-win32-mingw-creation.txt 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. Download msysDTK:
  11. http://sourceforge.net/projects/mingw/files/MSYS%20Supplementary%20Tools/msysDTK-1.0.1/msysDTK-1.0.1.exe/download
  12. Install MinGW, msysDTK, and MSYS in that order.
  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. Start MSYS(rxvt).
  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.8l.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.8l.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.8l/"
  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. Type "find ./fips -type f -name "*.h" -exec cp {} include/openssl/ \;"
  40. # The next steps can take up to 30 minutes to complete.
  41. Type "make"
  42. Type "make install"
  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. Done.
  58. Stage Four: Download, extract, and compile libevent
  59. ------------------------------------------------------
  60. Download the latest libevent release:
  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 "./configure --enable-static --disable-shared"
  66. Type "make"
  67. Type "make install"
  68. Stage Five: Build Tor
  69. ----------------------
  70. Download the current Tor alpha release source code from https://torproject.org/download.html.
  71. Copy the Tor tarball into the "tor-mingw" directory.
  72. Extract Tor:
  73. Type "tar zxf latest-tor-alpha.tar.gz"
  74. cd tor-<version>
  75. Type "./configure"
  76. Type "make"
  77. You now have a tor.exe in src/or/. This is Tor.
  78. You now have a tor-resolve.exe in src/tools/.
  79. Stage Six: Build the installer
  80. -------------------------------
  81. Install the latest NSIS:
  82. http://nsis.sourceforge.net/Download
  83. Run the package script in contrib:
  84. From the Tor build directory above, run:
  85. "./contrib/package_nsis-mingw.sh"
  86. The resulting Tor installer executable is in ./win_tmp/.