Prechádzať zdrojové kódy

Changes to doc as a result of creating a MinGW tor.exe on a bare system.
Add two TODO items relating to MinGW instructions.


svn:r8472

Andrew Lewman 18 rokov pred
rodič
commit
4125fe234d
2 zmenil súbory, kde vykonal 58 pridanie a 50 odobranie
  1. 2 0
      doc/TODO
  2. 56 50
      doc/tor-win32-mingw-creation.txt

+ 2 - 0
doc/TODO

@@ -41,6 +41,8 @@ R . If we fail to connect via an exit enclave, (warn and) try again
       so we can abandon then too.
       so we can abandon then too.
 N - We need a separate list of "hidserv authorities" if we want to
 N - We need a separate list of "hidserv authorities" if we want to
     retire moria1 from the main list.
     retire moria1 from the main list.
+P - Figure out why dll's compiled in mingw don't work right in Winxp.
+P - Figure out why openssl 0.9.8c "make test" fails at sha256t test.
 
 
 Items for 0.1.2.x:
 Items for 0.1.2.x:
   o re-enable blossom functionality: let tor servers decide if they
   o re-enable blossom functionality: let tor servers decide if they

+ 56 - 50
doc/tor-win32-mingw-creation.txt

@@ -18,6 +18,8 @@ http://prdownloads.sf.net/mingw/w32api-3.6.tar.gz?download
 
 
 Install mingw, msys and mingw-dtk.
 Install mingw, msys and mingw-dtk.
 
 
+Create a directory called "tor-mingw".
+
 Stage Two:  Download, extract, compile openssl
 Stage Two:  Download, extract, compile openssl
 ----------------------------------------------
 ----------------------------------------------
 
 
@@ -25,28 +27,24 @@ Download openssl:
 http://www.openssl.org/source/openssl-0.9.8c.tar.gz
 http://www.openssl.org/source/openssl-0.9.8c.tar.gz
 
 
 Extract openssl:
 Extract openssl:
-cp openssl-0.9.8c.tar.gz tor-mingw/
+Copy the openssl tarball into the "tor-mingw" directory.
-cd tor-mingw/
+Type "cd tor-mingw/"
-tar zxf openssl-0.9.8c.tar.gz
+Type "tar zxf openssl-0.9.8c.tar.gz"
-
+
-Make openssl.dll:
+Make openssl libraries:
-cd tor-mingw/openssl-0.9.8c/
+Type "cd tor-mingw/openssl-0.9.8c/"
-cd crypto/
+Type "./Configure mingw"
-find ./ -name "*.h" -exec cp {} ../include/openssl/ \;
+Edit Makefile and remove the "test:" and "tests:" sections.
-find ./ -type f -name "*.c" -exec cp {} ../test/ \;
+Type "rm -rf ./test"
-cd ../ssl/
+Type "cd crypto/"
-find ./ -name "*.h" -exec cp {} ../include/openssl/ \;
+Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;"
-cd ..
+Type "cd ../ssl/"
-cp *.h include/openssl/
+Type "find ./ -name "*.h" -exec cp {} ../include/openssl/ \;
-cp ssl/ssltest.c test/
+Type "cd .."
-Edit Makefile and remove the "test" and "tests" sections.
+Type "cp *.h include/openssl/"
-rm -rf ./test
+# The next steps can take up to 30 minutes to complete.
-./Configure mingw
+Type "make"
-make
+Type "make install"
-
-Note: this fails in test due to: 
-make[1]: *** No rule to make target `sha256t.o', needed by `sha256t.exe'.  Stop.
---need to research this - phobos
 
 
 Alternatively:
 Alternatively:
 Download the pre-compiled openssl for win32.
 Download the pre-compiled openssl for win32.
@@ -60,13 +58,24 @@ Download zlib source:
 http://www.zlib.net/zlib-1.2.3.tar.gz
 http://www.zlib.net/zlib-1.2.3.tar.gz
 
 
 Extract zlib:
 Extract zlib:
-cp zlib-1.2.3.tar.gz tor-mingw/
+Copy the zlib tarball into the "tor-mingw" directory
-cd tor-mingw/
+Type "cd tor-mingw/"
-tar zxf zlib-1.2.3.tar.gz
+Type "tar zxf zlib-1.2.3.tar.gz"
+
+CHOICE:
+
+Make zlib.a:
+Type "cd tor-mingw/zlib-1.2.3/"
+Type "./configure"
+Type "make"
+Type "make install"
+
+OR 
 
 
 Make zlib1.dll:
 Make zlib1.dll:
-cd tor-mingw/zlib-1.2.3/
+Type "cd tor-mingw/zlib-1.2.3"/
-make -f win32/Makefile.gcc
+Type "./configure"
+Type "make -f win32/Makefile.gcc"
 
 
 Done.
 Done.
 
 
@@ -77,38 +86,35 @@ Stage Four: Download, extract, and patch libevent-1.1b.
 Download libevent-1.1b:
 Download libevent-1.1b:
 http://www.monkey.org/~provos/libevent/
 http://www.monkey.org/~provos/libevent/
 
 
-Start up MSYS:
+Copy the libevent tarball into the "tor-mingw" directory.
-Start -> Programs -> MinGW -> MSYS -> msys
+Type "cd tor-mingw"
-
-Create a directory to work within, for example, /c/tor-mingw.
-
-Copy libevent and tor tarballs into this working dir:
-cp /path/to/libevent-1.1b.tar.gz /c/tor-mingw/
-cp /patch/to/tor-alpha.tar.gz /c/tor-mingw/
-cd /c/tor-mingw/
 
 
-Extract libevent: tar zxf libevent-1.1b.tar.gz
+Extract libevent: 
-Extract tor: tar zxf tor-alpha.tar.gz
+Type "tar zxf libevent-1.1b.tar.gz"
 
 
-Copy the libevent-1.1b diff into libevent-1.1b:
+Download the libevent-1.1b-mingw.diff from 
-patch -p0 < ../tor-alpha/Win32Build/mingw/libevent-1.1b-mingw.diff
+http://cvsview.seul.org/tor/something/path.
+Copy the libevent-1.1b diff into the libevent-1.1b directory.
+Type "patch -p0 < libevent-1.1b-mingw.diff"
 
 
-Run "aclocal && autoheader && automake && autoconf".
+Type "aclocal && autoheader && automake && autoconf".
 There may be WARNING messages.  There will be no output if all runs successfuly.
 There may be WARNING messages.  There will be no output if all runs successfuly.
 
 
-Run "./configure"
+Type "./configure --enable-static --disable-shared"
-Run "make"
+Type "make"
-Run "make install"
+Type "make install"
 
 
 Stage Five:  Build Tor
 Stage Five:  Build Tor
 ----------------------
 ----------------------
 
 
-Extract the latest tor from svn in tor-mingw dir:
+Download the current Tor alpha release from http://tor.eff.org/download.html.
-tar zxf latest-tor-alpha.tar.gz
+Copy the Tor tarball into the "tor-mingw" directory.
+Extract Tor:
+Type "tar zxf latest-tor-alpha.tar.gz"
 
 
-cd tor-alpha
+cd tor-<version>
-./autogen.sh
+Type "./configure --enable-static --disable-shared"
-./configure 
+Type "make"
-make
 
 
 You now have a tor.exe in src/or/.  This is Tor.
 You now have a tor.exe in src/or/.  This is Tor.
+You now have a tor_resolve.exe in src/tools/.