Merge "Moved TextureCache dispatch methods to their own class" into devel/master
[platform/core/uifw/dali-core.git] / README
1 T.O.C.
2 ======
3
4  1.   GBS Builds
5  1.1. NON-SMACK Targets
6  1.2. SMACK enabled Targets
7  2.   Building for Ubuntu desktop
8  2.1. Minimum Requirements
9  2.2. Creating a DALi Environment
10  2.3. Building the Repository
11  2.4. Build target options
12  2.5. Building and executing test cases
13  3.   Building DALi as Javascript using Emscripten
14  3.1. Creating a DALi Environment for Emscripten Javascript builds
15  3.2. Building the repository as Javascript using Emscripten
16
17 1. GBS Builds
18 =============
19
20 1.1. NON-SMACK Targets
21 ----------------------
22
23  gbs build -A [TARGET_ARCH]
24
25 1.2. SMACK enabled Targets
26 --------------------------
27
28  gbs build -A [TARGET_ARCH] --define "%enable_dali_smack_rules 1"
29
30
31
32 2. Building for Ubuntu desktop
33 ==============================
34
35 2.1. Minimum Requirements
36 ------------------------
37
38  - Ubuntu 14.04
39
40 2.2. Creating a DALi Environment
41 -------------------------------
42
43 To build for desktop first ensure ALL sources are selected:
44  - Go to Ubuntu Settings and then to "Software & Updates"
45  - In the "Ubuntu Software" tab, ensure ALL software sources are ticked
46    (This is required because we install some community-maintained free & open-source software)
47
48 Then you can create a dali-env folder in your home folder with:
49
50  dali-core/build/scripts/dali_env -c
51
52 This will also download any dependencies that the dali repositories require.
53
54 You can save the environment variables to a file:
55
56  dali-env/opt/bin/dali_env -s > setenv
57
58 This process only needs to be done once.
59
60 Next source these variables:
61
62  . setenv
63
64 You will have to source these variables every time you open up a new terminal (or you can add to .bashrc if you prefer).
65
66
67 2.3. Building the Repository
68 ----------------------------
69
70 To build the repository enter the 'build/tizen' folder:
71
72  cd dali-core/build/tizen
73
74 Then run the following commands:
75
76  autoreconf --install
77  ./configure --prefix=$DESKTOP_PREFIX
78  make install -j8
79
80
81 2.4. Build target options
82 -------------------------
83
84 OpenGL ES context:
85
86 When building, the OpenGL ES version of the target should be specified.
87
88 Valid version options are 20, 30, 31
89
90 With configure:
91 Add: --enable-gles=X
92
93 With gbs:
94 Add to the gbs build line: --define "%target_gles_version X"
95
96
97 2.5. Building and executing test cases
98 --------------------------------------
99
100 See the README.md in dali-core/automated-tests.
101
102
103 3. Building DALi as Javascript using Emscripten
104 -----------------------------------------------
105
106
107 3.1. Environment for Emscripten Javascript builds
108 --------------------------------------------------
109
110 To build the Javascript version of DALi, the Emscripten SDK is required.
111 Installation of this is built in to the main dali_env script.
112
113 First create a directory for the environment:
114
115 # mkdir -p ~/dali-env-emscripten
116
117 Now run the dali_env script. This will download and build the Emscripten SDK, which may take several minutes.
118 The script may ask for your password as it will need to install any package prerequisites.
119 Note the "-e" option for Emscripten.
120
121 # cd ~/dali-env-emscripten
122 # PATH-TO-DALI-CORE/build/scripts/dali_env -c -e
123
124 Create the setenv script. A new section for Emscripten will be created at the top.
125
126 # ./dali-env/opt/bin/dali_env -s > setenv
127
128 Run the setenv script to setup environment variables.
129
130 # . ./setenv
131
132 Warning: As of 19/01/2015 with a userID > 6 digits there was a bug in llvm that caused
133 the build to fail. So I've used the incoming branches of the emscripten sdk and not latest.
134
135
136 3.2. Building the repository as Javascript using Emscripten
137 -----------------------------------------------------------
138
139 Clean the build first:
140
141 # cd ./dali-core/build/tizen
142 # git clean -dxf
143 # autoreconf --install
144
145 Use llvm's drop in replacements for configure & make:
146
147 # emconfigure ./configure --verbose --prefix=$DESKTOP_PREFIX --enable-emscripten=yes --enable-debug=yes --enable-profile=UBUNTU --enable-gles=20
148 # emmake make install -j8
149
150