refactor(engine): move files to new structure\
This commit is contained in:
parent
2c0448083d
commit
4a47835d6f
18
.bumpversion.cfg
Normal file
18
.bumpversion.cfg
Normal file
@ -0,0 +1,18 @@
|
||||
[bumpversion]
|
||||
current_version = ALPHA-2.0.0
|
||||
commit = True
|
||||
tag = True
|
||||
tag_name = v{new_version}
|
||||
|
||||
[bumpversion:file:VERSION]
|
||||
search = {current_version}
|
||||
replace = {new_version}
|
||||
|
||||
[bumpversion:part:major]
|
||||
first_value = 2
|
||||
|
||||
[bumpversion:part:minor]
|
||||
first_value = 0
|
||||
|
||||
[bumpversion:part:patch]
|
||||
first_value = 0
|
19
docs/Building.md
Normal file
19
docs/Building.md
Normal file
@ -0,0 +1,19 @@
|
||||
# Building
|
||||
|
||||
ICEngine supports both single and multi type configuration types:
|
||||
Make/Ninja
|
||||
|
||||
```bash
|
||||
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build
|
||||
```
|
||||
|
||||
\- OR -
|
||||
|
||||
Visual Studio:
|
||||
|
||||
```bash
|
||||
cmake -S . -B build -G "Visual Studio 16 2019" # or your preferred Visual Studio version
|
||||
cmake --build build --config Debug
|
||||
cmake --build build --config Release
|
||||
```
|
39
docs/Developers.md
Normal file
39
docs/Developers.md
Normal file
@ -0,0 +1,39 @@
|
||||
# Dev Notes
|
||||
|
||||
### Version Bumping
|
||||
|
||||
We use a tool called `bump2version` to manage bumping versions in the project. To ensure a clean git history and avoid
|
||||
conflicts, follow these steps when bumping the version:
|
||||
|
||||
1. **Before bumping the version**, always `git pull` to ensure you have the latest changes from the repository.
|
||||
2. Ensure no other copies of the repo are being worked on or committed before running the `bump2version` tool.
|
||||
3. Bump the version using the command:
|
||||
|
||||
```bash
|
||||
bumpversion [major|minor|patch]
|
||||
```
|
||||
|
||||
This will:
|
||||
|
||||
1. Update the version in the VERSION file.
|
||||
1. Automatically commit the version bump.
|
||||
1. Create a Git tag with the new version (e.g., vALPHA-2.0.1).
|
||||
|
||||
Push your changes and the tag to the remote repository after bumping the version:
|
||||
|
||||
```bash
|
||||
git push origin master --tags
|
||||
```
|
||||
|
||||
ersioning Guidelines
|
||||
|
||||
We follow a versioning structure of ALPHA-major.minor.patch. Here’s a breakdown of the versioning rules:
|
||||
|
||||
- **Major**: The major version is incremented for significant changes that introduce new features or incompatible API
|
||||
changes.
|
||||
- **Minor**: The minor version is incremented for adding new functionality in a backwards-compatible manner.
|
||||
- **Patch**: The patch version is incremented for bug fixes and minor improvements that don’t affect the existing
|
||||
functionality.
|
||||
|
||||
This will be managed by a CI/CD pipeline (or Gitea Actions) later down the line, but for now, follow these manual steps
|
||||
carefully to ensure version consistency.
|
5
engine/src/core/ICEngine.ixx
Normal file
5
engine/src/core/ICEngine.ixx
Normal file
@ -0,0 +1,5 @@
|
||||
module;
|
||||
|
||||
export module ICEngine;
|
||||
|
||||
export void Test() { return; }
|
19
engine/src/core/Logger.hpp
Normal file
19
engine/src/core/Logger.hpp
Normal file
@ -0,0 +1,19 @@
|
||||
//
|
||||
// Created by illyum on 9/14/2024.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
class Logger {
|
||||
public:
|
||||
void logVersion() {
|
||||
std::cout << "ICEngine Version: " << PROJECT_VERSION << std::endl;
|
||||
}
|
||||
|
||||
void logCrash(const std::string& errorMessage) {
|
||||
std::cerr << "Crash detected in version " << PROJECT_VERSION << ": " << errorMessage << std::endl;
|
||||
}
|
||||
};
|
18
examples/CMakeLists.txt
Normal file
18
examples/CMakeLists.txt
Normal file
@ -0,0 +1,18 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.28)
|
||||
PROJECT(ICEngineExamples LANGUAGES CXX)
|
||||
|
||||
SET(CMAKE_CXX_STANDARD 20)
|
||||
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
FIND_PACKAGE(ICEngine REQUIRED)
|
||||
|
||||
SET(SERVER_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/server/server.cpp)
|
||||
SET(CLIENT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/client/client.cpp)
|
||||
|
||||
ADD_EXECUTABLE(server ${SERVER_SOURCE})
|
||||
TARGET_LINK_LIBRARIES(server PRIVATE ICEngine::ICEngine)
|
||||
TARGET_INCLUDE_DIRECTORIES(server PRIVATE ${ICEngine_INCLUDE_DIRS})
|
||||
|
||||
ADD_EXECUTABLE(client ${CLIENT_SOURCE})
|
||||
TARGET_LINK_LIBRARIES(client PRIVATE ICEngine::ICEngine)
|
||||
TARGET_INCLUDE_DIRECTORIES(client PRIVATE ${ICEngine_INCLUDE_DIRS})
|
10
examples/client/client.cpp
Normal file
10
examples/client/client.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
//
|
||||
// Created by illyum on 9/15/2024.
|
||||
//
|
||||
|
||||
import ICEngine;
|
||||
|
||||
int main() {
|
||||
Test();
|
||||
return 0;
|
||||
}
|
10
examples/server/server.cpp
Normal file
10
examples/server/server.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
//
|
||||
// Created by illyum on 9/15/2024.
|
||||
//
|
||||
|
||||
import ICEngine;
|
||||
|
||||
int main() {
|
||||
Test();
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user