1# Configuration options
2
3This information will not be useful to most end users.
4The options documented here can, however be useful for package maintainers in making *Go For It!* integrate better with the target operating system.
5
6## Cmake build flags
7
8The following options can be supplied either as command line parameter or by using a GUI for cmake.
9
10### Setting the system name
11By default *Go For It!* uses reverse domain notation for its files (executable name, name of the directory data is stored in, name of the configuration directory, ...), this means that the application is installed as com.github.jmoerman.go-for-it.
12In case a different naming scheme is used on the target operating system or another naming scheme was used previously, the name of these files and directories can be changed by changing the system name.
13
14The system name can be set to `new-name` by appending `-DAPP_SYSTEM_NAME:STRING=new-name` to the cmake build command.
15
16For example:
17
18```
19cmake -DCMAKE_INSTALL_PREFIX=/usr -DAPP_SYSTEM_NAME:STRING=go-for-it ..
20make
21sudo make install
22```
23
24In this case *Go For It!* would be installed as `/usr/bin/go-for-it`, `/usr/share/applications/go-for-it.desktop`, etc...
25
26### Setting the application id
27The application id can be set by appending `-DAPP_ID:STRING=new-id` to the cmake build command.
28The default value of `APP_SYSTEM_NAME` is based on `APP_ID` meaning that, asuming a clean build, setting the application id will have a similar effect to changing the system name.
29
30For example:
31
32```
33cmake -DCMAKE_INSTALL_PREFIX=/usr -DAPP_ID=test.go-for-it ..
34make
35sudo make install
36```
37
38### Removing the contribute dialog
39By default *Go For It!* includes a contribute dialog.
40In cases where the information present in this dialog is also provided by other sources such as the elementary OS AppCenter results for *Go For It!* it may be desirable to leave out this dialog.
41
42This can be accomplished by appending `-DNO_CONTRIBUTE_DIALOG:BOOL="1"` to the cmake build command.
43
44For example:
45
46```
47cmake -DCMAKE_INSTALL_PREFIX=/usr -DNO_CONTRIBUTE_DIALOG:BOOL="1" ..
48make
49sudo make install
50```
51
52### Removing references to the about dialog
53By default it is possible to view the about dialog of *Go For It!* via a menu option or by activating an action present in the .desktop file.
54If this information is easily accessible elsewhere it may be desirable to decrease clutter by these actions.
55
56This can be accomplished by appending `-DSHOW_ABOUT:BOOL="0"` to the cmake build command.
57
58For example:
59
60```
61cmake -DCMAKE_INSTALL_PREFIX=/usr -DSHOW_ABOUT:BOOL="0" ..
62make
63sudo make install
64```
65
66### gtk-update-icon-cache
67By default `gtk-update-icon-cache` will run after installing the icons, .desktop file and appdata metadata.
68This may not be desirable if `make install` is used to generate an installation package like a .deb file.
69
70gtk-update-icon-cache will not run if `-DICON_UPDATE:BOOL="0"` is appended to the cmake build command.
71
72### Building unit tests
73For some of the classes used in *Go For It!* unit tests can be build and run.
74
75Unit tests can be enabled by appending `-DBUILD_TESTS:BOOL="1"` to the cmake build command.
76
77This will result in a testing binary located in `<build directory>/tests/`.
78
79### Listing all CMake options
80Running `cmake -LAH ..` from the build directory will list all CMake configuration options including their description and current value.
81