2024-08-05 06:50:58 +03:00
# Yoda - Browser for [Gemini protocol](https://geminiprotocol.net)
2024-08-04 19:50:29 +03:00
2024-09-07 22:05:38 +03:00
C++ / GTK 4 implementation, see also [PHP-GTK3 ](https://github.com/YGGverse/Yoda/tree/PHP-GTK3 ) experimental branch
2024-08-04 17:31:41 +03:00
> [!IMPORTANT]
> Project in development!
>
2024-08-07 07:35:53 +03:00
## Build
2024-08-07 07:30:46 +03:00
2024-08-07 07:35:53 +03:00
### Linux
2024-08-04 17:31:41 +03:00
2024-08-11 12:35:57 +03:00
``` bash
2024-08-11 15:02:34 +03:00
apt install git\
2024-08-15 12:29:54 +03:00
libglib2.0-dev\
2024-08-11 15:02:34 +03:00
libglibmm-2.68-dev\
2024-08-15 12:29:54 +03:00
libgtkmm-4.0-dev\
2024-08-20 15:38:35 +03:00
libpangomm-2.48-dev\
2024-09-09 05:06:36 +03:00
libsqlite3-dev
2024-08-11 12:35:57 +03:00
```
2024-08-04 17:31:41 +03:00
* `git clone https://github.com/YGGverse/Yoda.git`
* `cd Yoda`
2024-09-07 22:01:27 +03:00
* `git checkout CPP-GTK4`
2024-08-07 07:30:46 +03:00
* `make`
2024-08-07 07:35:53 +03:00
#### Update
2024-08-07 07:30:46 +03:00
* `git pull`
* `make clean`
* `make`
2024-08-10 08:37:52 +03:00
## Localization
### Official
* [Crowdin ](https://crowdin.com/project/yoda-browser )
### Personal
2024-08-11 15:01:47 +03:00
* `apt install intltool`
2024-08-10 08:37:52 +03:00
* `cd po`
* `intltool-update --pot`
2024-08-07 07:30:46 +03:00
## Development
2024-09-09 09:05:09 +03:00
### Introduction
2024-09-09 08:33:48 +03:00
2024-09-09 09:10:33 +03:00
Project structure and codebase in development, it promise to grow. This section would help with understand what is going on, before you start to work with code.
2024-09-09 09:05:09 +03:00
2024-09-09 09:19:39 +03:00
#### `src/app`
2024-09-09 09:21:38 +03:00
Currently, main application sources located at `src/app` folder, written by following principles:
2024-09-09 08:33:48 +03:00
2024-09-09 08:52:35 +03:00
* Every file implement (extend) one of GTK 4 Widgets, according to the functional subject (e.g. `class Browser : public Gtk::ApplicationWindow` )
2024-09-09 08:46:00 +03:00
* `src/app` does not contain other class types like models or libraries (another folders and namespaces at `src` root are reserved for these needs)
2024-09-09 08:48:00 +03:00
* Namespaces match filesystem path, where directory namespaces are lowercase
2024-09-09 08:33:48 +03:00
* Every file work with it own, 1th level child only, to prevent massive logic levels keeping in mind
2024-09-09 09:19:39 +03:00
* All classes (but window) never work with parents (including their dependencies) but may receive system data types as the arguments in constructors
2024-09-09 08:33:48 +03:00
* To access any children features, deeper or higher than 1th level of current class, use delegation methods (actions, getters and setters)
* One file - one class. If the file requires additional (GTK) component, this component should be placed at similar folder with same name as parent filename. So we have simple hierarchy navigation logic - from app to window, from window to it container, etc.
* At this moment, all constants named with uppercase, const everything that not mutable
2024-09-09 08:40:11 +03:00
* `#include` application `.hpp` files in `.cpp` . For system libraries, use headers only. Do not place system dependencies in `.cpp`
2024-09-09 08:33:48 +03:00
2024-08-07 07:30:46 +03:00
### Environment
2024-08-11 12:35:57 +03:00
``` bash
2024-08-15 12:29:54 +03:00
pkg-config --cflags --libs gio-2.0\
2024-08-11 15:02:34 +03:00
glibmm-2.68\
2024-08-15 12:29:54 +03:00
gtkmm-4.0\
2024-08-20 15:38:35 +03:00
pangomm-2.48\
2024-08-11 15:01:47 +03:00
sqlite3
2024-08-11 12:35:57 +03:00
```
2024-08-07 07:30:46 +03:00
### Contribution
* `cd Yoda`
2024-09-07 22:01:27 +03:00
* `git checkout CPP-GTK4`
2024-08-07 07:39:06 +03:00
* `git pull`
2024-08-10 08:52:44 +03:00
* `git checkout -b 'contribution-name'`
### Documentation
2024-08-10 08:56:57 +03:00
#### Components
2024-08-11 14:59:00 +03:00
* [GTK ](https://gtk.org ) - free and open-source cross-platform widget toolkit
* [gtkmm ](https://gtkmm.org ) - official C++ interface for GTK
2024-09-09 05:06:36 +03:00
* [SQLite ](https://sqlite.org ) - profile database