Coder Social home page Coder Social logo

dali-toolkit's Introduction

Table of Contents

Build Instructions

1. Building for Ubuntu desktop

Requirements

  • Ubuntu 16.04 or later
  • Environment created using dali_env script in dali-core repository
  • GCC version 9
  • Cmake version 3.8.2 or later

DALi requires a compiler supporting C++17 features.

Building the Repository

To build the repository enter the 'build/tizen' folder:

     $ cd dali-toolkit/build/tizen

Then run the following command to set up the build:

     $ cmake -DCMAKE_INSTALL_PREFIX=$DESKTOP_PREFIX .

If a Debug build is required, then add -DCMAKE_BUILD_TYPE=Debug

To build run:

     $ make install -j8

Building and executing test cases

See the README.md in dali-toolkit/automated-tests.

2. GBS Builds

NON-SMACK Targets

     $ gbs build -A [TARGET_ARCH]

SMACK enabled Targets

     $ gbs build -A [TARGET_ARCH] --define "%enable_dali_smack_rules 1"

DEBUG Builds

     $ gbs build -A [TARGET_ARCH] --define "%enable_debug 1"

3. Building for MS Windows

Third party dependencies are built using vcpkg. Instructions on how to install vcpkg can be found in the vcpkg-script folder in the windows-dependencies repository.

  • Download the windows-dependencies repository from DaliHub

       $ git clone https://github.com/dalihub/windows-dependencies.git
    
  • Read the windows-dependencies/vcpkg-script/Readme.md file for more instructions on how to build and install the third-party dependencies.

Build with the Visual Studio project

Read the windows-dependencies/README.md file for more instructions on how to build and run DALi for MS Windows.

Build with CMake

  • Requirements It's required the version 3.12.2 of CMake and a Git Bash Shell.

  • Notes and troubleshoting: 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. However, the CMake version installed with MS Visual Studio 2017 is a bit out of date and some VCPKG modules require a higher version. This instructions have been tested with CMake 3.12.2 on a Git Bash shell.

  • Define an environment variable to set the path to the VCPKG folder

    $ export VCPKG_FOLDER=C:/Users/username/Workspace/VCPKG_TOOL

  • Define an environment variable to set the path where DALi is going to be installed.

    $ export DALI_ENV_FOLDER=C:/Users/username/Workspace/dali-env

  • Execute the following commands to create the makefiles, build and install DALi.

    $ cmake -g Ninja . -DCMAKE_TOOLCHAIN_FILE=$VCPKG_FOLDER/vcpkg/scripts/buildsystems/vcpkg.cmake -DENABLE_PKG_CONFIGURE=OFF -DENABLE_LINK_TEST=OFF -DCMAKE_INSTALL_PREFIX=$DALI_ENV_FOLDER -DINSTALL_CMAKE_MODULES=ON -DUSE_DEFAULT_RESOURCE_DIR=OFF $ cmake --build . --target install

  • Options:

    • CMAKE_TOOLCHAIN_FILE ---> Needed to find packages installed by VCPKG.
    • ENABLE_PKG_CONFIGURE ---> Whether to install pkg configure files (not currently working on MS Windows. CMake modules used instead).
    • ENABLE_LINK_TEST ---> Whether to enable the link test (not currently working on MS Windows).
    • CMAKE_INSTALL_PREFIX ---> Were DALi is installed.
    • INSTALL_CMAKE_MODULES ---> Whether to install the CMake modules (Used by the CMake command find_package() to find previously installed libraries).
    • ENABLE_DEBUG ---> Whether to build with debug enabled.
    • USE_DEFAULT_RESOURCE_DIR ---> Whether to use the default resource folders. Otherwise set environment variables for DALI_IMAGE_DIR, DALI_SOUND_DIR, DALI_STYLE_DIR, DALI_STYLE_IMAGE_DIR and DALI_DATA_READ_ONLY_DIR

4. Building for MacOS

It is assumed that the DALi environment has been set up & both DALi Core & Adaptor have been built accordingly.

To build the repository enter the 'build/tizen' folder:

% cd dali-toolkit/build/tizen

