Modfied documentation using asciibook.
[profile/ivi/dlt-daemon.git] / INSTALL.txt
1 Diagnostic Log and Trace  - Installation
2 ========================================
3 Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
4
5 Instructions for installing this software
6 -----------------------------------------
7 This software uses cmake as its build tool. To build and install the
8 DLT daemon, follow these steps:
9
10 - mkdir build
11 - cd build
12 - cmake ..
13 - make
14 - optional: sudo make install
15 - optional: sudo ldconfig
16
17 Compile options with default values
18 -----------------------------------
19 [options="header"]
20 |==============================================================================================
21 | Option                 | Value | Comment
22 | WITH_SYSTEMD           | OFF   | Set to on to run CMakeLists.txt in systemd
23 | WITH_SYSTEMD_WATCHDOG  | OFF   | Set to ON to use the systemd watchdog in dlt-daemon
24 | WITH_DLT_ADAPTOR       | ON    | Set ton ON to build src/adaptor binaries
25 | WITH_DLT_CONSOLE       | ON    | Set ton ON to build src/console binaries
26 | WITH_DLT_SYSTEM        | ON    | Set ton ON to build src/systembinaries
27 | WITH_DLT_EXAMPLES      | ON    | Set ton ON to build src/examplesbinaries
28 | WITH_DLT_TESTS         | ON    | Set ton ON to build src/testbinaries
29 | WITH_DLT_SHM_ENABLE    | OFF   | Set to OFF to use FIFO as IPC from user to daemon
30 | WITH_CHECK_CONFIG_FILE | OFF   | Set to ON to create a configure file of CheckIncludeFiles and CheckFunctionExists
31 | WITH_DOC               | OFF   | Set to ON to build documentation target
32 | WITH_TESTSCRIPTS       | OFF   | Set to on to run CMakeLists.txt in test scripts
33 | WITH_GPROF             | OFF   | Set \-pg to compile flags
34 | WITH_MAN               | ON    | Set to OFF to skip building of man pages
35 | BUILD_SHARED_LIBS      | ON    | Set to OFF to build static libraries
36 | CMAKE_INSTALL_PREFIX   | /usr/local | 
37 | CMAKE_BUILD_TYPE       | RelWithDebInfo | 
38 |==============================================================================================
39
40 In order to change these options, you can modify this values
41 with ccmake, do the appropriate changes in CmakeList.txt or via 
42 the commandline for cmake
43
44 - Change a value with: cmake -D<Variable>=<Value>
45 - Example: cmake -DCMAKE_INSTALL_PREFIX=/usr
46
47 Create Man pages
48 ----------------
49 With the compile option "WITH_MAN=ON" (default value) the man 
50 pages will generated. After the call "sudo make install" (see 
51 "Compiling in Linux") they are installed at <CMAKE_INSTALL_PREFIX>/share/man. 
52
53 Create doxygen documentation
54 ----------------------------
55 - mkdir build
56 - cd build
57 - cmake -DWITH_DOC=ON ..
58 - make 
59 - (only DLT doc - optional )make doc
60 - (only DLT-Filetransfer - optional )make doc-filetransfer
61
62 You find the documentation know as HTML, RTF or LaTex in <project-root>/build/doc
63
64 - Doxygen documentation
65
66 Generation of systemd unit files
67 --------------------------------
68
69 DLT provides some example unit files for systemd, stored in <DLT-root>/systemd.
70 In <DLT-root>/systemd/CMakeLists.txt you have to specify some values, e.g. the port for dlt-adaptor-udp.
71 By default the generation of unit files with cmake is off. Please follow these steps to enable the generation:
72
73 * Change into the root directory of DLT-daemon
74 * mkdir build
75 * cd build
76 * cmake -DWITH_SYSTEMD=ON ..
77
78 You find the parsed unit files in the PROJECT_BINARY_DIR/systemd directory.
79
80 Git configuration
81 -----------------
82 It is important to set the name of the user and the email of the user for all git instances on the system:
83
84 ----
85 git config --global user.name "Firstname Lastname"
86 git config --global user.email "your_email@youremail.com"
87 ----
88
89 If you are behind a proxy you have to set up the Git proxy configuration, e.g.
90
91 ----
92 git config --global http.proxy $http_proxy
93 ----
94
95 Checkout the code from the GENIVI Git repository.
96
97 ----
98 git clone http://git.projects.genivi.org/dlt-daemon.git
99 ----
100
101 Working on the code & contribution
102 ----------------------------------
103 Get an overview of all branches:
104
105 ----
106 git branch -a
107 ----
108
109 Switch to the branch you want to work on (see versioning scheme, the master is the feature branch) and verify that it has switched.
110
111 ----
112 git checkout <remote branch>
113 git branch -a
114 ----
115
116 Best practice is to create a local branch based on the remote branch:
117
118 ----
119 git checkout -b <local branch> <remote branch>
120 ----
121
122 Start working, best practice is to commit smaller, compilable pieces during the work that makes it easier to handle later on.
123
124 If you want to commit your changes, send them to the auto-dlt list, you can create a patch like this:
125
126 ----
127 git format-patch -s <remote branch>
128 ----
129
130 This creates a set of patches that are published via the mailing list. The patches will be discussed, merged & uploaded on the git.
131
132