mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:57:35 +00:00
Ladybird: Ensure that installed ladybird can launch WebContent process
Always call platform_init after there's a QApplication, because in the installed configuration that's how we find the resources. Try QCoreApplication::applicationDirPath() after looking in ./WebContent for the WebContent process. In an installed configuration, ladybird and WebContent will both be in $PREFIX/bin. Add install rules for WebContent and its linked libraries, for if they ever differ from ladybird's.
This commit is contained in:
parent
bbb08c1912
commit
6fff03713c
6 changed files with 32 additions and 17 deletions
|
@ -1,10 +1,10 @@
|
|||
set(WEBCONTENT_SOURCE_DIR ${SERENITY_SOURCE_DIR}/Userland/Services/WebContent/)
|
||||
|
||||
set(WEBCONTENT_SOURCES
|
||||
${WEBCONTENT_SOURCE_DIR}/ConnectionFromClient.cpp
|
||||
${WEBCONTENT_SOURCE_DIR}/ConsoleGlobalObject.cpp
|
||||
${WEBCONTENT_SOURCE_DIR}/PageHost.cpp
|
||||
${WEBCONTENT_SOURCE_DIR}/WebContentConsoleClient.cpp
|
||||
${WEBCONTENT_SOURCE_DIR}/ConnectionFromClient.cpp
|
||||
${WEBCONTENT_SOURCE_DIR}/ConsoleGlobalObject.cpp
|
||||
${WEBCONTENT_SOURCE_DIR}/PageHost.cpp
|
||||
${WEBCONTENT_SOURCE_DIR}/WebContentConsoleClient.cpp
|
||||
../EventLoopPluginQt.cpp
|
||||
../FontPluginQt.cpp
|
||||
../ImageCodecPluginLadybird.cpp
|
||||
|
@ -14,7 +14,7 @@ set(WEBCONTENT_SOURCES
|
|||
../WebSocketClientManagerLadybird.cpp
|
||||
../WebSocketLadybird.cpp
|
||||
main.cpp
|
||||
)
|
||||
)
|
||||
|
||||
qt_add_executable(WebContent ${WEBCONTENT_SOURCES})
|
||||
|
||||
|
|
|
@ -38,10 +38,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
// FIXME: Refactor things so we can get rid of this somehow.
|
||||
Core::EventLoop event_loop;
|
||||
|
||||
platform_init();
|
||||
|
||||
QGuiApplication app(arguments.argc, arguments.argv);
|
||||
|
||||
platform_init();
|
||||
|
||||
Web::Platform::EventLoopPlugin::install(*new Ladybird::EventLoopPluginQt);
|
||||
Web::Platform::ImageCodecPlugin::install(*new Ladybird::ImageCodecPluginLadybird);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue