SVACE errors fixed
[platform/core/uifw/dali-demo.git] / README.md
1 <img src="https://dalihub.github.io/images/DaliLogo320x200.png">
2
3 # Table of Contents
4
5    * [Build Instructions](#build-instructions)
6       * [1. Building for Ubuntu desktop](#1-building-for-ubuntu-desktop)
7          * [Minimum Requirements](#minimum-requirements)
8          * [Building the Repository](#building-the-repository)
9          * [DEBUG Builds](#debug-builds)
10       * [2. GBS Builds](#2-gbs-builds)
11          * [NON-SMACK Targets](#non-smack-targets)
12          * [SMACK enabled Targets](#smack-enabled-targets)
13          * [DEBUG Builds](#debug-builds-1)
14    * [Creating an example](#creating-an-example)
15
16 # Build Instructions
17
18 ## 1. Building for Ubuntu desktop
19
20 ### Requirements
21
22  - Ubuntu 16.04 or later
23  - Environment created using dali_env script in dali-core repository
24  - GCC version 6
25
26 DALi requires a compiler supporting C++11 features.
27 Ubuntu 16.04 is the first version to offer this by default (GCC v5.4.0).
28
29 GCC version 6 is recommended since it has fixes for issues in version 5
30 e.g. it avoids spurious 'defined but not used' warnings in header files.
31
32 ### Building the Repository
33
34 To build the repository enter the 'build/tizen' folder:
35
36          $ cd dali-demo/build/tizen
37
38 Then run the following commands:
39
40          $ cmake -DCMAKE_INSTALL_PREFIX=$DESKTOP_PREFIX .
41          $ make install -j8
42
43 ### DEBUG Builds
44
45 Specify a debug build when building for desktop by passing the following parameter to cmake:
46
47          $ cmake -DCMAKE_INSTALL_PREFIX=$DESKTOP_PREFIX -DCMAKE_BUILD_TYPE=Debug .
48
49 Before running make install as normal:
50
51          $ make install -j8
52
53 ## 2. GBS Builds
54
55 ### NON-SMACK Targets
56
57          $ gbs build -A [TARGET_ARCH]
58
59 ### SMACK enabled Targets
60
61          $ gbs build -A [TARGET_ARCH] --define "%enable_dali_smack_rules 1"
62
63 ### DEBUG Builds
64
65          $ gbs build -A [TARGET_ARCH] --define "%enable_debug 1"
66
67 # Creating an example
68
69  - Make a directory in the "examples" directory. Only one example will be created per directory.
70  - The executable installed will have a ".example" appended to it, e.g. a "blocks" directory produces "blocks.example".
71  - Add all source files for the required example in this directory.
72  - Modify "com.samsung.dali-demo.xml" to include your example so that it can be launched on target.
73  - No changes are required to the make system as long as the above is followed, your example will be automatically built & installed.
74
75 ## 3. Building for Android
76
77 ### Requirements
78
79  - Ubuntu 16.04 or later
80  - GCC version 6
81  - Android DALi dependencies
82
83 ### Building the Repository
84 To download Android DALi dependencies clone https://github.com/dalihub/android-dependencies
85 in your DALi folder (folder containing dali-demo).
86
87          $ git clone https://github.com/dalihub/android-dependencies.git
88
89 To build the repository enter the 'build/android' folder:
90
91          $ cd dali-demo/build/android
92
93 Then run the following command:
94
95          $ ./build.sh
96
97 For debug build:
98
99          $ DEBUG=1 ./build.sh
100
101 To debug from Android Studio set Android DALi enviroment using setenv script in 'build/android' and launch Android Studio from the enviroment:
102
103          $ . setenv
104          $ <path/to/androidstudio>/bin/studio.sh
105
106 To clean the build:
107
108          $ ./build.sh clean
109
110 To install apks:
111
112          $ adb install -r ./app/build/outputs/apk/debug/dali-demo-debug.apk
113          $ adb install -r ./app/build/outputs/apk/release/dali-demo-release.apk
114
115