1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-05-06 02:37:45 +00:00

Allow configuring the platform, boot and game update channels

This commit is contained in:
Joshua Goins 2025-05-04 12:27:37 -04:00
parent 02a44b0247
commit 74a3c5f5d2
3 changed files with 58 additions and 6 deletions

View file

@ -69,5 +69,14 @@ SPDX-License-Identifier: CC0-1.0
<entry key="AllowPatching" type="bool"> <entry key="AllowPatching" type="bool">
<default>true</default> <default>true</default>
</entry> </entry>
<entry key="Platform" type="String">
<default>win32</default>
</entry>
<entry key="BootUpdateChannel" type="String">
<default>ffxivneo_release_boot</default>
</entry>
<entry key="GameUpdateChannel" type="String">
<default>ffxivneo_release_game</default>
</entry>
</group> </group>
</kcfg> </kcfg>

View file

@ -20,10 +20,6 @@
#include "profileconfig.h" #include "profileconfig.h"
#include "utility.h" #include "utility.h"
const QString platform = QStringLiteral("win32");
const QString bootUpdateChannel = QStringLiteral("ffxivneo_release_boot");
const QString gameUpdateChannel = QStringLiteral("ffxivneo_release_game");
const QByteArray patchUserAgent = QByteArrayLiteral("FFXIV PATCH CLIENT"); const QByteArray patchUserAgent = QByteArrayLiteral("FFXIV PATCH CLIENT");
const QByteArray macosPatchUserAgent = QByteArrayLiteral("FFXIV-MAC PATCH CLIEN"); const QByteArray macosPatchUserAgent = QByteArrayLiteral("FFXIV-MAC PATCH CLIEN");
@ -168,7 +164,8 @@ QCoro::Task<bool> SquareEnixLogin::checkBootUpdates()
QUrl url; QUrl url;
url.setScheme(QStringLiteral("http")); url.setScheme(QStringLiteral("http"));
url.setHost(QStringLiteral("patch-bootver.%1").arg(m_info->profile->account()->config()->oldServer())); url.setHost(QStringLiteral("patch-bootver.%1").arg(m_info->profile->account()->config()->oldServer()));
url.setPath(QStringLiteral("/http/%1/%2/%3/").arg(platform, bootUpdateChannel, m_info->profile->bootVersion())); url.setPath(QStringLiteral("/http/%1/%2/%3/")
.arg(m_info->profile->config()->platform(), m_info->profile->config()->bootUpdateChannel(), m_info->profile->bootVersion()));
url.setQuery(query); url.setQuery(query);
auto request = QNetworkRequest(url); auto request = QNetworkRequest(url);
@ -362,7 +359,8 @@ QCoro::Task<bool> SquareEnixLogin::registerSession()
QUrl url; QUrl url;
url.setScheme(m_info->profile->account()->config()->preferredProtocol()); url.setScheme(m_info->profile->account()->config()->preferredProtocol());
url.setHost(QStringLiteral("patch-gamever.%1").arg(m_info->profile->account()->config()->oldServer())); url.setHost(QStringLiteral("patch-gamever.%1").arg(m_info->profile->account()->config()->oldServer()));
url.setPath(QStringLiteral("/http/%1/%2/%3/%4").arg(platform, gameUpdateChannel, m_info->profile->baseGameVersion(), m_SID)); url.setPath(QStringLiteral("/http/%1/%2/%3/%4")
.arg(m_info->profile->config()->platform(), m_info->profile->config()->gameUpdateChannel(), m_info->profile->baseGameVersion(), m_SID));
auto request = QNetworkRequest(url); auto request = QNetworkRequest(url);
Utility::setSSL(request); Utility::setSSL(request);

View file

@ -47,6 +47,10 @@ FormCard.FormCardPage {
Kirigami.Action { Kirigami.Action {
id: dalamudAction id: dalamudAction
text: i18n("Dalamud") text: i18n("Dalamud")
},
Kirigami.Action {
id: developerAction
text: i18n("Developer")
} }
] ]
@ -245,6 +249,47 @@ FormCard.FormCardPage {
} }
} }
FormCard.FormCard {
visible: developerAction.checked
Layout.fillWidth: true
Layout.topMargin: Kirigami.Units.largeSpacing * 4
FormCard.FormTextFieldDelegate {
id: platformDelegate
label: i18n("Platform")
text: page.profile.config.platform
onTextChanged: page.profile.config.platform = text
}
FormCard.FormDelegateSeparator {
above: platformDelegate
below: bootUpdateChannel
}
FormCard.FormTextFieldDelegate {
id: bootUpdateChannel
label: i18n("Boot Update Channel")
text: page.profile.config.bootUpdateChannel
onTextChanged: page.profile.config.bootUpdateChannel = text
}
FormCard.FormDelegateSeparator {
above: bootUpdateChannel
below: gameUpdateChannel
}
FormCard.FormTextFieldDelegate {
id: gameUpdateChannel
label: i18n("Game Update Channel")
text: page.profile.config.gameUpdateChannel
onTextChanged: page.profile.config.gameUpdateChannel = text
}
}
Kirigami.PromptDialog { Kirigami.PromptDialog {
id: deletePrompt id: deletePrompt