tor-win32-mingw-creation.txt 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. Instructions for building Tor with MinGW (http://www.mingw.org/)
  2. Stage One: Download and Install MinGW.
  3. ---------------------------------------
  4. Download mingw:
  5. http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe?download
  6. Download the mingw developer tool kit:
  7. http://prdownloads.sf.net/mingw/msysDTK-1.0.1.exe?download
  8. Install mingw and mingw-dtk.
  9. Stage Two: Download, extract, and patch libevent-1.1b.
  10. ------------------------------------------------------
  11. Download libevent-1.1b:
  12. http://www.monkey.org/~provos/libevent/
  13. Start up MSYS:
  14. Start -> Programs -> MinGW -> MSYS -> msys
  15. Create a directory to work within, for example, /c/tor-mingw.
  16. Copy libevent and tor tarballs into this working dir:
  17. cp /path/to/libevent-1.1b.tar.gz /c/tor-mingw/
  18. cp /patch/to/tor-alpha.tar.gz /c/tor-mingw/
  19. cd /c/tor-mingw/
  20. Extract libevent: tar zxf libevent-1.1b.tar.gz
  21. Extract tor: tar zxf tor-alpha.tar.gz
  22. Copy the libevent-1.1b diff into libevent-1.1b:
  23. cp /c/tor-mingw/tor/Win32Build/mingw/libevent-1.1b-mingw-custom.diff /c/tor-mingw/libevent-1.1b/
  24. patch -i libevent-1.1b-mingw-custom.diff
  25. Your output of the "patch" command should be similar to:
  26. "patch -i libevent-1.1b-mingw-custom.diff
  27. patching file `Makefile.am'
  28. can't find file to patch at input line 49
  29. Perhaps you should have used the -p or --strip option?
  30. The text leading up to this was:
  31. --------------------------
  32. |Only in libevent-1.1b: Makefile.in
  33. |diff -uwr libevent-1.1b-old/WIN32-Code/misc.c libevent-1.1b/WIN32-Code/misc.c
  34. |--- libevent-1.1b-old/WIN32-Code/misc.c Wed Aug 9 21:01:14 2006
  35. |+++ libevent-1.1b/WIN32-Code/misc.c Fri Sep 1 22:21:31 2006
  36. --------------------------
  37. File to patch: WIN32-Code/misc.c
  38. patching file `WIN32-Code/misc.c'
  39. can't find file to patch at input line 65
  40. Perhaps you should have used the -p or --strip option?
  41. The text leading up to this was:
  42. --------------------------
  43. |diff -uwr libevent-1.1b-old/WIN32-Code/misc.h libevent-1.1b/WIN32-Code/misc.h
  44. |--- libevent-1.1b-old/WIN32-Code/misc.h Wed Aug 9 21:01:14 2006
  45. |+++ libevent-1.1b/WIN32-Code/misc.h Fri Sep 1 18:47:09 2006
  46. --------------------------
  47. File to patch: WIN32-Code/misc.h
  48. patching file `WIN32-Code/misc.h'
  49. can't find file to patch at input line 78
  50. Perhaps you should have used the -p or --strip option?
  51. The text leading up to this was:
  52. --------------------------
  53. |diff -uwr libevent-1.1b-old/WIN32-Code/win32.c
  54. libevent-1.1b/WIN32-Code/win32.c
  55. |--- libevent-1.1b-old/WIN32-Code/win32.c Wed Aug 9 21:25:48 2006
  56. |+++ libevent-1.1b/WIN32-Code/win32.c Sat Sep 2 00:45:55 2006
  57. --------------------------
  58. File to patch: WIN32-Code/win32.c
  59. patching file `WIN32-Code/win32.c'
  60. patching file `buffer.c'
  61. patching file `config.h.in'
  62. patching file `configure.in'
  63. patching file `evbuffer.c'
  64. patching file `event.c'
  65. patching file `log.c' "
  66. Stage 3: Build libevent-1.1b DLL
  67. ---------------------------------
  68. Run "aclocal && autoheader && automake && autoconf".
  69. There may be WARNING messages. There will be no output if all runs successfuly.
  70. Run "./configure"
  71. Run "make"
  72. (magic happens here and a complete tor-alpha.exe is created)