2021-07-05 04:38:25 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2021, timmot <tiwwot@protonmail.com>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
2022-02-25 07:18:30 -03:00
|
|
|
#include <FileSystemAccessServer/ConnectionFromClient.h>
|
2021-11-23 06:59:50 -03:00
|
|
|
#include <LibCore/System.h>
|
2021-07-05 04:38:25 -03:00
|
|
|
#include <LibGUI/Application.h>
|
2021-12-06 14:11:05 -03:00
|
|
|
#include <LibIPC/SingleServer.h>
|
2021-11-23 06:33:21 -03:00
|
|
|
#include <LibMain/Main.h>
|
2021-07-05 04:38:25 -03:00
|
|
|
|
2021-11-23 06:33:21 -03:00
|
|
|
ErrorOr<int> serenity_main(Main::Arguments)
|
2021-07-05 04:38:25 -03:00
|
|
|
{
|
2021-11-27 19:26:34 -03:00
|
|
|
TRY(Core::System::pledge("stdio recvfd sendfd rpath cpath wpath unix thread"));
|
2021-07-05 04:38:25 -03:00
|
|
|
|
2022-04-16 13:17:39 -03:00
|
|
|
auto app = TRY(GUI::Application::try_create(0, nullptr));
|
2021-07-05 04:38:25 -03:00
|
|
|
app->set_quit_when_last_window_deleted(false);
|
|
|
|
|
|
2022-02-25 07:18:30 -03:00
|
|
|
auto client = TRY(IPC::take_over_accepted_client_from_system_server<FileSystemAccessServer::ConnectionFromClient>());
|
2021-07-05 04:38:25 -03:00
|
|
|
return app->exec();
|
|
|
|
|
}
|