tor-osx-dmg-creation.txt 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. ## Instructions for building the official dmgs for OSX.
  2. ##
  3. ## The loose table of contents:
  4. ## Summary
  5. ## Single Architecture Binaries for PPC or X86, not both.
  6. ## Backwards compatible single-architecture binaries for OSX x86 10.4 from newer versions of OS X.
  7. ## Universal Binaries for OSX PPC and X86
  8. ## Each section is delineated by ###.
  9. The following steps are the exact steps used to produce the "official"
  10. OSX builds of tor.
  11. ### Summary:
  12. 1) Compile and install a static version of the latest release of
  13. libevent.
  14. 2) Acquire and install your preferred version of tor. Extract.
  15. 3) "make dist-osx"
  16. 4) You now have a dmg from which you can install Tor.
  17. ### Single Architecture Binaries for PPC or X86, not both.
  18. ### This method works in all versions of OSX 10.3 through 10.6
  19. ## Compiling libevent ##
  20. 1) Download the latest stable libevent from
  21. http://www.monkey.org/~provos/libevent/
  22. 2) The first step of compiling libevent is to configure it as
  23. follows:
  24. ./configure --enable-static --disable-shared
  25. 3) Complete the "make" and "make install". You will need to be root,
  26. or sudo -s, to complete the "make install".
  27. ## Compiling Tor ##
  28. 4) Get your preferred version of the tor source from https://www.torproject.org. Extract the
  29. tarball.
  30. 5) In the top level, this means /path/to/tor/, not tor/contrib/osx,
  31. do a configure with these parameters:
  32. CONFDIR=/Library/Tor ./configure --prefix=/Library/Tor \
  33. --bindir=/Library/Tor --sysconfdir=/Library
  34. 6) In same top level dir, do a "make dist-osx". There now exists a
  35. .dmg file in the same directory. Install from this dmg.
  36. ### Backwards compatible single-architecture binaries for OSX x86 10.4 from newer versions of OS X.
  37. 1) Install the latest XCode updates available from http://developer.apple.com.
  38. ## Compiling libevent ##
  39. 2) Download latest stable libevent from
  40. http://www.monkey.org/~provos/libevent/
  41. 3) The first step of compiling libevent is to configure it as
  42. follows:
  43. CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386" \
  44. LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
  45. ./configure --enable-static --disable-shared --disable-dependency-tracking
  46. 4) Complete the "make" and "make install". You will need to be root,
  47. or sudo -s, to complete the "make install".
  48. 5) Check for a successful universal binary of libevent.a in, by default,
  49. /usr/local/lib by using the following command:
  50. "file /usr/local/lib/libevent.a"
  51. Your output should be:
  52. /usr/local/lib/libevent.a (for architecture i386): current ar archive random library
  53. 6) Get your preferred version of the tor source from https://www.torproject.org/download.
  54. Extract the tarball.
  55. 7) In the top level, this means /path/to/tor/, not tor/contrib/osx,
  56. do a configure with these parameters:
  57. CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386" \
  58. LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
  59. CONFDIR=/Library/Tor \
  60. ./configure --prefix=/Library/Tor --bindir=/Library/Tor \
  61. --sysconfdir=/Library --disable-dependency-tracking
  62. 8) "make dist-osx"
  63. 9) Confirm you have created a universal binary by issuing the follow command:
  64. "file src/or/tor". Its output should be as follows:
  65. src/or/tor (for architecture i386): Mach-O executable i386
  66. 10) There should exist in the top-level directory a
  67. Tor-$VERSION-universal-Bundle.dmg
  68. 11) Congrats. You have a backwards-compatible binary. You are now ready to install Tor.
  69. ### Universal Binaries for OSX PPC and X86
  70. ### This method works in OSX 10.4 (Tiger) and newer OSX versions.
  71. 1) Install the latest XCode updates available from http://developer.apple.com.
  72. ## Compiling libevent ##
  73. 2) Download latest stable libevent from
  74. http://www.monkey.org/~provos/libevent/
  75. 3) The first step of compiling libevent is to configure it as
  76. follows:
  77. CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
  78. LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
  79. ./configure --enable-static --disable-shared --disable-dependency-tracking
  80. 4) Complete the "make" and "make install". You will need to be root,
  81. or sudo -s, to complete the "make install".
  82. 5) Check for a successful universal binary of libevent.a in, by default,
  83. /usr/local/lib by using the following command:
  84. "file /usr/local/lib/libevent.a"
  85. Your output should be:
  86. /usr/local/lib/libevent.a: Mach-O fat file with 2 architectures
  87. /usr/local/lib/libevent.a (for architecture i386): current ar archive random library
  88. /usr/local/lib/libevent.a (for architecture ppc): current ar archive
  89. 6) Get your preferred version of the tor source from https://www.torproject.org/download.
  90. Extract the tarball.
  91. 7) In the top level, this means /path/to/tor/, not tor/contrib/osx,
  92. do a configure with these parameters:
  93. CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
  94. LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
  95. CONFDIR=/Library/Tor \
  96. ./configure --prefix=/Library/Tor --bindir=/Library/Tor \
  97. --sysconfdir=/Library --disable-dependency-tracking
  98. 8) "make dist-osx"
  99. 9) Confirm you have created a universal binary by issuing the follow command:
  100. "file src/or/tor". Its output should be as follows:
  101. src/or/tor: Mach-O fat file with 2 architectures
  102. src/or/tor (for architecture i386): Mach-O executable i386
  103. src/or/tor (for architecture ppc): Mach-O executable ppc
  104. 10) There should exist in the top-level directory a
  105. Tor-$VERSION-universal-Bundle.dmg
  106. 11) Congrats. You have a universal binary. You are now ready to install Tor.