From 7c1273b246117740dd17fb70ad712346421224d7 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 17743312..90ddcf81 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -5435,11 +5435,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