diff options
Diffstat (limited to 'docs/install.rst')
-rw-r--r-- | docs/install.rst | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/docs/install.rst b/docs/install.rst new file mode 100644 index 00000000..c5fea5d1 --- /dev/null +++ b/docs/install.rst | |||
@@ -0,0 +1,129 @@ | |||
1 | Install Instructions | ||
2 | ==================== | ||
3 | |||
4 | Linux | ||
5 | --------- | ||
6 | |||
7 | First, install the build dependencies :: | ||
8 | |||
9 | bash apt-get install build-essential libtool autotools-dev automake libconfig-dev ncurses-dev cmake checkinstall | ||
10 | |||
11 | .. note :: ``libconfig-dev`` should be >= 1.4. | ||
12 | |||
13 | |||
14 | Then you'll need a recent version of `libsodium <https://github.com/jedisct1/libsodium>`_ :: | ||
15 | |||
16 | git clone git://github.com/jedisct1/libsodium.git | ||
17 | cd libsodium | ||
18 | git checkout tags/0.4.2 | ||
19 | ./autogen.sh | ||
20 | ./configure && make check | ||
21 | sudo checkinstall --install --pkgname libsodium --pkgversion 0.4.2 --nodoc | ||
22 | sudo ldconfig`` | ||
23 | |||
24 | Finally, fetch the Tox source code and run cmake :: | ||
25 | |||
26 | git clone git://github.com/irungentoo/ProjectTox-Core.git | ||
27 | cd ProjectTox-Core && mkdir build && cd build | ||
28 | cmake .. | ||
29 | |||
30 | Then you can build any of the files in `/testing`_ and `/other`_ that are currently | ||
31 | supported on your platform by running :: | ||
32 | |||
33 | make name_of_c_file | ||
34 | |||
35 | For example, to build `Messenger_test.c`_ you would run :: | ||
36 | |||
37 | make Messenger_test | ||
38 | |||
39 | |||
40 | Or you could just build everything that is supported on your platform by | ||
41 | running :: | ||
42 | bash make | ||
43 | |||
44 | OS X | ||
45 | ------ | ||
46 | |||
47 | Homebrew | ||
48 | ~~~~~~~~~~ | ||
49 | :: | ||
50 | |||
51 | brew install libtool automake autoconf libconfig libsodium cmake | ||
52 | cmake . | ||
53 | make | ||
54 | sudo make install | ||
55 | |||
56 | Non-homebrew | ||
57 | ~~~~~~~~~~~~ | ||
58 | |||
59 | Much the same as Linux, remember to install the latest XCode and the | ||
60 | developer tools (Preferences -> Downloads -> Command Line Tools). Users | ||
61 | running Mountain Lion and the latest version of XCode (4.6.3) will also | ||
62 | need to install libtool, automake and autoconf. They are easy enough to | ||
63 | install, grab them from http://www.gnu.org/software/libtool/, | ||
64 | http://www.gnu.org/software/autoconf/ and | ||
65 | http://www.gnu.org/software/automake/, then follow these steps for each: | ||
66 | |||
67 | :: | ||
68 | |||
69 | ./configure | ||
70 | make | ||
71 | sudo make install | ||
72 | |||
73 | Do not install them from macports (or any dependencies for that matter) | ||
74 | as they get shoved in the wrong directory and make your life more | ||
75 | annoying. | ||
76 | |||
77 | Another thing you may want to install is the latest gcc, this caused me | ||
78 | a few problems as XCode from 4.3 no longer includes gcc and instead uses | ||
79 | LLVM-GCC, a nice install guide can be found at | ||
80 | http://caiustheory.com/install-gcc-421-apple-build-56663-with-xcode-42 | ||
81 | |||
82 | Windows | ||
83 | --------- | ||
84 | |||
85 | You should install: | ||
86 | |||
87 | * `MinGW <http://sourceforge.net/projects/mingw/>`_'s C compiler | ||
88 | * `CMake <http://www.cmake.org/cmake/resources/software.html>`_ | ||
89 | |||
90 | You have to `modify your PATH environment | ||
91 | variable <http://www.computerhope.com/issues/ch000549.htm>`_ so that it | ||
92 | contains MinGW's bin folder path. With default settings, the bin folder | ||
93 | is located at ``C:\MinGW\bin``, which means that you would have to | ||
94 | append ``;C:\MinGW\bin`` to the PATH variable. | ||
95 | |||
96 | Then you should either clone this repo by using git, or just download a | ||
97 | `zip of current Master | ||
98 | branch <https://github.com/irungentoo/ProjectTox-Core/archive/master.zip>`_ | ||
99 | and extract it somewhere. | ||
100 | |||
101 | After that you should get precompiled package of libsodium from | ||
102 | `here <https://download.libsodium.org/libsodium/releases/libsodium-win32-0.4.2.tar.gz>`_ | ||
103 | and extract the archive into this repo's root. That is, ``sodium`` | ||
104 | folder should be along with ``core``, ``testing`` and other folders. | ||
105 | |||
106 | Navigate in ``cmd`` to this repo and run:: | ||
107 | |||
108 | mkdir build && cd build | ||
109 | cmake -G "MinGW Makefiles" .. | ||
110 | |||
111 | Then you can build any of the `/testing`_ and `/other`_ that are currently | ||
112 | supported on your platform by running:: | ||
113 | |||
114 | mingw32-make name_of_c_file | ||
115 | |||
116 | For example, to build `Messenger_test.c`_ you would run:: | ||
117 | |||
118 | mingw32-make Messenger_test`` | ||
119 | |||
120 | Or you could just build everything that is supported on your platform by | ||
121 | running:: | ||
122 | |||
123 | mingw32-make | ||
124 | |||
125 | |||
126 | .. _/testing: https://github.com/irungentoo/ProjectTox-Core/tree/master/testing | ||
127 | .. _/other: https://github.com/irungentoo/ProjectTox-Core/tree/master/other | ||
128 | |||
129 | .. _Messenger_test.c: https://github.com/irungentoo/ProjectTox-Core/tree/master/other/Messanger_test.c | ||