mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +00: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: b25d220a2c
Pull-request: https://github.com/SerenityOS/serenity/pull/24085
1 changed files with 5 additions and 0 deletions
|
@ -675,6 +675,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
ByteString test_glob;
|
ByteString test_glob;
|
||||||
Vector<ByteString> certificates;
|
Vector<ByteString> certificates;
|
||||||
|
|
||||||
|
#if !defined(AK_OS_SERENITY)
|
||||||
|
platform_init();
|
||||||
|
resources_folder = s_serenity_resource_root;
|
||||||
|
#endif
|
||||||
|
|
||||||
Core::ArgsParser args_parser;
|
Core::ArgsParser args_parser;
|
||||||
args_parser.set_general_help("This utility runs the Browser in headless mode.");
|
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");
|
args_parser.add_option(screenshot_timeout, "Take a screenshot after [n] seconds (default: 1)", "screenshot", 's', "n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue