diff --git a/launcher/include/profile.h b/launcher/include/profile.h index 0fac726..bacc85a 100644 --- a/launcher/include/profile.h +++ b/launcher/include/profile.h @@ -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 }; diff --git a/launcher/src/assetupdater.cpp b/launcher/src/assetupdater.cpp index bc70de7..30a49b5 100644 --- a/launcher/src/assetupdater.cpp +++ b/launcher/src/assetupdater.cpp @@ -65,12 +65,16 @@ QCoro::Task 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; diff --git a/launcher/src/profile.cpp b/launcher/src/profile.cpp index 80fab33..d7fec27 100644 --- a/launcher/src/profile.cpp +++ b/launcher/src/profile.cpp @@ -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 diff --git a/launcher/ui/Settings/ProfileSettings.qml b/launcher/ui/Settings/ProfileSettings.qml index 0b26a6d..143b372 100644 --- a/launcher/ui/Settings/ProfileSettings.qml +++ b/launcher/ui/Settings/ProfileSettings.qml @@ -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