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