Mercurial > nsnake
annotate INSTALL.md @ 26:137ead4860a0
Misc: style
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 22 Oct 2018 20:16:00 +0200 |
parents | 0e0ee35dae66 |
children | 0c49fb9c5420 |
rev | line source |
---|---|
0 | 1 NSnake INSTALL |
2 ============== | |
3 | |
4 To build nsnake, you need a C compiler, [CMake][] and the curses library. | |
5 | |
6 Note for Windows | |
7 ---------------- | |
8 | |
9 NSnake has been ported to Windows using pdcurses, it is bundled with nsnake and does not need to be installed | |
10 separately. | |
11 | |
12 Build | |
13 ----- | |
14 | |
15 Go to the source directory and type the following commands | |
16 | |
1
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
17 mkdir _build_ |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
18 cd _build_ |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
19 cmake .. -DCMAKE_BUILD_TYPE=Release |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
20 make |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
21 make install |
0 | 22 |
23 See the CMake documentation for other generators. | |
24 | |
25 Options | |
26 ------- | |
27 | |
28 The following boolean options are available: | |
29 | |
26 | 30 - **WITH_DOCS**: set to false if you don't want documentation to be installed, |
31 - **WITH_MAN**: set to false if you don't want manual pages to be installed. | |
0 | 32 |
33 The following directories may be adjusted: | |
34 | |
26 | 35 - **WITH_DOCDIR**: the directory where to install documentation files, |
36 - **WITH_MANDIR**: the root directory where to install manual files. | |
0 | 37 |
38 Example: | |
39 | |
1
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
40 cmake .. -DWITH_DOCS=Off -DWITH_MANDIR=man |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
41 |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
42 Scores file |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
43 ----------- |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
44 |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
45 NSnake uses a scores file in order to share all users scores on the same machine. In order to work, nsnake is |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
46 installed with setgid bit set and **games** as user and group. |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
47 |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
48 The directory for saving the scores is writable by this group to make sure the executable can write it from any user. |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
49 |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
50 You can adjust the user, group and scores directory with the following options: |
0 | 51 |
26 | 52 - **WITH_USER**: the uid passed in `chown` command, |
53 - **WITH_GROUP**: the gid passed in `chown` command, | |
54 - **WITH_DBDIR**: the directory where to store the scores file. | |
1
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
55 |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
56 Note: these options have no effects on Windows. |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
57 |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
58 Example: |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
59 |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
60 cmake .. -DWITH_USER=nobody -DWITH_GROUP=nobody -DWITH_DBDIR=/var/cache/nsnake |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
61 |
0e0ee35dae66
Add post install script to chown binary and directory
David Demelier <markand@malikania.fr>
parents:
0
diff
changeset
|
62 [CMake]: http://cmake.org |