mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 10:19:03 +03:00
headless-browser: Call platform_init()
for path of resources folder
For `AK_OS_SERENITY`, the root path of the resources folder is "/res"; but otherwise it should be the `s_serenity_resource_root` variable set in `platform_init()`. However, a path provided on the command line, will override the default path in both of those cases. This change also makes sure that `RequestServer` can find the certificates file `serenity/Build/lagom/share/Lagom/ladybird/cacert.pem`
This commit is contained in:
parent
49e09507d7
commit
b25d220a2c
Notes:
sideshowbarker
2024-07-17 07:31:31 +09:00
Author: https://github.com/ronak69 Commit: https://github.com/SerenityOS/serenity/commit/b25d220a2c Pull-request: https://github.com/SerenityOS/serenity/pull/24085
@ -675,6 +675,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
ByteString test_glob;
|
||||
Vector<ByteString> certificates;
|
||||
|
||||
#if !defined(AK_OS_SERENITY)
|
||||
platform_init();
|
||||
resources_folder = s_serenity_resource_root;
|
||||
#endif
|
||||
|
||||
Core::ArgsParser args_parser;
|
||||
args_parser.set_general_help("This utility runs the Browser in headless mode.");
|
||||
args_parser.add_option(screenshot_timeout, "Take a screenshot after [n] seconds (default: 1)", "screenshot", 's', "n");
|
||||
|
Loading…
Reference in New Issue
Block a user