Anpassung von README.md für Haiku
This commit is contained in:
168
README.md
168
README.md
@@ -1,95 +1,171 @@
|
||||
# BareCode
|
||||
|
||||
A modular code editor built with **C++17**, **Qt6**, and **CMake**.
|
||||
Designed to compile cleanly on **Linux** and **Windows**.
|
||||
Ein modularer Code-Editor, entwickelt mit **C++17**, **Qt6** und **CMake**
|
||||
von **Dany Thinnes** | [Projekt Hirnfrei](https://www.projekt-hirnfrei.de)
|
||||
|
||||
Kompiliert sauber auf **Linux**, **Windows** und **Haiku**.
|
||||
|
||||
---
|
||||
|
||||
## Features (v1.0)
|
||||
## Features
|
||||
|
||||
| Feature | Details |
|
||||
|---|---|
|
||||
| Project tree | Left panel — shows only the selected project directory |
|
||||
| Tabbed editor | Open multiple files simultaneously; tabs are movable and closable |
|
||||
| Syntax highlighting | C / C++ (extensible via `HighlighterFactory`) |
|
||||
| Line numbers | Painted in a dedicated gutter |
|
||||
| Auto-indent | Preserves indentation level on Enter |
|
||||
| Tab → spaces | Configurable; jumps to next tab stop |
|
||||
| Persistent settings | Window geometry, font, tab size, last project (INI file) |
|
||||
| Projektbaum | Linkes Panel — zeigt nur das gewählte Projektverzeichnis |
|
||||
| Tabs | Mehrere Dateien gleichzeitig, verschiebbar und schließbar |
|
||||
| Änderungsindikator | ● im Tab-Titel bei ungespeicherten Änderungen |
|
||||
| Syntax-Highlighting | HTML, PHP, CSS, C/C++ inkl. mehrzeiliger Kommentare |
|
||||
| Zeilennummern | Eigener Gutter, aktuelle Zeile hervorgehoben |
|
||||
| Einrück-Führungslinien | Vertikale Linien wie in VS Code |
|
||||
| Auto-Indent | Einrückungstiefe wird bei Enter übernommen |
|
||||
| Tab / Shift+Tab | Ein- und Ausrücken, auch für mehrere Zeilen gleichzeitig |
|
||||
| Smart Backspace | Springt zur vorherigen Tab-Stop-Position |
|
||||
| Speichern | Speichern, Speichern unter, Alles speichern |
|
||||
| Suchen & Ersetzen | Einzeln, Alle, In Auswahl, Regex, Live-Hervorhebung |
|
||||
| In Dateien suchen | Rekursive Projektsuche mit Ergebnisliste, direkt zur Zeile |
|
||||
| Dark / Light Mode | Umschaltbar, wird gespeichert |
|
||||
| Session | Geöffnete Dateien und aktiver Tab werden wiederhergestellt |
|
||||
|
||||
---
|
||||
|
||||
## Project Structure
|
||||
## Projektstruktur
|
||||
|
||||
```
|
||||
BareCode/
|
||||
├── CMakeLists.txt # Top-level build
|
||||
├── CMakeLists.txt
|
||||
├── main.cpp
|
||||
├── resources/
|
||||
│ └── resources.qrc
|
||||
│ ├── resources.qrc
|
||||
│ └── icon_*.png
|
||||
└── src/
|
||||
├── core/ # MainWindow, ProjectManager, Settings, IPlugin
|
||||
├── editor/ # EditorPanel, EditorTab, CodeEditor, LineNumberArea
|
||||
├── filetree/ # FileTreePanel
|
||||
└── highlighter/ # SyntaxHighlighter, CppHighlighter, HighlighterFactory
|
||||
├── core/ # MainWindow, ProjectManager, Settings, ThemeManager, IPlugin
|
||||
├── editor/ # EditorPanel, EditorTab, CodeEditor, SearchPanel, FileSearchPanel
|
||||
├── filetree/ # FileTreePanel
|
||||
└── highlighter/ # SyntaxHighlighter, HighlighterFactory
|
||||
```
|
||||
|
||||
Each subdirectory compiles into its own **static library**, keeping modules independent.
|
||||
Jedes Unterverzeichnis kompiliert als eigene statische Bibliothek.
|
||||
|
||||
---
|
||||
|
||||
## Building
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- CMake ≥ 3.16
|
||||
- Qt6 (Widgets module)
|
||||
- A C++17-capable compiler (GCC, Clang, MSVC)
|
||||
## Abhängigkeiten & Bauen
|
||||
|
||||
### Linux
|
||||
|
||||
**Abhängigkeiten (Beispiel Ubuntu/Debian):**
|
||||
```bash
|
||||
sudo apt install cmake qt6-base-dev qt6-base-dev-tools libqt6concurrent6
|
||||
```
|
||||
|
||||
**Abhängigkeiten (Arch/Manjaro):**
|
||||
```bash
|
||||
sudo pacman -S cmake qt6-base
|
||||
```
|
||||
|
||||
**Bauen:**
|
||||
```bash
|
||||
cmake -B build -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build -j$(nproc)
|
||||
./build/BareCode
|
||||
```
|
||||
|
||||
**Installieren:**
|
||||
```bash
|
||||
sudo cmake --install build
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Windows (Visual Studio)
|
||||
|
||||
**Abhängigkeiten:**
|
||||
- [Qt6](https://www.qt.io/download) (Komponenten: Qt6 Base, Qt6 Concurrent)
|
||||
- CMake ≥ 3.16
|
||||
- Visual Studio 2019 oder neuer
|
||||
|
||||
```bat
|
||||
cmake -B build -G "Visual Studio 17 2022" -A x64
|
||||
cmake --build build --config Release
|
||||
build\Release\BareCode.exe
|
||||
```
|
||||
|
||||
### Windows (MinGW)
|
||||
|
||||
**Windows Installer erstellen** (mit [Inno Setup](https://jrsoftware.org/isinfo.php)):
|
||||
```bat
|
||||
cmake -B build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build
|
||||
build\BareCode.exe
|
||||
windeployqt --release build\Release\BareCode.exe
|
||||
```
|
||||
Danach das Inno Setup Skript ausführen.
|
||||
|
||||
---
|
||||
|
||||
### Haiku
|
||||
|
||||
**Abhängigkeiten:**
|
||||
```bash
|
||||
pkgman install qt6_base qt6_base_devel
|
||||
```
|
||||
|
||||
---
|
||||
> **Hinweis:** `qt6_base_devel` enthält auf Haiku sowohl die Header als auch
|
||||
> die Build-Tools (`moc`, `rcc`, `qmake`). Getestet auf Haiku R1/beta5.
|
||||
|
||||
## Extending BareCode
|
||||
**Bauen:**
|
||||
```bash
|
||||
cmake -B build -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build -j$(nproc)
|
||||
./build/BareCode
|
||||
```
|
||||
|
||||
### Adding a new syntax highlighter
|
||||
**Installieren:**
|
||||
```bash
|
||||
cmake --install build
|
||||
```
|
||||
|
||||
1. Create a subclass of `SyntaxHighlighter` in `src/highlighter/`.
|
||||
2. Populate `m_rules` in the constructor (see `CppHighlighter` as a template).
|
||||
3. Register the file extension(s) in `HighlighterFactory.cpp`.
|
||||
|
||||
No other files need to change.
|
||||
|
||||
### Adding a new panel / plugin
|
||||
|
||||
1. Implement the `IPlugin` interface from `src/core/IPlugin.h`.
|
||||
2. Create a `QWidget`-derived class for the UI.
|
||||
3. Instantiate and wire it up in `MainWindow`.
|
||||
> Nach der Installation wird `mimeset` automatisch aufgerufen um den
|
||||
> MIME-Typ zu registrieren, damit BareCode im Haiku Tracker korrekt
|
||||
> als Anwendung erkannt wird.
|
||||
|
||||
---
|
||||
|
||||
## Code Style
|
||||
## Tastaturkürzel
|
||||
|
||||
All code uses **Allman brace style** and C++17 throughout.
|
||||
| Aktion | Kürzel |
|
||||
|---|---|
|
||||
| Datei öffnen | Strg+O |
|
||||
| Neue Datei | Strg+N |
|
||||
| Projekt öffnen | Strg+Shift+O |
|
||||
| Speichern | Strg+S |
|
||||
| Speichern unter | Strg+Shift+A |
|
||||
| Alles speichern | Strg+Shift+S |
|
||||
| Suchen / Ersetzen | Strg+F |
|
||||
| In Dateien suchen | Strg+Shift+F |
|
||||
| Dark Mode | Strg+Shift+D |
|
||||
|
||||
---
|
||||
|
||||
## Erweitern
|
||||
|
||||
### Neuen Highlighter hinzufügen
|
||||
|
||||
1. Subklasse von `SyntaxHighlighter` in `src/highlighter/` erstellen
|
||||
2. `m_rules` im Konstruktor befüllen (siehe `CppHighlighter` als Vorlage)
|
||||
3. Dateiendung in `HighlighterFactory.cpp` registrieren
|
||||
|
||||
Keine weiteren Dateien müssen geändert werden.
|
||||
|
||||
### Neues Panel / Plugin hinzufügen
|
||||
|
||||
1. `IPlugin`-Interface aus `src/core/IPlugin.h` implementieren
|
||||
2. `QWidget`-Subklasse für die UI erstellen
|
||||
3. In `MainWindow` instanziieren und verdrahten
|
||||
|
||||
---
|
||||
|
||||
## Code-Stil
|
||||
|
||||
Allman-Klammerstil, C++17 durchgehend.
|
||||
|
||||
---
|
||||
|
||||
## Links
|
||||
|
||||
- Website: [www.projekt-hirnfrei.de](https://www.projekt-hirnfrei.de)
|
||||
- Discord: [discord.projekt-hirnfrei.de](https://discord.projekt-hirnfrei.de)
|
||||
|
||||
Reference in New Issue
Block a user