From a8556eacb629f605d318514bd95af844304f5a03 Mon Sep 17 00:00:00 2001 From: ZachHaber Date: Tue, 27 Dec 2016 16:41:12 -0600 Subject: Added preliminary support for changes to lootcli project Hopefully re-enabled lootcli report. Added new argument for lootcli.exe: pluginListPath, so it can determine what to read and thus change. Need to figure out how to determine the current language in a format that's easily understood. --- src/mainwindow.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index f554f0aa..13cf9846 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -4229,6 +4229,9 @@ void MainWindow::on_bossButton_clicked() std::string errorMessages; m_OrganizerCore.currentProfile()->writeModlistNow(); + //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,6 +4244,8 @@ void MainWindow::on_bossButton_clicked() dialog.show(); QString outPath = QDir::temp().absoluteFilePath("lootreport.json"); + //Trying to make it display the report. + reportURL=outPath.toStdString(); QStringList parameters; parameters << "--unattended" @@ -4248,13 +4253,14 @@ void MainWindow::on_bossButton_clicked() << "--noreport" << "--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) { + /*if (m_DidUpdateMasterList) { parameters << "--skipUpdateMasterlist"; } else { m_DidUpdateMasterList = true; - } + }*/ HANDLE stdOutWrite = INVALID_HANDLE_VALUE; HANDLE stdOutRead = INVALID_HANDLE_VALUE; createStdoutPipe(&stdOutRead, &stdOutWrite); -- cgit v1.3.1 From 8b8ddc8163a66ea938c93a19eef906ef73f13e91 Mon Sep 17 00:00:00 2001 From: Zanoth Date: Tue, 27 Dec 2016 22:18:49 -0600 Subject: Got rid of some unnecesarry code Removed some parameters that were being sent to lootcli.exe that aren't relevant anymore, commented out the report viewing, and set the masterlist update boolean to switch only when there was no error. --- src/mainwindow.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 13cf9846..0b49967c 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -4248,19 +4248,14 @@ void MainWindow::on_bossButton_clicked() reportURL=outPath.toStdString(); 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()) + << "--pluginListPath" << QString("%1/loadorder.txt").arg(m_OrganizerCore.profilePath()) << "--out" << outPath; - /*if (m_DidUpdateMasterList) { + if (m_DidUpdateMasterList) { parameters << "--skipUpdateMasterlist"; - } else { - m_DidUpdateMasterList = true; - }*/ + } HANDLE stdOutWrite = INVALID_HANDLE_VALUE; HANDLE stdOutRead = INVALID_HANDLE_VALUE; createStdoutPipe(&stdOutRead, &stdOutWrite); @@ -4375,7 +4370,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("?"); @@ -4384,7 +4380,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. -- cgit v1.3.1 From 866a004438e286b5cc7f5fb324a4a0b11d55dc8b Mon Sep 17 00:00:00 2001 From: ZachHaber Date: Wed, 28 Dec 2016 03:37:14 -0600 Subject: Fixed pluginListPath to allow spaces lootcli was failing on FO4 b/c it was passing in a space. --- src/mainwindow.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 0b49967c..c9b62945 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -4244,13 +4244,11 @@ void MainWindow::on_bossButton_clicked() dialog.show(); QString outPath = QDir::temp().absoluteFilePath("lootreport.json"); - //Trying to make it display the report. - reportURL=outPath.toStdString(); - + QStringList parameters; parameters << "--game" << m_OrganizerCore.managedGame()->gameShortName() << "--gamePath" << QString("\"%1\"").arg(m_OrganizerCore.managedGame()->gameDirectory().absolutePath()) - << "--pluginListPath" << QString("%1/loadorder.txt").arg(m_OrganizerCore.profilePath()) + << "--pluginListPath" << QString("\"%1/loadorder.txt\"").arg(m_OrganizerCore.profilePath()) << "--out" << outPath; if (m_DidUpdateMasterList) { -- cgit v1.3.1