From 84690f432e3ccfa1cb7c9be5e17016cec9b5ff45 Mon Sep 17 00:00:00 2001 From: ayeteadoe Date: Sat, 28 Jun 2025 13:42:42 -0700 Subject: [PATCH] test-web: Allow help command to succeed These are required for test-web runtime to actually work --- Libraries/LibCore/StandardPaths.cpp | 9 ++++++--- Tests/LibWeb/test-web/CMakeLists.txt | 7 +++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Libraries/LibCore/StandardPaths.cpp b/Libraries/LibCore/StandardPaths.cpp index 8ba738e8d02..cab1d2c204e 100644 --- a/Libraries/LibCore/StandardPaths.cpp +++ b/Libraries/LibCore/StandardPaths.cpp @@ -131,14 +131,17 @@ ByteString StandardPaths::videos_directory() ByteString StandardPaths::config_directory() { + StringBuilder builder; #ifdef AK_OS_WINDOWS - dbgln("Core::StandardPaths::config_directory() is not implemented"); - VERIFY_NOT_REACHED(); + if (auto appdata = get_environment_if_not_empty("APPDATA"sv); appdata.has_value()) + return LexicalPath::canonicalized_path(*appdata); + builder.append(home_directory()); + builder.append("\\AppData\\Roaming"sv); + return LexicalPath::canonicalized_path(builder.to_byte_string()); #endif if (auto config_directory = get_environment_if_not_empty("XDG_CONFIG_HOME"sv); config_directory.has_value()) return LexicalPath::canonicalized_path(*config_directory); - StringBuilder builder; builder.append(home_directory()); #if defined(AK_OS_MACOS) builder.append("/Library/Preferences"sv); diff --git a/Tests/LibWeb/test-web/CMakeLists.txt b/Tests/LibWeb/test-web/CMakeLists.txt index 53af005107a..dd0efdb1b54 100644 --- a/Tests/LibWeb/test-web/CMakeLists.txt +++ b/Tests/LibWeb/test-web/CMakeLists.txt @@ -22,6 +22,13 @@ elseif (WIN32) target_link_libraries(test-web PRIVATE LibDevTools) find_package(pthread REQUIRED) target_include_directories(test-web PRIVATE $) + add_custom_command(TARGET test-web POST_BUILD + COMMAND ${CMAKE_COMMAND} + -E copy_if_different + $ + $ + COMMAND_EXPAND_LISTS + ) endif() # FIXME: Increase support for building targets on Windows