mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-21 12:17:45 +00:00
Add a way to use local, non-updatable Dalamud versions
You can now plop your own custom Dalamud installation into a "local" folder under %APPDATA\dalamud and Astra will use it without question. It won't update it or perform any game version checks.
This commit is contained in:
parent
d51ba16e5c
commit
dfabcd6cd9
4 changed files with 15 additions and 8 deletions
|
@ -51,7 +51,7 @@ public:
|
|||
enum class WineType { BuiltIn, Custom };
|
||||
Q_ENUM(WineType)
|
||||
|
||||
enum class DalamudChannel { Stable, Staging };
|
||||
enum class DalamudChannel { Stable, Staging, Local };
|
||||
Q_ENUM(DalamudChannel)
|
||||
|
||||
enum class DalamudInjectMethod { Entrypoint, DLLInject };
|
||||
|
|
|
@ -65,12 +65,16 @@ QCoro::Task<bool> AssetUpdater::update()
|
|||
Utility::createPathIfNeeded(m_dalamudAssetDir);
|
||||
Utility::createPathIfNeeded(m_dalamudRuntimeDir);
|
||||
|
||||
if (!co_await checkRemoteDalamudAssetVersion()) {
|
||||
co_return false;
|
||||
}
|
||||
if (m_profile.dalamudChannel() != Profile::DalamudChannel::Local) {
|
||||
if (!co_await checkRemoteDalamudAssetVersion()) {
|
||||
co_return false;
|
||||
}
|
||||
|
||||
if (!co_await checkRemoteDalamudVersion()) {
|
||||
co_return false;
|
||||
if (!co_await checkRemoteDalamudVersion()) {
|
||||
co_return false;
|
||||
}
|
||||
} else {
|
||||
qInfo(ASTRA_LOG) << "Using a local Dalamud installation, skipping version checks!";
|
||||
}
|
||||
|
||||
co_return true;
|
||||
|
|
|
@ -493,6 +493,8 @@ QString Profile::dalamudChannelName() const
|
|||
return QStringLiteral("stable");
|
||||
case DalamudChannel::Staging:
|
||||
return QStringLiteral("staging");
|
||||
case DalamudChannel::Local:
|
||||
return QStringLiteral("local");
|
||||
}
|
||||
|
||||
Q_UNREACHABLE();
|
||||
|
@ -563,7 +565,8 @@ void Profile::setDalamudApplicable(bool applicable)
|
|||
|
||||
bool Profile::dalamudShouldLaunch() const
|
||||
{
|
||||
return dalamudEnabled() && m_dalamudApplicable;
|
||||
// Local Dalamud installations can always run
|
||||
return dalamudEnabled() && (dalamudChannel() != DalamudChannel::Local ? m_dalamudApplicable : true);
|
||||
}
|
||||
|
||||
QString Profile::compatibilityToolVersion() const
|
||||
|
|
|
@ -238,7 +238,7 @@ FormCard.FormCardPage {
|
|||
id: dalamudChannelDelegate
|
||||
|
||||
text: i18n("Update Channel")
|
||||
model: [i18n("Stable"), i18n("Staging")]
|
||||
model: LauncherCore.settings.showDevTools ? [i18n("Stable"), i18n("Staging"), i18n("Local")] : [i18n("Stable"), i18n("Staging")]
|
||||
currentIndex: page.profile.dalamudChannel
|
||||
onCurrentIndexChanged: page.profile.dalamudChannel = currentIndex
|
||||
enabled: page.profile.dalamudEnabled
|
||||
|
|
Loading…
Add table
Reference in a new issue