mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-07-10 01:24:41 -06:00
Add support for case insensitive non-ASCII paths
This commit is contained in:
parent
a69c18b8b2
commit
b46e45f402
@ -82,7 +82,7 @@ find_package(CURL REQUIRED)
|
||||
find_package(pugixml REQUIRED)
|
||||
find_package(imgui REQUIRED)
|
||||
find_package(RapidJSON REQUIRED)
|
||||
find_package(Boost COMPONENTS program_options filesystem nowide REQUIRED)
|
||||
find_package(Boost COMPONENTS program_options filesystem nowide locale REQUIRED)
|
||||
find_package(libzip REQUIRED)
|
||||
find_package(glslang REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
@ -38,6 +38,7 @@ target_link_libraries(CemuCommon PRIVATE
|
||||
CemuComponents
|
||||
Boost::nowide
|
||||
Boost::filesystem
|
||||
Boost::locale
|
||||
glm::glm
|
||||
)
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#include "Common/unix/FileStream_unix.h"
|
||||
#include <boost/locale/conversion.hpp>
|
||||
|
||||
std::optional<fs::path> findPathCI(const fs::path& path)
|
||||
{
|
||||
@ -18,7 +19,7 @@ std::optional<fs::path> findPathCI(const fs::path& path)
|
||||
for (auto&& dirEntry : fs::directory_iterator(parrentPath))
|
||||
{
|
||||
std::string dirFName = dirEntry.path().filename().string();
|
||||
if (boost::iequals(dirFName, fName))
|
||||
if (boost::equals(boost::locale::to_lower(dirFName), boost::locale::to_lower(fName)))
|
||||
{
|
||||
return dirEntry;
|
||||
}
|
||||
|
||||
@ -19,6 +19,9 @@
|
||||
|
||||
#include "Common/ExceptionHandler/ExceptionHandler.h"
|
||||
|
||||
#include <boost/locale/generator.hpp>
|
||||
#include <boost/locale.hpp>
|
||||
#include <locale>
|
||||
#include <wx/setup.h>
|
||||
#include "util/helpers/helpers.h"
|
||||
#include "config/ActiveSettings.h"
|
||||
@ -378,7 +381,8 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
if (!LaunchSettings::HandleCommandline(argc, argv))
|
||||
return 0;
|
||||
|
||||
boost::locale::generator gen;
|
||||
std::locale::global(gen(""));
|
||||
ActiveSettings::LoadOnce();
|
||||
|
||||
HandlePostUpdate();
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
"boost-range",
|
||||
"boost-functional",
|
||||
"boost-dll",
|
||||
"boost-locale",
|
||||
"boost-optional",
|
||||
"boost-signals2",
|
||||
"boost-crc",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user