From 0b14949d0ebd151e3ea574a9dbd289ae822aface Mon Sep 17 00:00:00 2001 From: Tannin Date: Tue, 11 Nov 2014 21:41:22 +0100 Subject: some work on installer scripts --- src/mainwindow.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 935ed995..964449aa 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -5402,11 +5402,22 @@ HANDLE MainWindow::startApplication(const QString &executable, const QStringList QString steamAppID; if (executable.contains('\\') || executable.contains('/')) { // file path + binary = QFileInfo(executable); if (binary.isRelative()) { // relative path, should be relative to game directory binary = QFileInfo(QDir::fromNativeSeparators(ToQString(GameInfo::instance().getGameDirectory())) + "/" + executable); } + + std::vector::iterator current, end; + m_ExecutablesList.getExecutables(current, end); + for (; current != end; ++current) { + if (current->m_BinaryInfo == binary) { + steamAppID = current->m_SteamAppID; + currentDirectory = current->m_WorkingDirectory; + } + } + if (cwd.length() == 0) { currentDirectory = binary.absolutePath(); } -- cgit v1.3.1