mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-18 15:32:22 +00:00
LibWebView: Enable in Windows CI
This commit is contained in:
parent
09ff99c50e
commit
ee3c033de2
Notes:
github-actions[bot]
2025-08-23 22:07:48 +00:00
Author: https://github.com/ayeteadoe
Commit: ee3c033de2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5229
Reviewed-by: https://github.com/ADKaster ✅
9 changed files with 26 additions and 11 deletions
6
.github/actions/setup/action.yml
vendored
6
.github/actions/setup/action.yml
vendored
|
@ -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
|
||||
|
|
|
@ -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 <sched.h>
|
||||
#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) {
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -145,8 +145,7 @@
|
|||
"displayName": "Windows CI Config",
|
||||
"description": "CI Windows build",
|
||||
"cacheVariables": {
|
||||
"ENABLE_WINDOWS_CI": "ON",
|
||||
"ENABLE_QT": "OFF"
|
||||
"ENABLE_WINDOWS_CI": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <AK/Utf16FlyString.h>
|
||||
#include <AK/Utf16String.h>
|
||||
#include <AK/Variant.h>
|
||||
#include <LibJS/Export.h>
|
||||
|
||||
namespace JS {
|
||||
|
||||
|
@ -175,7 +176,7 @@ enum class TokenCategory {
|
|||
Identifier
|
||||
};
|
||||
|
||||
class Token {
|
||||
class JS_API Token {
|
||||
public:
|
||||
Token() = default;
|
||||
|
||||
|
|
|
@ -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 $<BUILD_INTERFACE:${PTHREAD_INCLUDE_DIR}>)
|
||||
endif()
|
||||
target_link_libraries(LibWebViewPlatform INTERFACE LibWebViewQt)
|
||||
elseif (APPLE)
|
||||
add_library(LibWebViewCocoa STATIC
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
private:
|
||||
Core::Platform::ProcessStatistics m_statistics;
|
||||
HashMap<pid_t, Process> m_processes;
|
||||
int m_signal_handle { -1 };
|
||||
[[maybe_unused]] int m_signal_handle { -1 };
|
||||
Threading::Mutex m_lock;
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
"$<$<COMPILE_LANGUAGE:CXX>:-fvisibility=hidden>"
|
||||
"$<$<COMPILE_LANGUAGE:C>:-fvisibility=hidden>"
|
||||
)
|
||||
else()
|
||||
set_target_properties(${name} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS OFF)
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue