equal
deleted
inserted
replaced
45 |
45 |
46 int main(int argc, char *argv[]) |
46 int main(int argc, char *argv[]) |
47 { |
47 { |
48 QApplication app(argc, argv); |
48 QApplication app(argc, argv); |
49 |
49 |
|
50 Q_INIT_RESOURCE(hedgewars); |
|
51 |
|
52 QTranslator Translator; |
|
53 Translator.load(":/translations/hedgewars_" + QLocale::system().name()); |
|
54 app.installTranslator(&Translator); |
|
55 |
50 QDir mydir = QFileInfo(argv[0]).dir(); |
56 QDir mydir = QFileInfo(argv[0]).dir(); |
51 bindir = new QDir(mydir); |
57 bindir = new QDir(mydir); |
52 cfgdir = new QDir(); |
58 cfgdir = new QDir(); |
53 |
59 |
54 cfgdir->setPath(cfgdir->homePath()); |
60 cfgdir->setPath(cfgdir->homePath()); |
65 cfgdir->cd(".hedgewars"); |
71 cfgdir->cd(".hedgewars"); |
66 |
72 |
67 datadir = new QDir(mydir); |
73 datadir = new QDir(mydir); |
68 datadir->cd("../share/hedgewars/Data"); |
74 datadir->cd("../share/hedgewars/Data"); |
69 |
75 |
70 Q_INIT_RESOURCE(hedgewars); |
|
71 |
|
72 QTranslator Translator; |
|
73 Translator.load(":/translations/hedgewars_" + QLocale::system().name()); |
|
74 app.installTranslator(&Translator); |
|
75 |
|
76 HWForm *Form = new HWForm(); |
76 HWForm *Form = new HWForm(); |
77 Form->show(); |
77 Form->show(); |
78 return app.exec(); |
78 return app.exec(); |
79 } |
79 } |