diff --git a/WeChatFerry/com/log.cpp b/WeChatFerry/com/log.cpp index e06c0e9..6524dd0 100644 --- a/WeChatFerry/com/log.cpp +++ b/WeChatFerry/com/log.cpp @@ -14,7 +14,11 @@ void InitLogger(std::string path) if (logger != nullptr) { return; } - + // check and create logs folder + std::filesystem::path logDir = std::filesystem::path(path) / "logs"; + if (!std::filesystem::exists(logDir)) { + std::filesystem::create_directory(logDir); + } auto filename = std::filesystem::path(path + LOGGER_FILE_NAME).make_preferred().string(); try { logger = spdlog::rotating_logger_mt(LOGGER_NAME, filename, LOGGER_MAX_SIZE, LOGGER_MAX_FILES); diff --git a/WeChatFerry/sdk/SDK.vcxproj b/WeChatFerry/sdk/SDK.vcxproj index af47a4b..a796526 100644 --- a/WeChatFerry/sdk/SDK.vcxproj +++ b/WeChatFerry/sdk/SDK.vcxproj @@ -117,6 +117,7 @@ true MultiThreaded + /utf-8 %(AdditionalOptions) Windows diff --git a/WeChatFerry/spy/Spy.vcxproj b/WeChatFerry/spy/Spy.vcxproj index 0c44f9a..02a49a0 100644 --- a/WeChatFerry/spy/Spy.vcxproj +++ b/WeChatFerry/spy/Spy.vcxproj @@ -192,7 +192,7 @@ xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)..\clients\python\wcferryfalse 4251;4731;4819 - /EHa %(AdditionalOptions) + /EHa /utf-8 %(AdditionalOptions) MultiThreaded