diff --git a/lib/external/libwolv b/lib/external/libwolv index 6742cbb5c..f98c18807 160000 --- a/lib/external/libwolv +++ b/lib/external/libwolv @@ -1 +1 @@ -Subproject commit 6742cbb5c464ae4dcd7c1d5d1a573403258000bd +Subproject commit f98c18807a961dfcbf19dae256361e6b99a265d2 diff --git a/lib/external/pattern_language b/lib/external/pattern_language index 714fb62cf..0858a0a1a 160000 --- a/lib/external/pattern_language +++ b/lib/external/pattern_language @@ -1 +1 @@ -Subproject commit 714fb62cf47b171dae58bf2c5a95e82d4d8310a7 +Subproject commit 0858a0a1a0309bacaa34670488f7643d53d91849 diff --git a/lib/libimhex/CMakeLists.txt b/lib/libimhex/CMakeLists.txt index 6ca6da81b..b1fce8807 100644 --- a/lib/libimhex/CMakeLists.txt +++ b/lib/libimhex/CMakeLists.txt @@ -48,7 +48,6 @@ if (APPLE) endif () set(LIBIMHEX_SOURCES ${LIBIMHEX_SOURCES} - source/helpers/fs_macos.m source/helpers/utils_macos.m) endif () diff --git a/lib/libimhex/include/hex/helpers/utils.hpp b/lib/libimhex/include/hex/helpers/utils.hpp index 6c699344b..d58d1d81f 100644 --- a/lib/libimhex/include/hex/helpers/utils.hpp +++ b/lib/libimhex/include/hex/helpers/utils.hpp @@ -274,13 +274,6 @@ namespace hex { return iter != a.end(); } - template requires requires(T t) { t.u8string(); } - std::string toUTF8String(const T &value) { - auto result = value.u8string(); - - return { result.begin(), result.end() }; - } - template T get_or(const std::variant &variant, T alt) { const T *value = std::get_if(&variant); diff --git a/lib/libimhex/source/api/plugin_manager.cpp b/lib/libimhex/source/api/plugin_manager.cpp index 77cb43785..542191646 100644 --- a/lib/libimhex/source/api/plugin_manager.cpp +++ b/lib/libimhex/source/api/plugin_manager.cpp @@ -3,6 +3,8 @@ #include #include +#include + #include #include @@ -17,7 +19,7 @@ namespace hex { return; } #else - this->m_handle = dlopen(hex::toUTF8String(path).c_str(), RTLD_LAZY); + this->m_handle = dlopen(wolv::util::toUTF8String(path).c_str(), RTLD_LAZY); if (this->m_handle == nullptr) { log::error("dlopen failed: {}!", dlerror()); @@ -69,7 +71,7 @@ namespace hex { bool Plugin::initializePlugin() const { const auto requestedVersion = getCompatibleVersion(); if (requestedVersion != IMHEX_VERSION) { - log::error("Refused to load plugin '{}' which was built for a different version of ImHex: '{}'", hex::toUTF8String(this->m_path.filename()), requestedVersion); + log::error("Refused to load plugin '{}' which was built for a different version of ImHex: '{}'", wolv::util::toUTF8String(this->m_path.filename()), requestedVersion); return false; } diff --git a/lib/libimhex/source/helpers/fs_macos.m b/lib/libimhex/source/helpers/fs_macos.m deleted file mode 100644 index fb5502096..000000000 --- a/lib/libimhex/source/helpers/fs_macos.m +++ /dev/null @@ -1,44 +0,0 @@ -#if defined(OS_MACOS) - - #include - #include - #include - - char* getMacExecutableDirectoryPath(void) { - @autoreleasepool { - const char *pathString = [[[[[NSBundle mainBundle] executableURL] URLByDeletingLastPathComponent] path] UTF8String]; - - char *result = malloc(strlen(pathString) + 1); - strcpy(result, pathString); - - return result; - } - } - - char* getMacApplicationSupportDirectoryPath(void) { - @autoreleasepool { - NSError* error = nil; - NSURL* dirUrl = [[NSFileManager defaultManager] URLForDirectory:NSApplicationSupportDirectory - inDomain:NSUserDomainMask - appropriateForURL:nil - create:YES - error:&error]; - - if (error != nil) { - return NULL; - } - - const char *pathString = [[[dirUrl URLByAppendingPathComponent:(@"imhex")] path] UTF8String]; - - char *result = malloc(strlen(pathString) + 1); - strcpy(result, pathString); - - return result; - } - } - - void macFree(void *ptr) { - free(ptr); - } - -#endif diff --git a/lib/libimhex/source/helpers/magic.cpp b/lib/libimhex/source/helpers/magic.cpp index 1bd4173a3..275ecbe22 100644 --- a/lib/libimhex/source/helpers/magic.cpp +++ b/lib/libimhex/source/helpers/magic.cpp @@ -4,6 +4,7 @@ #include #include +#include #include @@ -29,7 +30,7 @@ namespace hex::magic { for (const auto &dir : fs::getDefaultPaths(fs::ImHexPath::Magic)) { for (const auto &entry : std::fs::directory_iterator(dir, error)) { if (entry.is_regular_file() && ((sourceFiles && entry.path().extension().empty()) || (!sourceFiles && entry.path().extension() == ".mgc"))) { - magicFiles += hex::toUTF8String(wolv::io::fs::toShortPath(entry.path())) + MAGIC_PATH_SEPARATOR; + magicFiles += wolv::util::toUTF8String(wolv::io::fs::toShortPath(entry.path())) + MAGIC_PATH_SEPARATOR; } } } diff --git a/lib/libimhex/source/helpers/net.cpp b/lib/libimhex/source/helpers/net.cpp index 90ce677ed..35d1ee6f0 100644 --- a/lib/libimhex/source/helpers/net.cpp +++ b/lib/libimhex/source/helpers/net.cpp @@ -211,7 +211,7 @@ namespace hex { curl_mime *mime = curl_mime_init(this->m_ctx); curl_mimepart *part = curl_mime_addpart(mime); - auto fileName = hex::toUTF8String(filePath.filename()); + auto fileName = wolv::util::toUTF8String(filePath.filename()); curl_mime_data_cb(part, file.getSize(), [](char *buffer, size_t size, size_t nitems, void *arg) -> size_t { auto file = static_cast(arg); diff --git a/main/source/init/tasks.cpp b/main/source/init/tasks.cpp index e79e8d7a4..61a900a03 100644 --- a/main/source/init/tasks.cpp +++ b/main/source/init/tasks.cpp @@ -98,7 +98,7 @@ namespace hex::init { try { wolv::io::fs::createDirectories(folder); } catch (...) { - log::error("Failed to create folder {}!", hex::toUTF8String(folder)); + log::error("Failed to create folder {}!", wolv::util::toUTF8String(folder)); result = false; } } @@ -159,7 +159,7 @@ namespace hex::init { fonts->Clear(); fonts->AddFontDefault(&cfg); } else { - fonts->AddFontFromFileTTF(hex::toUTF8String(fontFile).c_str(), 0, &cfg, ranges.Data); + fonts->AddFontFromFileTTF(wolv::util::toUTF8String(fontFile).c_str(), 0, &cfg, ranges.Data); } // Merge all fonts into one big font atlas @@ -333,7 +333,7 @@ namespace hex::init { // Initialize the plugin if (!plugin.initializePlugin()) { - log::error("Failed to initialize plugin {}", hex::toUTF8String(plugin.getPath().filename())); + log::error("Failed to initialize plugin {}", wolv::util::toUTF8String(plugin.getPath().filename())); loadErrors++; } } @@ -349,7 +349,7 @@ namespace hex::init { // Initialize the plugin if (!plugin.initializePlugin()) { - log::error("Failed to initialize plugin {}", hex::toUTF8String(plugin.getPath().filename())); + log::error("Failed to initialize plugin {}", wolv::util::toUTF8String(plugin.getPath().filename())); loadErrors++; } } diff --git a/main/source/window/win_window.cpp b/main/source/window/win_window.cpp index 0f724d72a..0a4ae40ad 100644 --- a/main/source/window/win_window.cpp +++ b/main/source/window/win_window.cpp @@ -47,7 +47,7 @@ namespace hex { if (data == nullptr) break; std::fs::path path = data; - log::info("Opening file in existing instance: {}", hex::toUTF8String(path)); + log::info("Opening file in existing instance: {}", wolv::util::toUTF8String(path)); EventManager::post(path); break; } diff --git a/main/source/window/window.cpp b/main/source/window/window.cpp index 3fd85f8d4..5a9caf945 100644 --- a/main/source/window/window.cpp +++ b/main/source/window/window.cpp @@ -167,7 +167,7 @@ namespace hex { // Save a backup project when the application crashes EventManager::subscribe(this, [this](int) { - ImGui::SaveIniSettingsToDisk(hex::toUTF8String(this->m_imguiSettingsPath).c_str()); + ImGui::SaveIniSettingsToDisk(wolv::util::toUTF8String(this->m_imguiSettingsPath).c_str()); if (!ImHexApi::Provider::isDirty()) return; @@ -441,7 +441,7 @@ namespace hex { const auto filePath = path / "builtin.hexplug"; ImGui::TableNextRow(); ImGui::TableNextColumn(); - ImGui::TextUnformatted(hex::toUTF8String(filePath).c_str()); + ImGui::TextUnformatted(wolv::util::toUTF8String(filePath).c_str()); ImGui::TableNextColumn(); ImGui::TextUnformatted(wolv::io::fs::exists(filePath) ? ICON_VS_CHECK : ICON_VS_CLOSE); } @@ -868,7 +868,7 @@ namespace hex { } if (!this->m_imguiSettingsPath.empty() && wolv::io::fs::exists(this->m_imguiSettingsPath)) - ImGui::LoadIniSettingsFromDisk(hex::toUTF8String(this->m_imguiSettingsPath).c_str()); + ImGui::LoadIniSettingsFromDisk(wolv::util::toUTF8String(this->m_imguiSettingsPath).c_str()); } ImGui_ImplGlfw_InitForOpenGL(this->m_window, true); @@ -893,7 +893,7 @@ namespace hex { void Window::exitImGui() { delete static_cast(ImGui::GetIO().UserData); - ImGui::SaveIniSettingsToDisk(hex::toUTF8String(this->m_imguiSettingsPath).c_str()); + ImGui::SaveIniSettingsToDisk(wolv::util::toUTF8String(this->m_imguiSettingsPath).c_str()); ImGui_ImplOpenGL3_Shutdown(); ImGui_ImplGlfw_Shutdown(); diff --git a/plugins/builtin/source/content/providers/disk_provider.cpp b/plugins/builtin/source/content/providers/disk_provider.cpp index 874a64f00..850e47e28 100644 --- a/plugins/builtin/source/content/providers/disk_provider.cpp +++ b/plugins/builtin/source/content/providers/disk_provider.cpp @@ -6,6 +6,8 @@ #include #include +#include + #include #include @@ -259,12 +261,12 @@ namespace hex::plugin::builtin { } std::string DiskProvider::getName() const { - return hex::toUTF8String(this->m_path); + return wolv::util::toUTF8String(this->m_path); } std::vector> DiskProvider::getDataDescription() const { return { - { "hex.builtin.provider.disk.selected_disk"_lang, hex::toUTF8String(this->m_path) }, + { "hex.builtin.provider.disk.selected_disk"_lang, wolv::util::toUTF8String(this->m_path) }, { "hex.builtin.provider.disk.disk_size"_lang, hex::toByteString(this->m_diskSize) }, { "hex.builtin.provider.disk.sector_size"_lang, hex::toByteString(this->m_sectorSize) } }; @@ -341,7 +343,7 @@ namespace hex::plugin::builtin { } nlohmann::json DiskProvider::storeSettings(nlohmann::json settings) const { - settings["path"] = hex::toUTF8String(this->m_path); + settings["path"] = wolv::util::toUTF8String(this->m_path); return Provider::storeSettings(settings); } @@ -365,7 +367,7 @@ namespace hex::plugin::builtin { std::variant DiskProvider::queryInformation(const std::string &category, const std::string &argument) { if (category == "file_path") - return hex::toUTF8String(this->m_path); + return wolv::util::toUTF8String(this->m_path); else if (category == "sector_size") return this->m_sectorSize; else diff --git a/plugins/builtin/source/content/providers/file_provider.cpp b/plugins/builtin/source/content/providers/file_provider.cpp index f24a82391..33a7ac0e1 100644 --- a/plugins/builtin/source/content/providers/file_provider.cpp +++ b/plugins/builtin/source/content/providers/file_provider.cpp @@ -9,6 +9,8 @@ #include #include +#include + #include namespace hex::plugin::builtin { @@ -169,13 +171,13 @@ namespace hex::plugin::builtin { } std::string FileProvider::getName() const { - return hex::toUTF8String(this->m_path.filename()); + return wolv::util::toUTF8String(this->m_path.filename()); } std::vector> FileProvider::getDataDescription() const { std::vector> result; - result.emplace_back("hex.builtin.provider.file.path"_lang, hex::toUTF8String(this->m_path)); + result.emplace_back("hex.builtin.provider.file.path"_lang, wolv::util::toUTF8String(this->m_path)); result.emplace_back("hex.builtin.provider.file.size"_lang, hex::toByteString(this->getActualSize())); if (this->m_fileStats.has_value()) { @@ -189,11 +191,11 @@ namespace hex::plugin::builtin { std::variant FileProvider::queryInformation(const std::string &category, const std::string &argument) { if (category == "file_path") - return hex::toUTF8String(this->m_path); + return wolv::util::toUTF8String(this->m_path); else if (category == "file_name") - return hex::toUTF8String(this->m_path.filename()); + return wolv::util::toUTF8String(this->m_path.filename()); else if (category == "file_extension") - return hex::toUTF8String(this->m_path.extension()); + return wolv::util::toUTF8String(this->m_path.extension()); else if (category == "creation_time") return this->m_fileStats->st_ctime; else if (category == "access_time") @@ -253,9 +255,9 @@ namespace hex::plugin::builtin { nlohmann::json FileProvider::storeSettings(nlohmann::json settings) const { std::string path; if (auto projectPath = ProjectFile::getPath(); !projectPath.empty()) - path = hex::toUTF8String(std::fs::proximate(this->m_path, projectPath.parent_path())); + path = wolv::util::toUTF8String(std::fs::proximate(this->m_path, projectPath.parent_path())); if (path.empty()) - path = hex::toUTF8String(this->m_path); + path = wolv::util::toUTF8String(this->m_path); settings["path"] = path; diff --git a/plugins/builtin/source/content/providers/intel_hex_provider.cpp b/plugins/builtin/source/content/providers/intel_hex_provider.cpp index 9bd9a90b8..9075428ec 100644 --- a/plugins/builtin/source/content/providers/intel_hex_provider.cpp +++ b/plugins/builtin/source/content/providers/intel_hex_provider.cpp @@ -10,6 +10,7 @@ #include #include +#include namespace hex::plugin::builtin { @@ -222,7 +223,7 @@ namespace hex::plugin::builtin { } [[nodiscard]] std::string IntelHexProvider::getName() const { - return hex::format("hex.builtin.provider.intel_hex.name"_lang, hex::toUTF8String(this->m_sourceFilePath.filename())); + return hex::format("hex.builtin.provider.intel_hex.name"_lang, wolv::util::toUTF8String(this->m_sourceFilePath.filename())); } bool IntelHexProvider::handleFilePicker() { @@ -274,7 +275,7 @@ namespace hex::plugin::builtin { } nlohmann::json IntelHexProvider::storeSettings(nlohmann::json settings) const { - settings["path"] = hex::toUTF8String(this->m_sourceFilePath); + settings["path"] = wolv::util::toUTF8String(this->m_sourceFilePath); return Provider::storeSettings(settings); } diff --git a/plugins/builtin/source/content/providers/motorola_srec_provider.cpp b/plugins/builtin/source/content/providers/motorola_srec_provider.cpp index b1f81afe8..437c69f0d 100644 --- a/plugins/builtin/source/content/providers/motorola_srec_provider.cpp +++ b/plugins/builtin/source/content/providers/motorola_srec_provider.cpp @@ -7,6 +7,7 @@ #include #include +#include namespace hex::plugin::builtin { @@ -199,7 +200,7 @@ namespace hex::plugin::builtin { } [[nodiscard]] std::string MotorolaSRECProvider::getName() const { - return hex::format("hex.builtin.provider.motorola_srec.name"_lang, hex::toUTF8String(this->m_sourceFilePath.filename())); + return hex::format("hex.builtin.provider.motorola_srec.name"_lang, wolv::util::toUTF8String(this->m_sourceFilePath.filename())); } bool MotorolaSRECProvider::handleFilePicker() { diff --git a/plugins/builtin/source/content/settings_entries.cpp b/plugins/builtin/source/content/settings_entries.cpp index a6490a42a..ead7f48f5 100644 --- a/plugins/builtin/source/content/settings_entries.cpp +++ b/plugins/builtin/source/content/settings_entries.cpp @@ -402,7 +402,7 @@ namespace hex::plugin::builtin { if (ImGui::IconButton(ICON_VS_FOLDER_OPENED, ImGui::GetStyleColorVec4(ImGuiCol_Text))) { return fs::openFileBrowser(fs::DialogMode::Open, { { "TTF Font", "ttf" }, { "OTF Font", "otf" } }, [&](const std::fs::path &path) { - fontPath = hex::toUTF8String(path); + fontPath = wolv::util::toUTF8String(path); setting = fontPath; }); } @@ -461,7 +461,7 @@ namespace hex::plugin::builtin { } else { for (size_t n = 0; n < userFolders.size(); n++) { const bool isSelected = (currentItemIndex == n); - if (ImGui::Selectable(hex::toUTF8String(userFolders.at(n)).c_str(), isSelected)) { currentItemIndex = n; } + if (ImGui::Selectable(wolv::util::toUTF8String(userFolders.at(n)).c_str(), isSelected)) { currentItemIndex = n; } if (isSelected) { ImGui::SetItemDefaultFocus(); } } ImGui::EndListBox(); @@ -576,7 +576,7 @@ namespace hex::plugin::builtin { for (const auto &dir : fs::getDefaultPaths(fs::ImHexPath::Resources)) { auto path = dir / "font.ttf"; if (wolv::io::fs::exists(path)) { - log::info("Loading custom front from {}", hex::toUTF8String(path)); + log::info("Loading custom front from {}", wolv::util::toUTF8String(path)); fontFile = path; break; diff --git a/plugins/builtin/source/content/tools_entries.cpp b/plugins/builtin/source/content/tools_entries.cpp index a82f14c96..20a125ee6 100644 --- a/plugins/builtin/source/content/tools_entries.cpp +++ b/plugins/builtin/source/content/tools_entries.cpp @@ -619,7 +619,7 @@ namespace hex::plugin::builtin { try { auto json = nlohmann::json::parse(response.body); links.push_back({ - hex::toUTF8String(currFile.filename()), + wolv::util::toUTF8String(currFile.filename()), json["data"]["file"]["url"]["short"], json["data"]["file"]["metadata"]["size"]["readable"] }); @@ -974,7 +974,7 @@ namespace hex::plugin::builtin { if (ImGui::BeginListBox("##files", { -FLT_MIN, 10 * ImGui::GetTextLineHeightWithSpacing() })) { u32 index = 0; for (auto &file : files) { - if (ImGui::Selectable(hex::toUTF8String(file).c_str(), index == selectedIndex)) + if (ImGui::Selectable(wolv::util::toUTF8String(file).c_str(), index == selectedIndex)) selectedIndex = index; index++; } @@ -1064,7 +1064,7 @@ namespace hex::plugin::builtin { wolv::io::File input(file, wolv::io::File::Mode::Read); if (!input.isValid()) { - View::showErrorPopup(hex::format("hex.builtin.tools.file_tools.combiner.open_input"_lang, hex::toUTF8String(file))); + View::showErrorPopup(hex::format("hex.builtin.tools.file_tools.combiner.open_input"_lang, wolv::util::toUTF8String(file))); return; } diff --git a/plugins/builtin/source/content/ui_items.cpp b/plugins/builtin/source/content/ui_items.cpp index 2063630e8..6ef5686d0 100644 --- a/plugins/builtin/source/content/ui_items.cpp +++ b/plugins/builtin/source/content/ui_items.cpp @@ -150,7 +150,7 @@ namespace hex::plugin::builtin { ImGui::PushID(index); bool selected = s_selectableFileIndices.contains(index); - if (ImGui::Selectable(hex::toUTF8String(path.filename()).c_str(), selected)) { + if (ImGui::Selectable(wolv::util::toUTF8String(path.filename()).c_str(), selected)) { if (!s_selectableFileMultiple) { s_selectableFileIndices.clear(); s_selectableFileIndices.insert(index); diff --git a/plugins/builtin/source/content/views/view_about.cpp b/plugins/builtin/source/content/views/view_about.cpp index 1d14fc3bd..69d181557 100644 --- a/plugins/builtin/source/content/views/view_about.cpp +++ b/plugins/builtin/source/content/views/view_about.cpp @@ -172,9 +172,9 @@ namespace hex::plugin::builtin { ImGui::TableNextColumn(); for (auto &path : fs::getDefaultPaths(type, true)){ if(wolv::io::fs::isDirectory(path)){ - ImGui::TextUnformatted(hex::toUTF8String(path).c_str()); + ImGui::TextUnformatted(wolv::util::toUTF8String(path).c_str()); }else{ - ImGui::TextFormattedColored(ImGui::GetCustomColorVec4(ImGuiCustomCol_ToolbarRed), hex::toUTF8String(path).c_str()); + ImGui::TextFormattedColored(ImGui::GetCustomColorVec4(ImGuiCustomCol_ToolbarRed), wolv::util::toUTF8String(path).c_str()); } } } diff --git a/plugins/builtin/source/content/views/view_constants.cpp b/plugins/builtin/source/content/views/view_constants.cpp index 4422fee0e..bae79de48 100644 --- a/plugins/builtin/source/content/views/view_constants.cpp +++ b/plugins/builtin/source/content/views/view_constants.cpp @@ -4,6 +4,8 @@ #include #include +#include + #include #include #include @@ -54,7 +56,7 @@ namespace hex::plugin::builtin { this->m_constants.push_back(constant); } } catch (...) { - log::error("Failed to parse constants file {}", hex::toUTF8String(file.path())); + log::error("Failed to parse constants file {}", wolv::util::toUTF8String(file.path())); continue; } } diff --git a/plugins/builtin/source/content/views/view_pattern_editor.cpp b/plugins/builtin/source/content/views/view_pattern_editor.cpp index d89a24167..d8cc56471 100644 --- a/plugins/builtin/source/content/views/view_pattern_editor.cpp +++ b/plugins/builtin/source/content/views/view_pattern_editor.cpp @@ -506,13 +506,13 @@ namespace hex::plugin::builtin { entries.resize(this->m_possiblePatternFiles.size()); for (u32 i = 0; i < entries.size(); i++) { - entries[i] = hex::toUTF8String(this->m_possiblePatternFiles[i].filename()); + entries[i] = wolv::util::toUTF8String(this->m_possiblePatternFiles[i].filename()); } if (ImGui::BeginListBox("##patterns_accept", ImVec2(-FLT_MIN, 0))) { u32 index = 0; for (auto &path : this->m_possiblePatternFiles) { - if (ImGui::Selectable(hex::toUTF8String(path.filename()).c_str(), index == this->m_selectedPatternFile)) + if (ImGui::Selectable(wolv::util::toUTF8String(path.filename()).c_str(), index == this->m_selectedPatternFile)) this->m_selectedPatternFile = index; index++; } diff --git a/plugins/builtin/source/content/views/view_yara.cpp b/plugins/builtin/source/content/views/view_yara.cpp index 08a15a8f8..2dce17111 100644 --- a/plugins/builtin/source/content/views/view_yara.cpp +++ b/plugins/builtin/source/content/views/view_yara.cpp @@ -80,8 +80,8 @@ namespace hex::plugin::builtin { auto &extraData = ProviderExtraData::get(provider).yara; for (auto &[name, path] : extraData.rules) { data["rules"].push_back({ - { "name", hex::toUTF8String(name) }, - { "path", hex::toUTF8String(path) } + { "name", wolv::util::toUTF8String(name) }, + { "path", wolv::util::toUTF8String(path) } }); } @@ -109,7 +109,7 @@ namespace hex::plugin::builtin { if (ImGui::BeginListBox("##rules", ImVec2(-FLT_MIN, ImGui::GetTextLineHeightWithSpacing() * 5))) { for (u32 i = 0; i < rules.size(); i++) { const bool selected = (this->m_selectedRule == i); - if (ImGui::Selectable(hex::toUTF8String(rules[i].first).c_str(), selected)) { + if (ImGui::Selectable(wolv::util::toUTF8String(rules[i].first).c_str(), selected)) { this->m_selectedRule = i; } } @@ -264,7 +264,7 @@ namespace hex::plugin::builtin { yr_compiler_destroy(compiler); }; - auto currFilePath = hex::toUTF8String(wolv::io::fs::toShortPath(filePath)); + auto currFilePath = wolv::util::toUTF8String(wolv::io::fs::toShortPath(filePath)); yr_compiler_set_include_callback( compiler,