2020-01-18 11:38:21 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 11:24:48 +03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 11:38:21 +03:00
|
|
|
*/
|
|
|
|
|
2020-05-24 17:26:33 +03:00
|
|
|
#include <LibGUI/AboutDialog.h>
|
2020-02-06 22:33:02 +03:00
|
|
|
#include <LibGUI/Application.h>
|
2020-11-02 22:30:17 +03:00
|
|
|
#include <LibGUI/Icon.h>
|
2020-01-13 11:35:37 +03:00
|
|
|
#include <stdio.h>
|
2021-03-12 19:29:37 +03:00
|
|
|
#include <unistd.h>
|
2019-02-12 17:23:07 +03:00
|
|
|
|
|
|
|
int main(int argc, char** argv)
|
|
|
|
{
|
2021-05-14 00:20:26 +03:00
|
|
|
if (pledge("stdio recvfd sendfd rpath unix", nullptr) < 0) {
|
2020-01-13 11:35:37 +03:00
|
|
|
perror("pledge");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2020-07-04 15:05:19 +03:00
|
|
|
auto app = GUI::Application::construct(argc, argv);
|
2019-02-12 17:23:07 +03:00
|
|
|
|
2021-05-14 00:20:26 +03:00
|
|
|
if (pledge("stdio recvfd sendfd rpath", nullptr) < 0) {
|
2020-01-13 11:35:37 +03:00
|
|
|
perror("pledge");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2020-01-21 14:12:07 +03:00
|
|
|
if (unveil("/res", "r") < 0) {
|
|
|
|
perror("unveil");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
unveil(nullptr, nullptr);
|
|
|
|
|
2021-04-25 19:45:43 +03:00
|
|
|
auto app_icon = GUI::Icon::default_icon("ladyball");
|
|
|
|
GUI::AboutDialog::show("SerenityOS", app_icon.bitmap_for_size(32), nullptr, app_icon.bitmap_for_size(16));
|
2020-07-04 15:05:19 +03:00
|
|
|
return app->exec();
|
2019-02-12 17:23:07 +03:00
|
|
|
}
|