Fix a couple of non-cleared key issues in hidden services
[tor/rransom.git] / doc / tor-osx-dmg-creation.txt
blob9a89e98759c842a0b77ece58924f7f9268eb2d63
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 ###.
10 The following steps are the exact steps used to produce the "official"
11 OSX builds of tor.
13 ### Summary:
14 1) Compile and install a static version of the latest release of
15 libevent.
16 2) Acquire and install your preferred version of tor. Extract.
17 3) "make dist-osx"
18 4) You now have a dmg from which you can install Tor.
20 ### Single Architecture Binaries for PPC or X86, not both.
21 ### This method works in all versions of OSX 10.3 through 10.6
23 ## Compiling libevent ##
25 1)  Download the latest stable libevent from
26 http://www.monkey.org/~provos/libevent/
28 2) The first step of compiling libevent is to configure it as
29 follows:
30        ./configure --enable-static --disable-shared
32 3) Complete the "make" and "make install".  You will need to be root,
33 or sudo -s, to complete the "make install".
35 ## Compiling Tor ##
37 4) Get your preferred version of the tor source from https://www.torproject.org.  Extract the
38 tarball.
40 5) In the top level, this means /path/to/tor/, not tor/contrib/osx,
41 do a configure with these parameters:
42      CONFDIR=/Library/Tor ./configure --prefix=/Library/Tor \
43      --bindir=/Library/Tor --sysconfdir=/Library
45 6) In same top level dir, do a "make dist-osx".  There now exists a
46 .dmg file in the same directory.  Install from this dmg.
48 ### Backwards compatible single-architecture binaries for OSX x86 10.4 from newer versions of OS X.
50 1) Install the latest XCode updates available from http://developer.apple.com.
52 ## Compiling libevent ##
54 2)  Download latest stable libevent from
55 http://www.monkey.org/~provos/libevent/
57 3) The first step of compiling libevent is to configure it as
58 follows:
59 CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386" \
60 LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
61 ./configure --enable-static --disable-shared --disable-dependency-tracking
63 4) Complete the "make" and "make install".  You will need to be root,
64 or sudo -s, to complete the "make install".
66 5) Check for a successful universal binary of libevent.a in, by default,
67 /usr/local/lib by using the following command:
68         "file /usr/local/lib/libevent.a"
70         Your output should be:
71 /usr/local/lib/libevent.a (for architecture i386):      current ar archive random library
73 6) Get your preferred version of the tor source from https://www.torproject.org/download.  
74 Extract the tarball.
76 7) In the top level, this means /path/to/tor/, not tor/contrib/osx,
77 do a configure with these parameters:
78 CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386" \
79 LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
80 CONFDIR=/Library/Tor \
81 ./configure --prefix=/Library/Tor --bindir=/Library/Tor \
82 --sysconfdir=/Library --disable-dependency-tracking
84 8) "make dist-osx"
86 9) Confirm you have created a universal binary by issuing the follow command:
87 "file src/or/tor".  Its output should be as follows:
88 src/or/tor (for architecture i386):     Mach-O executable i386
90 10) There should exist in the top-level directory a
91 Tor-$VERSION-universal-Bundle.dmg
93 11) Congrats.  You have a backwards-compatible binary. You are now ready to install Tor.
95 ### Universal Binaries for OSX PPC and X86
96 ### This method works in OSX 10.4 (Tiger) and newer OSX versions.
98 1) Install the latest XCode updates available from http://developer.apple.com.
100 ## Compiling libevent ##
102 2)  Download latest stable libevent from
103 http://www.monkey.org/~provos/libevent/
105 3) The first step of compiling libevent is to configure it as
106 follows:
107 CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
108 LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
109 ./configure --enable-static --disable-shared --disable-dependency-tracking
111 4) Complete the "make" and "make install".  You will need to be root,
112 or sudo -s, to complete the "make install".
114 5) Check for a successful universal binary of libevent.a in, by default,
115 /usr/local/lib by using the following command:
116         "file /usr/local/lib/libevent.a"
118         Your output should be:
119 /usr/local/lib/libevent.a: Mach-O fat file with 2 architectures
120 /usr/local/lib/libevent.a (for architecture i386):      current ar archive random library
121 /usr/local/lib/libevent.a (for architecture ppc):       current ar archive
123 6) Get your preferred version of the tor source from https://www.torproject.org/download.  
124 Extract the tarball.
126 7) In the top level, this means /path/to/tor/, not tor/contrib/osx,
127 do a configure with these parameters:
128 CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
129 LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
130 CONFDIR=/Library/Tor \
131 ./configure --prefix=/Library/Tor --bindir=/Library/Tor \
132 --sysconfdir=/Library --disable-dependency-tracking
134 8) "make dist-osx"
136 9) Confirm you have created a universal binary by issuing the follow command:
137 "file src/or/tor".  Its output should be as follows:
138 src/or/tor: Mach-O fat file with 2 architectures
139 src/or/tor (for architecture i386):     Mach-O executable i386
140 src/or/tor (for architecture ppc):      Mach-O executable ppc
142 10) There should exist in the top-level directory a
143 Tor-$VERSION-universal-Bundle.dmg
145 11) Congrats.  You have a universal binary. You are now ready to install Tor.