14 #include <QApplication>
15 #include <QCoreApplication>
16 #include <QTemporaryDir>
31 int main(
int argc,
char **argv) {
33 QCoreApplication::setOrganizationName(
"The Legendary Team of Ailesse");
34 QCoreApplication::setApplicationName(
"CRE");
35 QApplication app(argc, argv);
38 if (trans.load(QLocale(),
"cre",
"_", app.applicationDirPath() +
"/l10n")) {
39 app.installTranslator(&trans);
42 app.setWindowIcon(QIcon(
":resources/app_icon.png"));
44 QSplashScreen *splash =
new QSplashScreen(QPixmap(
":/resources/crossfirebanner.png"));
45 splash->showMessage(QObject::tr(
"Initializing CRE..."), Qt::AlignCenter);
49 qRegisterMetaTypeStreamOperators<CREFilterDefinition>(
"CREFilterDefinition");
50 qRegisterMetaTypeStreamOperators<CREFilterDefinitionManager>(
"CREFilterDefinitionManager");
51 qRegisterMetaTypeStreamOperators<CREReportDefinition>(
"CREReportDefinition");
52 qRegisterMetaTypeStreamOperators<CREReportDefinitionManager>(
"CREReportDefinitionManager");
54 qRegisterMetaType<const Face *>(
"const Face*");
55 qRegisterMetaType<const treasurelist *>(
"const treasurelist*");
56 qRegisterMetaType<const archetype *>(
"const archetype*");
57 qRegisterMetaType<const quest_definition *>(
"const quest_definition*");
60 QTemporaryDir forHelp;
61 QFile::copy(app.applicationDirPath() +
"/cre.qch", forHelp.path() +
"/cre.qch");
62 QFile::copy(app.applicationDirPath() +
"/cre.qhc", forHelp.path() +
"/cre.qhc");
67 std::string confdir = app.applicationDirPath().toStdString() +
"/etc";
69 std::string localdir = app.applicationDirPath().toStdString() +
"/var";
71 std::string datadir = app.applicationDirPath().toStdString() +
"/share";
73 std::string
temp = QDir::tempPath().toStdString();
78 std::string
log = (QDir::tempPath() +
"\\cre.log").toStdString();