tor-osx-dmg-creation.txt 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. CPPFLAGS='-DSSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION=0x0010' \
  29. CONFDIR=/Library/Tor ./configure --prefix=/Library/Tor \
  30. --bindir=/Library/Tor --sysconfdir=/Library
  31. 6) In same top level dir, do a "make dist-osx". There now exists a
  32. .dmg file in the same directory. Install from this dmg.
  33. #######################################
  34. #
  35. # Section 2
  36. # Backwards compatible single-architecture binaries for OSX x86 10.4 from newer versions of OS X.
  37. #
  38. #######################################
  39. 1) Install the latest XCode updates available from http://developer.apple.com.
  40. ## Compiling libevent ##
  41. 2) Download latest stable libevent from
  42. http://www.monkey.org/~provos/libevent/
  43. 3) The first step of compiling libevent is to configure it as
  44. follows:
  45. CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386" \
  46. LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
  47. ./configure --enable-static --disable-shared --disable-dependency-tracking
  48. 4) Complete the "make" and "make install". You will need to be root,
  49. or sudo -s, to complete the "make install".
  50. 5) Check for a successful universal binary of libevent.a in, by default,
  51. /usr/local/lib by using the following command:
  52. "file /usr/local/lib/libevent.a"
  53. Your output should be:
  54. "/usr/local/lib/libevent.a (for architecture i386): current ar archive random library"
  55. 6) Get your preferred version of the tor source from https://www.torproject.org/download.
  56. Extract the tarball.
  57. 7) In the top level, this means /path/to/tor/, not tor/contrib/osx,
  58. do a configure with these parameters:
  59. CPPFLAGS='-DSSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION=0x0010' \
  60. CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386" \
  61. LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
  62. CONFDIR=/Library/Tor \
  63. ./configure --prefix=/Library/Tor --bindir=/Library/Tor \
  64. --sysconfdir=/Library --disable-dependency-tracking
  65. 8) "make dist-osx"
  66. 9) Confirm you have created a universal binary by issuing the follow command:
  67. "file src/or/tor". Its output should be as follows:
  68. src/or/tor (for architecture i386): Mach-O executable i386
  69. 10) There should exist in the top-level directory a
  70. Tor-$VERSION-i386-Bundle.dmg
  71. 11) Congrats. You have a backwards-compatible binary. You are now ready to install Tor.
  72. ####################################################################
  73. #
  74. # Section 3
  75. #
  76. # Universal Binaries for OSX PPC and X86
  77. # This method works in OSX 10.4 (Tiger) and newer OSX versions.
  78. #
  79. ####################################################################
  80. 1) Install the latest XCode updates available from http://developer.apple.com.
  81. ## Compiling libevent ##
  82. 2) Download latest stable libevent from
  83. http://www.monkey.org/~provos/libevent/
  84. 3) The first step of compiling libevent is to configure it as
  85. follows:
  86. CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
  87. LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
  88. ./configure --enable-static --disable-shared --disable-dependency-tracking
  89. 4) Complete the "make" and "make install". You will need to be root,
  90. or sudo -s, to complete the "make install".
  91. 5) Check for a successful universal binary of libevent.a in, by default,
  92. /usr/local/lib by using the following command:
  93. "file /usr/local/lib/libevent.a"
  94. Your output should be:
  95. /usr/local/lib/libevent.a: Mach-O fat file with 2 architectures
  96. /usr/local/lib/libevent.a (for architecture i386): current ar archive random library
  97. /usr/local/lib/libevent.a (for architecture ppc): current ar archive
  98. 6) Get your preferred version of the tor source from https://www.torproject.org/download.
  99. Extract the tarball.
  100. 7) In the top level, this means /path/to/tor/, not tor/contrib/osx,
  101. do a configure with these parameters:
  102. CPPFLAGS='-DSSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION=0x0010' \
  103. CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
  104. LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
  105. CONFDIR=/Library/Tor \
  106. ./configure --prefix=/Library/Tor --bindir=/Library/Tor \
  107. --sysconfdir=/Library --disable-dependency-tracking
  108. 8) "make dist-osx"
  109. 9) Confirm you have created a universal binary by issuing the follow command:
  110. "file src/or/tor". Its output should be as follows:
  111. src/or/tor: Mach-O fat file with 2 architectures
  112. src/or/tor (for architecture i386): Mach-O executable i386
  113. src/or/tor (for architecture ppc): Mach-O executable ppc
  114. 10) There should exist in the top-level directory a
  115. Tor-$VERSION-universal-Bundle.dmg
  116. 11) Congrats. You have a universal binary. You are now ready to install Tor.