Move exit-stats code to the end of rephist.c.
[tor/rransom.git] / doc / tor-osx-dmg-creation.txt
blob6aa98b9748068b26b41d5ef03b9829b500361b58
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 ###.
10 #######################################
12 # Section 1
14 # Single Architecture Binaries for PPC or i386, not both.
15 # This method works in all versions of OSX 10.3 through 10.6
16 #######################################
18 ## Compiling libevent ##
20 1) Download the latest stable libevent from
21 http://www.monkey.org/~provos/libevent/
23 2) The first step of compiling libevent is to configure it as
24 follows:
25 ./configure --enable-static --disable-shared
27 3) Complete the "make" and "make install". You will need to be root,
28 or sudo -s, to complete the "make install".
30 ## Compiling Tor ##
32 4) Get your preferred version of the tor source from
33 https://www.torproject.org/dist/ or
34 http://archive.torproject.org/tor-package-archive/. Extract the tarball.
36 5) In the top level, this means /path/to/tor/, not tor/contrib/osx,
37 do a configure with these parameters:
39 CONFDIR=/Library/Tor ./configure --prefix=/Library/Tor \
40 --bindir=/Library/Tor --sysconfdir=/Library
42 6) In same top level dir, do a "make dist-osx". There now exists a
43 .dmg file in the same directory. Install from this dmg.
45 #######################################
47 # Section 2
48 # Backwards compatible single-architecture binaries for OSX x86 10.4 from
49 # newer versions of OS X.
51 #######################################
53 1) Install the latest XCode updates available from http://developer.apple.com.
55 ## Compiling libevent ##
57 2) Download latest stable libevent from
58 http://www.monkey.org/~provos/libevent/
60 3) The first step of compiling libevent is to configure it as
61 follows:
63 CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot \
64 /Developer/SDKs/MacOSX10.4u.sdk -arch i386" \
65 LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
66 ./configure --enable-static --disable-shared --disable-dependency-tracking \
67 CC="gcc-4.0"
69 4) Complete the "make" and "make install". You will need to be root,
70 or sudo -s, to complete the "make install".
72 5) Check for a successful universal binary of libevent.a in, by default,
73 /usr/local/lib by using the following command:
75         "file /usr/local/lib/libevent.a"
77         Your output should be:
79 "/usr/local/lib/libevent.a (for architecture i386):
80 current ar archive random library"
82 6) Get your preferred version of the tor source from
83 https://www.torproject.org/dist/ or
84 http://archive.torproject.org/tor-package-archive/.
85 Extract the tarball.
87 7) In the top level, this means /path/to/tor/, not tor/contrib/osx,
88 do a configure with these parameters:
90 CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot \
91 /Developer/SDKs/MacOSX10.4u.sdk -arch i386" \
92 LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
93 CONFDIR=/Library/Tor \
94 ./configure --prefix=/Library/Tor --bindir=/Library/Tor \
95 --sysconfdir=/Library --disable-dependency-tracking CC="gcc-4.0"
97 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 (for architecture i386): Mach-O executable i386
103 10) There should exist in the top-level directory a
104 Tor-$VERSION-i386-Bundle.dmg
106 11) Congrats. You have a backwards-compatible binary.
107 You are now ready to install Tor.
109 ####################################################################
111 # Section 3
113 # Universal Binaries for OSX PPC and X86
114 # This method works in OSX 10.4 (Tiger) and newer OSX versions.
116 ####################################################################
118 1) Install the latest XCode updates available from http://developer.apple.com.
120 ## Compiling libevent ##
122 2) Download latest stable libevent from
123 http://www.monkey.org/~provos/libevent/
125 3) The first step of compiling libevent is to configure it as
126 follows:
127 CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot \
128 /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
129 LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
130 ./configure --enable-static --disable-shared --disable-dependency-tracking \
131 CC="gcc-4.0"
133 4) Complete the "make" and "make install". You will need to be root,
134 or sudo -s, to complete the "make install".
136 5) Check for a successful universal binary of libevent.a in, by default,
137 /usr/local/lib by using the following command:
138         "file /usr/local/lib/libevent.a"
140         Your output should be:
142 /usr/local/lib/libevent.a: Mach-O fat file with 2 architectures
143 /usr/local/lib/libevent.a (for architecture i386):
144 current ar archive random library
145 /usr/local/lib/libevent.a (for architecture ppc):
146 current ar archive
148 6) Get your preferred version of the tor source from
149 https://www.torproject.org/dist/ or
150 http://archive.torproject.org/tor-package-archive/.
151 Extract the tarball.
153 7) In the top level, this means /path/to/tor/, not tor/contrib/osx,
154 do a configure with these parameters:
156 CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot \
157 /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
158 LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
159 CONFDIR=/Library/Tor \
160 ./configure --prefix=/Library/Tor --bindir=/Library/Tor \
161 --sysconfdir=/Library --disable-dependency-tracking CC="gcc-4.0"
163 8) "make dist-osx"
165 9) Confirm you have created a universal binary by issuing the follow command:
166 "file src/or/tor". Its output should be as follows:
168 src/or/tor: Mach-O fat file with 2 architectures
169 src/or/tor (for architecture i386): Mach-O executable i386
170 src/or/tor (for architecture ppc): Mach-O executable ppc
172 10) There should exist in the top-level directory a
173 Tor-$VERSION-universal-Bundle.dmg
175 11) Congrats. You have a universal binary. You are now ready to install Tor.