Ticket #4260: tor-win32-mingw-creation.txt.patch

File tor-win32-mingw-creation.txt.patch, 4.7 KB (added by Tey', 8 years ago)
  • doc/tor-win32-mingw-creation.txt

    old new  
    55Stage One:  Download and Install MinGW.
    66---------------------------------------
    77
    8 Download mingw:
    9 http://prdownloads.sf.net/mingw/MinGW-5.1.6.exe?download
     8Download mingw autoinstaller:
     9http://prdownloads.sf.net/mingw/mingw-get-inst-20110802.exe?download
    1010
    11 Download msys:
    12 http://prdownloads.sf.net/ming/MSYS-1.0.11.exe?download
     11The following packages needs to be installed:
     12MinGW Compiler Suite
     13- C Compiler
     14MSYS Basic System
     15MinGW Developer Toolkit
    1316
    14 Download msysDTK:
    15 http://sourceforge.net/projects/mingw/files/MSYS%20Supplementary%20Tools/msysDTK-1.0.1/msysDTK-1.0.1.exe/download
     17Once MinGW is installed, start the MinGW Shell from the start menu.
    1618
    17 Install MinGW, msysDTK, and MSYS in that order. 
    18 
    19 Make sure your PATH includes C:\MinGW\bin.  You can verify this by right
    20 clicking on "My Computer", choose "Properties", choose "Advanced",
    21 choose "Environment Variables", select PATH.
    22 
    23 Start MSYS(rxvt).
    24 
    25 Create a directory called "tor-mingw".
     19Create a directory called "tor-mingw" this way:
     20mkdir tor-mingw
    2621
    2722Stage Two:  Download, extract, compile openssl
    2823----------------------------------------------
    2924
    3025Download openssl:
    31 http://www.openssl.org/source/openssl-0.9.8l.tar.gz
     26http://www.openssl.org/source/openssl-1.0.0e.tar.gz
    3227
    3328Extract openssl:
    3429Copy the openssl tarball into the "tor-mingw" directory.
    35 Type "cd tor-mingw/"
    36 Type "tar zxf openssl-0.9.8l.tar.gz"
    37 (Note:  There are many symlink errors because Windows doesn't support
    38 symlinks.  You can ignore these errors.)
     30Type "cd $HOME/tor-mingw/"
     31Type "tar zxf openssl-1.0.0e.tar.gz"
    3932
    4033Make openssl libraries:
    41 Type "cd tor-mingw/openssl-0.9.8l/"
    42 Type "./Configure -no-idea -no-rc5 -no-mdc2 mingw"
    43 Edit Makefile and remove the "test:" and "tests:" sections.
    44 Type "rm -rf ./test"
    45 Type "cd crypto/"
    46 Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
    47 Type "cd ../ssl/"
    48 Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
    49 Type "cd .."
    50 Type "cp *.h include/openssl/"
    51 Type "find ./fips -type f -name "*.h" -exec cp {} include/openssl/ \;"
     34Type "cd $HOME/tor-mingw/openssl-1.0.0e/"
     35Type "./Configure mingw"
    5236# The next steps can take up to 30 minutes to complete.
    5337Type "make"
     38Type "make test" if you want to check that the compiled library works
     39as expected.
    5440Type "make install"
    5541
    5642
    Stage Three: Download, extract, compile 
    5844---------------------------------------------
    5945
    6046Download zlib source:
    61 http://www.zlib.net/zlib-1.2.3.tar.gz
     47http://zlib.net/zlib-1.2.5.tar.gz
    6248
    6349Extract zlib:
    6450Copy the zlib tarball into the "tor-mingw" directory
    65 Type "cd tor-mingw/"
    66 Type "tar zxf zlib-1.2.3.tar.gz"
    67 
    68 CHOICE:
     51Type "cd $HOME/tor-mingw/"
     52Type "tar zxf zlib-1.2.5.tar.gz"
    6953
    70 Make zlib.a:
    71 Type "cd tor-mingw/zlib-1.2.3/"
    72 Type "./configure"
    73 Type "make"
    74 Type "make install"
     54Make zlib:
     55Type "cd $HOME/tor-mingw/zlib-1.2.5/"
     56Type "make -f win32/Makefile.gcc"
     57Type "make -f win32/Makefile.gcc test" if you want to check that the compiled
     58library works as expected.
     59Type "export LIBRARY_PATH=/local/lib/ INCLUDE_PATH=/local/include/"
     60Type "export BINARY_PATH=/local/bin/"
     61Type "make -f win32/Makefile.gcc install"
    7562
    7663Done.
    7764
    Done. 
    7966Stage Four: Download, extract, and compile libevent
    8067------------------------------------------------------
    8168
    82 Download the latest libevent release:
    83 http://www.monkey.org/~provos/libevent/
     69Download the latest stable libevent release:
     70http://libevent.org/
    8471
    8572Copy the libevent tarball into the "tor-mingw" directory.
    86 Type "cd tor-mingw"
     73Type "cd $HOME/tor-mingw"
    8774
    88 Extract libevent.
     75Extract libevent, and go to the newly created directory:
     76tar zxf libevent-x.y.z-stable.tar.gz
     77cd $HOME/tor-mingw/libevent-x.y.z-stable
    8978
    9079Type "./configure --enable-static --disable-shared"
    9180Type "make"
     81Type "make check" if you want to check that the compiled library works
     82as expected.
    9283Type "make install"
    9384
    9485Stage Five:  Build Tor
    9586----------------------
    9687
    97 Download the current Tor alpha release source code from https://torproject.org/download.html.
     88Download the latest Tor (stable or alpha) release source code from:
     89https://www.torproject.org/download/download.html
    9890Copy the Tor tarball into the "tor-mingw" directory.
     91Type "cd $HOME/tor-mingw"
    9992Extract Tor:
    100 Type "tar zxf latest-tor-alpha.tar.gz"
     93Type "tar zxf tor-<version>.tar.gz"
    10194
    102 cd tor-<version>
     95Type "cd $HOME/tor_mingw/tor-<version>"
    10396Type "./configure"
    10497Type "make"
     98Type "make test" if you want to check that the compiled TOR works as expected.
    10599
    106100You now have a tor.exe in src/or/.  This is Tor.
    107101You now have a tor-resolve.exe in src/tools/.