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 * [5. Building for MacOS](#5-building-for-macos)
19 * [Creating an example](#creating-an-example)
23 ## 1. Building for Ubuntu desktop
27 - Ubuntu 16.04 or later
28 - Environment created using dali_env script in dali-core repository
30 - Cmake version 3.8.2 or later
32 DALi requires a compiler supporting C++17 features.
34 ### Building the Repository
36 To build the repository enter the 'build/tizen' folder:
38 $ cd dali-demo/build/tizen
40 Then run the following commands:
42 $ cmake -DCMAKE_INSTALL_PREFIX=$DESKTOP_PREFIX .
47 Specify a debug build when building for desktop by passing the following parameter to cmake:
49 $ cmake -DCMAKE_INSTALL_PREFIX=$DESKTOP_PREFIX -DCMAKE_BUILD_TYPE=Debug .
51 Before running make install as normal:
59 $ gbs build -A [TARGET_ARCH]
61 ### SMACK enabled Targets
63 $ gbs build -A [TARGET_ARCH] --define "%enable_dali_smack_rules 1"
67 $ gbs build -A [TARGET_ARCH] --define "%enable_debug 1"
71 - Make a directory in the "examples" directory. Only one example will be created per directory.
72 - The executable installed will have a ".example" appended to it, e.g. a "blocks" directory produces "blocks.example".
73 - Add all source files for the required example in this directory.
74 - Modify "com.samsung.dali-demo.xml" to include your example so that it can be launched on target.
75 - No changes are required to the make system as long as the above is followed, your example will be automatically built & installed.
77 ## 3. Building for Android
81 - Ubuntu 16.04 or later
82 - Android DALi dependencies
83 - If you are behind a proxy, please set up the "http_proxy" and "https_proxy" environment variables appropriately
84 - Clone dali-core, dali-adaptor, dali-toolkit & android-dependencies to the same folder as dali-demo
85 - Android dependencies can be cloned from: https://github.com/dalihub/android-dependencies
87 ### Building the Repository
88 To build the repository enter the 'build/android' folder:
90 $ cd dali-demo/build/android
92 Then run the following command:
100 To debug from Android Studio set Android DALi enviroment using setenv script in 'build/android' and launch Android Studio from the enviroment:
103 $ <path/to/androidstudio>/bin/studio.sh
111 $ adb install -r ./app/build/outputs/apk/debug/dali-demo-debug.apk
112 $ adb install -r ./app/build/outputs/apk/release/dali-demo-release.apk
114 Manually granting permission for accessing Storage before running the demo
115 1. Long press the DALi demo app icon => App Info
116 2. Permissions => Storage => Enable
118 ## 4. Building for MS Windows
120 Third party dependencies are built using vcpkg. Instructions on how to install vcpkg can be found in the
121 vcpkg-script folder in the windows-dependencies repository.
123 - Download the windows-dependencies repository from DaliHub
125 $ git clone https://github.com/dalihub/windows-dependencies.git
127 - Read the windows-dependencies/vcpkg-script/Readme.md file for more instructions on how to build and install the third-party dependencies.
129 ### Build with the Visual Studio project
130 Read the windows-dependencies/README.md file for more instructions on how to build and run DALi for MS Windows.
135 It's required the version 3.12.2 of CMake and a Git Bash Shell.
137 * Notes and troubleshoting:
138 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.
139 However, the CMake version installed with MS Visual Studio 2017 is a bit out of date and some VCPKG modules require a higher version.
140 This instructions have been tested with CMake 3.12.2 on a Git Bash shell.
142 * Define an environment variable to set the path to the VCPKG folder
144 $ export VCPKG_FOLDER=C:/Users/username/Workspace/VCPKG_TOOL
146 * Define an environment variable to set the path where DALi is going to be installed.
148 $ export DALI_ENV_FOLDER=C:/Users/username/Workspace/dali-env
150 * Execute the following commands to create the makefiles, build and install DALi.
152 $ 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
153 $ cmake --build . --target install
156 - CMAKE_TOOLCHAIN_FILE ---> Needed to find packages installed by VCPKG.
157 - ENABLE_PKG_CONFIGURE ---> Whether to install pkg configure files (not currently working on MS Windows. CMake modules used instead).
158 - INTERNATIONALIZATION ---> Whether to generate and install internazionalization '.po' Portable Object files.
159 - CMAKE_INSTALL_PREFIX ---> Were DALi is installed.
160 - ENABLE_DEBUG ---> Whether to build with debug enabled.
162 * 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.
165 $ setx DALI_ENV_FOLDER C:/Users/username/dali-env
166 $ setx DALI_IMAGE_DIR $DALI_ENV_FOLDER/share/dali/toolkit/images/
167 $ setx DALI_SOUND_DIR $DALI_ENV_FOLDER/share/dali/toolkit/sounds/
168 $ setx DALI_STYLE_DIR $DALI_ENV_FOLDER/share/dali/toolkit/styles/
169 $ setx DALI_STYLE_IMAGE_DIR $DALI_ENV_FOLDER/share/dali/toolkit/styles/images/
170 $ setx DALI_DATA_READ_ONLY_DIR $DALI_ENV_FOLDER/share/dali/
172 ## 5. Building for MacOS
174 It is assumed that the DALi environment has been set up & that DALi Core, Adaptor & Toolkit have been built accordingly.
176 To build the repository enter the 'build/tizen' folder:
178 % cd dali-demo/build/tizen
180 Then run the following command to set up the build:
182 % cmake -DCMAKE_INSTALL_PREFIX=$DESKTOP_PREFIX -DCMAKE_TOOLCHAIN_FILE=$VCPKG_FOLDER/scripts/buildsystems/vcpkg.cmake -DINTERNATIONALIZATION=OFF
184 If a Debug build is required, then add `-DCMAKE_BUILD_TYPE=Debug`