tor-osx-dmg-creation.txt 3.6 KB

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