~unity-team/indicators-client/phablet-fix-local-folder

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
ChewieClient application - System Settings and Indicators QML client application

= Building =

The build system uses cmake.
To compile, simply invoke cmake and then make, e.g.:

    $ cmake .
    $ make


= Running =

You can run the chewie client application without installing any file for this use the command below with the correct arguments:

    $ <build-dir>/client/chewie-client --plugins-dir=<build-dir>/plugins --include-dir=<source-dir>/chewieui

    Ex(build-dir = "build"):

    $ cd build
    $ ./client/chewie-client --plugins-dir=plugins --include-dir=../chewieui


= Debugging / Profiling =

To enable QML and javascript debugging, do a build in debug mode, i.e. re-run cmake with -DCMAKE_BUILD_TYPE=Debug:

    $ cmake -DCMAKE_BUILD_TYPE=Debug .
    $ make

Then, run chewie-client with "-qmljsdebugger=port:3768". You should see the following message in the console:

    QML Debugger: Waiting for connection on port 3768...

You can then connect to the running program in QtCreator and use the profiling tools.


= Running unit tests =

To run the unit tests, you can use the commands below:

    $ make test

      - or -

    $ ctest


= Getting code coverage information =

To run the unit tests and generate code coverage information, you need to re-run
cmake with ENABLE_COVERAGE set to ON and then invoke `make lcov`.
This requires lcov to be installed.

    $ cmake -DENABLE_COVERAGE=ON .
    $ make lcov

This will generate a report (coverage/index.html) which you can view in a
browser.


= API documentation =

To generate API documentation, you need to re-run cmake with GENERATE_DOC set to
ON and then invoke `make qdoc`. This requires qdoc3 to be installed.

    $ cmake -DGENERATE_DOC=ON .
    $ make qdoc

The documentation is generated in the HTML format under doc/html/.


= Examples =

Some example server implementations can be found in "examples" folder.

The example server runs in a different dbus namespace, before run it update the plugin
metadata file replacing the following lines:

    "dbus-service" : "com.canonical.test.messages",
    "dbus-object-path" : "/com/canonical/test/messages"

To run the examples use the command below:

    $ python <example-name>

After starting the server you can have access to it from the client application. (check the "Running" section in this file for more info)