Giter Site home page Giter Site logo

anu-prakash-dev / laf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aseprite/laf

0.0 0.0 0.0 1.39 MB

A C++ library to create desktop applications

License: MIT License

CMake 2.20% C++ 84.17% C 1.89% Objective-C++ 10.64% Objective-C 1.11%

laf's Introduction

LAF: The Lost Application Framework

build MIT Licensed

A library to create Windows, macOS, and Linux applications.

This library is under active development so we don't provide API or ABI compatibility at this moment.

Modules

  • base: Base functions for any kind of application.
  • gfx: Generic graphics classes (rectangle, point, region, etc.)
  • ft: FreeType wrapper used by the os module (requires freetype library as dependency)
  • os: Functions to create windows in your Operating System.

Dependencies

laf can be compiled with two back-ends (LAF_BACKEND): skia or none.

When LAF_BACKEND=skia, laf requires a compiled version of the Skia library from branch aseprite-m81. You can check the aseprite/skia fork which includes a release with pre-built versions, or the check the instructions to compile skia from scratch.

When LAF_BACKEND=none, the Pixman library can be used as an alternative implementation of the gfx::Region class (generally if you're using laf-os you will link it with Skia, so there is no need for Pixman at all).

Compile

To compile laf with Skia as backend you have to specify some variables pointing to a valid compiled version of Skia in your disk. In the following example /skiadir is the absolute path to a directory where the Skia source code + compiled version is, or just where you've uncompressed a pre-built package of Skia (note that in this case /skiadir/out/Release-x64 should contain the Skia library files, i.e. skia.lib on Windows or libskia.a on other platforms):

git clone https://github.com/aseprite/laf.git
cd laf
mkdir build
cd build
cmake -G Ninja \
  -DLAF_BACKEND=skia \
  -DSKIA_DIR=/skiadir \
  -DSKIA_LIBRARY_DIR=/skiadir/out/Release-x64 \
  ..
ninja
./examples/helloworld

To compile only the library (without examples and tests) you can disable the LAF_WITH_EXAMPLES/LAF_WITH_TESTS options:

cmake -DLAF_WITH_EXAMPLES=OFF -DLAF_WITH_TESTS=OFF ...

Running Tests

You can use ctest to run all tests:

cd build
ninja
ctest

Defined Macros

  • LAF_WINDOWS: Compiling on Windows platform
  • LAF_MACOS: Compiling on macOS platform
  • LAF_LINUX: Compiling on Linux platform
  • LAF_SKIA: When we compile with LAF_BACKEND=skia (Skia library is available)

License

laf is distributed under the terms of the MIT license.

Some functions in laf depends on third party libraries (you should include these license notices when you distribute your software):

laf's People

Contributors

dacap avatar ayuusweetfish avatar gasparoken avatar winterheart avatar aesophor avatar martincapello avatar gnumaru avatar clarfonthey avatar

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.