This commit is contained in:
恍兮惚兮 2024-11-10 22:27:33 +08:00
parent b8ce0ed03f
commit 1de8afaa0f
3 changed files with 8 additions and 4 deletions

View File

@ -130,11 +130,15 @@ std::optional<std::wstring> StringToWideString(std::string_view text, UINT encod
std::wstring StringToWideString(const std::string &text) std::wstring StringToWideString(const std::string &text)
{ {
return StringToWideString(text, CP_UTF8).value(); if (!text.size())
return L"";
return StringToWideString(text, CP_UTF8).value_or(L"");
} }
std::wstring StringToWideString(std::string_view text) std::wstring StringToWideString(std::string_view text)
{ {
return StringToWideString(text, CP_UTF8).value(); if (!text.size())
return L"";
return StringToWideString(text, CP_UTF8).value_or(L"");
} }
std::optional<std::wstring> StringToWideString(const char *text, UINT encoding) std::optional<std::wstring> StringToWideString(const char *text, UINT encoding)

View File

@ -1,5 +1,5 @@
python fetchwebview2.py python fetchwebview2.py
cmake ..\CMakeLists.txt -G "Visual Studio 17 2022" -A win32 -T host=x86 -B ..\build\x86 cmake ..\CMakeLists.txt -G "Visual Studio 17 2022" -A win32 -T host=x86 -B ..\build\x86
cmake --build ..\build\x86 --config Release --target ALL_BUILD -j 14 cmake --build ..\build\x86 --config Release --target ALL_BUILD -j 14
copy .\builds\_x86\shareddllproxy32.exe ..\..\py\files\plugins copy ..\builds\_x86\shareddllproxy32.exe ..\..\py\files\plugins
robocopy ..\builds\_x86 ..\..\py\files\plugins\DLL32 robocopy ..\builds\_x86 ..\..\py\files\plugins\DLL32

View File

@ -1,7 +1,7 @@
set(VERSION_MAJOR 5) set(VERSION_MAJOR 5)
set(VERSION_MINOR 57) set(VERSION_MINOR 57)
set(VERSION_PATCH 1) set(VERSION_PATCH 2)
set(VERSION_REVISION 0) set(VERSION_REVISION 0)
add_definitions(-DVERSION_MAJOR=${VERSION_MAJOR}) add_definitions(-DVERSION_MAJOR=${VERSION_MAJOR})
add_definitions(-DVERSION_MINOR=${VERSION_MINOR}) add_definitions(-DVERSION_MINOR=${VERSION_MINOR})