mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
open: Port to LibMain
This commit is contained in:
parent
73f431a7cb
commit
71c004b75f
Notes:
sideshowbarker
2024-07-17 19:56:54 +09:00
Author: https://github.com/kennethmyhra Commit: https://github.com/SerenityOS/serenity/commit/71c004b75f8 Pull-request: https://github.com/SerenityOS/serenity/pull/12221
2 changed files with 4 additions and 3 deletions
|
@ -142,7 +142,7 @@ target_link_libraries(nl LibMain)
|
|||
target_link_libraries(notify LibGUI LibMain)
|
||||
target_link_libraries(nproc LibMain)
|
||||
target_link_libraries(ntpquery LibMain)
|
||||
target_link_libraries(open LibDesktop)
|
||||
target_link_libraries(open LibDesktop LibMain)
|
||||
target_link_libraries(pape LibGUI)
|
||||
target_link_libraries(passwd LibCrypt LibMain)
|
||||
target_link_libraries(paste LibGUI)
|
||||
|
|
|
@ -11,15 +11,16 @@
|
|||
#include <LibCore/EventLoop.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibDesktop/Launcher.h>
|
||||
#include <LibMain/Main.h>
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
Core::EventLoop loop;
|
||||
Vector<const char*> urls_or_paths;
|
||||
Core::ArgsParser parser;
|
||||
parser.set_general_help("Open a file or URL by executing the appropriate program.");
|
||||
parser.add_positional_argument(urls_or_paths, "URL or file path to open", "url-or-path");
|
||||
parser.parse(argc, argv);
|
||||
parser.parse(arguments);
|
||||
|
||||
bool all_ok = true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue