mirror of
https://invent.kde.org/marcoa/a-la-karte.git
synced 2026-02-09 21:13:08 +00:00
35 lines
860 B
C++
35 lines
860 B
C++
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
// SPDX-FileCopyrightText: 2026 A-La-Karte Contributors
|
|
|
|
#include <QCommandLineOption>
|
|
#include <QCommandLineParser>
|
|
#include <QCoreApplication>
|
|
|
|
#include "gamecenterdaemon.h"
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QCoreApplication app(argc, argv);
|
|
|
|
QCommandLineParser parser;
|
|
parser.setApplicationDescription(QStringLiteral("A-La-Karte Game Center"));
|
|
parser.addHelpOption();
|
|
parser.addOption(QCommandLineOption(QStringLiteral("system"), QStringLiteral("Run as system bus proxy")));
|
|
parser.process(app);
|
|
|
|
if (parser.isSet(QStringLiteral("system"))) {
|
|
GameCenterSystemProxy proxy;
|
|
if (!proxy.init()) {
|
|
return 1;
|
|
}
|
|
|
|
return app.exec();
|
|
}
|
|
|
|
GameCenterDaemon daemon;
|
|
if (!daemon.init()) {
|
|
return 1;
|
|
}
|
|
|
|
return app.exec();
|
|
}
|