summaryrefslogtreecommitdiffstats
path: root/blinken/src/main.cpp
blob: 06f9b21d3b3a870d872d97e52f429efe48d01d35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/***************************************************************************
 *   Copyright (C) 2005 by Albert Astals Cid <tsdgeos@terra.es>            *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 ***************************************************************************/

#include <kaboutdata.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kprocess.h>
#include <kstandarddirs.h>

#include "fontchecker.h"
#include "blinken.h"

int main(int argc, char *argv[])
{
	KAboutData about("blinken", I18N_NOOP("blinKen"), "0.1.1", I18N_NOOP("A memory enhancement game"), KAboutData::License_GPL, "© 2005 Albert Astals Cid\n© 2005 Danny Allen");
	about.addAuthor("Albert Astals Cid", I18N_NOOP("Coding"), "tsdgeos@terra.es");
	about.addAuthor("Danny Allen", I18N_NOOP("Design, Graphics and Sounds"), "danny@dannyallen.co.uk");
	about.addCredit("Steve Jordi", I18N_NOOP("GPL'ed his 'Steve' font so that we could use it"), "steve@sjordi.com");
	TDECmdLineArgs::init(argc, argv, &about);
	KApplication app;
	app.connect(&app, TQT_SIGNAL(lastWindowClosed()), &app, TQT_SLOT(quit()));
	
	TQFont f("Steve", 12, TQFont::Normal, true);
	if (!fontChecker::checkInstalled(f, locate("appdata", "fonts/steve.ttf")))
	{
		KProcess *proc = new KProcess;
		for (int i = 0; i < argc; i++) *proc << argv[i];
		proc->start();
	}
	else
	{
		app.setTopWidget(new blinken());
		return app.exec();
	}
}