tor-osx-dmg-creation.txt 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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 torbutton xpi and license file.
  12. 4) Acquire and install your preferred version of tor. Extract.
  13. 5) Update some variables in contrib/osx/package.sh
  14. 6) "make dist-osx"
  15. 7) You now have a dmg from which you can install Tor, Privoxy, and the
  16. Torbutton extension for Firefox.
  17. ## Universal Binaries for OSX PPC and X86
  18. ## This method works in OSX 10.4 (Tiger) and 10.5 (Leopard) only.
  19. ## See far below if you don't care about cross compiling for PPC and X86.
  20. ## The single architecture process starts with "###"
  21. 1) Install XCode 2.4.1 updates available from http://developer.apple.com.
  22. ## Compiling libevent
  23. 2) Download latest libevent from
  24. http://www.monkey.org/~provos/libevent/
  25. 3) The first step of compiling libevent is to configure it as
  26. follows:
  27. CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
  28. LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
  29. ./configure --enable-static --disable-shared --disable-dependency-tracking
  30. 3) Complete the "make" and "make install". You will need to be root,
  31. or sudo -s, to complete the "make install".
  32. 4) If you have previouslly installed libevent, rm the old libevent.*, located
  33. by default, in /usr/local/lib/.
  34. 5) Check for a successful universal binary of libevent.a in, by default,
  35. /usr/local/lib by using the following command:
  36. "file /usr/local/lib/libevent.a"
  37. Your output should be:
  38. /usr/local/lib/libevent.a: Mach-O fat file with 2 architectures
  39. /usr/local/lib/libevent.a (for architecture i386): current ar archive random library
  40. /usr/local/lib/libevent.a (for architecture ppc): current ar archive
  41. ## Acquiring privoxy
  42. 6) Download osx privoxy source from
  43. http://downloads.sourceforge.net/ijbswa/privoxyosx_setup_3.0.6.zip?modtime=1164104652&big_mirror=0
  44. 7) Place the privoxyosx_setup_3.0.6.zip in a location of your choice.
  45. Remember this location.
  46. 8) Get your preferred version of Torbutton from https://torbutton.torproject.org.
  47. Place into a location of your choosing, remember this location.
  48. 9) Get the torbutton LICENSE file from https://torbutton.torproject.org.
  49. Place into a location of your choosing, remember this location.
  50. 10) Get your preferred version of the tor source from https://tor.eff.org/download.
  51. Extract the tarball.
  52. 11) Update three variables in contrib/osx/package.sh:
  53. PRIVOXY_PKG_ZIP=~/tmp/privoxyosx_setup_3.0.6.zip
  54. TORBUTTON_PATH=~/tmp/torbutton-1.1.8-alpha.xpi
  55. TORBUTTON_LIC_PATH=~/tmp/LICENSE
  56. Make sure the paths are correct. The build will fail if they are not.
  57. 12) 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. CONFDIR=/Library/Tor \
  62. ./configure --prefix=/Library/Tor --bindir=/Library/Tor \
  63. --sysconfdir=/Library --enable-static --disable-shared \
  64. --disable-dependency-tracking
  65. 13) "make dist-osx"
  66. 14) Confirm you have created a universal binary by issuing the follow command:
  67. "file src/or/tor". Its output should be as follows:
  68. src/or/tor: Mach-O fat file with 2 architectures
  69. src/or/tor (for architecture i386): Mach-O executable i386
  70. src/or/tor (for architecture ppc): Mach-O executable ppc
  71. 15) There should exist in the top-level directory a
  72. Tor-$VERSION-universal-$OS-Bundle.dmg
  73. 16) Congrats. You have a universal binary. You are now ready to install Tor,
  74. Privoxy, and the Torbutton extension for Firefox.
  75. ### Single Architecture Binaries for PPC or X86, not both.
  76. ### This method works in all versions of OSX 10.1 through 10.5
  77. ### Compiling libevent
  78. 1) Download the latest libevent from
  79. http://www.monkey.org/~provos/libevent/
  80. 2) The first step of compiling libevent is to configure it as
  81. follows:
  82. ./configure --enable-static --disable-shared
  83. 3) Complete the "make" and "make install". You will need to be root,
  84. or sudo -s, to complete the "make install".
  85. 4) If you have previouslly installed libevent, go rm the old libevent.so*
  86. files so the linker doesn't get suckered into using them.
  87. ### Acquiring privoxy
  88. 1) Download osx privoxy source from
  89. http://downloads.sourceforge.net/ijbswa/privoxyosx_setup_3.0.6.zip?modtime=1164104652&big_mirror=0
  90. 2) Place the privoxyosx_setup_3.0.6.zip in a location of your choice.
  91. Remember this location.
  92. ### Compiling Tor
  93. 1) Get your preferred version of Torbutton from
  94. https://torbutton.torproject.org.
  95. Place into a location of your choosing, remember this location.
  96. 2) Get the torbutton LICENSE file from https://torbutton.torproject.org.
  97. Place into a location of your choosing, remember this location.
  98. 3) Get your preferred version of the tor source from tor.eff.org. Extract the
  99. tarball.
  100. 4) Update three variables in contrib/osx/package.sh:
  101. PRIVOXY_PKG_ZIP=~/tmp/privoxyosx_setup_3.0.6.zip
  102. TORBUTTON_PATH=~/tmp/torbutton-1.1.8-alpha.xpi
  103. TORBUTTON_LIC_PATH=~/tmp/LICENSE
  104. Make sure the paths are correct. The build will fail if they are not.
  105. 5) In the top level, this means /path/to/tor/, not tor/contrib/osx,
  106. do a configure with these parameters:
  107. CONFDIR=/Library/Tor ./configure --prefix=/Library/Tor \
  108. --bindir=/Library/Tor --sysconfdir=/Library \
  109. --enable-eventdns --enable-static --disable-shared
  110. 6) In same top level dir, do a "make dist-osx". There now exists a
  111. .dmg file in the same directory. Install from this dmg.