diff --git a/launcher/include/launchercore.h b/launcher/include/launchercore.h index cea0b8f..3ad5ced 100755 --- a/launcher/include/launchercore.h +++ b/launcher/include/launchercore.h @@ -111,7 +111,8 @@ public: [[nodiscard]] bool isLoadingFinished() const; [[nodiscard]] bool isSteam() const; [[nodiscard]] bool isSteamDeck() const; - [[nodiscard]] bool isWindows() const; + [[nodiscard]] static bool isWindows(); + [[nodiscard]] static bool needsCompatibilityTool(); [[nodiscard]] Q_INVOKABLE bool isPatching() const; [[nodiscard]] QNetworkAccessManager *mgr(); diff --git a/launcher/src/assetupdater.cpp b/launcher/src/assetupdater.cpp index 8694ec1..eefa9f5 100644 --- a/launcher/src/assetupdater.cpp +++ b/launcher/src/assetupdater.cpp @@ -31,20 +31,23 @@ QCoro::Task AssetUpdater::update() qInfo(ASTRA_LOG) << "Checking for compatibility tool updates..."; m_dataDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); - const QDir compatibilityToolDir = m_dataDir.absoluteFilePath(QStringLiteral("tool")); - m_wineDir = compatibilityToolDir.absoluteFilePath(QStringLiteral("wine")); - m_dxvkDir = compatibilityToolDir.absoluteFilePath(QStringLiteral("dxvk")); - Utility::createPathIfNeeded(m_wineDir); - Utility::createPathIfNeeded(m_dxvkDir); + if (LauncherCore::needsCompatibilityTool()) { + const QDir compatibilityToolDir = m_dataDir.absoluteFilePath(QStringLiteral("tool")); + m_wineDir = compatibilityToolDir.absoluteFilePath(QStringLiteral("wine")); + m_dxvkDir = compatibilityToolDir.absoluteFilePath(QStringLiteral("dxvk")); - if (m_profile.wineType() == Profile::WineType::BuiltIn && !co_await checkRemoteCompatibilityToolVersion()) { - co_return false; - } + Utility::createPathIfNeeded(m_wineDir); + Utility::createPathIfNeeded(m_dxvkDir); - // TODO: should DXVK be tied to this setting...? - if (m_profile.wineType() == Profile::WineType::BuiltIn && !co_await checkRemoteDxvkVersion()) { - co_return false; + if (m_profile.wineType() == Profile::WineType::BuiltIn && !co_await checkRemoteCompatibilityToolVersion()) { + co_return false; + } + + // TODO: should DXVK be tied to this setting...? + if (m_profile.wineType() == Profile::WineType::BuiltIn && !co_await checkRemoteDxvkVersion()) { + co_return false; + } } if (!m_profile.dalamudEnabled()) { diff --git a/launcher/src/launchercore.cpp b/launcher/src/launchercore.cpp index 0213344..6c4f274 100755 --- a/launcher/src/launchercore.cpp +++ b/launcher/src/launchercore.cpp @@ -302,7 +302,7 @@ bool LauncherCore::isSteamDeck() const } } -bool LauncherCore::isWindows() const +bool LauncherCore::isWindows() { #if defined(Q_OS_WIN) return true; @@ -311,6 +311,11 @@ bool LauncherCore::isWindows() const #endif } +bool LauncherCore::needsCompatibilityTool() +{ + return !isWindows(); +} + bool LauncherCore::isPatching() const { return m_isPatching;