Update README.md

This commit is contained in:
James Grogan 2023-01-23 09:36:31 +00:00 committed by GitHub
parent 25a25c2af0
commit b02e489ee3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,84 +4,41 @@ Notes Toolkit (NotesTK) is a set of tools for building applications focused on t
## Project Goals
* Cross-platform - Currently targets Linux and Windows, Mac is planned.
* Low dependencies - Depends on as few third-party libraries as possible.
* Clean licensing - APIs may be similar to other libraries for compatibility but implementations are built from scratch.
* Code re-use - If distinct areas depend on a similar routine implement it only once.
* Cross-platform
* Low third-party dependencies
* Permissive licensing
* Simplicity over performance
## Project Status
The codebase is at a very early/prototype stage and under heavy active development. It is strongly recommended to only use it as a reading reference. Expect:
🚨🚨🚨 The codebase is at a very early/prototype stage and under heavy active development🚨🚨🚨
In addition to feature development I've been using it to get up-to-speed on various media formats and desktop and rendering APIs. It is strongly recommended to only use it as a reading reference.
Expect:
* No Docs or tagged releases
* Misleadingly named and broken APIs
* Large commits and significant breaking changes
* Naive/low-performance implementations of things that haved worked just fine in other libraries for years
* Unreliable/untested APIs
* Naive/low-performance implementations
The only currently recommended use case is if you are implementing some element of the library functionality, have exhasuted existing online tutorials and want to see how someone else has tackled it (bearing in mind the copyleft licensing below).
The only currently recommended use case is if you are implementing some element of the library functionality and want to see how someone else has tackled it, maybe you will see something useful.
## License
# Building
This project is dual-licensed under the copyleft AGPL with a commercial licensing option. If using this code in your own project make sure you are aware of the implications of copyleft and AGPL. See the `LICENSE` file in this repository for more details, including contact details.
Many project features (e.g. Wayland integration) only build if suitable third-party dependencies are found on the system, otherwise they will be automatically disabled. You can find dependency requirements in the `README.md` file in each module's `src`directory.
# Build Dependencies
A minimal set of dependencies for each platform are included below.
## Linux
### Minimal
Install dependencies:
```bash
sudo apt-get install build-essential pkg-config cmake
```
### Optional
#### Audio
```bash
sudo apt-get install libasound2-dev
```
#### Image Formats
```bash
sudo apt-get install libpng-dev
```
#### Window rendering
```bash
sudo apt-get install libwayland-dev wayland-protocols libx11-dev libxkbcommon-dev libxkbcommon-x11-dev libx11-xcb-dev libxcb-image0-dev
```
We need to generate suitable xdg shell c code for wayland:
```bash
mkdir $WORK_DIR
cd $WORK_DIR
wayland-scanner private-code < /usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml > xdg-shell-protocol.cpp
wayland-scanner client-header < /usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml > xdg-shell-client-protocol.h
export WAYLAND_EXTENSION_DIR=$WORK_DIR
```
In `xdg-shell-protocol.cpp` - we need access to `xdg_wm_base_interface` so export it also `extern const struct wl_interface xdg_wm_base_interface;` as per similar interface structs.
#### 3D Rendering
```bash
sudo apt-get install libgl-dev libegl1-mesa-dev libglu1-mesa-dev libglm-dev
```
#### fonts
```bash
sudo apt-get install libfreetype-dev
```
# Build from Source
## Linux
Build:
```bash
mkdir build
@ -90,3 +47,15 @@ cmake $PATH_TO_SOURCE
make
apps/$NAME_OF_APP
```
## Windows
Tested with Visual Studio 17 with 'Desktop Development with C++' tooling, including ATL and Windows SDK 10 (10.0.19041.0). Additionally, install `cmake`.
```bash
mkdir build
cd build
cmake $PATH_TO_SOURCE
```
You can open the resulting `NotesTK.sln`in Visual Studio and build.