mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
32 lines
638 B
C++
32 lines
638 B
C++
#include <QApplication>
|
|
#include <QDir>
|
|
|
|
#include "maindialog.hpp"
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QApplication app(argc, argv);
|
|
|
|
// Now we make sure the current dir is set to application path
|
|
QDir dir(QCoreApplication::applicationDirPath());
|
|
#if defined(Q_OS_WIN)
|
|
if (dir.dirName().toLower() == "debug" ||
|
|
dir.dirName().toLower() == "release")
|
|
{
|
|
dir.cdUp();
|
|
}
|
|
#elif defined(Q_OS_MAC)
|
|
if (dir.dirName() == "MacOS")
|
|
{
|
|
dir.cdUp();
|
|
dir.cdUp();
|
|
dir.cdUp();
|
|
}
|
|
#endif
|
|
|
|
QDir::setCurrent(dir.absolutePath());
|
|
MainDialog dialog;
|
|
return dialog.exec();
|
|
|
|
}
|
|
|