diff options
| author | Tannin <devnull@localhost> | 2014-11-11 21:41:22 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-11-11 21:41:22 +0100 |
| commit | 0b14949d0ebd151e3ea574a9dbd289ae822aface (patch) | |
| tree | 26c208a5216ce146dd6c42c1a7babdc2ba2a9645 | |
| parent | 2237d7c10349064b740923ba142f41a1ded15562 (diff) | |
some work on installer scripts
| -rw-r--r-- | src/mainwindow.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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<Executable>::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();
}
|
