diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index bb50a409f5b..220ccca5999 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -119,6 +119,12 @@ runs: brew update brew install autoconf autoconf-archive automake bash ccache coreutils llvm@20 nasm ninja pkg-config qt unzip wabt + - name: Install Qt (Windows) + if: ${{ inputs.os == 'Windows' }} + uses: jurplel/install-qt-action@v4 + with: + modules: "qtmultimedia" + - name: 'Set required environment variables' if: ${{ inputs.os == 'Linux' && inputs.arch == 'arm64' }} uses: actions/github-script@v7 diff --git a/AK/Singleton.h b/AK/Singleton.h index b1a0d5527f9..0dbba482597 100644 --- a/AK/Singleton.h +++ b/AK/Singleton.h @@ -12,9 +12,6 @@ #ifdef AK_OS_WINDOWS // Forward declare to avoid pulling Windows.h into every file in existence. extern "C" __declspec(dllimport) void __stdcall Sleep(unsigned long); -# ifndef sched_yield -# define sched_yield() Sleep(0) -# endif #else # include #endif @@ -57,7 +54,11 @@ public: } // Someone else was faster, wait until they're done while (obj == (T*)0x1) { +#if defined(AK_OS_WINDOWS) + Sleep(0); +#else sched_yield(); +#endif obj = obj_var.load(AK::memory_order_acquire); } if constexpr (allow_create) { diff --git a/CMakeLists.txt b/CMakeLists.txt index 93283e7a81a..afcc5bf2658 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,7 +62,7 @@ if (ANDROID AND ENABLE_QT) set(ENABLE_QT OFF CACHE BOOL "" FORCE) endif() -if (ENABLE_QT AND ENABLE_GUI_TARGETS AND (NOT WIN32 OR NOT ENABLE_WINDOWS_CI)) +if (ENABLE_QT AND ENABLE_GUI_TARGETS) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) @@ -74,7 +74,7 @@ find_package(OpenSSL REQUIRED) include(CTest) # for BUILD_TESTING option, default ON -if (ENABLE_GUI_TARGETS AND (NOT WIN32 OR NOT ENABLE_WINDOWS_CI)) +if (ENABLE_GUI_TARGETS) add_subdirectory(Services) add_subdirectory(UI) endif() diff --git a/CMakePresets.json b/CMakePresets.json index f6687412e3f..f23c9794c05 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -145,8 +145,7 @@ "displayName": "Windows CI Config", "description": "CI Windows build", "cacheVariables": { - "ENABLE_WINDOWS_CI": "ON", - "ENABLE_QT": "OFF" + "ENABLE_WINDOWS_CI": "ON" } }, { diff --git a/Libraries/CMakeLists.txt b/Libraries/CMakeLists.txt index 568b08d1461..b24ccb4d277 100644 --- a/Libraries/CMakeLists.txt +++ b/Libraries/CMakeLists.txt @@ -24,6 +24,7 @@ if (ENABLE_GUI_TARGETS) add_subdirectory(LibImageDecoderClient) add_subdirectory(LibMedia) add_subdirectory(LibWeb) + add_subdirectory(LibWebView) endif() # FIXME: Increase support for building targets on Windows @@ -36,5 +37,4 @@ add_subdirectory(LibLine) if (ENABLE_GUI_TARGETS) # FIXME: TCPServer still needs to be implemented on Windows add_subdirectory(LibDevTools) - add_subdirectory(LibWebView) endif() diff --git a/Libraries/LibJS/Token.h b/Libraries/LibJS/Token.h index 9b490d0c32a..ac9f18460a7 100644 --- a/Libraries/LibJS/Token.h +++ b/Libraries/LibJS/Token.h @@ -10,6 +10,7 @@ #include #include #include +#include namespace JS { @@ -175,7 +176,7 @@ enum class TokenCategory { Identifier }; -class Token { +class JS_API Token { public: Token() = default; diff --git a/Libraries/LibWebView/CMakeLists.txt b/Libraries/LibWebView/CMakeLists.txt index e6382b86f75..508a771a701 100644 --- a/Libraries/LibWebView/CMakeLists.txt +++ b/Libraries/LibWebView/CMakeLists.txt @@ -93,6 +93,10 @@ if (ENABLE_QT) set_target_properties(LibWebViewQt PROPERTIES AUTOMOC ON AUTORCC OFF AUTOUIC OFF) find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(LibWebViewQt PUBLIC Qt::Core) + if (WIN32) + find_package(pthread REQUIRED) + target_include_directories(LibWebViewQt PRIVATE $) + endif() target_link_libraries(LibWebViewPlatform INTERFACE LibWebViewQt) elseif (APPLE) add_library(LibWebViewCocoa STATIC diff --git a/Libraries/LibWebView/ProcessManager.h b/Libraries/LibWebView/ProcessManager.h index a4c63821100..7ac283b1940 100644 --- a/Libraries/LibWebView/ProcessManager.h +++ b/Libraries/LibWebView/ProcessManager.h @@ -42,7 +42,7 @@ public: private: Core::Platform::ProcessStatistics m_statistics; HashMap m_processes; - int m_signal_handle { -1 }; + [[maybe_unused]] int m_signal_handle { -1 }; Threading::Mutex m_lock; }; diff --git a/Meta/CMake/targets.cmake b/Meta/CMake/targets.cmake index d4881dde3be..c605a9947b7 100644 --- a/Meta/CMake/targets.cmake +++ b/Meta/CMake/targets.cmake @@ -5,7 +5,11 @@ function(lagom_generate_export_header name fs_name) # to export symbols required by external consumers. This allows the codebase # to gradually slowly migrate instead of an all-or-nothing approach. if (NOT WIN32) - add_cxx_compile_options(${name} PRIVATE -fvisibility=hidden) + target_compile_options(${name} + PRIVATE + "$<$:-fvisibility=hidden>" + "$<$:-fvisibility=hidden>" + ) else() set_target_properties(${name} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS OFF) endif()