Anpassung von README.md für Haiku
This commit is contained in:
168
README.md
168
README.md
@@ -1,95 +1,171 @@
|
|||||||
# BareCode
|
# BareCode
|
||||||
|
|
||||||
A modular code editor built with **C++17**, **Qt6**, and **CMake**.
|
Ein modularer Code-Editor, entwickelt mit **C++17**, **Qt6** und **CMake**
|
||||||
Designed to compile cleanly on **Linux** and **Windows**.
|
von **Dany Thinnes** | [Projekt Hirnfrei](https://www.projekt-hirnfrei.de)
|
||||||
|
|
||||||
|
Kompiliert sauber auf **Linux**, **Windows** und **Haiku**.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Features (v1.0)
|
## Features
|
||||||
|
|
||||||
| Feature | Details |
|
| Feature | Details |
|
||||||
|---|---|
|
|---|---|
|
||||||
| Project tree | Left panel — shows only the selected project directory |
|
| Projektbaum | Linkes Panel — zeigt nur das gewählte Projektverzeichnis |
|
||||||
| Tabbed editor | Open multiple files simultaneously; tabs are movable and closable |
|
| Tabs | Mehrere Dateien gleichzeitig, verschiebbar und schließbar |
|
||||||
| Syntax highlighting | C / C++ (extensible via `HighlighterFactory`) |
|
| Änderungsindikator | ● im Tab-Titel bei ungespeicherten Änderungen |
|
||||||
| Line numbers | Painted in a dedicated gutter |
|
| Syntax-Highlighting | HTML, PHP, CSS, C/C++ inkl. mehrzeiliger Kommentare |
|
||||||
| Auto-indent | Preserves indentation level on Enter |
|
| Zeilennummern | Eigener Gutter, aktuelle Zeile hervorgehoben |
|
||||||
| Tab → spaces | Configurable; jumps to next tab stop |
|
| Einrück-Führungslinien | Vertikale Linien wie in VS Code |
|
||||||
| Persistent settings | Window geometry, font, tab size, last project (INI file) |
|
| 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/
|
BareCode/
|
||||||
├── CMakeLists.txt # Top-level build
|
├── CMakeLists.txt
|
||||||
├── main.cpp
|
├── main.cpp
|
||||||
├── resources/
|
├── resources/
|
||||||
│ └── resources.qrc
|
│ ├── resources.qrc
|
||||||
|
│ └── icon_*.png
|
||||||
└── src/
|
└── src/
|
||||||
├── core/ # MainWindow, ProjectManager, Settings, IPlugin
|
├── core/ # MainWindow, ProjectManager, Settings, ThemeManager, IPlugin
|
||||||
├── editor/ # EditorPanel, EditorTab, CodeEditor, LineNumberArea
|
├── editor/ # EditorPanel, EditorTab, CodeEditor, SearchPanel, FileSearchPanel
|
||||||
├── filetree/ # FileTreePanel
|
├── filetree/ # FileTreePanel
|
||||||
└── highlighter/ # SyntaxHighlighter, CppHighlighter, HighlighterFactory
|
└── highlighter/ # SyntaxHighlighter, HighlighterFactory
|
||||||
```
|
```
|
||||||
|
|
||||||
Each subdirectory compiles into its own **static library**, keeping modules independent.
|
Jedes Unterverzeichnis kompiliert als eigene statische Bibliothek.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Building
|
## Abhängigkeiten & Bauen
|
||||||
|
|
||||||
### Prerequisites
|
|
||||||
|
|
||||||
- CMake ≥ 3.16
|
|
||||||
- Qt6 (Widgets module)
|
|
||||||
- A C++17-capable compiler (GCC, Clang, MSVC)
|
|
||||||
|
|
||||||
### Linux
|
### 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
|
```bash
|
||||||
cmake -B build -DCMAKE_BUILD_TYPE=Release
|
cmake -B build -DCMAKE_BUILD_TYPE=Release
|
||||||
cmake --build build -j$(nproc)
|
cmake --build build -j$(nproc)
|
||||||
./build/BareCode
|
./build/BareCode
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Installieren:**
|
||||||
|
```bash
|
||||||
|
sudo cmake --install build
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### Windows (Visual Studio)
|
### 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
|
```bat
|
||||||
cmake -B build -G "Visual Studio 17 2022" -A x64
|
cmake -B build -G "Visual Studio 17 2022" -A x64
|
||||||
cmake --build build --config Release
|
cmake --build build --config Release
|
||||||
build\Release\BareCode.exe
|
build\Release\BareCode.exe
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows (MinGW)
|
**Windows Installer erstellen** (mit [Inno Setup](https://jrsoftware.org/isinfo.php)):
|
||||||
|
|
||||||
```bat
|
```bat
|
||||||
cmake -B build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release
|
windeployqt --release build\Release\BareCode.exe
|
||||||
cmake --build build
|
```
|
||||||
build\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/`.
|
> Nach der Installation wird `mimeset` automatisch aufgerufen um den
|
||||||
2. Populate `m_rules` in the constructor (see `CppHighlighter` as a template).
|
> MIME-Typ zu registrieren, damit BareCode im Haiku Tracker korrekt
|
||||||
3. Register the file extension(s) in `HighlighterFactory.cpp`.
|
> als Anwendung erkannt wird.
|
||||||
|
|
||||||
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`.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 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