tor-osx-dmg-creation.txt 3.5 KB

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