mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
migrate from std::filesystem::path to io::path (WIP)
This commit is contained in:
parent
1e22882284
commit
e0314803c0
72 changed files with 1189 additions and 791 deletions
|
|
@ -1,6 +1,5 @@
|
|||
#include "command_line.hpp"
|
||||
|
||||
#include <filesystem>
|
||||
#include <iostream>
|
||||
|
||||
#include "io/engine_paths.hpp"
|
||||
|
|
@ -14,10 +13,10 @@ static bool perform_keyword(
|
|||
) {
|
||||
if (keyword == "--res") {
|
||||
auto token = reader.next();
|
||||
params.resFolder = fs::u8path(token);
|
||||
params.resFolder = token;
|
||||
} else if (keyword == "--dir") {
|
||||
auto token = reader.next();
|
||||
params.userFolder = fs::u8path(token);
|
||||
params.userFolder = token;
|
||||
} else if (keyword == "--help" || keyword == "-h") {
|
||||
std::cout << "VoxelCore v" << ENGINE_VERSION_STRING << "\n\n";
|
||||
std::cout << "command-line arguments:\n";
|
||||
|
|
@ -38,11 +37,11 @@ static bool perform_keyword(
|
|||
} else if (keyword == "--test") {
|
||||
auto token = reader.next();
|
||||
params.testMode = true;
|
||||
params.scriptFile = fs::u8path(token);
|
||||
params.scriptFile = token;
|
||||
} else if (keyword == "--script") {
|
||||
auto token = reader.next();
|
||||
params.testMode = false;
|
||||
params.scriptFile = fs::u8path(token);
|
||||
params.scriptFile = token;
|
||||
} else {
|
||||
throw std::runtime_error("unknown argument " + keyword);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue