diff --git a/cmake/grpc.cmake b/cmake/grpc.cmake index 71fb1835..1b47e525 100644 --- a/cmake/grpc.cmake +++ b/cmake/grpc.cmake @@ -18,11 +18,11 @@ set(CMAKE_POLICY_VERSION_MINIMUM 3.5) set(FETCHCONTENT_QUIET OFF) -# CRITICAL: Prevent CMake from finding system-installed protobuf +# CRITICAL: Prevent CMake from finding system-installed protobuf/abseil # This ensures gRPC uses its own bundled versions -# NOTE: We allow gRPC to use our FetchContent abseil to keep versions in sync set(CMAKE_DISABLE_FIND_PACKAGE_Protobuf TRUE) set(CMAKE_DISABLE_FIND_PACKAGE_gRPC TRUE) +set(CMAKE_DISABLE_FIND_PACKAGE_absl TRUE) # Also prevent pkg-config from finding system packages set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH FALSE) diff --git a/src/cli/service/agent/todo_manager.cc b/src/cli/service/agent/todo_manager.cc index caee8fc6..b764b14a 100644 --- a/src/cli/service/agent/todo_manager.cc +++ b/src/cli/service/agent/todo_manager.cc @@ -53,9 +53,9 @@ TodoItem::Status TodoItem::StringToStatus(const std::string& str) { TodoManager::TodoManager() { auto result = util::PlatformPaths::GetAppDataSubdirectory("agent"); if (result.ok()) { - data_dir_ = *result; + data_dir_ = result->string(); } else { - data_dir_ = std::filesystem::current_path() / ".yaze" / "agent"; + data_dir_ = (std::filesystem::current_path() / ".yaze" / "agent").string(); } todos_file_ = (std::filesystem::path(data_dir_) / "todos.json").string(); } diff --git a/src/cli/service/ai/vision_action_refiner.cc b/src/cli/service/ai/vision_action_refiner.cc index 2329f5c3..11e50664 100644 --- a/src/cli/service/ai/vision_action_refiner.cc +++ b/src/cli/service/ai/vision_action_refiner.cc @@ -110,9 +110,9 @@ absl::StatusOr VisionActionRefiner::RefineAction( std::vector parts = absl::StrSplit(coords, ','); if (parts.size() == 2) { refinement.adjusted_parameters["x"] = - absl::StripAsciiWhitespace(parts[0]); + std::string(absl::StripAsciiWhitespace(parts[0])); refinement.adjusted_parameters["y"] = - absl::StripAsciiWhitespace(parts[1]); + std::string(absl::StripAsciiWhitespace(parts[1])); } } } @@ -167,8 +167,8 @@ VisionActionRefiner::LocateUIElement( std::string coords = text.substr(pos + 1, end - pos - 1); std::vector parts = absl::StrSplit(coords, ','); if (parts.size() == 2) { - location["x"] = absl::StripAsciiWhitespace(parts[0]); - location["y"] = absl::StripAsciiWhitespace(parts[1]); + location["x"] = std::string(absl::StripAsciiWhitespace(parts[0])); + location["y"] = std::string(absl::StripAsciiWhitespace(parts[1])); } } } @@ -324,7 +324,7 @@ VisionAnalysisResult VisionActionRefiner::ParseVerificationResponse( size_t pos = response_upper.find("SUCCESS:"); if (pos != std::string::npos) { std::string desc = response.substr(pos + 8); - result.description = absl::StripAsciiWhitespace(desc); + result.description = std::string(absl::StripAsciiWhitespace(desc)); } } else if (response_upper.find("FAILURE") != std::string::npos) { diff --git a/src/cli/service/net/z3ed_network_client.cc b/src/cli/service/net/z3ed_network_client.cc index 59b06c1b..2e0a393d 100644 --- a/src/cli/service/net/z3ed_network_client.cc +++ b/src/cli/service/net/z3ed_network_client.cc @@ -16,6 +16,14 @@ #include "httplib.h" #endif +// Undefine Windows macros that conflict with our method names +// Must be outside the #ifdef so it applies to all code below +#ifdef _WIN32 +#ifdef SendMessage +#undef SendMessage +#endif +#endif + namespace yaze { namespace cli { namespace net { diff --git a/vcpkg.json b/vcpkg.json index 06b1a4aa..8c9a951e 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -11,10 +11,6 @@ "default-features": false, "features": [] }, - { - "name": "abseil", - "platform": "windows" - }, { "name": "yaml-cpp", "platform": "windows"