tor-osx-dmg-creation.txt 3.7 KB

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