https://github.com/deltabeard/haiyajan-menu
Haiyajan UI Toolkit
https://github.com/deltabeard/haiyajan-menu
c gui sdl2
Last synced: 5 months ago
JSON representation
Haiyajan UI Toolkit
- Host: GitHub
- URL: https://github.com/deltabeard/haiyajan-menu
- Owner: deltabeard
- License: other
- Created: 2020-10-08T22:16:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-20T16:01:12.000Z (almost 2 years ago)
- Last Synced: 2024-07-20T17:22:51.734Z (almost 2 years ago)
- Topics: c, gui, sdl2
- Language: C
- Homepage: https://deltabeard.github.io/haiyajan-menu/
- Size: 21.9 MB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE.GPLv3.md
Awesome Lists containing this project
README
# Haiyajan UI
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.
## Building
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](https://cmake.org/)
- Building for Windows NT platforms additionally requires [vcpkg](https://vcpkg.io/).
- Other platforms will benefit with having pkg-config installed.
- [SDL2](https://www.libsdl.org/)
- [SDL2_ttf](https://www.libsdl.org/projects/SDL_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 NT
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:
- [Visual Studio Build Tools](https://aka.ms/buildtools)
- [w64devkit](https://github.com/skeeto/w64devkit)
#### Build using VCPKG
1. Download the latest release of [vcpkg](https://vcpkg.io/).
2. 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.
3. Within one of the supported toolchain environments, use CMake to configure the project with
`cmake -S -B -DLIBRARY_DISCOVER_METHOD=VCPKG -DCMAKE_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake`
4. Start the build by executing `cmake --build `
#### Build using CPM
[CPM](https://github.com/cpm-cmake/CPM.cmake) is already included with the respository. However, during the build CPM will download required dependencies. See [this guide](https://github.com/cpm-cmake/CPM.cmake#cpm_source_cache) on how to cache downloaded dependencies to speed up subsequent builds.
1. Within the Visual Studio Native Tools Command Prompt, use CMake to configure the project with
`cmake -S -B -DLIBRARY_DISCOVER_METHOD=CPM`
2. Start the build by executing `cmake --build `
### Linux, MacOS, BSD, and other Unix-like
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.
1. 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`.
2. Use CMake to configure the project with
`cmake -S -B -DLIBRARY_DISCOVER_METHOD=PKG_CONFIG`
3. Start the build by executing `cmake --build `
### Nintendo Switch
The [devkitPro toolchain](https://devkitpro.org/wiki/Getting_Started) with devkitA64 enabled, is required.
1. Within the devkitPro environment, install the required dependencies with `pacman -S switch-cmake switch-pkg-config switch-sdl2 switch-sdl2_ttf switch-libfribidi`
2. Use CMake to configure the project with
`cmake -S -B -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake`
3. Start the build by executing `cmake --build `
### Web Browser
[Emscripten](https://emscripten.org/index.html) is required to build for modern web browsers that support [Web Assembly](https://webassembly.org/).
1. [Download and Install Emscripten](https://emscripten.org/docs/getting_started/downloads.html)
2. Within an Emscripten environment, configure the project using cmake with
`emcmake cmake -S -B `
3. Start the build by executing `cmake --build `
## License
Copyright (c) 2020-2022 Mahyar Koshkouei
Licensed under GNU LGPL Version 3.