mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:07:34 +00:00
Run: Port to LibMain :^)
This commit is contained in:
parent
0b8fb8358e
commit
1ded1ed963
2 changed files with 7 additions and 10 deletions
|
@ -14,4 +14,4 @@ set(SOURCES
|
||||||
)
|
)
|
||||||
|
|
||||||
serenity_app(Run ICON app-run)
|
serenity_app(Run ICON app-run)
|
||||||
target_link_libraries(Run LibCore LibDesktop LibGUI)
|
target_link_libraries(Run LibCore LibDesktop LibGUI LibMain)
|
||||||
|
|
|
@ -5,20 +5,17 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "RunWindow.h"
|
#include "RunWindow.h"
|
||||||
#include <AK/StringBuilder.h>
|
#include <LibCore/System.h>
|
||||||
#include <LibGUI/Application.h>
|
#include <LibGUI/Application.h>
|
||||||
#include <LibGUI/Desktop.h>
|
#include <LibGUI/Desktop.h>
|
||||||
#include <unistd.h>
|
#include <LibMain/Main.h>
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
{
|
{
|
||||||
if (pledge("stdio recvfd sendfd thread cpath rpath wpath unix proc exec", nullptr) < 0) {
|
TRY(Core::System::pledge("stdio recvfd sendfd thread cpath rpath wpath unix proc exec", nullptr));
|
||||||
perror("pledge");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto app = GUI::Application::construct(argc, argv);
|
auto app = TRY(GUI::Application::try_create(arguments));
|
||||||
auto window = RunWindow::construct();
|
auto window = TRY(RunWindow::try_create());
|
||||||
|
|
||||||
window->move_to(16, GUI::Desktop::the().rect().bottom() - GUI::Desktop::the().taskbar_height() - 16 - window->height());
|
window->move_to(16, GUI::Desktop::the().rect().bottom() - GUI::Desktop::the().taskbar_height() - 16 - window->height());
|
||||||
window->show();
|
window->show();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue