equal
deleted
inserted
replaced
22 #include <QMessageBox> |
22 #include <QMessageBox> |
23 #include <QPlastiqueStyle> |
23 #include <QPlastiqueStyle> |
24 #include <QRegExp> |
24 #include <QRegExp> |
25 #include <QMap> |
25 #include <QMap> |
26 |
26 |
|
27 |
|
28 |
27 #include "hwform.h" |
29 #include "hwform.h" |
28 #include "hwconsts.h" |
30 #include "hwconsts.h" |
29 |
31 |
30 bool checkForDir(const QString & dir) |
32 bool checkForDir(const QString & dir) |
31 { |
33 { |
42 return true; |
44 return true; |
43 } |
45 } |
44 |
46 |
45 int main(int argc, char *argv[]) |
47 int main(int argc, char *argv[]) |
46 { |
48 { |
47 QApplication app(argc, argv); |
49 QApplication app(argc, argv); |
48 |
50 |
49 QStringList arguments = app.arguments(); |
51 QStringList arguments = app.arguments(); |
50 QMap<QString, QString> parsedArgs; |
52 QMap<QString, QString> parsedArgs; |
51 { |
53 { |
52 QList<QString>::iterator i = arguments.begin(); |
54 QList<QString>::iterator i = arguments.begin(); |
284 |
286 |
285 bindir->cd("bin"); // workaround over NSIS installer |
287 bindir->cd("bin"); // workaround over NSIS installer |
286 |
288 |
287 cfgdir->setPath(cfgdir->homePath()); |
289 cfgdir->setPath(cfgdir->homePath()); |
288 #ifdef __APPLE__ |
290 #ifdef __APPLE__ |
|
291 |
|
292 |
289 if (checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars")) |
293 if (checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars")) |
290 { |
294 { |
291 checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Demos"); |
295 checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Demos"); |
292 checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Saves"); |
296 checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Saves"); |
293 } |
297 } |
334 tmpdir.cd("Maps"); |
338 tmpdir.cd("Maps"); |
335 tmpdir.setFilter(QDir::Dirs | QDir::NoDotAndDotDot); |
339 tmpdir.setFilter(QDir::Dirs | QDir::NoDotAndDotDot); |
336 mapList = new QStringList(tmpdir.entryList(QStringList("*"))); |
340 mapList = new QStringList(tmpdir.entryList(QStringList("*"))); |
337 |
341 |
338 HWForm *Form = new HWForm(); |
342 HWForm *Form = new HWForm(); |
|
343 |
|
344 |
339 Form->show(); |
345 Form->show(); |
340 return app.exec(); |
346 return app.exec(); |
341 } |
347 } |