mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
Ladybird: Remove $SERENITY_SOURCE_DIR from resource root candidates
Now we will only load resources from $build/share/Lagom. On macOS, we load from the bundle directory Contents/Resources instead. This simplifies the commands and environment variables needed to execute Ladybird from the build directory, and makes our install setup less awkward for distributions and packagers.
This commit is contained in:
committed by
Andrew Kaster
parent
21ac431fac
commit
68402bec12
@@ -23,14 +23,9 @@
|
||||
// FIXME: Share b/w RequestServer and WebSocket
|
||||
ErrorOr<ByteString> find_certificates(StringView serenity_resource_root)
|
||||
{
|
||||
auto cert_path = ByteString::formatted("{}/res/ladybird/cacert.pem", serenity_resource_root);
|
||||
if (!FileSystem::exists(cert_path)) {
|
||||
auto app_dir = LexicalPath::dirname(TRY(Core::System::current_executable_path()));
|
||||
|
||||
cert_path = ByteString::formatted("{}/cacert.pem", LexicalPath(app_dir).parent());
|
||||
if (!FileSystem::exists(cert_path))
|
||||
return Error::from_string_view("Don't know how to load certs!"sv);
|
||||
}
|
||||
auto cert_path = ByteString::formatted("{}/ladybird/cacert.pem", serenity_resource_root);
|
||||
if (!FileSystem::exists(cert_path))
|
||||
return Error::from_string_view("Don't know how to load certs!"sv);
|
||||
return cert_path;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user