tor-osx-dmg-creation.txt 5.7 KB

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