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
29 - Cmake version 3.8.2 or later
31 DALi requires a compiler supporting C++17 features.
33 ### Building the Repository
35 To build the repository enter the 'build/tizen' folder:
37 $ cd dali-demo/build/tizen
39 Then run the following commands:
41 $ cmake -DCMAKE_INSTALL_PREFIX=$DESKTOP_PREFIX .
46 Specify a debug build when building for desktop by passing the following parameter to cmake:
48 $ cmake -DCMAKE_INSTALL_PREFIX=$DESKTOP_PREFIX -DCMAKE_BUILD_TYPE=Debug .
50 Before running make install as normal:
58 $ gbs build -A [TARGET_ARCH]
60 ### SMACK enabled Targets
62 $ gbs build -A [TARGET_ARCH] --define "%enable_dali_smack_rules 1"
66 $ gbs build -A [TARGET_ARCH] --define "%enable_debug 1"
70 - Make a directory in the "examples" directory. Only one example will be created per directory.
71 - The executable installed will have a ".example" appended to it, e.g. a "blocks" directory produces "blocks.example".
72 - Add all source files for the required example in this directory.
73 - Modify "com.samsung.dali-demo.xml" to include your example so that it can be launched on target.
74 - No changes are required to the make system as long as the above is followed, your example will be automatically built & installed.
76 ## 3. Building for Android
80 - Ubuntu 16.04 or later
81 - Android DALi dependencies
82 - If you are behind a proxy, please set up the "http_proxy" and "https_proxy" environment variables appropriately
83 - Clone dali-core, dali-adaptor, dali-toolkit & android-dependencies to the same folder as dali-demo
84 - Android dependencies can be cloned from: https://github.com/dalihub/android-dependencies
86 ### Building the Repository
87 To build the repository enter the 'build/android' folder:
89 $ cd dali-demo/build/android
91 Then run the following command:
99 To debug from Android Studio set Android DALi enviroment using setenv script in 'build/android' and launch Android Studio from the enviroment:
102 $ <path/to/androidstudio>/bin/studio.sh
110 $ adb install -r ./app/build/outputs/apk/debug/dali-demo-debug.apk
111 $ adb install -r ./app/build/outputs/apk/release/dali-demo-release.apk
113 ## 4. Building for MS Windows
115 Third party dependencies are built using vcpkg. Instructions on how to install vcpkg can be found in the
116 vcpkg-script folder in the windows-dependencies repository.
118 - Download the windows-dependencies repository from DaliHub
120 $ git clone https://github.com/dalihub/windows-dependencies.git
122 - Read the windows-dependencies/vcpkg-script/Readme.md file for more instructions on how to build and install the third-party dependencies.
124 ### Build with the Visual Studio project
125 Read the windows-dependencies/README.md file for more instructions on how to build and run DALi for MS Windows.
130 It's required the version 3.12.2 of CMake and a Git Bash Shell.
132 * Notes and troubleshoting:
133 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.
134 However, the CMake version installed with MS Visual Studio 2017 is a bit out of date and some VCPKG modules require a higher version.
135 This instructions have been tested with CMake 3.12.2 on a Git Bash shell.
137 * Define an environment variable to set the path to the VCPKG folder
139 $ export VCPKG_FOLDER=C:/Users/username/Workspace/VCPKG_TOOL
141 * Define an environment variable to set the path where DALi is going to be installed.
143 $ export DALI_ENV_FOLDER=C:/Users/username/Workspace/dali-env
145 * Execute the following commands to create the makefiles, build and install DALi.
147 $ 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
148 $ cmake --build . --target install
151 - CMAKE_TOOLCHAIN_FILE ---> Needed to find packages installed by VCPKG.
152 - ENABLE_PKG_CONFIGURE ---> Whether to install pkg configure files (not currently working on MS Windows. CMake modules used instead).
153 - INTERNATIONALIZATION ---> Whether to generate and install internazionalization '.po' Portable Object files.
154 - CMAKE_INSTALL_PREFIX ---> Were DALi is installed.
155 - ENABLE_DEBUG ---> Whether to build with debug enabled.
157 * 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.
160 $ setx DALI_ENV_FOLDER C:/Users/username/dali-env
161 $ setx DALI_IMAGE_DIR $DALI_ENV_FOLDER/share/dali/toolkit/images/
162 $ setx DALI_SOUND_DIR $DALI_ENV_FOLDER/share/dali/toolkit/sounds/
163 $ setx DALI_STYLE_DIR $DALI_ENV_FOLDER/share/dali/toolkit/styles/
164 $ setx DALI_STYLE_IMAGE_DIR $DALI_ENV_FOLDER/share/dali/toolkit/styles/images/
165 $ setx DALI_DATA_READ_ONLY_DIR $DALI_ENV_FOLDER/share/dali/