test-web: Allow help command to succeed

These are required for test-web runtime to actually work
This commit is contained in:
ayeteadoe 2025-06-28 13:42:42 -07:00 committed by Andrew Kaster
commit 84690f432e
Notes: github-actions[bot] 2025-08-23 22:06:52 +00:00
2 changed files with 13 additions and 3 deletions

View file

@ -131,14 +131,17 @@ ByteString StandardPaths::videos_directory()
ByteString StandardPaths::config_directory() ByteString StandardPaths::config_directory()
{ {
StringBuilder builder;
#ifdef AK_OS_WINDOWS #ifdef AK_OS_WINDOWS
dbgln("Core::StandardPaths::config_directory() is not implemented"); if (auto appdata = get_environment_if_not_empty("APPDATA"sv); appdata.has_value())
VERIFY_NOT_REACHED(); return LexicalPath::canonicalized_path(*appdata);
builder.append(home_directory());
builder.append("\\AppData\\Roaming"sv);
return LexicalPath::canonicalized_path(builder.to_byte_string());
#endif #endif
if (auto config_directory = get_environment_if_not_empty("XDG_CONFIG_HOME"sv); config_directory.has_value()) if (auto config_directory = get_environment_if_not_empty("XDG_CONFIG_HOME"sv); config_directory.has_value())
return LexicalPath::canonicalized_path(*config_directory); return LexicalPath::canonicalized_path(*config_directory);
StringBuilder builder;
builder.append(home_directory()); builder.append(home_directory());
#if defined(AK_OS_MACOS) #if defined(AK_OS_MACOS)
builder.append("/Library/Preferences"sv); builder.append("/Library/Preferences"sv);

View file

@ -22,6 +22,13 @@ elseif (WIN32)
target_link_libraries(test-web PRIVATE LibDevTools) target_link_libraries(test-web PRIVATE LibDevTools)
find_package(pthread REQUIRED) find_package(pthread REQUIRED)
target_include_directories(test-web PRIVATE $<BUILD_INTERFACE:${PTHREAD_INCLUDE_DIR}>) target_include_directories(test-web PRIVATE $<BUILD_INTERFACE:${PTHREAD_INCLUDE_DIR}>)
add_custom_command(TARGET test-web POST_BUILD
COMMAND ${CMAKE_COMMAND}
-E copy_if_different
$<TARGET_RUNTIME_DLLS:test-web>
$<TARGET_FILE_DIR:test-web>
COMMAND_EXPAND_LISTS
)
endif() endif()
# FIXME: Increase support for building targets on Windows # FIXME: Increase support for building targets on Windows