mirror of https://github.com/AxioDL/metaforce.git
More complete package step verification
This commit is contained in:
parent
1b2ee6749d
commit
2fd21e3270
|
@ -10,6 +10,8 @@ find_package(Qt5Xml)
|
|||
|
||||
if(APPLE)
|
||||
set(PLAT_SRCS MacOSSystemVersion.hpp MacOSSystemVersion.mm)
|
||||
set_source_files_properties(MacOSSystemVersion.mm
|
||||
PROPERTIES COMPILE_FLAGS -fobjc-arc)
|
||||
find_library(FOUNDATION_LIBRARY Foundation)
|
||||
set(PLAT_LIBS ${FOUNDATION_LIBRARY})
|
||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <Foundation/Foundation.h>
|
||||
|
||||
#if !__has_feature(objc_arc)
|
||||
#error ARC Required
|
||||
#endif
|
||||
|
||||
void GetMacOSSystemVersion(int& major, int& minor, int& patch)
|
||||
{
|
||||
major = 0;
|
||||
|
|
|
@ -317,7 +317,7 @@ void MainWindow::enableOperations()
|
|||
if (QFile::exists(m_path + "/MP1/!original_ids.yaml"))
|
||||
{
|
||||
m_ui->packageBtn->setEnabled(true);
|
||||
if (QFile::exists(m_path + "/out/MP1/!original_ids.upak"))
|
||||
if (isPackageComplete())
|
||||
m_ui->launchBtn->setEnabled(true);
|
||||
}
|
||||
|
||||
|
@ -331,6 +331,30 @@ void MainWindow::enableOperations()
|
|||
insertContinueNote("Press 'Extract' to begin.");
|
||||
}
|
||||
|
||||
bool MainWindow::isPackageComplete() const
|
||||
{
|
||||
return
|
||||
QFile::exists(m_path + "/out/MP1/!original_ids.upak") &&
|
||||
QFile::exists(m_path + "/out/MP1/AudioGrp.upak") &&
|
||||
QFile::exists(m_path + "/out/MP1/GGuiSys.upak") &&
|
||||
QFile::exists(m_path + "/out/MP1/Metroid1.upak") &&
|
||||
QFile::exists(m_path + "/out/MP1/Metroid2.upak") &&
|
||||
QFile::exists(m_path + "/out/MP1/Metroid3.upak") &&
|
||||
QFile::exists(m_path + "/out/MP1/Metroid4.upak") &&
|
||||
QFile::exists(m_path + "/out/MP1/metroid5.upak") &&
|
||||
QFile::exists(m_path + "/out/MP1/Metroid6.upak") &&
|
||||
QFile::exists(m_path + "/out/MP1/Metroid7.upak") &&
|
||||
QFile::exists(m_path + "/out/MP1/Metroid8.upak") &&
|
||||
QFile::exists(m_path + "/out/MP1/MidiData.upak") &&
|
||||
QFile::exists(m_path + "/out/MP1/MiscData.upak") &&
|
||||
QFile::exists(m_path + "/out/MP1/NoARAM.upak") &&
|
||||
QFile::exists(m_path + "/out/MP1/SamGunFx.upak") &&
|
||||
QFile::exists(m_path + "/out/MP1/SamusGun.upak") &&
|
||||
QFile::exists(m_path + "/out/MP1/SlideShow.upak") &&
|
||||
QFile::exists(m_path + "/out/MP1/TestAnim.upak") &&
|
||||
QFile::exists(m_path + "/out/MP1/Tweaks.upak");
|
||||
}
|
||||
|
||||
static bool GetDLPackage(const QString& path, QString& dlPackage)
|
||||
{
|
||||
QProcess proc;
|
||||
|
@ -464,7 +488,6 @@ void MainWindow::initSlots()
|
|||
connect(&m_heclProc, &QProcess::readyRead, [=](){
|
||||
QByteArray bytes = m_heclProc.readAll();
|
||||
setTextTermFormatting(bytes);
|
||||
m_ui->processOutput->ensureCursorVisible();
|
||||
});
|
||||
|
||||
connect(m_ui->extractBtn, SIGNAL(clicked()), this, SLOT(onExtract()));
|
||||
|
@ -519,6 +542,7 @@ void MainWindow::setTextTermFormatting(const QString& text)
|
|||
}
|
||||
}
|
||||
m_cursor.setCharFormat(defaultTextCharFormat);
|
||||
m_ui->processOutput->ensureCursorVisible();
|
||||
}
|
||||
|
||||
void MainWindow::insertContinueNote(const QString& text)
|
||||
|
@ -532,4 +556,5 @@ void MainWindow::insertContinueNote(const QString& text)
|
|||
textCharFormat.setForeground(QColor(0,255,0));
|
||||
m_cursor.insertText(text, textCharFormat);
|
||||
m_cursor.insertBlock();
|
||||
m_ui->processOutput->ensureCursorVisible();
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ private:
|
|||
void onBinaryFailed();
|
||||
void disableOperations();
|
||||
void enableOperations();
|
||||
bool isPackageComplete() const;
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_HPP
|
||||
|
|
|
@ -120,7 +120,7 @@ SysReqTableModel::SysReqTableModel(QObject* parent)
|
|||
#else
|
||||
m_memorySize = uint64_t(sysconf(_SC_PHYS_PAGES)) * sysconf(_SC_PAGESIZE);
|
||||
#endif
|
||||
m_memorySizeStr.sprintf("%g GB", m_memorySize / 1024.f / 1024.f / 1024.f);
|
||||
m_memorySizeStr.sprintf("%g GiB", m_memorySize / 1024.f / 1024.f / 1024.f);
|
||||
#ifdef __APPLE__
|
||||
GetMacOSSystemVersion(m_macosMajor, m_macosMinor, m_macosPatch);
|
||||
if (m_macosPatch == 0)
|
||||
|
@ -213,7 +213,7 @@ QVariant SysReqTableModel::data(const QModelIndex& index, int role) const
|
|||
case 1:
|
||||
return QStringLiteral("1.5 GHz");
|
||||
case 2:
|
||||
return QStringLiteral("3 GB");
|
||||
return QStringLiteral("3 GiB");
|
||||
case 3:
|
||||
return QStringLiteral("16 GB (MP1)");
|
||||
case 4:
|
||||
|
|
Loading…
Reference in New Issue