25 #include "serverapi/gamefile.h"
26 #include "templatedpathresolver.h"
29 #include <QStringList>
31 QString PathFind::findExe(
const PathFinder &pathFinder,
const QString &name)
33 #if defined(Q_OS_WIN32)
34 if (!name.endsWith(
".exe"))
36 QString file = pathFinder.
findFile(name +
".exe");
46 QString PathFind::findGameFile(
const QStringList &knownPaths,
const GameFile &gameFile)
49 QStringList knownDirs;
50 for (
const QString &path : knownPaths)
52 if (!path.trimmed().isEmpty())
59 if (fileInfo.dir().exists())
65 return findGameFile(pathFinder, gameFile);
72 return findExe(pathFinder, gameFile.
fileName());