mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:57:46 +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:
parent
21ac431fac
commit
68402bec12
8 changed files with 38 additions and 80 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue