1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +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:
Andrew Kaster 2022-10-07 17:08:29 -06:00
parent bbb08c1912
commit 6fff03713c
6 changed files with 32 additions and 17 deletions

View file

@ -570,6 +570,8 @@ void WebContentView::create_client()
MUST(Core::System::setenv("FD_PASSING_SOCKET"sv, fd_passing_socket_string, true));
auto rc = execlp("./WebContent/WebContent", "WebContent", nullptr);
if (rc < 0)
rc = execlp((QCoreApplication::applicationDirPath() + "/WebContent").toStdString().c_str(), "WebContent", nullptr);
if (rc < 0)
perror("execlp");
VERIFY_NOT_REACHED();