tor-osx-dmg-creation.txt 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. The following steps are the exact steps used to produce the "official"
  2. OSX builds of tor
  3. Summary:
  4. 1) Compile and install a static version of the latest release of
  5. libevent.
  6. 2) Acquire privoxyosx_setup_3.0.3.zip. Remember where you put this
  7. file.
  8. 3) Acquire and install your preferred version of tor via "make
  9. dist-osx"
  10. Details:
  11. ### Compiling libevent
  12. 1) Download the latest libevent from
  13. http://www.monkey.org/~provos/libevent/
  14. 2) The first step of compiling libevent is to configure it as
  15. follows:
  16. ./configure --enable-static --disable-shared
  17. 3) Complete the "make" and "make install". You will need to be root,
  18. or sudo -s, to complete the "make install".
  19. 4) If you have previouslly installed libevent, go rm the old libevent.so*
  20. files so the linker doesn't get suckered into using them.
  21. ### Acquiring privoxy
  22. 1) Download osx privoxy source from
  23. http://prdownloads.sourceforge.net/ijbswa/privoxyosx_setup_3.0.3.zip?download
  24. 2) Edit /path/to/tor/contrib/osx/package.sh and confirm
  25. PRIVOXY_PKG_ZIP= is set to the correct path to find the
  26. file privoxyosx_setup_3.0.3.zip
  27. ## Compiling Tor
  28. 1) Get your preferred version of the tor source from tor.eff.org.
  29. 2) In the top level, this means /path/to/tor/, not tor/contrib/osx,
  30. do a configure with these parameters:
  31. configure --prefix=/Library/Tor --bindir=/Library/Tor \
  32. --sysconfdir=/Library --enable-static --disable-shared
  33. 3) In same top level dir, do a "make dist-osx". There now exists a
  34. .dmg file in the same directory. Install from this dmg.
  35. ## Universal Binaries for OSX PPC and X86
  36. 1) Install XCode 2.4 updates available from http://developer.apple.com.
  37. 2) Download latest libevent from
  38. http://www.monkey.org/~provos/libevent/
  39. 3) The first step of compiling libevent is to configure it as
  40. follows:
  41. CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
  42. \ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
  43. ./configure --enable-static --disable-shared \
  44. --disable-dependency-tracking
  45. 3) Complete the "make" and "make install". You will need to be root,
  46. or sudo -s, to complete the "make install".
  47. 4) If you have previouslly installed libevent, rm the old libevent.*, located
  48. by default, in /usr/local/lib/.
  49. 5) Check for a successful universal binary of libevent.a in, by default,
  50. /usr/local/lib by using the following command:
  51. file /usr/local/lib/libevent.a
  52. Your output should be:
  53. /usr/local/lib/libevent.a: Mach-O fat file with 2 architectures
  54. /usr/local/lib/libevent.a (for architecture i386): current ar archive random library
  55. /usr/local/lib/libevent.a (for architecture ppc): current ar archive
  56. 6) Get your preferred version of the tor source from tor.eff.org.
  57. 7) In the top level, this means /path/to/tor/, not tor/contrib/osx,
  58. do a configure with these parameters:
  59. CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
  60. \ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
  61. configure --prefix=/Library/Tor --bindir=/Library/Tor \
  62. --sysconfdir=/Library --enable-static --disable-shared \
  63. --disable-dependency-tracking
  64. 8) "make dist-osx"
  65. 9) Confirm you have created a universal binary by issuing the follow command:
  66. file src/or/tor
  67. src/or/tor: Mach-O fat file with 2 architectures
  68. src/or/tor (for architecture i386): Mach-O executable i386
  69. src/or/tor (for architecture ppc): Mach-O executable ppc
  70. Congrats. You have a universal binary.