From d40c41ec63252c820da5c330c2cb27276f34a41a Mon Sep 17 00:00:00 2001 From: Michal Date: Sun, 17 May 2026 10:52:51 +0200 Subject: [PATCH 1/2] docs: explain how to install all required dependencies and how to build format target --- README.md | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 738344b..e776c21 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,17 @@ This project uses CMake and requires a modern C++17 compiler. -### 1. Build the Project +### 1. Clone repo and install required dependencies +This project uses GTest, LSL, SDL2, Clang-format, Clang-tidy, protobuf-compiler and cmake, but you don't need to install GTest and LSL because cmake will install it for you. Below is minimal linux setup. + +```bash +git clone git@github.com:KN-Neuron/Neuron-IDE-runtime.git + +sudo apt update +sudo apt install cmake clang-format clang-tidy libsdl2-dev protobuf-compiler +``` + +### 2. Build the Project To configure and compile the project, open your terminal in the root directory and run: ```bash @@ -17,7 +27,7 @@ cmake --build build Once built, the main executable will be available inside the `build` directory. -### 2. Running Tests +### 3. Running Tests This project uses Google Test (GTest) and CTest for testing. The tests are categorized by labels so you can run them selectively. **To run all tests:** @@ -36,4 +46,16 @@ ctest -L unit --output-on-failure ```bash cd build ctest -L component --output-on-failure -``` \ No newline at end of file +``` + +### 4. Code Formatting + +This project includes a custom CMake target to automatically format all C++ source files using `clang-format`. + +**To format your code:** +```bash +# Assuming you have already configured the build directory +cmake --build build --target format +``` + +This will run `clang-format -i` over all trackable source and header files, applying the style configuration specified in the project. \ No newline at end of file From 60a05fe54b58981fb88943b69f4bb09ea5cc6010 Mon Sep 17 00:00:00 2001 From: Michal Date: Sun, 17 May 2026 23:46:04 +0200 Subject: [PATCH 2/2] docs: explain how to compile pbtxt files --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e776c21..1c3dc88 100644 --- a/README.md +++ b/README.md @@ -58,4 +58,12 @@ This project includes a custom CMake target to automatically format all C++ sour cmake --build build --target format ``` -This will run `clang-format -i` over all trackable source and header files, applying the style configuration specified in the project. \ No newline at end of file +This will run `clang-format -i` over all trackable source and header files, applying the style configuration specified in the project. + +### 5. Working with protobuf files + +In case you want to create an example .pb file for testing or some other purpose, you have to first create a .pbtxt file (check out protoFiles/tests/test_scene.pbtxt for reference) which you then compile with this command: + +```bash +protoc --encode=NeuronIDE.Scene protoFiles/neuronide.proto < protoFiles/tests/test_scene.pbtxt > protoFiles/tests/test_scene.pb +``` \ No newline at end of file