Then run the following command to set up the build:

% cmake -DCMAKE_INSTALL_PREFIX=$DESKTOP_PREFIX -DCMAKE_TOOLCHAIN_FILE=$VCPKG_FOLDER/scripts/buildsystems/vcpkg.cmake -DINSTALL_CMAKE_MODULES=ON

If a Debug build is required, then add -DCMAKE_BUILD_TYPE=Debug -DENABLE_DEBUG=ON

To build, run:

% make install -j8

DALi Scene3D

For information about the DALi Scene3D library, refer to dali-scene3d/README.md.

dali-toolkit's People

Contributors

abdullahghujah avatar adeelkazmi avatar agnelovaz avatar bshsqa avatar davidiansteele avatar dongsug-song avatar fsole avatar greynaga3d avatar heeyongsong avatar hrdisaac avatar huayongxu avatar hyunjushin avatar jeanolee avatar jonghyunho avatar joogabyun avatar jsuya avatar loleksak avatar mumars avatar nick-holland-samsung avatar pwisbey avatar rabbitfor avatar seoyeon2kim avatar shrouqsabah avatar suhyungeom avatar taeyoon0lee avatar tom-robinson-samsung avatar tscholb avatar vcebollada avatar wonrst avatar xiangyinma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dali-toolkit's Issues

[Text] Introduce AttributedText Class

Add public API to deal with AttributedText Class, which allows the user to set/get/modify the rich text(plain text + formats) in text controllers.
This is similar to what other platforms have:

https://developer.apple.com/documentation/foundation/nsattributedstring
https://developer.android.com/guide/topics/text/spans

For Phase 1: we will support immutable Class only.

