tor-osx-dmg-creation.txt 5.5 KB

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