1 <img src="https://dalihub.github.io/images/DaliLogo320x200.png">
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 * [3. Building for Android](#3-android-builds)
15 * [4. Building for MS Windows](#4-windows-builds)
16 * Build with the Visual Studio project.
18 * [Creating an example](#creating-an-example)
22 ## 1. Building for Ubuntu desktop
26 - Ubuntu 16.04 or later
27 - Environment created using dali_env script in dali-core repository
30 DALi requires a compiler supporting C++11 features.
31 Ubuntu 16.04 is the first version to offer this by default (GCC v5.4.0).
33 GCC version 6 is recommended since it has fixes for issues in version 5
34 e.g. it avoids spurious 'defined but not used' warnings in header files.
36 ### Building the Repository
38 To build the repository enter the 'build/tizen' folder:
40 $ cd dali-demo/build/tizen
42 Then run the following commands:
44 $ cmake -DCMAKE_INSTALL_PREFIX=$DESKTOP_PREFIX .
49 Specify a debug build when building for desktop by passing the following parameter to cmake:
51 $ cmake -DCMAKE_INSTALL_PREFIX=$DESKTOP_PREFIX -DCMAKE_BUILD_TYPE=Debug .
53 Before running make install as normal:
61 $ gbs build -A [TARGET_ARCH]
63 ### SMACK enabled Targets
65 $ gbs build -A [TARGET_ARCH] --define "%enable_dali_smack_rules 1"
69 $ gbs build -A [TARGET_ARCH] --define "%enable_debug 1"
73 - Make a directory in the "examples" directory. Only one example will be created per directory.
74 - The executable installed will have a ".example" appended to it, e.g. a "blocks" directory produces "blocks.example".
75 - Add all source files for the required example in this directory.
76 - Modify "com.samsung.dali-demo.xml" to include your example so that it can be launched on target.
77 - No changes are required to the make system as long as the above is followed, your example will be automatically built & installed.
79 ## 3. Building for Android
83 - Ubuntu 16.04 or later
85 - Android DALi dependencies
87 ### Building the Repository
88 To download Android DALi dependencies clone https://github.com/dalihub/android-dependencies
89 in your DALi folder (folder containing dali-demo).
91 $ git clone https://github.com/dalihub/android-dependencies.git
93 To build the repository enter the 'build/android' folder:
95 $ cd dali-demo/build/android
97 Then run the following command:
105 To debug from Android Studio set Android DALi enviroment using setenv script in 'build/android' and launch Android Studio from the enviroment:
108 $ <path/to/androidstudio>/bin/studio.sh
116 $ adb install -r ./app/build/outputs/apk/debug/dali-demo-debug.apk
117 $ adb install -r ./app/build/outputs/apk/release/dali-demo-release.apk
119 ## 4. Building for MS Windows
121 Third party dependencies are built using vcpkg. Instructions on how to install vcpkg can be found in the
122 vcpkg-script folder in the windows-dependencies repository.
124 - Download the windows-dependencies repository from DaliHub
126 $ git clone https://github.com/dalihub/windows-dependencies.git
128 - Read the windows-dependencies/vcpkg-script/Readme.md file for more instructions on how to build and install the third-party dependencies.
130 ### Build with the Visual Studio project
131 Read the windows-dependencies/README.md file for more instructions on how to build and run DALi for MS Windows.
136 It's required the version 3.12.2 of CMake and a Git Bash Shell.
138 * Notes and troubleshoting:
139 It should be possible to use the MS Visual studio Developer Command Prompt (https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs) to build DALi from the command line.
140 However, the CMake version installed with MS Visual Studio 2017 is a bit out of date and some VCPKG modules require a higher version.
141 This instructions have been tested with CMake 3.12.2 on a Git Bash shell.
143 * Define an environment variable to set the path to the VCPKG folder
145 $ export VCPKG_FOLDER=C:/Users/username/Workspace/VCPKG_TOOL
147 * Define an environment variable to set the path where DALi is going to be installed.
149 $ export DALI_ENV_FOLDER=C:/Users/username/Workspace/dali-env
151 * Execute the following commands to create the makefiles, build and install DALi.
153 $ cmake -g Ninja . -DCMAKE_TOOLCHAIN_FILE=$VCPKG_FOLDER/vcpkg/scripts/buildsystems/vcpkg.cmake -DENABLE_PKG_CONFIGURE=OFF -DINTERNATIONALIZATION=OFF -DCMAKE_INSTALL_PREFIX=$DALI_ENV_FOLDER
154 $ cmake --build . --target install
157 - CMAKE_TOOLCHAIN_FILE ---> Needed to find packages installed by VCPKG.
158 - ENABLE_PKG_CONFIGURE ---> Whether to install pkg configure files (not currently working on MS Windows. CMake modules used instead).
159 - INTERNATIONALIZATION ---> Whether to generate and install internazionalization '.po' Portable Object files.
160 - CMAKE_INSTALL_PREFIX ---> Were DALi is installed.
161 - ENABLE_DEBUG ---> Whether to build with debug enabled.
163 * If dali-toolkit has been compiled with the USE_DEFAULT_RESOURCE_DIR option disabled then is needed to set global environment variables in order to find the default toolkit resources.
166 $ setx DALI_ENV_FOLDER C:/Users/username/dali-env
167 $ setx DALI_IMAGE_DIR $DALI_ENV_FOLDER/share/dali/toolkit/images/
168 $ setx DALI_SOUND_DIR $DALI_ENV_FOLDER/share/dali/toolkit/sounds/
169 $ setx DALI_STYLE_DIR $DALI_ENV_FOLDER/share/dali/toolkit/styles/
170 $ setx DALI_STYLE_IMAGE_DIR $DALI_ENV_FOLDER/share/dali/toolkit/styles/images/
171 $ setx DALI_DATA_READ_ONLY_DIR $DALI_ENV_FOLDER/share/dali/