mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-21 20:27:45 +00:00
Only add hashes for files that exist
This allows older 32-bit clients to work again, without additional configuration.
This commit is contained in:
parent
8e4c032b3c
commit
c8a81af967
1 changed files with 5 additions and 16 deletions
|
@ -18,10 +18,6 @@
|
||||||
#include "launchercore.h"
|
#include "launchercore.h"
|
||||||
#include "utility.h"
|
#include "utility.h"
|
||||||
|
|
||||||
// Support for the 32-bit DX9 client was removed in March 2024
|
|
||||||
// TODO: we should probably detect this automatically
|
|
||||||
#define SUPPORT_32BIT 0
|
|
||||||
|
|
||||||
using namespace Qt::StringLiterals;
|
using namespace Qt::StringLiterals;
|
||||||
|
|
||||||
SquareEnixLogin::SquareEnixLogin(LauncherCore &window, QObject *parent)
|
SquareEnixLogin::SquareEnixLogin(LauncherCore &window, QObject *parent)
|
||||||
|
@ -336,8 +332,6 @@ QCoro::Task<bool> SquareEnixLogin::registerSession()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
qInfo() << report;
|
|
||||||
|
|
||||||
Utility::printRequest(QStringLiteral("POST"), request);
|
Utility::printRequest(QStringLiteral("POST"), request);
|
||||||
|
|
||||||
const auto reply = m_launcher.mgr()->post(request, report.toUtf8());
|
const auto reply = m_launcher.mgr()->post(request, report.toUtf8());
|
||||||
|
@ -390,19 +384,12 @@ QCoro::Task<bool> SquareEnixLogin::registerSession()
|
||||||
|
|
||||||
QCoro::Task<QString> SquareEnixLogin::getBootHash()
|
QCoro::Task<QString> SquareEnixLogin::getBootHash()
|
||||||
{
|
{
|
||||||
#if SUPPORT_32BIT
|
|
||||||
const QList<QString> fileList = {QStringLiteral("ffxivboot.exe"),
|
const QList<QString> fileList = {QStringLiteral("ffxivboot.exe"),
|
||||||
QStringLiteral("ffxivboot64.exe"),
|
QStringLiteral("ffxivboot64.exe"),
|
||||||
QStringLiteral("ffxivlauncher.exe"),
|
QStringLiteral("ffxivlauncher.exe"),
|
||||||
QStringLiteral("ffxivlauncher64.exe"),
|
QStringLiteral("ffxivlauncher64.exe"),
|
||||||
QStringLiteral("ffxivupdater.exe"),
|
QStringLiteral("ffxivupdater.exe"),
|
||||||
QStringLiteral("ffxivupdater64.exe")};
|
QStringLiteral("ffxivupdater64.exe")};
|
||||||
#else
|
|
||||||
const QList<QString> fileList = {QStringLiteral("ffxivboot.exe"),
|
|
||||||
QStringLiteral("ffxivboot64.exe"),
|
|
||||||
QStringLiteral("ffxivlauncher64.exe"),
|
|
||||||
QStringLiteral("ffxivupdater64.exe")};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const auto hashFuture = QtConcurrent::mapped(fileList, [this](const auto &filename) -> QString {
|
const auto hashFuture = QtConcurrent::mapped(fileList, [this](const auto &filename) -> QString {
|
||||||
return getFileHash(m_info->profile->gamePath() + QStringLiteral("/boot/") + filename);
|
return getFileHash(m_info->profile->gamePath() + QStringLiteral("/boot/") + filename);
|
||||||
|
@ -413,11 +400,13 @@ QCoro::Task<QString> SquareEnixLogin::getBootHash()
|
||||||
|
|
||||||
QString result;
|
QString result;
|
||||||
for (int i = 0; i < fileList.count(); i++) {
|
for (int i = 0; i < fileList.count(); i++) {
|
||||||
|
if (!hashes[i].isEmpty()) {
|
||||||
result += fileList[i] + QStringLiteral("/") + hashes[i];
|
result += fileList[i] + QStringLiteral("/") + hashes[i];
|
||||||
|
|
||||||
if (i != fileList.length() - 1)
|
if (i != fileList.length() - 1)
|
||||||
result += QStringLiteral(",");
|
result += QStringLiteral(",");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
co_return result;
|
co_return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue