stuff-from-scratch/README.md

93 lines
2.7 KiB
Markdown
Raw Normal View History

2022-11-30 11:18:18 +00:00
# NotesTK
2022-11-30 11:18:18 +00:00
Notes Toolkit (NotesTK) is a set of tools for building applications focused on taking and organising notes, like study or research materials.
2022-11-30 11:18:18 +00:00
## Project Goals
2022-11-30 11:18:18 +00:00
* 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.
## 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:
* 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
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).
## License
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.
# Build Dependencies
## Linux
### Minimal
```bash
2022-11-30 12:30:20 +00:00
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
```
2022-11-10 10:48:22 +00:00
#### Window rendering
```bash
2022-11-17 11:28:18 +00:00
sudo apt-get install libwayland-dev wayland-protocols libx11-dev libxkbcommon-dev libxkbcommon-x11-dev libx11-xcb-dev libxcb-image0-dev
2022-11-10 10:48:22 +00:00
```
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
2022-11-15 15:50:36 +00:00
sudo apt-get install libgl-dev libegl1-mesa-dev libglu1-mesa-dev libglm-dev
```
2022-11-10 20:35:00 +00:00
#### fonts
```bash
sudo apt-get install libfreetype-dev
```
# Build from Source
## Linux
2020-05-03 06:56:27 +00:00
```bash
mkdir build
cd build
cmake $PATH_TO_SOURCE
make
apps/$NAME_OF_APP
```