Additional:
Supporting HTML/CSS can be done, by extending AttributedText Class to save/load from HTML content. (#6)

ImageView FittingMode is not working

I notice that setting fitting mode for image View is not working, if it was set like:

Property::Map imageMap;
imageMap[ Toolkit::Visual::Property::TYPE ] = Toolkit::Visual::IMAGE;
imageMap[ ImageVisual::Property::URL ] = "img.png";
imageMap[ ImageVisual::Property::FITTING_MODE ] = FittingMode::FIT_WIDTH;//Aspect Ratio is messed up
mImageView.SetProperty(ImageView::Property::IMAGE, imageMap);

but if fitting mode is set like this it will work just fine:

Property::Map imageMap;
imageMap[ Toolkit::Visual::Property::TYPE ] = Toolkit::Visual::IMAGE;
imageMap[ ImageVisual::Property::URL ] = "img.png";
imageMap[ DevelVisual::Property::VISUAL_FITTING_MODE ] = Toolkit::DevelVisual::FIT_WIDTH;//Aspect Ratio is preserved
mImageView.SetProperty(ImageView::Property::IMAGE, imageMap);

This project could be used to show the issue:
https://github.com/Ali-Alzyoud/dali_image_app

[Text] Atals Size For Glyphs

It seems Dali will always request the Same Atlas size, for all font instance glyphs regardless of glyph real size.
So maybe there is room for memory enhancement when caching glyph bitmaps

Build failure

When building I get this:

[ 0%] Building CXX object CMakeFiles/dali-toolkit.dir/p/misc/tizen/nui/dali-toolkit/dali-toolkit/internal/builder/builder-animations.cpp.o
In file included from /p/misc/tizen/nui/dali-toolkit/dali-toolkit/internal/builder/builder-animations.cpp:23:
/p/misc/tizen/nui/dali-toolkit/dali-toolkit/internal/builder/builder-impl.h:25:10: fatal error: dali/public-api/common/stage.h: No such file or directory
25 | #include <dali/public-api/common/stage.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/dali-toolkit.dir/build.make:76: CMakeFiles/dali-toolkit.dir/p/misc/tizen/nui/dali-toolkit/dali-toolkit/internal/builder/builder-animations.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:117: CMakeFiles/dali-toolkit.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

I am building on ubuntu 20.04. I have successfully built dali-core and the missing header is in the dali-env location where core was installed, and $DESKTOP_PREFIX=/p/misc/tizen/nui/dali-env/opt. Am I missing a step? Also is there a particular order in which the various repos should be built?

Build errors while building dali-toolkit

I am getting the build errors described below. dali-core and dali-adapters built fine.

Any thoughts?

Errors:

/p/tizen/dali-toolkit/dali-toolkit/internal/visuals/image/image-visual.cpp: In member function ‘void Dali::Toolkit::Internal::ImageVisual::InitializeRenderer()’:
/p/tizen/dali-toolkit/dali-toolkit/internal/visuals/image/image-visual.cpp:694:34: error: ‘class Dali::Texture’ has no member named ‘GetPixelFormat’
  694 |       if(mTextures.GetTexture(0).GetPixelFormat() == Pixel::L8 && mTextures.GetTexture(1).GetPixelFormat() == Pixel::CHROMINANCE_U && mTextures.GetTexture(2).GetPixelFormat() == Pixel::CHROMINANCE_V)
      |                                  ^~~~~~~~~~~~~~
/p/tizen/dali-toolkit/dali-toolkit/internal/visuals/image/image-visual.cpp:694:91: error: ‘class Dali::Texture’ has no member named ‘GetPixelFormat’
  694 |       if(mTextures.GetTexture(0).GetPixelFormat() == Pixel::L8 && mTextures.GetTexture(1).GetPixelFormat() == Pixel::CHROMINANCE_U && mTextures.GetTexture(2).GetPixelFormat() == Pixel::CHROMINANCE_V)
      |                                                                                           ^~~~~~~~~~~~~~
/p/tizen/dali-toolkit/dali-toolkit/internal/visuals/image/image-visual.cpp:694:118: error: ‘CHROMINANCE_U’ is not a member of ‘Dali::Pixel’
  694 |       if(mTextures.GetTexture(0).GetPixelFormat() == Pixel::L8 && mTextures.GetTexture(1).GetPixelFormat() == Pixel::CHROMINANCE_U && mTextures.GetTexture(2).GetPixelFormat() == Pixel::CHROMINANCE_V)
      |                                                                                                                      ^~~~~~~~~~~~~
/p/tizen/dali-toolkit/dali-toolkit/internal/visuals/image/image-visual.cpp:694:159: error: ‘class Dali::Texture’ has no member named ‘GetPixelFormat’
  694 |       if(mTextures.GetTexture(0).GetPixelFormat() == Pixel::L8 && mTextures.GetTexture(1).GetPixelFormat() == Pixel::CHROMINANCE_U && mTextures.GetTexture(2).GetPixelFormat() == Pixel::CHROMINANCE_V)
      |                                                                                                                                                               ^~~~~~~~~~~~~~
/p/tizen/dali-toolkit/dali-toolkit/internal/visuals/image/image-visual.cpp:694:186: error: ‘CHROMINANCE_V’ is not a member of ‘Dali::Pixel’
  694 |       if(mTextures.GetTexture(0).GetPixelFormat() == Pixel::L8 && mTextures.GetTexture(1).GetPixelFormat() == Pixel::CHROMINANCE_U && mTextures.GetTexture(2).GetPixelFormat() == Pixel::CHROMINANCE_V)
      |                                                                                                                                                                                          ^~~~~~~~~~~~~
/p/tizen/dali-toolkit/dali-toolkit/internal/visuals/image/image-visual.cpp: In member function ‘virtual void Dali::Toolkit::Internal::ImageVisual::LoadComplete(bool, Dali::Toolkit::TextureUploadObserver::TextureInformation)’:
/p/tizen/dali-toolkit/dali-toolkit/internal/visuals/image/image-visual.cpp:931:56: error: ‘class Dali::Texture’ has no member named ‘GetPixelFormat’
  931 |         if(textureInformation.textureSet.GetTexture(0).GetPixelFormat() == Pixel::L8 && textureInformation.textureSet.GetTexture(1).GetPixelFormat() == Pixel::CHROMINANCE_U && textureInformation.textureSet.GetTexture(2).GetPixelFormat() == Pixel::CHROMINANCE_V)
      |                                                        ^~~~~~~~~~~~~~
/p/tizen/dali-toolkit/dali-toolkit/internal/visuals/image/image-visual.cpp:931:133: error: ‘class Dali::Texture’ has no member named ‘GetPixelFormat’
  931 |         if(textureInformation.textureSet.GetTexture(0).GetPixelFormat() == Pixel::L8 && textureInformation.textureSet.GetTexture(1).GetPixelFormat() == Pixel::CHROMINANCE_U && textureInformation.textureSet.GetTexture(2).GetPixelFormat() == Pixel::CHROMINANCE_V)
      |                                                                                                                                     ^~~~~~~~~~~~~~
/p/tizen/dali-toolkit/dali-toolkit/internal/visuals/image/image-visual.cpp:931:160: error: ‘CHROMINANCE_U’ is not a member of ‘Dali::Pixel’
  931 |         if(textureInformation.textureSet.GetTexture(0).GetPixelFormat() == Pixel::L8 && textureInformation.textureSet.GetTexture(1).GetPixelFormat() == Pixel::CHROMINANCE_U && textureInformation.textureSet.GetTexture(2).GetPixelFormat() == Pixel::CHROMINANCE_V)
      |                                                                                                                                                                ^~~~~~~~~~~~~
/p/tizen/dali-toolkit/dali-toolkit/internal/visuals/image/image-visual.cpp:931:221: error: ‘class Dali::Texture’ has no member named ‘GetPixelFormat’
  931 |         if(textureInformation.textureSet.GetTexture(0).GetPixelFormat() == Pixel::L8 && textureInformation.textureSet.GetTexture(1).GetPixelFormat() == Pixel::CHROMINANCE_U && textureInformation.textureSet.GetTexture(2).GetPixelFormat() == Pixel::CHROMINANCE_V)
      |                                                                                                                                                                                                                             ^~~~~~~~~~~~~~
/p/tizen/dali-toolkit/dali-toolkit/internal/visuals/image/image-visual.cpp:931:248: error: ‘CHROMINANCE_V’ is not a member of ‘Dali::Pixel’
  931 |         if(textureInformation.textureSet.GetTexture(0).GetPixelFormat() == Pixel::L8 && textureInformation.textureSet.GetTexture(1).GetPixelFormat() == Pixel::CHROMINANCE_U && textureInformation.textureSet.GetTexture(2).GetPixelFormat() == Pixel::CHROMINANCE_V)
      |                                                                                                                                                                                                                                                        ^~~~~~~~~~~~~
make[2]: *** [CMakeFiles/dali2-toolkit.dir/build.make:528: CMakeFiles/dali2-toolkit.dir/p/tizen/dali-toolkit/dali-toolkit/internal/visuals/image/image-visual.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/p/tizen/dali-toolkit/dali-toolkit/internal/visuals/text/text-visual.cpp: In member function ‘void Dali::Toolkit::Internal::TextVisual::AddTilingTexture(Dali::TextureSet&, Dali::Toolkit::Internal::TextVisual::TilingInfo&, Dali::PixelData&, Dali::Sampler&, unsigned int)’:
/p/tizen/dali-toolkit/dali-toolkit/internal/visuals/text/text-visual.cpp:604:17: error: ‘UploadSubPixelData’ is not a member of ‘Dali::DevelTexture’
  604 |   DevelTexture::UploadSubPixelData(texture, data, 0u, tilingInfo.offsetHeight, tilingInfo.width, tilingInfo.height);
      |                 ^~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/dali2-toolkit.dir/build.make:654: CMakeFiles/dali2-toolkit.dir/p/tizen/dali-toolkit/dali-toolkit/internal/visuals/text/text-visual.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:131: CMakeFiles/dali2-toolkit.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

[Text] Undo Redo TextModifications

Add API to :
1- Undo Text Changes
2- Redo Text Changes
3- Clear Undo List
4- Set Size for Undo List

This can be used with TextEditor, TextField

[Text] Caret movement support

Add API to allow modify location for Caret.
1- LineUp,LineDown
2- NextWord, PreviousWord
3- WordStart, WordEnd
4- LineStart, LineEnd

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.