tor-osx-dmg-creation.txt 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 and install your preferred version of tor. Extract.
  9. 3) Update some variables in contrib/osx/package.sh
  10. 4) "make dist-osx"
  11. 5) You now have a dmg from which you can install Tor.
  12. ## Universal Binaries for OSX PPC and X86
  13. ## This method works in OSX 10.4 (Tiger) and newer OSX versions.
  14. ## See far below if you don't care about cross compiling for PPC and X86.
  15. ## The single architecture process starts with "###"
  16. 1) Install XCode 2.4.1 updates available from http://developer.apple.com.
  17. ## Compiling libevent
  18. 2) Download latest libevent from
  19. http://www.monkey.org/~provos/libevent/
  20. 3) The first step of compiling libevent is to configure it as
  21. follows:
  22. CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
  23. LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
  24. ./configure --enable-static --disable-shared --disable-dependency-tracking
  25. 3) Complete the "make" and "make install". You will need to be root,
  26. or sudo -s, to complete the "make install".
  27. 4) If you have previouslly installed libevent, rm the old libevent.*, located
  28. by default, in /usr/local/lib/.
  29. 5) Check for a successful universal binary of libevent.a in, by default,
  30. /usr/local/lib by using the following command:
  31. "file /usr/local/lib/libevent.a"
  32. Your output should be:
  33. /usr/local/lib/libevent.a: Mach-O fat file with 2 architectures
  34. /usr/local/lib/libevent.a (for architecture i386): current ar archive random library
  35. /usr/local/lib/libevent.a (for architecture ppc): current ar archive
  36. 6) Get your preferred version of the tor source from https://www.torproject.org/download.
  37. Extract the tarball.
  38. 7) In the top level, this means /path/to/tor/, not tor/contrib/osx,
  39. do a configure with these parameters:
  40. CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
  41. LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
  42. CONFDIR=/Library/Tor \
  43. ./configure --prefix=/Library/Tor --bindir=/Library/Tor \
  44. --sysconfdir=/Library --disable-dependency-tracking
  45. 13) "make dist-osx"
  46. 14) Confirm you have created a universal binary by issuing the follow command:
  47. "file src/or/tor". Its output should be as follows:
  48. src/or/tor: Mach-O fat file with 2 architectures
  49. src/or/tor (for architecture i386): Mach-O executable i386
  50. src/or/tor (for architecture ppc): Mach-O executable ppc
  51. 15) There should exist in the top-level directory a
  52. Tor-$VERSION-universal-$OS-Bundle.dmg
  53. 16) Congrats. You have a universal binary. You are now ready to install Tor.
  54. ### Single Architecture Binaries for PPC or X86, not both.
  55. ### This method works in all versions of OSX 10.3 through 10.5
  56. ### Compiling libevent
  57. 1) Download the latest libevent from
  58. http://www.monkey.org/~provos/libevent/
  59. 2) The first step of compiling libevent is to configure it as
  60. follows:
  61. ./configure --enable-static --disable-shared
  62. 3) Complete the "make" and "make install". You will need to be root,
  63. or sudo -s, to complete the "make install".
  64. 4) If you have previouslly installed libevent, go rm the old libevent.so*
  65. files so the linker doesn't get suckered into using them.
  66. ### Compiling Tor
  67. 1) Get your preferred version of the tor source from https://www.torproject.org. Extract the
  68. tarball.
  69. 2) In the top level, this means /path/to/tor/, not tor/contrib/osx,
  70. do a configure with these parameters:
  71. CONFDIR=/Library/Tor ./configure --prefix=/Library/Tor \
  72. --bindir=/Library/Tor --sysconfdir=/Library
  73. 3) In same top level dir, do a "make dist-osx". There now exists a
  74. .dmg file in the same directory. Install from this dmg.