diff --git a/Meta/CMake/libweb_generators.cmake b/Meta/CMake/libweb_generators.cmake index cf4e5f61c0e..eb193074b9c 100644 --- a/Meta/CMake/libweb_generators.cmake +++ b/Meta/CMake/libweb_generators.cmake @@ -219,10 +219,17 @@ function (generate_js_bindings target) ShadowRealmExposedInterfaces.cpp ShadowRealmExposedInterfaces.h WindowExposedInterfaces.cpp WindowExposedInterfaces.h) list(TRANSFORM exposed_interface_sources PREPEND "Bindings/") + set(LIBWEB_ALL_IDL_FILES_ARGUMENT ${LIBWEB_ALL_IDL_FILES}) + if (WIN32) + list(JOIN LIBWEB_ALL_IDL_FILES "\n" idl_file_list) + file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/all_idl_files.txt" CONTENT "${idl_file_list}" NEWLINE_STYLE UNIX) + set(LIBWEB_ALL_IDL_FILES "${CMAKE_CURRENT_BINARY_DIR}/all_idl_files.txt") + set(LIBWEB_ALL_IDL_FILES_ARGUMENT "@${LIBWEB_ALL_IDL_FILES}") + endif() add_custom_command( OUTPUT ${exposed_interface_sources} COMMAND "${CMAKE_COMMAND}" -E make_directory "tmp" - COMMAND $ -o "${CMAKE_CURRENT_BINARY_DIR}/tmp" -b "${LIBWEB_INPUT_FOLDER}" -b "${CMAKE_CURRENT_BINARY_DIR}" ${LIBWEB_ALL_IDL_FILES} + COMMAND $ -o "${CMAKE_CURRENT_BINARY_DIR}/tmp" -b "${LIBWEB_INPUT_FOLDER}" -b "${CMAKE_CURRENT_BINARY_DIR}" ${LIBWEB_ALL_IDL_FILES_ARGUMENT} COMMAND "${CMAKE_COMMAND}" -E copy_if_different tmp/IntrinsicDefinitions.cpp "Bindings/IntrinsicDefinitions.cpp" COMMAND "${CMAKE_COMMAND}" -E copy_if_different tmp/DedicatedWorkerExposedInterfaces.h "Bindings/DedicatedWorkerExposedInterfaces.h" COMMAND "${CMAKE_COMMAND}" -E copy_if_different tmp/DedicatedWorkerExposedInterfaces.cpp "Bindings/DedicatedWorkerExposedInterfaces.cpp" diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp index abed3cb44d4..f463ebe7bf8 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp @@ -356,6 +356,25 @@ ErrorOr serenity_main(Main::Arguments arguments) VERIFY(!paths.is_empty()); VERIFY(!base_paths.is_empty()); + if (paths.first().starts_with("@"sv)) { + // Response file + auto file_or_error = Core::File::open(paths.first().substring_view(1), Core::File::OpenMode::Read); + paths.remove(0); + VERIFY(paths.is_empty()); + + if (file_or_error.is_error()) { + s_error_string = ByteString::formatted("Unable to open response file {}", paths.first()); + return Error::from_string_view(s_error_string.view()); + } + auto file = file_or_error.release_value(); + auto string = TRY(file->read_until_eof()); + for (auto const& path : StringView(string).split_view('\n')) { + if (path.is_empty()) + continue; + paths.append(path); + } + } + Vector lexical_bases; for (auto const& base_path : base_paths) { VERIFY(!base_path.is_empty());