UI toolkit for Haiyajan. Requires the SDL2, and SDL2_ttf libraries only. Written in C99.
Simple to implement, simple to use.
This project is still a work in progress and an initial release is not yet available.
This UI toolkit requires the following run-time dependencies:
- SDL2
- SDL2_ttf
- SDL2_ttf depends upon FreeType.
And can optionally use the following run-time libraries:
- GNU Fribidi
- Provides Unicode bidirectional text support, for languages including Hebrew and Persian.
The following tools and dependencies are required to build Haiyajan-UI.
- A C99 compatible compiler
- Support includes GCC, Clang, and Visual Studio Build Tools*.
- CMake
- Building for Windows NT platforms additionally requires vcpkg.
- Other platforms will benefit with having pkg-config installed.
- SDL2
- SDL2_ttf
- SDL2_ttf depends upon FreeType.
And optionally:
- GNU Fribidi
* Visual Studio Build Tools is only supported on for Windows targets. Only the latest version of Visual Studio Build Tools is supported.
Windows 10 is required for builds targeting Windows NT (XP, Vista, 7, 8.1, 10 and 11). It may be possible to cross-compile from a Unix-like platform, but this is not supported or recommended by this project.
The following toolchains are tested regularly:
- Download the latest release of vcpkg.
- Install the required dependencies within vcpkg, making sure that the target triplet is set.
- For example, the command
vcpkg install --triplet=x64-windows-static sdl2 sdl2-ttf fribidi
installs all dependencies for a static 64-bit build. - Use
vcpkg help triplet
to list supported triplets.
- For example, the command
- Within one of the supported toolchain environments, use CMake to configure the project with
cmake -S <source directory> -B <build directory> -DLIBRARY_DISCOVER_METHOD=VCPKG -DCMAKE_TOOLCHAIN_FILE=<path to vcpkg>/vcpkg/scripts/buildsystems/vcpkg.cmake
- Start the build by executing
cmake --build <build directory>
CPM is already included with the respository. However, during the build CPM will download required dependencies. See this guide on how to cache downloaded dependencies to speed up subsequent builds.
- Within the Visual Studio Native Tools Command Prompt, use CMake to configure the project with
cmake -S <source directory> -B <build directory> -DLIBRARY_DISCOVER_METHOD=CPM
- Start the build by executing
cmake --build <build directory>
These instructions use pkg-config to link with dependencies already installed on you system. You may alternatively build using CPM by specifying -DLIBRARY_DISCOVER_METHOD=CPM
when configuring.
- Install the dependecies listed above.
- On Debian for example, the following command can be executed as root to install the required dependencies:
apt-get install gcc cmake libsdl2-dev libsdl2-ttf-dev libfribidi-dev pkg-config
.
- On Debian for example, the following command can be executed as root to install the required dependencies:
- Use CMake to configure the project with
cmake -S <source directory> -B <build directory> -DLIBRARY_DISCOVER_METHOD=PKG_CONFIG
- Start the build by executing
cmake --build <build directory>
The devkitPro toolchain with devkitA64 enabled, is required.
- Within the devkitPro environment, install the required dependencies with
pacman -S switch-cmake switch-pkg-config switch-sdl2 switch-sdl2_ttf switch-libfribidi
- Use CMake to configure the project with
cmake -S <source directory> -B <build directory> -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake
- Start the build by executing
cmake --build <build directory>
Emscripten is required to build for modern web browsers that support Web Assembly.
- Download and Install Emscripten
- Within an Emscripten environment, configure the project using cmake with
emcmake cmake -S <source directory> -B <build directory>
- Start the build by executing
cmake --build <build directory>
Copyright (c) 2020-2022 Mahyar Koshkouei
Licensed under GNU LGPL Version 3.