tor-osx-dmg-creation.txt 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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://www.torproject.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.9.1-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 --disable-dependency-tracking
  64. 13) "make dist-osx"
  65. 14) Confirm you have created a universal binary by issuing the follow command:
  66. "file src/or/tor". Its output should be as follows:
  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. 15) There should exist in the top-level directory a
  71. Tor-$VERSION-universal-$OS-Bundle.dmg
  72. 16) Congrats. You have a universal binary. You are now ready to install Tor,
  73. Privoxy, and the Torbutton extension for Firefox.
  74. ### Single Architecture Binaries for PPC or X86, not both.
  75. ### This method works in all versions of OSX 10.1 through 10.5
  76. ### Compiling libevent
  77. 1) Download the latest libevent from
  78. http://www.monkey.org/~provos/libevent/
  79. 2) The first step of compiling libevent is to configure it as
  80. follows:
  81. ./configure --enable-static --disable-shared
  82. 3) Complete the "make" and "make install". You will need to be root,
  83. or sudo -s, to complete the "make install".
  84. 4) If you have previouslly installed libevent, go rm the old libevent.so*
  85. files so the linker doesn't get suckered into using them.
  86. ### Acquiring privoxy
  87. 1) Download osx privoxy source from
  88. http://downloads.sourceforge.net/ijbswa/privoxyosx_setup_3.0.6.zip?modtime=1164104652&big_mirror=0
  89. 2) Place the privoxyosx_setup_3.0.6.zip in a location of your choice.
  90. Remember this location.
  91. ### Compiling Tor
  92. 1) Get your preferred version of Torbutton from
  93. https://torbutton.torproject.org.
  94. Place into a location of your choosing, remember this location.
  95. 2) Get the torbutton LICENSE file from https://torbutton.torproject.org.
  96. Place into a location of your choosing, remember this location.
  97. 3) Get your preferred version of the tor source from https://www.torproject.org. Extract the
  98. tarball.
  99. 4) Update three variables in contrib/osx/package.sh:
  100. PRIVOXY_PKG_ZIP=~/tmp/privoxyosx_setup_3.0.6.zip
  101. TORBUTTON_PATH=~/tmp/torbutton-1.1.9.1-alpha.xpi
  102. TORBUTTON_LIC_PATH=~/tmp/LICENSE
  103. Make sure the paths are correct. The build will fail if they are not.
  104. 5) In the top level, this means /path/to/tor/, not tor/contrib/osx,
  105. do a configure with these parameters:
  106. CONFDIR=/Library/Tor ./configure --prefix=/Library/Tor \
  107. --bindir=/Library/Tor --sysconfdir=/Library
  108. 6) In same top level dir, do a "make dist-osx". There now exists a
  109. .dmg file in the same directory. Install from this dmg.