summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTannin <sherb@gmx.net>2016-06-30 22:15:50 +0200
committerTannin <sherb@gmx.net>2016-06-30 22:15:50 +0200
commit64590a10d7832b6d94dcf4539f7da93d6eb889b9 (patch)
treeeab9ea4119010f8ee28e0b6f94caefaad33e4bdc /src
parenta00cda607cd9115d06c1185f78bcdded28c8b09d (diff)
parent4a582e524dd012ed9d5fdb4f9c97aab22c8dac85 (diff)
Merge branch 'master' into new_vfs_library
Diffstat (limited to 'src')
-rw-r--r--src/dlls.manifest.debug.qt56
-rw-r--r--src/iuserinterface.h1
-rw-r--r--src/lockeddialog.cpp5
-rw-r--r--src/lockeddialog.h11
-rw-r--r--src/mainwindow.cpp45
-rw-r--r--src/mainwindow.h2
-rw-r--r--src/organizer_en.ts580
-rw-r--r--src/organizercore.cpp260
-rw-r--r--src/organizercore.h26
-rw-r--r--src/pluginlist.cpp1
-rw-r--r--src/settings.cpp36
-rw-r--r--src/settings.h24
12 files changed, 515 insertions, 482 deletions
diff --git a/src/dlls.manifest.debug.qt5 b/src/dlls.manifest.debug.qt5
index 59497baa..a2f75206 100644
--- a/src/dlls.manifest.debug.qt5
+++ b/src/dlls.manifest.debug.qt5
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" name="dlls" version="1.0.0.0" processorArchitecture="x86"/>
- <file name="icuin53.dll"/>
- <file name="icuuc53.dll"/>
- <file name="icudt53.dll"/>
+ <file name="icuin54.dll"/>
+ <file name="icuuc54.dll"/>
+ <file name="icudt54.dll"/>
<file name="Qt5Cored.dll"/>
<file name="Qt5Declaratived.dll"/>
<file name="Qt5Guid.dll"/>
diff --git a/src/iuserinterface.h b/src/iuserinterface.h
index 19e58c75..0af1c2ac 100644
--- a/src/iuserinterface.h
+++ b/src/iuserinterface.h
@@ -30,6 +30,7 @@ public:
virtual void lock() = 0;
virtual void unlock() = 0;
virtual bool unlockClicked() = 0;
+ virtual void setProcessName(QString const &) = 0;
};
diff --git a/src/lockeddialog.cpp b/src/lockeddialog.cpp
index 907e3c0a..519abd5b 100644
--- a/src/lockeddialog.cpp
+++ b/src/lockeddialog.cpp
@@ -19,8 +19,11 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "lockeddialog.h"
#include "ui_lockeddialog.h"
-#include <QResizeEvent>
+#include <QPoint>
+#include <QResizeEvent>
+#include <QWidget>
+#include <Qt> // for Qt::FramelessWindowHint, etc
LockedDialog::LockedDialog(QWidget *parent, const QString &text, bool unlockButton)
: QDialog(parent)
diff --git a/src/lockeddialog.h b/src/lockeddialog.h
index 60af425d..29ac459b 100644
--- a/src/lockeddialog.h
+++ b/src/lockeddialog.h
@@ -20,7 +20,12 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#ifndef LOCKEDDIALOG_H
#define LOCKEDDIALOG_H
-#include <QDialog>
+#include <QDialog> // for QDialog
+#include <QObject> // for Q_OBJECT, slots
+#include <QString> // for QString
+
+class QResizeEvent;
+class QWidget;
namespace Ui {
class LockedDialog;
@@ -49,6 +54,10 @@ public:
**/
bool unlockClicked() const { return m_UnlockClicked; }
+ /**
+ * @brief set the name of the process being run
+ * @param name of process
+ */
void setProcessName(const QString &name);
protected:
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index abf52796..f554f0aa 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -34,6 +34,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "organizercore.h"
#include "pluginlistsortproxy.h"
#include "previewgenerator.h"
+#include "serverinfo.h"
#include "savegameinfo.h"
#include "spawn.h"
#include "versioninfo.h"
@@ -1011,8 +1012,14 @@ void MainWindow::startExeAction()
{
QAction *action = qobject_cast<QAction*>(sender());
if (action != nullptr) {
- m_OrganizerCore.spawnBinary(
+ const Executable &selectedExecutable(
m_OrganizerCore.executablesList()->find(action->text()));
+ m_OrganizerCore.spawnBinary(
+ selectedExecutable.m_BinaryInfo, selectedExecutable.m_Arguments,
+ selectedExecutable.m_WorkingDirectory.length() != 0
+ ? selectedExecutable.m_WorkingDirectory
+ : selectedExecutable.m_BinaryInfo.absolutePath(),
+ selectedExecutable.m_SteamAppID);
} else {
qCritical("not an action?");
}
@@ -1450,18 +1457,31 @@ void MainWindow::storeSettings(QSettings &settings) {
void MainWindow::lock()
{
+ if (m_LockDialog != nullptr) {
+ ++m_LockCount;
+ return;
+ }
m_LockDialog = new LockedDialog(qApp->activeWindow());
m_LockDialog->show();
setEnabled(false);
+ m_LockDialog->setEnabled(true); //What's the point otherwise?
+ ++m_LockCount;
}
void MainWindow::unlock()
{
- if (m_LockDialog != nullptr) {
+ //If you come through here with a null lock pointer, it's a bug!
+ if (m_LockDialog == nullptr) {
+ qDebug("Unlocking main window when already unlocked");
+ return;
+ }
+ --m_LockCount;
+ if (m_LockCount == 0) {
m_LockDialog->hide();
m_LockDialog->deleteLater();
+ m_LockDialog = nullptr;
+ setEnabled(true);
}
- setEnabled(true);
}
bool MainWindow::unlockClicked()
@@ -1473,6 +1493,13 @@ bool MainWindow::unlockClicked()
}
}
+void MainWindow::setProcessName(QString const &name)
+{
+ if (m_LockDialog != nullptr) {
+ m_LockDialog->setProcessName(name);
+ }
+}
+
void MainWindow::on_btnRefreshData_clicked()
{
m_OrganizerCore.refreshDirectoryStructure();
@@ -1515,13 +1542,17 @@ void MainWindow::installMod(QString fileName)
}
}
+void MainWindow::on_startButton_clicked() {
+ const Executable &selectedExecutable(getSelectedExecutable());
-void MainWindow::on_startButton_clicked()
-{
- m_OrganizerCore.spawnBinary(getSelectedExecutable());
+ m_OrganizerCore.spawnBinary(
+ selectedExecutable.m_BinaryInfo, selectedExecutable.m_Arguments,
+ selectedExecutable.m_WorkingDirectory.length() != 0
+ ? selectedExecutable.m_WorkingDirectory
+ : selectedExecutable.m_BinaryInfo.absolutePath(),
+ selectedExecutable.m_SteamAppID);
}
-
static HRESULT CreateShortcut(LPCWSTR targetFileName, LPCWSTR arguments,
LPCSTR linkFileName, LPCWSTR description,
LPCTSTR iconFileName, int iconNumber,
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 0e542996..06c51203 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -119,6 +119,7 @@ public:
virtual void lock() override;
virtual void unlock() override;
virtual bool unlockClicked() override;
+ virtual void setProcessName(QString const &name) override;
bool addProfile();
void refreshDataTree();
@@ -350,6 +351,7 @@ private:
bool m_DidUpdateMasterList;
LockedDialog *m_LockDialog { nullptr };
+ uint64_t m_LockCount { 0 };
std::vector<std::pair<QString, QHeaderView*>> m_PersistedGeometry;
diff --git a/src/organizer_en.ts b/src/organizer_en.ts
index c3e523c4..da3a3c6e 100644
--- a/src/organizer_en.ts
+++ b/src/organizer_en.ts
@@ -1461,8 +1461,8 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location filename="mainwindow.ui" line="928"/>
- <location filename="mainwindow.cpp" line="2875"/>
- <location filename="mainwindow.cpp" line="3630"/>
+ <location filename="mainwindow.cpp" line="2896"/>
+ <location filename="mainwindow.cpp" line="3651"/>
<source>Refresh</source>
<translation type="unfinished"></translation>
</message>
@@ -1641,7 +1641,7 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location filename="mainwindow.ui" line="1328"/>
- <location filename="mainwindow.cpp" line="3571"/>
+ <location filename="mainwindow.cpp" line="3592"/>
<source>Update</source>
<translation type="unfinished"></translation>
</message>
@@ -1652,7 +1652,7 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location filename="mainwindow.ui" line="1343"/>
- <location filename="mainwindow.cpp" line="596"/>
+ <location filename="mainwindow.cpp" line="597"/>
<source>No Problems</source>
<translation type="unfinished"></translation>
</message>
@@ -1682,7 +1682,7 @@ Right now this has very limited functionality</source>
</message>
<message>
<location filename="mainwindow.ui" line="1376"/>
- <location filename="mainwindow.cpp" line="3649"/>
+ <location filename="mainwindow.cpp" line="3670"/>
<source>Endorse Mod Organizer</source>
<translation type="unfinished"></translation>
</message>
@@ -1707,579 +1707,579 @@ Right now this has very limited functionality</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="285"/>
+ <location filename="mainwindow.cpp" line="286"/>
<source>Toolbar</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="286"/>
+ <location filename="mainwindow.cpp" line="287"/>
<source>Desktop</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="287"/>
+ <location filename="mainwindow.cpp" line="288"/>
<source>Start Menu</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="584"/>
+ <location filename="mainwindow.cpp" line="585"/>
<source>Problems</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="585"/>
+ <location filename="mainwindow.cpp" line="586"/>
<source>There are potential problems with your setup</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="597"/>
+ <location filename="mainwindow.cpp" line="598"/>
<source>Everything seems to be in order</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="658"/>
+ <location filename="mainwindow.cpp" line="659"/>
<source>Help on UI</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="662"/>
+ <location filename="mainwindow.cpp" line="663"/>
<source>Documentation Wiki</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="666"/>
+ <location filename="mainwindow.cpp" line="667"/>
<source>Report Issue</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="670"/>
+ <location filename="mainwindow.cpp" line="671"/>
<source>Tutorials</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="709"/>
+ <location filename="mainwindow.cpp" line="710"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="710"/>
+ <location filename="mainwindow.cpp" line="711"/>
<source>About Qt</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="762"/>
+ <location filename="mainwindow.cpp" line="763"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="763"/>
+ <location filename="mainwindow.cpp" line="764"/>
<source>Please enter a name for the new profile</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="771"/>
+ <location filename="mainwindow.cpp" line="772"/>
<source>failed to create profile: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="815"/>
+ <location filename="mainwindow.cpp" line="816"/>
<source>Show tutorial?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="816"/>
+ <location filename="mainwindow.cpp" line="817"/>
<source>You are starting Mod Organizer for the first time. Do you want to show a tutorial of its basic features? If you choose no you can always start the tutorial from the &quot;Help&quot;-menu.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="849"/>
+ <location filename="mainwindow.cpp" line="850"/>
<source>Downloads in progress</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="850"/>
+ <location filename="mainwindow.cpp" line="851"/>
<source>There are still downloads in progress, do you really want to quit?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="952"/>
+ <location filename="mainwindow.cpp" line="953"/>
<source>Plugin &quot;%1&quot; failed: %2</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="954"/>
+ <location filename="mainwindow.cpp" line="955"/>
<source>Plugin &quot;%1&quot; failed</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="991"/>
+ <location filename="mainwindow.cpp" line="992"/>
<source>Browse Mod Page</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1119"/>
+ <location filename="mainwindow.cpp" line="1120"/>
<source>Also in: &lt;br&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1130"/>
+ <location filename="mainwindow.cpp" line="1131"/>
<source>No conflict</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1242"/>
+ <location filename="mainwindow.cpp" line="1243"/>
<source>&lt;Edit...&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1391"/>
+ <location filename="mainwindow.cpp" line="1392"/>
<source>Activating Network Proxy</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1504"/>
+ <location filename="mainwindow.cpp" line="1525"/>
<source>Choose Mod</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1505"/>
+ <location filename="mainwindow.cpp" line="1526"/>
<source>Mod Archive</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1663"/>
+ <location filename="mainwindow.cpp" line="1684"/>
<source>Start Tutorial?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1664"/>
+ <location filename="mainwindow.cpp" line="1685"/>
<source>You&apos;re about to start a tutorial. For technical reasons it&apos;s not possible to end the tutorial early. Continue?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1799"/>
+ <location filename="mainwindow.cpp" line="1820"/>
<source>failed to spawn notepad.exe: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1827"/>
+ <location filename="mainwindow.cpp" line="1848"/>
<source>failed to open %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1901"/>
+ <location filename="mainwindow.cpp" line="1922"/>
<source>failed to change origin name: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1924"/>
+ <location filename="mainwindow.cpp" line="1945"/>
<source>failed to move &quot;%1&quot; from mod &quot;%2&quot; to &quot;%3&quot;: %4</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1948"/>
+ <location filename="mainwindow.cpp" line="1969"/>
<source>&lt;Contains %1&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1983"/>
+ <location filename="mainwindow.cpp" line="2004"/>
<source>&lt;Checked&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1984"/>
+ <location filename="mainwindow.cpp" line="2005"/>
<source>&lt;Unchecked&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1985"/>
+ <location filename="mainwindow.cpp" line="2006"/>
<source>&lt;Update&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1986"/>
+ <location filename="mainwindow.cpp" line="2007"/>
<source>&lt;Managed by MO&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1987"/>
+ <location filename="mainwindow.cpp" line="2008"/>
<source>&lt;Managed outside MO&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1988"/>
+ <location filename="mainwindow.cpp" line="2009"/>
<source>&lt;No category&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1989"/>
+ <location filename="mainwindow.cpp" line="2010"/>
<source>&lt;Conflicted&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1990"/>
+ <location filename="mainwindow.cpp" line="2011"/>
<source>&lt;Not Endorsed&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2036"/>
+ <location filename="mainwindow.cpp" line="2057"/>
<source>failed to rename mod: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2049"/>
+ <location filename="mainwindow.cpp" line="2070"/>
<source>Overwrite?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2050"/>
+ <location filename="mainwindow.cpp" line="2071"/>
<source>This will replace the existing mod &quot;%1&quot;. Continue?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2053"/>
+ <location filename="mainwindow.cpp" line="2074"/>
<source>failed to remove mod &quot;%1&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2057"/>
- <location filename="mainwindow.cpp" line="3469"/>
- <location filename="mainwindow.cpp" line="3493"/>
+ <location filename="mainwindow.cpp" line="2078"/>
+ <location filename="mainwindow.cpp" line="3490"/>
+ <location filename="mainwindow.cpp" line="3514"/>
<source>failed to rename &quot;%1&quot; to &quot;%2&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2105"/>
- <location filename="mainwindow.cpp" line="2786"/>
- <location filename="mainwindow.cpp" line="2794"/>
- <location filename="mainwindow.cpp" line="3052"/>
+ <location filename="mainwindow.cpp" line="2126"/>
+ <location filename="mainwindow.cpp" line="2807"/>
+ <location filename="mainwindow.cpp" line="2815"/>
+ <location filename="mainwindow.cpp" line="3073"/>
<source>Confirm</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2106"/>
+ <location filename="mainwindow.cpp" line="2127"/>
<source>Remove the following mods?&lt;br&gt;&lt;ul&gt;%1&lt;/ul&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2117"/>
+ <location filename="mainwindow.cpp" line="2138"/>
<source>failed to remove mod: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2152"/>
- <location filename="mainwindow.cpp" line="2155"/>
+ <location filename="mainwindow.cpp" line="2173"/>
+ <location filename="mainwindow.cpp" line="2176"/>
<source>Failed</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2152"/>
+ <location filename="mainwindow.cpp" line="2173"/>
<source>Installation file no longer exists</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2156"/>
+ <location filename="mainwindow.cpp" line="2177"/>
<source>Mods installed with old versions of MO can&apos;t be reinstalled in this way.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2173"/>
+ <location filename="mainwindow.cpp" line="2194"/>
<source>You need to be logged in with Nexus to resume a download</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2189"/>
- <location filename="mainwindow.cpp" line="2216"/>
+ <location filename="mainwindow.cpp" line="2210"/>
+ <location filename="mainwindow.cpp" line="2237"/>
<source>You need to be logged in with Nexus to endorse</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2264"/>
+ <location filename="mainwindow.cpp" line="2285"/>
<source>Failed to display overwrite dialog: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2393"/>
+ <location filename="mainwindow.cpp" line="2414"/>
<source>Nexus ID for this Mod is unknown</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2403"/>
+ <location filename="mainwindow.cpp" line="2424"/>
<source>Web page for this mod is unknown</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2430"/>
- <location filename="mainwindow.cpp" line="2457"/>
- <location filename="mainwindow.cpp" line="2903"/>
+ <location filename="mainwindow.cpp" line="2451"/>
+ <location filename="mainwindow.cpp" line="2478"/>
+ <location filename="mainwindow.cpp" line="2924"/>
<source>Create Mod...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2431"/>
+ <location filename="mainwindow.cpp" line="2452"/>
<source>This will create an empty mod.
Please enter a name:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2440"/>
- <location filename="mainwindow.cpp" line="2467"/>
+ <location filename="mainwindow.cpp" line="2461"/>
+ <location filename="mainwindow.cpp" line="2488"/>
<source>A mod with this name already exists</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2458"/>
+ <location filename="mainwindow.cpp" line="2479"/>
<source>This will move all files from overwrite into a new, regular mod.
Please enter a name:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2698"/>
+ <location filename="mainwindow.cpp" line="2719"/>
<source>Not logged in, endorsement information will be wrong</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2706"/>
+ <location filename="mainwindow.cpp" line="2727"/>
<source>Continue?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2707"/>
+ <location filename="mainwindow.cpp" line="2728"/>
<source>The versioning scheme decides which version is considered newer than another.
This function will guess the versioning scheme under the assumption that the installed version is outdated.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2727"/>
- <location filename="mainwindow.cpp" line="3539"/>
+ <location filename="mainwindow.cpp" line="2748"/>
+ <location filename="mainwindow.cpp" line="3560"/>
<source>Sorry</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2728"/>
+ <location filename="mainwindow.cpp" line="2749"/>
<source>I don&apos;t know a versioning scheme where %1 is newer than %2.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2786"/>
+ <location filename="mainwindow.cpp" line="2807"/>
<source>Really enable all visible mods?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2794"/>
+ <location filename="mainwindow.cpp" line="2815"/>
<source>Really disable all visible mods?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2802"/>
+ <location filename="mainwindow.cpp" line="2823"/>
<source>Choose what to export</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2804"/>
+ <location filename="mainwindow.cpp" line="2825"/>
<source>Everything</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2804"/>
+ <location filename="mainwindow.cpp" line="2825"/>
<source>All installed mods are included in the list</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2805"/>
+ <location filename="mainwindow.cpp" line="2826"/>
<source>Active Mods</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2805"/>
+ <location filename="mainwindow.cpp" line="2826"/>
<source>Only active (checked) mods from your current profile are included</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2806"/>
+ <location filename="mainwindow.cpp" line="2827"/>
<source>Visible</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2806"/>
+ <location filename="mainwindow.cpp" line="2827"/>
<source>All mods visible in the mod list are included</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2849"/>
+ <location filename="mainwindow.cpp" line="2870"/>
<source>export failed: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2866"/>
+ <location filename="mainwindow.cpp" line="2887"/>
<source>Install Mod...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2868"/>
+ <location filename="mainwindow.cpp" line="2889"/>
<source>Create empty mod</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2870"/>
+ <location filename="mainwindow.cpp" line="2891"/>
<source>Enable all visible</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2871"/>
+ <location filename="mainwindow.cpp" line="2892"/>
<source>Disable all visible</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2873"/>
+ <location filename="mainwindow.cpp" line="2894"/>
<source>Check all for update</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2877"/>
+ <location filename="mainwindow.cpp" line="2898"/>
<source>Export to csv...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2896"/>
+ <location filename="mainwindow.cpp" line="2917"/>
<source>All Mods</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2902"/>
+ <location filename="mainwindow.cpp" line="2923"/>
<source>Sync to Mods...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2906"/>
+ <location filename="mainwindow.cpp" line="2927"/>
<source>Restore Backup</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2907"/>
+ <location filename="mainwindow.cpp" line="2928"/>
<source>Remove Backup...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2911"/>
+ <location filename="mainwindow.cpp" line="2932"/>
<source>Add/Remove Categories</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2916"/>
+ <location filename="mainwindow.cpp" line="2937"/>
<source>Replace Categories</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2921"/>
+ <location filename="mainwindow.cpp" line="2942"/>
<source>Primary Category</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2927"/>
+ <location filename="mainwindow.cpp" line="2948"/>
<source>Change versioning scheme</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2931"/>
+ <location filename="mainwindow.cpp" line="2952"/>
<source>Un-ignore update</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2933"/>
+ <location filename="mainwindow.cpp" line="2954"/>
<source>Ignore update</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2938"/>
+ <location filename="mainwindow.cpp" line="2959"/>
<source>Rename Mod...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2939"/>
+ <location filename="mainwindow.cpp" line="2960"/>
<source>Remove Mod...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2940"/>
+ <location filename="mainwindow.cpp" line="2961"/>
<source>Reinstall Mod</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2944"/>
+ <location filename="mainwindow.cpp" line="2965"/>
<source>Un-Endorse</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2947"/>
- <location filename="mainwindow.cpp" line="2951"/>
+ <location filename="mainwindow.cpp" line="2968"/>
+ <location filename="mainwindow.cpp" line="2972"/>
<source>Endorse</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2948"/>
+ <location filename="mainwindow.cpp" line="2969"/>
<source>Won&apos;t endorse</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2954"/>
+ <location filename="mainwindow.cpp" line="2975"/>
<source>Endorsement state unknown</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2963"/>
+ <location filename="mainwindow.cpp" line="2984"/>
<source>Ignore missing data</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2967"/>
+ <location filename="mainwindow.cpp" line="2988"/>
<source>Visit on Nexus</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2969"/>
+ <location filename="mainwindow.cpp" line="2990"/>
<source>Visit web page</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2972"/>
+ <location filename="mainwindow.cpp" line="2993"/>
<source>Open in explorer</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2976"/>
+ <location filename="mainwindow.cpp" line="2997"/>
<source>Information...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2983"/>
- <location filename="mainwindow.cpp" line="4046"/>
+ <location filename="mainwindow.cpp" line="3004"/>
+ <location filename="mainwindow.cpp" line="4067"/>
<source>Exception: </source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="2985"/>
- <location filename="mainwindow.cpp" line="4048"/>
+ <location filename="mainwindow.cpp" line="3006"/>
+ <location filename="mainwindow.cpp" line="4069"/>
<source>Unknown exception</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3013"/>
+ <location filename="mainwindow.cpp" line="3034"/>
<source>&lt;All&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3015"/>
+ <location filename="mainwindow.cpp" line="3036"/>
<source>&lt;Multiple&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3049"/>
+ <location filename="mainwindow.cpp" line="3070"/>
<source>%1 more</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
- <location filename="mainwindow.cpp" line="3053"/>
+ <location filename="mainwindow.cpp" line="3074"/>
<source>Are you sure you want to remove the following %n save(s)?&lt;br&gt;&lt;ul&gt;%1&lt;/ul&gt;&lt;br&gt;Removed saves will be sent to the Recycle Bin.</source>
<translation type="unfinished">
<numerusform></numerusform>
@@ -2287,12 +2287,12 @@ This function will guess the versioning scheme under the assumption that the ins
</translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3098"/>
+ <location filename="mainwindow.cpp" line="3119"/>
<source>Enable Mods...</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
- <location filename="mainwindow.cpp" line="3113"/>
+ <location filename="mainwindow.cpp" line="3134"/>
<source>Delete %n save(s)</source>
<translation type="unfinished">
<numerusform></numerusform>
@@ -2300,319 +2300,319 @@ This function will guess the versioning scheme under the assumption that the ins
</translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3155"/>
+ <location filename="mainwindow.cpp" line="3176"/>
<source>failed to remove %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3177"/>
+ <location filename="mainwindow.cpp" line="3198"/>
<source>failed to create %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3219"/>
+ <location filename="mainwindow.cpp" line="3240"/>
<source>Can&apos;t change download directory while downloads are in progress!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3341"/>
+ <location filename="mainwindow.cpp" line="3362"/>
<source>failed to write to file %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3347"/>
+ <location filename="mainwindow.cpp" line="3368"/>
<source>%1 written</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3388"/>
+ <location filename="mainwindow.cpp" line="3409"/>
<source>Select binary</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3388"/>
+ <location filename="mainwindow.cpp" line="3409"/>
<source>Binary</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3414"/>
+ <location filename="mainwindow.cpp" line="3435"/>
<source>Enter Name</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3415"/>
+ <location filename="mainwindow.cpp" line="3436"/>
<source>Please enter a name for the executable</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3429"/>
+ <location filename="mainwindow.cpp" line="3450"/>
<source>Not an executable</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3429"/>
+ <location filename="mainwindow.cpp" line="3450"/>
<source>This is not a recognized executable.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3454"/>
- <location filename="mainwindow.cpp" line="3479"/>
+ <location filename="mainwindow.cpp" line="3475"/>
+ <location filename="mainwindow.cpp" line="3500"/>
<source>Replace file?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3454"/>
+ <location filename="mainwindow.cpp" line="3475"/>
<source>There already is a hidden version of this file. Replace it?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3457"/>
- <location filename="mainwindow.cpp" line="3482"/>
+ <location filename="mainwindow.cpp" line="3478"/>
+ <location filename="mainwindow.cpp" line="3503"/>
<source>File operation failed</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3457"/>
- <location filename="mainwindow.cpp" line="3482"/>
+ <location filename="mainwindow.cpp" line="3478"/>
+ <location filename="mainwindow.cpp" line="3503"/>
<source>Failed to remove &quot;%1&quot;. Maybe you lack the required file permissions?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3479"/>
+ <location filename="mainwindow.cpp" line="3500"/>
<source>There already is a visible version of this file. Replace it?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3512"/>
+ <location filename="mainwindow.cpp" line="3533"/>
<source>file not found: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3525"/>
+ <location filename="mainwindow.cpp" line="3546"/>
<source>failed to generate preview for %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3539"/>
+ <location filename="mainwindow.cpp" line="3560"/>
<source>Sorry, can&apos;t preview anything. This function currently does not support extracting from bsas.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3573"/>
+ <location filename="mainwindow.cpp" line="3594"/>
<source>Update available</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3610"/>
+ <location filename="mainwindow.cpp" line="3631"/>
<source>Open/Execute</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3611"/>
+ <location filename="mainwindow.cpp" line="3632"/>
<source>Add as Executable</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3615"/>
+ <location filename="mainwindow.cpp" line="3636"/>
<source>Preview</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3621"/>
+ <location filename="mainwindow.cpp" line="3642"/>
<source>Un-Hide</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3623"/>
+ <location filename="mainwindow.cpp" line="3644"/>
<source>Hide</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3629"/>
+ <location filename="mainwindow.cpp" line="3650"/>
<source>Write To File...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3650"/>
+ <location filename="mainwindow.cpp" line="3671"/>
<source>Do you want to endorse Mod Organizer on %1 now?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3753"/>
+ <location filename="mainwindow.cpp" line="3774"/>
<source>Thank you!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3753"/>
+ <location filename="mainwindow.cpp" line="3774"/>
<source>Thank you for your endorsement!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3788"/>
+ <location filename="mainwindow.cpp" line="3809"/>
<source>Request to Nexus failed: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3803"/>
- <location filename="mainwindow.cpp" line="3854"/>
+ <location filename="mainwindow.cpp" line="3824"/>
+ <location filename="mainwindow.cpp" line="3875"/>
<source>failed to read %1: %2</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3815"/>
- <location filename="mainwindow.cpp" line="4233"/>
+ <location filename="mainwindow.cpp" line="3836"/>
+ <location filename="mainwindow.cpp" line="4254"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3815"/>
+ <location filename="mainwindow.cpp" line="3836"/>
<source>failed to extract %1 (errorcode %2)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3846"/>
+ <location filename="mainwindow.cpp" line="3867"/>
<source>Extract BSA</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3865"/>
+ <location filename="mainwindow.cpp" line="3886"/>
<source>This archive contains invalid hashes. Some files may be broken.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3913"/>
+ <location filename="mainwindow.cpp" line="3934"/>
<source>Are you sure?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3914"/>
+ <location filename="mainwindow.cpp" line="3935"/>
<source>This will restart MO, continue?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3954"/>
+ <location filename="mainwindow.cpp" line="3975"/>
<source>Edit Categories...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="3955"/>
+ <location filename="mainwindow.cpp" line="3976"/>
<source>Deselect filter</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4006"/>
+ <location filename="mainwindow.cpp" line="4027"/>
<source>Remove</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4017"/>
+ <location filename="mainwindow.cpp" line="4038"/>
<source>Enable all</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4018"/>
+ <location filename="mainwindow.cpp" line="4039"/>
<source>Disable all</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4037"/>
+ <location filename="mainwindow.cpp" line="4058"/>
<source>Unlock load order</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4040"/>
+ <location filename="mainwindow.cpp" line="4061"/>
<source>Lock load order</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4182"/>
+ <location filename="mainwindow.cpp" line="4203"/>
<source>depends on missing &quot;%1&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4186"/>
+ <location filename="mainwindow.cpp" line="4207"/>
<source>incompatible with &quot;%1&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4208"/>
+ <location filename="mainwindow.cpp" line="4229"/>
<source>Please wait while LOOT is running</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4306"/>
+ <location filename="mainwindow.cpp" line="4327"/>
<source>loot failed. Exit code was: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4328"/>
+ <location filename="mainwindow.cpp" line="4349"/>
<source>failed to start loot</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4331"/>
+ <location filename="mainwindow.cpp" line="4352"/>
<source>failed to run loot: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4335"/>
+ <location filename="mainwindow.cpp" line="4356"/>
<source>Errors occured</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4388"/>
+ <location filename="mainwindow.cpp" line="4409"/>
<source>Backup of load order created</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4398"/>
+ <location filename="mainwindow.cpp" line="4419"/>
<source>Choose backup to restore</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4411"/>
+ <location filename="mainwindow.cpp" line="4432"/>
<source>No Backups</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4411"/>
+ <location filename="mainwindow.cpp" line="4432"/>
<source>There are no backups to restore</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4432"/>
- <location filename="mainwindow.cpp" line="4454"/>
+ <location filename="mainwindow.cpp" line="4453"/>
+ <location filename="mainwindow.cpp" line="4475"/>
<source>Restore failed</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4433"/>
- <location filename="mainwindow.cpp" line="4455"/>
+ <location filename="mainwindow.cpp" line="4454"/>
+ <location filename="mainwindow.cpp" line="4476"/>
<source>Failed to restore the backup. Errorcode: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4444"/>
+ <location filename="mainwindow.cpp" line="4465"/>
<source>Backup of modlist created</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4544"/>
+ <location filename="mainwindow.cpp" line="4565"/>
<source>A file with the same name has already been downloaded. What would you like to do?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4546"/>
+ <location filename="mainwindow.cpp" line="4567"/>
<source>Overwrite</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4547"/>
+ <location filename="mainwindow.cpp" line="4568"/>
<source>Rename new file</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="4548"/>
+ <location filename="mainwindow.cpp" line="4569"/>
<source>Ignore file</source>
<translation type="unfinished"></translation>
</message>
@@ -3551,189 +3551,189 @@ p, li { white-space: pre-wrap; }
<context>
<name>OrganizerCore</name>
<message>
- <location filename="organizercore.cpp" line="288"/>
- <location filename="organizercore.cpp" line="315"/>
+ <location filename="organizercore.cpp" line="304"/>
+ <location filename="organizercore.cpp" line="331"/>
<source>Failed to write settings</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="289"/>
+ <location filename="organizercore.cpp" line="305"/>
<source>An error occured trying to update MO settings to %1: %2</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="310"/>
+ <location filename="organizercore.cpp" line="326"/>
<source>File is write protected</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="312"/>
+ <location filename="organizercore.cpp" line="328"/>
<source>Invalid file format (probably a bug)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="313"/>
+ <location filename="organizercore.cpp" line="329"/>
<source>Unknown error %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="316"/>
+ <location filename="organizercore.cpp" line="332"/>
<source>An error occured trying to write back MO settings to %1: %2</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="553"/>
- <location filename="organizercore.cpp" line="564"/>
+ <location filename="organizercore.cpp" line="569"/>
+ <location filename="organizercore.cpp" line="580"/>
<source>Download started</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="567"/>
+ <location filename="organizercore.cpp" line="583"/>
<source>Download failed</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="793"/>
- <location filename="organizercore.cpp" line="848"/>
+ <location filename="organizercore.cpp" line="809"/>
+ <location filename="organizercore.cpp" line="864"/>
<source>Installation successful</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="801"/>
- <location filename="organizercore.cpp" line="858"/>
+ <location filename="organizercore.cpp" line="817"/>
+ <location filename="organizercore.cpp" line="874"/>
<source>Configure Mod</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="802"/>
- <location filename="organizercore.cpp" line="859"/>
+ <location filename="organizercore.cpp" line="818"/>
+ <location filename="organizercore.cpp" line="875"/>
<source>This mod contains ini tweaks. Do you want to configure them now?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="812"/>
- <location filename="organizercore.cpp" line="869"/>
+ <location filename="organizercore.cpp" line="828"/>
+ <location filename="organizercore.cpp" line="885"/>
<source>mod &quot;%1&quot; not found</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="815"/>
- <location filename="organizercore.cpp" line="876"/>
+ <location filename="organizercore.cpp" line="831"/>
+ <location filename="organizercore.cpp" line="892"/>
<source>Installation cancelled</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="816"/>
- <location filename="organizercore.cpp" line="877"/>
+ <location filename="organizercore.cpp" line="832"/>
+ <location filename="organizercore.cpp" line="893"/>
<source>The mod was not installed completely.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1136"/>
+ <location filename="organizercore.cpp" line="1066"/>
<source>Executable &quot;%1&quot; not found</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1161"/>
+ <location filename="organizercore.cpp" line="1092"/>
<source>Start Steam?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1162"/>
+ <location filename="organizercore.cpp" line="1093"/>
<source>Steam is required to be running already to correctly start the game. Should MO try to start steam now?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1186"/>
+ <location filename="organizercore.cpp" line="1116"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1234"/>
+ <location filename="organizercore.cpp" line="1164"/>
<source>No profile set</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1409"/>
+ <location filename="organizercore.cpp" line="1354"/>
<source>Failed to refresh list of esps: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1475"/>
+ <location filename="organizercore.cpp" line="1420"/>
<source>Multiple esps activated, please check that they don&apos;t conflict.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1542"/>
+ <location filename="organizercore.cpp" line="1487"/>
<source>Download?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1543"/>
+ <location filename="organizercore.cpp" line="1488"/>
<source>A download has been started but no installed page plugin recognizes it.
If you download anyway no information (i.e. version) will be associated with the download.
Continue?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1674"/>
+ <location filename="organizercore.cpp" line="1619"/>
<source>failed to update mod list: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1681"/>
- <location filename="organizercore.cpp" line="1698"/>
+ <location filename="organizercore.cpp" line="1626"/>
+ <location filename="organizercore.cpp" line="1643"/>
<source>login successful</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1705"/>
+ <location filename="organizercore.cpp" line="1650"/>
<source>Login failed</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1706"/>
+ <location filename="organizercore.cpp" line="1651"/>
<source>Login failed, try again?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1715"/>
+ <location filename="organizercore.cpp" line="1660"/>
<source>login failed: %1. Download will not be associated with an account</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1723"/>
+ <location filename="organizercore.cpp" line="1668"/>
<source>login failed: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1733"/>
+ <location filename="organizercore.cpp" line="1678"/>
<source>login failed: %1. You need to log-in with Nexus to update MO.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1769"/>
+ <location filename="organizercore.cpp" line="1714"/>
<source>Too many esps and esms enabled</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1772"/>
- <location filename="organizercore.cpp" line="1790"/>
+ <location filename="organizercore.cpp" line="1717"/>
+ <location filename="organizercore.cpp" line="1735"/>
<source>Description missing</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1781"/>
+ <location filename="organizercore.cpp" line="1726"/>
<source>The game doesn&apos;t allow more than 255 active plugins (including the official ones) to be loaded. You have to disable some unused plugins or merge some plugins into one. You can find a guide here: &lt;a href=&quot;http://wiki.step-project.com/Guide:Merging_Plugins&quot;&gt;http://wiki.step-project.com/Guide:Merging_Plugins&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1814"/>
+ <location filename="organizercore.cpp" line="1759"/>
<source>failed to save load order: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="1886"/>
+ <location filename="organizercore.cpp" line="1831"/>
<source>The designated write target &quot;%1&quot; is not enabled.</source>
<translation type="unfinished"></translation>
</message>
@@ -3830,109 +3830,109 @@ Continue?</source>
<context>
<name>PluginList</name>
<message>
- <location filename="pluginlist.cpp" line="89"/>
+ <location filename="pluginlist.cpp" line="90"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="90"/>
+ <location filename="pluginlist.cpp" line="91"/>
<source>Priority</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="91"/>
+ <location filename="pluginlist.cpp" line="92"/>
<source>Mod Index</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="92"/>
+ <location filename="pluginlist.cpp" line="93"/>
<source>Flags</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="93"/>
- <location filename="pluginlist.cpp" line="105"/>
+ <location filename="pluginlist.cpp" line="94"/>
+ <location filename="pluginlist.cpp" line="106"/>
<source>unknown</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="101"/>
+ <location filename="pluginlist.cpp" line="102"/>
<source>Name of your mods</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="102"/>
+ <location filename="pluginlist.cpp" line="103"/>
<source>Load priority of your mod. The higher, the more &quot;important&quot; it is and thus overwrites data from plugins with lower priority.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="104"/>
+ <location filename="pluginlist.cpp" line="105"/>
<source>The modindex determins the formids of objects originating from this mods.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="158"/>
+ <location filename="pluginlist.cpp" line="159"/>
<source>failed to update esp info for file %1 (source id: %2), error: %3</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="231"/>
+ <location filename="pluginlist.cpp" line="232"/>
<source>esp not found: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="238"/>
- <location filename="pluginlist.cpp" line="250"/>
+ <location filename="pluginlist.cpp" line="239"/>
+ <location filename="pluginlist.cpp" line="251"/>
<source>Confirm</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="238"/>
+ <location filename="pluginlist.cpp" line="239"/>
<source>Really enable all plugins?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="250"/>
+ <location filename="pluginlist.cpp" line="251"/>
<source>Really disable all plugins?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="321"/>
+ <location filename="pluginlist.cpp" line="322"/>
<source>The file containing locked plugin indices is broken</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="756"/>
+ <location filename="pluginlist.cpp" line="757"/>
<source>This plugin can&apos;t be disabled (enforced by the game)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="758"/>
+ <location filename="pluginlist.cpp" line="759"/>
<source>&lt;b&gt;Origin&lt;/b&gt;: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="760"/>
+ <location filename="pluginlist.cpp" line="761"/>
<source>Author</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="763"/>
+ <location filename="pluginlist.cpp" line="764"/>
<source>Description</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="766"/>
+ <location filename="pluginlist.cpp" line="767"/>
<source>Missing Masters</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="773"/>
+ <location filename="pluginlist.cpp" line="774"/>
<source>Enabled Masters</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="942"/>
+ <location filename="pluginlist.cpp" line="943"/>
<source>failed to restore load order for %1</source>
<translation type="unfinished"></translation>
</message>
@@ -4491,13 +4491,13 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location filename="main.cpp" line="93"/>
- <location filename="organizercore.cpp" line="591"/>
+ <location filename="organizercore.cpp" line="607"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cpp" line="94"/>
- <location filename="organizercore.cpp" line="592"/>
+ <location filename="organizercore.cpp" line="608"/>
<source>Failed to create &quot;%1&quot;. Your user account probably lacks permission.</source>
<translation type="unfinished"></translation>
</message>
@@ -4550,7 +4550,7 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location filename="main.cpp" line="608"/>
- <location filename="settings.cpp" line="887"/>
+ <location filename="settings.cpp" line="901"/>
<source>Mod Organizer</source>
<translation type="unfinished"></translation>
</message>
@@ -4565,33 +4565,33 @@ p, li { white-space: pre-wrap; }
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="828"/>
+ <location filename="mainwindow.cpp" line="829"/>
<source>Please use &quot;Help&quot; from the toolbar to get usage instructions to all elements</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1206"/>
- <location filename="mainwindow.cpp" line="3301"/>
+ <location filename="mainwindow.cpp" line="1207"/>
+ <location filename="mainwindow.cpp" line="3322"/>
<source>&lt;Manage...&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="1218"/>
+ <location filename="mainwindow.cpp" line="1219"/>
<source>failed to parse profile %1: %2</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="123"/>
+ <location filename="organizercore.cpp" line="139"/>
<source>Failed to start &quot;%1&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="126"/>
+ <location filename="organizercore.cpp" line="142"/>
<source>Waiting</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="organizercore.cpp" line="127"/>
+ <location filename="organizercore.cpp" line="143"/>
<source>Please press OK once you&apos;re logged into steam.</source>
<translation type="unfinished"></translation>
</message>
@@ -4612,12 +4612,12 @@ p, li { white-space: pre-wrap; }
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="397"/>
+ <location filename="pluginlist.cpp" line="398"/>
<source>failed to access %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="411"/>
+ <location filename="pluginlist.cpp" line="412"/>
<source>failed to set file time %1</source>
<translation type="unfinished"></translation>
</message>
@@ -4627,12 +4627,12 @@ p, li { white-space: pre-wrap; }
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="settings.cpp" line="894"/>
+ <location filename="settings.cpp" line="908"/>
<source>Script Extender</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="settings.cpp" line="901"/>
+ <location filename="settings.cpp" line="915"/>
<source>Proxy DLL</source>
<translation type="unfinished"></translation>
</message>
@@ -4817,28 +4817,28 @@ Start elevated anyway? (you will be asked if you want to allow ModOrganizer.exe
<context>
<name>Settings</name>
<message>
- <location filename="settings.cpp" line="115"/>
+ <location filename="settings.cpp" line="135"/>
<source>Failed</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="settings.cpp" line="116"/>
+ <location filename="settings.cpp" line="136"/>
<source>Sorry, failed to start the helper application</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="settings.cpp" line="398"/>
- <location filename="settings.cpp" line="417"/>
+ <location filename="settings.cpp" line="418"/>
+ <location filename="settings.cpp" line="437"/>
<source>attempt to store setting for unknown plugin &quot;%1&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="settings.cpp" line="709"/>
+ <location filename="settings.cpp" line="723"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="settings.cpp" line="710"/>
+ <location filename="settings.cpp" line="724"/>
<source>Failed to create &quot;%1&quot;, you may not have the necessary permission. path remains unchanged.</source>
<translation type="unfinished"></translation>
</message>
diff --git a/src/organizercore.cpp b/src/organizercore.cpp
index b5e5118d..d91e2423 100644
--- a/src/organizercore.cpp
+++ b/src/organizercore.cpp
@@ -1,17 +1,22 @@
#include "organizercore.h"
+#include "delayedfilewriter.h"
+#include "guessedvalue.h"
#include "imodinterface.h"
+#include "imoinfo.h"
#include "iplugingame.h"
#include "iuserinterface.h"
#include "loadmechanism.h"
#include "messagedialog.h"
#include "modlistsortproxy.h"
+#include "modrepositoryfileinfo.h"
+#include "nexusinterface.h"
#include "plugincontainer.h"
#include "pluginlistsortproxy.h"
+#include "profile.h"
#include "logbuffer.h"
#include "credentialsdialog.h"
#include "filedialogmemory.h"
-#include "lockeddialog.h"
#include "modinfodialog.h"
#include "spawn.h"
#include "syncoverwritedialog.h"
@@ -28,22 +33,33 @@
#include <questionboxmemory.h>
#include <QApplication>
+#include <QCoreApplication>
+#include <QDialog>
#include <QDialogButtonBox>
#include <QMessageBox>
#include <QNetworkInterface>
#include <QProcess>
#include <QTimer>
+#include <QUrl>
#include <QWidget>
#include <QtDebug>
+#include <QtGlobal> // for qPrintable, etc
#include <Psapi.h>
+#include <tchar.h> // for _tcsicmp
+
+#include <limits.h>
+#include <stddef.h>
+#include <string.h> // for memset, wcsrchr
#include <exception>
#include <functional>
#include <boost/algorithm/string/predicate.hpp>
#include <memory>
#include <set>
+#include <string> //for wstring
+#include <tuple>
#include <utility>
@@ -1005,120 +1021,34 @@ QStringList OrganizerCore::modsSortedByProfilePriority() const
return res;
}
-void OrganizerCore::spawnBinary(const Executable &exe)
-{
- spawnBinary(
- exe.m_BinaryInfo, exe.m_Arguments,
- exe.m_WorkingDirectory.length() != 0 ? exe.m_WorkingDirectory
- : exe.m_BinaryInfo.absolutePath(),
- exe.m_SteamAppID,
- m_CurrentProfile->setting("custom_overwrites", exe.m_Title).toString());
-}
-
-void OrganizerCore::spawnBinary(const QFileInfo &binary,
- const QString &arguments,
- const QDir &currentDirectory,
- const QString &steamAppID,
- const QString &customOverwrite)
+void OrganizerCore::spawnBinary(const QFileInfo &binary, const QString &arguments, const QDir &currentDirectory, const QString &steamAppID, const QString &customOverwrite)
{
- LockedDialog *dialog = new LockedDialog(qApp->activeWindow());
- dialog->show();
- ON_BLOCK_EXIT([&]() {
- dialog->hide();
- dialog->deleteLater();
+ if (m_UserInterface != nullptr) {
+ m_UserInterface->lock();
+ }
+ ON_BLOCK_EXIT([&] () {
+ if (m_UserInterface != nullptr) { m_UserInterface->unlock(); }
});
- HANDLE processHandle
- = spawnBinaryDirect(binary, arguments, m_CurrentProfile->name(),
- currentDirectory, steamAppID, customOverwrite);
+ HANDLE processHandle = spawnBinaryDirect(binary, arguments, m_CurrentProfile->name(), currentDirectory, steamAppID, customOverwrite);
if (processHandle != INVALID_HANDLE_VALUE) {
- if (m_UserInterface != nullptr) {
- m_UserInterface->setWindowEnabled(false);
- }
- // re-enable the locked dialog because what'd be the point otherwise?
- dialog->setEnabled(true);
-
- QCoreApplication::processEvents();
-
DWORD processExitCode;
+ (void)waitForProcessCompletion(processHandle, &processExitCode);
- dialog->setProcessName(
- QString::fromStdWString(getProcessName(::GetProcessId(processHandle))));
-
- {
- DWORD currentProcess = 0UL;
-
- DWORD res = ::MsgWaitForMultipleObjects(1, &processHandle, false, 1000,
- QS_KEY | QS_MOUSE);
- bool tryAgain = true;
- while ((res != WAIT_FAILED) && !dialog->unlockClicked()) {
- if (res == WAIT_OBJECT_0) {
- // process ended, is there another one in the group?
- static const DWORD maxCount = 5;
- size_t numProcesses = maxCount;
- LPDWORD processes = new DWORD[maxCount];
- if (::GetVFSProcessList(&numProcesses, processes)) {
- bool found = false;
- size_t count =
- std::min<size_t>(static_cast<size_t>(maxCount), numProcesses);
- for (size_t i = 0; i < count; ++i) {
- std::wstring processName = getProcessName(processes[i]);
- if (!boost::starts_with(processName, L"ModOrganizer.exe")) {
- currentProcess = processes[i];
- dialog->setProcessName(QString::fromStdWString(processName));
- processHandle
- = ::OpenProcess(SYNCHRONIZE, FALSE, currentProcess);
- found = true;
- }
- }
- if (!found) {
- // it's possible the previous process has deregistered before
- // the new one has registered, so we should try one more time
- // with a little delay
- if (tryAgain) {
- tryAgain = false;
- QThread::msleep(500);
- continue;
- } else {
- break;
- }
- } else {
- tryAgain = true;
- }
- } else {
- break;
- }
- }
-
- // keep processing events so the app doesn't appear dead
- QCoreApplication::processEvents();
-
- res = ::MsgWaitForMultipleObjects(1, &processHandle, false, 1000,
- QS_KEY | QS_MOUSE);
- }
- ::GetExitCodeProcess(processHandle, &processExitCode);
-
- ::CloseHandle(processHandle);
-
- if (m_UserInterface != nullptr) {
- m_UserInterface->setWindowEnabled(true);
- }
- // need to remove our stored load order because it may be outdated if a
- // foreign tool changed the
- // file time. After removing that file, refreshESPList will use the file
- // time as the order
- if (managedGame()->loadOrderMechanism()
- == IPluginGame::LoadOrderMechanism::FileTime) {
- qDebug("removing loadorder.txt");
- QFile::remove(m_CurrentProfile->getLoadOrderFileName());
- }
- refreshDirectoryStructure();
+ refreshDirectoryStructure();
+ // need to remove our stored load order because it may be outdated if a foreign tool changed the
+ // file time. After removing that file, refreshESPList will use the file time as the order
+ if (managedGame()->loadOrderMechanism() == IPluginGame::LoadOrderMechanism::FileTime) {
+ qDebug("removing loadorder.txt");
+ QFile::remove(m_CurrentProfile->getLoadOrderFileName());
+ }
+ refreshDirectoryStructure();
- refreshESPList();
- savePluginList();
+ refreshESPList();
+ savePluginList();
- m_FinishedRun(binary.absoluteFilePath(), processExitCode);
- }
+ //These callbacks should not fiddle with directoy structure and ESPs.
+ m_FinishedRun(binary.absoluteFilePath(), processExitCode);
}
}
@@ -1158,12 +1088,11 @@ HANDLE OrganizerCore::spawnBinaryDirect(const QFileInfo &binary,
if ((window != nullptr) && (!window->isVisible())) {
window = nullptr;
}
- if (QuestionBoxMemory::query(window, "steamQuery", tr("Start Steam?"),
- tr("Steam is required to be running already "
- "to correctly start the game. "
- "Should MO try to start steam now?"),
- QDialogButtonBox::Yes | QDialogButtonBox::No)
- == QDialogButtonBox::Yes) {
+ if (QuestionBoxMemory::query(window, "steamQuery", binary.fileName(),
+ tr("Start Steam?"),
+ tr("Steam is required to be running already to correctly start the game. "
+ "Should MO try to start steam now?"),
+ QDialogButtonBox::Yes | QDialogButtonBox::No) == QDialogButtonBox::Yes) {
startSteam(qApp->activeWindow());
}
}
@@ -1179,6 +1108,7 @@ HANDLE OrganizerCore::spawnBinaryDirect(const QFileInfo &binary,
m_CurrentProfile->modlistWriter().writeImmediately(true);
}
+ // TODO: should also pass arguments
if (m_AboutToRun(binary.absoluteFilePath())) {
try {
m_USVFS.updateMapping(fileMapping(profileName, customOverwrite));
@@ -1287,67 +1217,83 @@ bool OrganizerCore::waitForApplication(HANDLE handle, LPDWORD exitCode)
{
if (m_UserInterface != nullptr) {
m_UserInterface->lock();
- ON_BLOCK_EXIT([&]() { m_UserInterface->unlock(); });
}
- DWORD retLen;
- JOBOBJECT_BASIC_PROCESS_ID_LIST info;
-
- bool isJobHandle = true;
+ ON_BLOCK_EXIT([&] () {
+ if (m_UserInterface != nullptr) {
+ m_UserInterface->unlock();
+ } });
+ return waitForProcessCompletion(handle, exitCode);
+}
- ULONG lastProcessID = ULONG_MAX;
+bool OrganizerCore::waitForProcessCompletion(HANDLE handle, LPDWORD exitCode)
+{
HANDLE processHandle = handle;
- DWORD res
- = ::MsgWaitForMultipleObjects(1, &handle, false, 500, QS_KEY | QS_MOUSE);
+ static const DWORD maxCount = 5;
+ size_t numProcesses = maxCount;
+ LPDWORD processes = new DWORD[maxCount];
+
+ DWORD currentProcess = 0UL;
+ bool tryAgain = true;
+
+ DWORD res;
+ // Wait for a an event on the handle, a key press, mouse click or timeout
while (
- (res != WAIT_FAILED) && (res != WAIT_OBJECT_0)
- && ((m_UserInterface == nullptr) || !m_UserInterface->unlockClicked())) {
- if (isJobHandle) {
- if (::QueryInformationJobObject(handle, JobObjectBasicProcessIdList,
- &info, sizeof(info), &retLen)
- > 0) {
- if (info.NumberOfProcessIdsInList == 0) {
- // fake signaled state
- res = WAIT_OBJECT_0;
- break;
- } else {
- // this is indeed a job handle. Figure out one of the process handles
- // as well.
- if (lastProcessID != info.ProcessIdList[0]) {
- lastProcessID = info.ProcessIdList[0];
- if (processHandle != handle) {
- ::CloseHandle(processHandle);
- }
- processHandle = ::OpenProcess(PROCESS_QUERY_INFORMATION, FALSE,
- lastProcessID);
- }
- }
+ res = ::MsgWaitForMultipleObjects(1, &handle, false, 500,
+ QS_KEY | QS_MOUSE),
+ (MOBase::isOneOf(res, {WAIT_FAILED, WAIT_OBJECT_0}) &&
+ ((m_UserInterface == nullptr) || !m_UserInterface->unlockClicked()))) {
+
+ if (!::GetVFSProcessList(&numProcesses, processes)) {
+ break;
+ }
+
+ bool found = false;
+ size_t count =
+ std::min<size_t>(static_cast<size_t>(maxCount), numProcesses);
+ for (size_t i = 0; i < count; ++i) {
+ std::wstring processName = getProcessName(processes[i]);
+ if (!boost::starts_with(processName, L"ModOrganizer.exe")) {
+ currentProcess = processes[i];
+ m_UserInterface->setProcessName(QString::fromStdWString(processName));
+ processHandle = ::OpenProcess(SYNCHRONIZE, FALSE, currentProcess);
+ found = true;
+ }
+ }
+ if (!found) {
+ // it's possible the previous process has deregistered before
+ // the new one has registered, so we should try one more time
+ // with a little delay
+ if (tryAgain) {
+ tryAgain = false;
+ QThread::msleep(500);
+ continue;
} else {
- // the info-object I passed only provides space for 1 process id. but
- // since this code only cares about whether there
- // is more than one that's good enough. ERROR_MORE_DATA simply signals
- // there are at least two processes running.
- // any other error probably means the handle is a regular process
- // handle, probably caused by running MO in a job without
- // the right to break out.
- if (::GetLastError() != ERROR_MORE_DATA) {
- isJobHandle = false;
- }
+ break;
}
+ } else {
+ tryAgain = true;
}
// keep processing events so the app doesn't appear dead
QCoreApplication::processEvents();
-
- res = ::MsgWaitForMultipleObjects(1, &handle, false, 500,
- QS_KEY | QS_MOUSE);
}
if (exitCode != nullptr) {
- ::GetExitCodeProcess(processHandle, exitCode);
+ //This is actually wrong if the process we started finished before we
+ //got the event and so we end up with a job handle.
+ if (! ::GetExitCodeProcess(processHandle, exitCode))
+ {
+ DWORD error = ::GetLastError();
+ qDebug() << "Failed to get process exit code: Error " << error;
+ }
}
+
::CloseHandle(processHandle);
+ if (handle != processHandle) {
+ ::CloseHandle(handle);
+ }
return res == WAIT_OBJECT_0;
}
diff --git a/src/organizercore.h b/src/organizercore.h
index 6c882dc9..e994d9b1 100644
--- a/src/organizercore.h
+++ b/src/organizercore.h
@@ -23,21 +23,28 @@
class ModListSortProxy;
class PluginListSortProxy;
class Profile;
-namespace MOBase { template <typename T> class GuessedValue; }
+namespace MOBase {
+ template <typename T> class GuessedValue;
+ class IModInterface;
+}
namespace MOShared { class DirectoryEntry; }
#include <QDir>
+#include <QFileInfo>
#include <QList>
#include <QObject>
#include <QSettings>
#include <QString>
#include <QStringList>
#include <QThread>
+#include <QVariant>
class QNetworkReply;
class QUrl;
class QWidget;
+#include <Windows.h> //for HANDLE, LPDWORD
+
#include <functional>
#include <vector>
@@ -129,8 +136,16 @@ public:
void doAfterLogin(const std::function<void()> &function) { m_PostLoginTasks.append(function); }
- void spawnBinary(const Executable &exe);
- HANDLE spawnBinaryDirect(const QFileInfo &binary, const QString &arguments, const QString &profileName, const QDir &currentDirectory, const QString &steamAppID, const QString &customOverwrite);
+ void spawnBinary(const QFileInfo &binary, const QString &arguments = "",
+ const QDir &currentDirectory = QDir(),
+ const QString &steamAppID = "",
+ const QString &customOverwrite = "");
+
+ HANDLE spawnBinaryDirect(const QFileInfo &binary, const QString &arguments,
+ const QString &profileName,
+ const QDir &currentDirectory,
+ const QString &steamAppID,
+ const QString &customOverwrite);
void loginSuccessfulUpdate(bool necessary);
void loginFailedUpdate(const QString &message);
@@ -244,10 +259,7 @@ private:
const MOShared::DirectoryEntry *directoryEntry,
int createDestination);
- void spawnBinary(const QFileInfo &binary, const QString &arguments = "",
- const QDir &currentDirectory = QDir(),
- const QString &steamAppID = "",
- const QString &customOverwrite = "");
+ bool waitForProcessCompletion(HANDLE handle, LPDWORD exitCode);
private slots:
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp
index 44e08023..a4d8561c 100644
--- a/src/pluginlist.cpp
+++ b/src/pluginlist.cpp
@@ -33,6 +33,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <QMessageBox>
#include <QMimeData>
#include <QCoreApplication>
+#include <QDateTime>
#include <QDir>
#include <QFile>
#include <QTextCodec>
diff --git a/src/settings.cpp b/src/settings.cpp
index b86e2289..fc740302 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -19,24 +19,44 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "settings.h"
+#include "pluginsetting.h"
+#include "serverinfo.h"
#include "settingsdialog.h"
-#include "utility.h"
-#include "helper.h"
-#include <appconfig.h>
+#include "versioninfo.h"
+#include "appconfig.h"
#include <utility.h>
+#include <iplugin.h>
#include <iplugingame.h>
+#include <questionboxmemory.h>
#include <QCheckBox>
#include <QCoreApplication>
-#include <QDesktopServices>
+#include <QComboBox>
+#include <QDate>
+#include <QDialog>
+#include <QDir>
#include <QDirIterator>
+#include <QFileInfo>
#include <QLineEdit>
+#include <QListWidgetItem>
+#include <QLocale>
#include <QMessageBox>
#include <QApplication>
#include <QRegExp>
#include <QDir>
+#include <QStringList>
+#include <QVariantMap>
+
+#include <Qt> // for Qt::UserRole, etc
+#include <QtDebug> // for qDebug, qWarning
+
+#include <Windows.h> // For ShellExecuteW, HINSTANCE, etc
+#include <algorithm> // for sort
#include <memory>
+#include <stdexcept> // for runtime_error
+#include <string>
+#include <utility> // for pair, make_pair
using namespace MOBase;
@@ -547,13 +567,7 @@ void Settings::addStyles(QComboBox *styleBox)
void Settings::resetDialogs()
{
- m_Settings.beginGroup("DialogChoices");
- QStringList keys = m_Settings.childKeys();
- for (QString key : keys) {
- m_Settings.remove(key);
- }
-
- m_Settings.endGroup();
+ QuestionBoxMemory::resetDialogs();
}
diff --git a/src/settings.h b/src/settings.h
index 9676df70..d316c82d 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -21,20 +21,34 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#define WORKAROUNDS_H
#include "loadmechanism.h"
-#include "serverinfo.h"
-#include <iplugin.h>
+#include <QList>
+#include <QMap>
+#include <QObject>
+#include <QSet>
#include <QSettings>
-#include <QListWidget>
-#include <QComboBox>
+#include <QString>
+#include <QVariant>
+#include <QtGlobal> //for uint
+
+#include <map>
+#include <vector>
+
+class QCheckBox;
+class QComboBox;
+class QLineEdit;
+class QListWidget;
+class QWidget;
+
+struct ServerInfo;
namespace MOBase {
+ class IPlugin;
class IPluginGame;
}
class SettingsDialog;
-class QCheckBox;
/**
* manages the settings for Mod Organizer. The settings are not cached