mirror of https://github.com/AxioDL/metaforce.git
Fix packaging MPT, fix crash when attempting to warp to a specific room
This commit is contained in:
parent
e34a844537
commit
7cc9abfac8
|
@ -20,24 +20,23 @@
|
||||||
#include <TlHelp32.h>
|
#include <TlHelp32.h>
|
||||||
|
|
||||||
static void KillProcessTree(QProcess& proc) {
|
static void KillProcessTree(QProcess& proc) {
|
||||||
#if 0
|
quint64 pid = proc.processId();
|
||||||
Q_PID pid = proc.pid();
|
if (pid == 0) {
|
||||||
if (!pid)
|
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
DWORD myprocID = pid->dwProcessId;
|
|
||||||
PROCESSENTRY32 pe = {};
|
PROCESSENTRY32 pe = {};
|
||||||
pe.dwSize = sizeof(PROCESSENTRY32);
|
pe.dwSize = sizeof(PROCESSENTRY32);
|
||||||
|
|
||||||
HANDLE hSnap = ::CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
|
HANDLE hSnap = ::CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
|
||||||
|
|
||||||
if (::Process32First(hSnap, &pe)) {
|
if (::Process32First(hSnap, &pe) == TRUE) {
|
||||||
BOOL bContinue = TRUE;
|
BOOL bContinue = TRUE;
|
||||||
|
|
||||||
// kill child processes
|
// kill child processes
|
||||||
while (bContinue) {
|
while (bContinue != FALSE) {
|
||||||
// only kill child processes
|
// only kill child processes
|
||||||
if (pe.th32ParentProcessID == myprocID) {
|
if (pe.th32ParentProcessID == pid) {
|
||||||
HANDLE hChildProc = ::OpenProcess(PROCESS_ALL_ACCESS, FALSE, pe.th32ProcessID);
|
HANDLE hChildProc = ::OpenProcess(PROCESS_ALL_ACCESS, FALSE, pe.th32ProcessID);
|
||||||
|
|
||||||
if (hChildProc) {
|
if (hChildProc) {
|
||||||
|
@ -49,7 +48,7 @@ static void KillProcessTree(QProcess& proc) {
|
||||||
bContinue = ::Process32Next(hSnap, &pe);
|
bContinue = ::Process32Next(hSnap, &pe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
proc.close();
|
proc.close();
|
||||||
proc.terminate();
|
proc.terminate();
|
||||||
}
|
}
|
||||||
|
@ -196,7 +195,8 @@ void MainWindow::onPackage() {
|
||||||
disconnect(&m_heclProc, qOverload<int, QProcess::ExitStatus>(&QProcess::finished), nullptr, nullptr);
|
disconnect(&m_heclProc, qOverload<int, QProcess::ExitStatus>(&QProcess::finished), nullptr, nullptr);
|
||||||
connect(&m_heclProc, qOverload<int, QProcess::ExitStatus>(&QProcess::finished), this, &MainWindow::onPackageFinished);
|
connect(&m_heclProc, qOverload<int, QProcess::ExitStatus>(&QProcess::finished), this, &MainWindow::onPackageFinished);
|
||||||
|
|
||||||
const QStringList heclProcArguments{QStringLiteral("package"), QStringLiteral("-y"), QStringLiteral("-g")};
|
const QStringList heclProcArguments{QStringLiteral("package"), QStringLiteral("MP1"), QStringLiteral("-y"),
|
||||||
|
QStringLiteral("-g")};
|
||||||
m_heclProc.start(m_heclPath, heclProcArguments, QIODevice::ReadOnly | QIODevice::Unbuffered);
|
m_heclProc.start(m_heclPath, heclProcArguments, QIODevice::ReadOnly | QIODevice::Unbuffered);
|
||||||
|
|
||||||
m_ui->heclTabs->setCurrentIndex(0);
|
m_ui->heclTabs->setCurrentIndex(0);
|
||||||
|
@ -235,9 +235,8 @@ void MainWindow::onLaunch() {
|
||||||
disconnect(&m_heclProc, qOverload<int, QProcess::ExitStatus>(&QProcess::finished), nullptr, nullptr);
|
disconnect(&m_heclProc, qOverload<int, QProcess::ExitStatus>(&QProcess::finished), nullptr, nullptr);
|
||||||
connect(&m_heclProc, qOverload<int, QProcess::ExitStatus>(&QProcess::finished), this, &MainWindow::onLaunchFinished);
|
connect(&m_heclProc, qOverload<int, QProcess::ExitStatus>(&QProcess::finished), this, &MainWindow::onLaunchFinished);
|
||||||
|
|
||||||
const auto heclProcArguments = QStringList{m_path + QStringLiteral("/out")}
|
const auto heclProcArguments = QStringList{m_path + QStringLiteral("/out/MP1")}
|
||||||
<< m_warpSettings
|
<< m_warpSettings << QStringLiteral("-l")
|
||||||
<< QStringLiteral("-l")
|
|
||||||
<< m_settings.value(QStringLiteral("urde_arguments"))
|
<< m_settings.value(QStringLiteral("urde_arguments"))
|
||||||
.toStringList()
|
.toStringList()
|
||||||
.join(QLatin1Char{' '})
|
.join(QLatin1Char{' '})
|
||||||
|
@ -723,9 +722,7 @@ void MainWindow::initOptions() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::sort(layers.begin(), layers.end(), [&](const auto& a, const auto& b) {
|
std::sort(layers.begin(), layers.end(), [&](const auto& a, const auto& b) { return a.name < b.name; });
|
||||||
return a.name < b.name;
|
|
||||||
});
|
|
||||||
|
|
||||||
LayerDialog layer(this);
|
LayerDialog layer(this);
|
||||||
layer.createLayerCheckboxes(layers);
|
layer.createLayerCheckboxes(layers);
|
||||||
|
@ -735,6 +732,11 @@ void MainWindow::initOptions() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QString directoryPath = areaPath.path();
|
QString directoryPath = areaPath.path();
|
||||||
|
#if _WIN32
|
||||||
|
directoryPath.replace(QLatin1Char('/'), QDir::separator());
|
||||||
|
#else
|
||||||
|
directoryPath.replace(QLatin1Char('\\'), QDir::separator());
|
||||||
|
#endif
|
||||||
auto list = directoryPath.split(QDir::separator());
|
auto list = directoryPath.split(QDir::separator());
|
||||||
std::string areaDirectory = list.last().toLower().toStdString();
|
std::string areaDirectory = list.last().toLower().toStdString();
|
||||||
list.pop_back();
|
list.pop_back();
|
||||||
|
|
|
@ -306,8 +306,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>464</width>
|
<width>225</width>
|
||||||
<height>686</height>
|
<height>186</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="label">
|
<attribute name="label">
|
||||||
|
@ -450,8 +450,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>464</width>
|
<width>166</width>
|
||||||
<height>686</height>
|
<height>105</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="label">
|
<attribute name="label">
|
||||||
|
@ -495,6 +495,14 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="experimentalOptionsGroup">
|
<widget class="QWidget" name="experimentalOptionsGroup">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>164</width>
|
||||||
|
<height>47</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
<attribute name="label">
|
<attribute name="label">
|
||||||
<string>Experimental</string>
|
<string>Experimental</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
@ -522,6 +530,14 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="developerOptionsGroup">
|
<widget class="QWidget" name="developerOptionsGroup">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>450</width>
|
||||||
|
<height>649</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
<attribute name="label">
|
<attribute name="label">
|
||||||
<string>Developer</string>
|
<string>Developer</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
@ -1231,19 +1247,19 @@
|
||||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
p, li { white-space: pre-wrap; }
|
p, li { white-space: pre-wrap; }
|
||||||
</style></head><body style=" font-family:'Noto Sans'; font-size:10pt; font-weight:400; font-style:normal;">
|
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:10.5pt; font-weight:400; font-style:normal;">
|
||||||
<p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">About HECL Frontend</span></p>
|
<p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Sans'; font-size:10pt; font-weight:600;">About HECL Frontend</span></p>
|
||||||
<p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br />The HECL frontend UI is designed and built by <a href="https://axiodl.com"><span style=" text-decoration: underline; color:#007af4;">Axiomatic Data Laboratories</span></a> Copyright 2020<br /><br /><span style=" font-weight:600;">Authors:</span><br />Phillip &quot;Antidote&quot; Stephens<br />Jack &quot;jackoalan&quot; Andersen<br />Luke &quot;encounter&quot; Street</p>
|
<p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Sans'; font-size:10pt;"><br />The HECL frontend UI is designed and built by </span><a href="https://axiodl.com"><span style=" font-family:'Noto Sans'; font-size:10pt; text-decoration: underline; color:#007af4;">Axiomatic Data Laboratories</span></a><span style=" font-family:'Noto Sans'; font-size:10pt;"> Copyright 2020<br /><br /></span><span style=" font-family:'Noto Sans'; font-size:10pt; font-weight:600;">Authors:</span><span style=" font-family:'Noto Sans'; font-size:10pt;"><br />Phillip &quot;Antidote&quot; Stephens<br />Jack &quot;jackoalan&quot; Andersen<br />Luke &quot;encounter&quot; Street</span></p>
|
||||||
<p style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New';">The MIT License</span></p>
|
<p style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New'; font-size:10pt;">The MIT License</span></p>
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Courier New';"><br /></p>
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Courier New'; font-size:10pt;"><br /></p>
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New';">Copyright (c) 2015-2018 URDE Contributors</span></p>
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New'; font-size:10pt;">Copyright (c) 2015-2018 URDE Contributors</span></p>
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New';">Original Authors: Jack Andersen and Phillip &quot;Antidote&quot; Stephens</span></p>
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New'; font-size:10pt;">Original Authors: Jack Andersen and Phillip &quot;Antidote&quot; Stephens</span></p>
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Courier New';"><br /></p>
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Courier New'; font-size:10pt;"><br /></p>
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New';">Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &quot;Software&quot;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</span></p>
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New'; font-size:10pt;">Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &quot;Software&quot;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</span></p>
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Courier New';"><br /></p>
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Courier New'; font-size:10pt;"><br /></p>
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New';">The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</span></p>
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New'; font-size:10pt;">The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</span></p>
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Courier New';"><br /></p>
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Courier New'; font-size:10pt;"><br /></p>
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New';">THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span></p></body></html></string>
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New'; font-size:10pt;">THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="openExternalLinks">
|
<property name="openExternalLinks">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
|
Loading…
Reference in New Issue