2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@sns.it>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
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.
11 #include <kapplication.h>
12 #include <kaboutdata.h>
13 #include <kcmdlineargs.h>
16 #include <kstandarddirs.h>
17 #include <kiconloader.h>
20 #include "mainwindow.h"
24 static const char description
[] = "A generic board game interface";
26 static const char version
[] = "0.9.1";
29 printf("Press enter to quit.\n");
32 fgets(dummy
, 4096, stdin
);
35 int main(int argc
, char **argv
) {
36 KAboutData
about( "tagua", 0, ki18n("Tagua"),
37 version
, ki18n(description
), KAboutData::License_GPL
,
38 ki18n("(C) 2006 Paolo Capriotti, Maurizio Monge") );
39 about
.addAuthor(ki18n("Paolo Capriotti"), KLocalizedString(), "p.capriotti@gmail.com");
40 about
.addAuthor(ki18n("Maurizio Monge"), KLocalizedString(), "p.capriotti@gmail.com");
41 about
.addCredit(ki18n("Jani Huhtanen"), KLocalizedString(), I18N_NOOP("Gaussian blur code") );
42 about
.addCredit(ki18n("Rici Lake"), KLocalizedString(), I18N_NOOP("funclib lua library") );
44 KCmdLineOptions options
;
45 KCmdLineArgs::init(argc
, argv
, &about
);
46 KCmdLineArgs::addCmdLineOptions(options
);
50 // So you can attach the debugger in case of segfault.
54 // If we are debugging, it is handy to have a local data
55 // directory which is accessed by Tagua, so we don't need
56 // to reconfigure / reinstall whenever a change is made in
58 QString data_dir
= qgetenv("TAGUA_DATA");
59 if (data_dir
.isEmpty()) data_dir
= "data";
61 KGlobal::dirs()->addResourceDir("appdata", data_dir
, true);
62 KGlobal::dirs()->addResourceDir("icon", data_dir
+ "/pics", true);
63 KIconLoader::global()->reconfigure(about
.appName(), KGlobal::dirs());
64 #endif // KBOARD_DEBUG
66 MainWindow
* widget
= new MainWindow
;