diff options
| author | Brian Munro <brian.alexander.munro@gmail.com> | 2017-03-29 02:44:31 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-29 02:44:31 -0700 |
| commit | 822534e16a421520b7abdf0b698948eb2df88a63 (patch) | |
| tree | 16c61060a8aef581d0b322573c63ae6400ebbe86 /src | |
| parent | 99156abc6e0779ed3de437c0005b6de8293c7a15 (diff) | |
| parent | c64e12a289066c6b4834c43a49ff631a33b2f3ce (diff) | |
Merge pull request #69 from LePresidente/new_vfs_library
Bring in line with main branch
Diffstat (limited to 'src')
| -rw-r--r-- | src/mainwindow.cpp | 21 | ||||
| -rw-r--r-- | src/mainwindow.ui | 6 | ||||
| -rw-r--r-- | src/organizercore.cpp | 16 | ||||
| -rw-r--r-- | src/organizercore.h | 2 | ||||
| -rw-r--r-- | src/organizerproxy.cpp | 10 | ||||
| -rw-r--r-- | src/organizerproxy.h | 1 | ||||
| -rw-r--r-- | src/selfupdater.cpp | 2 | ||||
| -rw-r--r-- | src/version.rc | 4 |
8 files changed, 41 insertions, 21 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index f554f0aa..7c853578 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -4228,7 +4228,11 @@ void MainWindow::on_bossButton_clicked() std::string reportURL;
std::string errorMessages;
- m_OrganizerCore.currentProfile()->writeModlistNow();
+ //m_OrganizerCore.currentProfile()->writeModlistNow();
+ m_OrganizerCore.savePluginList();
+ //Create a backup of the load orders w/ LOOT in name
+ //to make sure that any sorting is easily undo-able.
+ //Need to figure out how I want to do that.
bool success = false;
@@ -4241,19 +4245,15 @@ void MainWindow::on_bossButton_clicked() dialog.show();
QString outPath = QDir::temp().absoluteFilePath("lootreport.json");
-
+
QStringList parameters;
- parameters << "--unattended"
- << "--stdout"
- << "--noreport"
- << "--game" << m_OrganizerCore.managedGame()->gameShortName()
+ parameters << "--game" << m_OrganizerCore.managedGame()->gameShortName()
<< "--gamePath" << QString("\"%1\"").arg(m_OrganizerCore.managedGame()->gameDirectory().absolutePath())
+ << "--pluginListPath" << QString("\"%1/loadorder.txt\"").arg(m_OrganizerCore.profilePath())
<< "--out" << outPath;
if (m_DidUpdateMasterList) {
parameters << "--skipUpdateMasterlist";
- } else {
- m_DidUpdateMasterList = true;
}
HANDLE stdOutWrite = INVALID_HANDLE_VALUE;
HANDLE stdOutRead = INVALID_HANDLE_VALUE;
@@ -4369,7 +4369,8 @@ void MainWindow::on_bossButton_clicked() }
if (success) {
- if (reportURL.length() > 0) {
+ m_DidUpdateMasterList = true;
+ /*if (reportURL.length() > 0) {
m_IntegratedBrowser.setWindowTitle("LOOT Report");
QString report(reportURL.c_str());
QStringList temp = report.split("?");
@@ -4378,7 +4379,7 @@ void MainWindow::on_bossButton_clicked() url.setQuery(temp.at(1).toUtf8());
}
m_IntegratedBrowser.openUrl(url);
- }
+ }*/
// if the game specifies load order by file time, our own load order file needs to be removed because it's outdated.
// refreshESPList will then use the file time as the load order.
diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 6ce156c8..4b5467ed 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -732,9 +732,9 @@ p, li { white-space: pre-wrap; } <property name="text">
<string>Sort</string>
</property>
- <property name="visible">
- <bool>false</bool>
- </property>
+ <property name="visible">
+ <bool>true</bool>
+ </property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/MO/gui/sort</normaloff>:/MO/gui/sort</iconset>
diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 142c9eba..d9ed6ab6 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -703,6 +703,16 @@ QString OrganizerCore::downloadsPath() const return QDir::fromNativeSeparators(m_Settings.getDownloadDirectory());
}
+QString OrganizerCore::overwritePath() const
+{
+ return QDir::fromNativeSeparators(m_Settings.getOverwriteDirectory());
+}
+
+QString OrganizerCore::basePath() const
+{
+ return QDir::fromNativeSeparators(m_Settings.getBaseDirectory());
+}
+
MOBase::VersionInfo OrganizerCore::appVersion() const
{
return m_Updater.getVersion();
@@ -1243,7 +1253,7 @@ bool OrganizerCore::waitForProcessCompletion(HANDLE handle, LPDWORD exitCode) while (
res = ::MsgWaitForMultipleObjects(1, &handle, false, 500,
QS_KEY | QS_MOUSE),
- ((res != WAIT_FAILED) && (res != WAIT_OBJECT_0)) &&
+ ((res != WAIT_FAILED) || (res != WAIT_OBJECT_0)) &&
((m_UserInterface == nullptr) || !m_UserInterface->unlockClicked())) {
if (!::GetVFSProcessList(&numProcesses, processes)) {
@@ -1256,9 +1266,9 @@ bool OrganizerCore::waitForProcessCompletion(HANDLE handle, LPDWORD exitCode) 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];
+ currentProcess = processes[i];
m_UserInterface->setProcessName(QString::fromStdWString(processName));
- processHandle = ::OpenProcess(SYNCHRONIZE, FALSE, currentProcess);
+ processHandle = ::OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, currentProcess);
found = true;
}
}
diff --git a/src/organizercore.h b/src/organizercore.h index e994d9b1..297b94f6 100644 --- a/src/organizercore.h +++ b/src/organizercore.h @@ -165,6 +165,8 @@ public: QString profileName() const;
QString profilePath() const;
QString downloadsPath() const;
+ QString overwritePath() const;
+ QString basePath() const;
MOBase::VersionInfo appVersion() const;
MOBase::IModInterface *getMod(const QString &name) const;
MOBase::IModInterface *createMod(MOBase::GuessedValue<QString> &name);
diff --git a/src/organizerproxy.cpp b/src/organizerproxy.cpp index b6dbd242..cf2e29e3 100644 --- a/src/organizerproxy.cpp +++ b/src/organizerproxy.cpp @@ -37,9 +37,15 @@ QString OrganizerProxy::downloadsPath() const QString OrganizerProxy::overwritePath() const
{
- return QDir::fromNativeSeparators(qApp->property("dataPath").toString())
+ /*return QDir::fromNativeSeparators(qApp->property("dataPath").toString())
+ "/"
- + ToQString(AppConfig::overwritePath());
+ + ToQString(AppConfig::overwritePath());*/
+ return m_Proxied->overwritePath();
+}
+
+QString OrganizerProxy::basePath() const
+{
+ return m_Proxied->basePath();
}
VersionInfo OrganizerProxy::appVersion() const
diff --git a/src/organizerproxy.h b/src/organizerproxy.h index 7d925482..7004db14 100644 --- a/src/organizerproxy.h +++ b/src/organizerproxy.h @@ -18,6 +18,7 @@ public: virtual QString profilePath() const;
virtual QString downloadsPath() const;
virtual QString overwritePath() const;
+ virtual QString basePath() const;
virtual MOBase::VersionInfo appVersion() const;
virtual MOBase::IModInterface *getMod(const QString &name) const;
virtual MOBase::IModInterface *createMod(MOBase::GuessedValue<QString> &name);
diff --git a/src/selfupdater.cpp b/src/selfupdater.cpp index 3e98a5ec..d78b020b 100644 --- a/src/selfupdater.cpp +++ b/src/selfupdater.cpp @@ -106,7 +106,7 @@ SelfUpdater::SelfUpdater(NexusInterface *nexusInterface) m_MOVersion = VersionInfo(version.dwFileVersionMS >> 16,
version.dwFileVersionMS & 0xFFFF,
version.dwFileVersionLS >> 16,
- version.dwFileVersionLS & 0xFFFF);
+ version.dwFileVersionLS & 0xFFFF);
}
diff --git a/src/version.rc b/src/version.rc index 6710bc30..e3a2c832 100644 --- a/src/version.rc +++ b/src/version.rc @@ -1,7 +1,7 @@ #include "Winver.h"
-#define VER_FILEVERSION 2,0,8,1
-#define VER_FILEVERSION_STR "2.0.8.1beta\0"
+#define VER_FILEVERSION 2,0,8,3
+#define VER_FILEVERSION_STR "2.0.8.3beta\0"
VS_VERSION_INFO VERSIONINFO
FILEVERSION VER_FILEVERSION
|
