mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add headless mode (engine initialization and finalization)
This commit is contained in:
parent
1ab3707343
commit
ee1a170376
7 changed files with 101 additions and 51 deletions
|
|
@ -48,6 +48,17 @@ static std::filesystem::path toCanonic(std::filesystem::path path) {
|
|||
}
|
||||
|
||||
void EnginePaths::prepare() {
|
||||
logger.info() << "resources folder: " << fs::canonical(resourcesFolder).u8string();
|
||||
logger.info() << "user files folder: " << fs::canonical(userFilesFolder).u8string();
|
||||
|
||||
if (!fs::is_directory(resourcesFolder)) {
|
||||
throw std::runtime_error(
|
||||
resourcesFolder.u8string() + " is not a directory"
|
||||
);
|
||||
}
|
||||
if (!fs::is_directory(userFilesFolder)) {
|
||||
fs::create_directories(userFilesFolder);
|
||||
}
|
||||
auto contentFolder = userFilesFolder / CONTENT_FOLDER;
|
||||
if (!fs::is_directory(contentFolder)) {
|
||||
fs::create_directories(contentFolder);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue