1/***************************************************************************
2 * Copyright (C) 1999-2006 by Éric Bischoff <ebischoff@nerim.net> *
3 * Copyright (C) 2007 by Albert Astals Cid <aacid@kde.org> *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 ***************************************************************************/
10
11#include <kapplication.h>
12#include <klocale.h>
13#include <kcmdlineargs.h>
14#include <kaboutdata.h>
15#include <kglobal.h>
16
17#include "toplevel.h"
18
19
20static const KLocalizedString description = ki18n("Potato game for kids");
21static const KLocalizedString text = ki18n("A program original by <email address='%1'>Éric Bischoff</email>\nand John Calhoun.\n\nThis program is dedicated to my daughter Sunniva.").subs(QLatin1String("ebischoff@nerim.net"));
22
23static const char version[] = "0.8.0";
24
25// Main function
26int main(int argc, char *argv[])
27{
28
29 KAboutData aboutData( "ktuberling", 0, ki18n("KTuberling"),
30 version, description, KAboutData::License_GPL,
31 ki18n("(c) 1999-2009, The KTuberling Developers"), text, "http://games.kde.org/ktuberling" );
32 aboutData.addAuthor(ki18n("Albert Astals Cid"), ki18n("Maintainer"), "aacid@kde.org");
33 aboutData.addAuthor(ki18n("Éric Bischoff"), ki18n("Former Developer"), "ebischoff@nerim.net");
34 aboutData.addCredit(ki18n("John Calhoun"), ki18n("Original concept and artwork"));
35 aboutData.addCredit(ki18n("Agnieszka Czajkowska"), ki18n("New artwork"), "agnieszka@imagegalaxy.de");
36 aboutData.addCredit(ki18n("Bas Willems"), ki18n("New artwork"), "cybersurfer@euronet.nl");
37 aboutData.addCredit(ki18n("Roger Larsson"), ki18n("Sounds tuning"), "roger.larsson@norran.net");
38 aboutData.addCredit(ki18n("Dolores Almansa"), ki18n("New artwork"), "dolores.almansa@corazondemaria.org");
39 KCmdLineArgs::init(argc, argv, &aboutData);
40
41 KCmdLineOptions options;
42 options.add("+<tuberling-file>", ki18n("Potato to open"));
43 KCmdLineArgs::addCmdLineOptions(options);
44
45 KApplication app;
46 KGlobal::locale()->insertCatalog( QLatin1String( "libkdegames" ));
47
48 TopLevel *toplevel=0;
49
50 if (app.isSessionRestored())
51 RESTORE(TopLevel)
52 else {
53 toplevel = new TopLevel();
54 toplevel->show();
55 KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
56 if (args->count())
57 toplevel->open(args->url(0));
58 args->clear();
59 }
60
61 return app.exec();
62}
63