< arma> mikeperry: perhaps some of those urls should be https?
[tor/rransom.git] / doc / tor-osx-dmg-creation.txt
blob6728e24ae896d9b7f29f9114dedcfdc16361a089
1 ## Instructions for building the official dmgs for OSX.
2 ##
4 The following steps are the exact steps used to produce the "official"
5 OSX builds of tor.
7 Summary:
8 1) Compile and install a static version of the latest release of
9 libevent.
10 2) Acquire and install your preferred version of tor. Extract.
11 3) "make dist-osx"
12 4) You now have a dmg from which you can install Tor.
14 ## Universal Binaries for OSX PPC and X86
15 ## This method works in OSX 10.4 (Tiger) and newer OSX versions.
16 ## See far below if you don't care about cross compiling for PPC and X86.
17 ## The single architecture process starts with "###"
19 1) Install the latest XCode updates available from http://developer.apple.com.
21 ## Compiling libevent
23 2)  Download latest stable libevent from
24 http://www.monkey.org/~provos/libevent/
26 3) The first step of compiling libevent is to configure it as
27 follows:
28 CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
29 LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
30 ./configure --enable-static --disable-shared --disable-dependency-tracking
32 4) Complete the "make" and "make install".  You will need to be root,
33 or sudo -s, to complete the "make install".
35 5) Check for a successful universal binary of libevent.a in, by default,
36 /usr/local/lib by using the following command:
37         "file /usr/local/lib/libevent.a"
39         Your output should be:
40 /usr/local/lib/libevent.a: Mach-O fat file with 2 architectures
41 /usr/local/lib/libevent.a (for architecture i386):      current ar archive random library
42 /usr/local/lib/libevent.a (for architecture ppc):       current ar archive
44 6) Get your preferred version of the tor source from https://www.torproject.org/download.  
45 Extract the tarball.
47 7) In the top level, this means /path/to/tor/, not tor/contrib/osx,
48 do a configure with these parameters:
49 CFLAGS="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
50 LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
51 CONFDIR=/Library/Tor \
52 ./configure --prefix=/Library/Tor --bindir=/Library/Tor \
53 --sysconfdir=/Library --disable-dependency-tracking
55 8) "make dist-osx"
57 9) Confirm you have created a universal binary by issuing the follow command:
58 "file src/or/tor".  Its output should be as follows:
59 src/or/tor: Mach-O fat file with 2 architectures
60 src/or/tor (for architecture i386):     Mach-O executable i386
61 src/or/tor (for architecture ppc):      Mach-O executable ppc
63 10) There should exist in the top-level directory a
64 Tor-$VERSION-universal-Bundle.dmg
66 11) Congrats.  You have a universal binary. You are now ready to install Tor.
68 ### Single Architecture Binaries for PPC or X86, not both.
69 ### This method works in all versions of OSX 10.3 through 10.5
71 ### Compiling libevent
73 1)  Download the latest stable libevent from
74 http://www.monkey.org/~provos/libevent/
76 2) The first step of compiling libevent is to configure it as
77 follows:
78        ./configure --enable-static --disable-shared
80 3) Complete the "make" and "make install".  You will need to be root,
81 or sudo -s, to complete the "make install".
83 ### Compiling Tor
85 4) Get your preferred version of the tor source from https://www.torproject.org.  Extract the
86 tarball.
88 5) In the top level, this means /path/to/tor/, not tor/contrib/osx,
89 do a configure with these parameters:
90      CONFDIR=/Library/Tor ./configure --prefix=/Library/Tor \
91      --bindir=/Library/Tor --sysconfdir=/Library
93 6) In same top level dir, do a "make dist-osx".  There now exists a
94 .dmg file in the same directory.  Install from this dmg.