1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-21 04:07:46 +00:00

Don't install compatibility tool on Windows

This commit is contained in:
Joshua Goins 2024-05-18 14:26:33 -04:00
parent 474bd19337
commit f5f143466b
3 changed files with 22 additions and 13 deletions

View file

@ -111,7 +111,8 @@ public:
[[nodiscard]] bool isLoadingFinished() const; [[nodiscard]] bool isLoadingFinished() const;
[[nodiscard]] bool isSteam() const; [[nodiscard]] bool isSteam() const;
[[nodiscard]] bool isSteamDeck() const; [[nodiscard]] bool isSteamDeck() const;
[[nodiscard]] bool isWindows() const; [[nodiscard]] static bool isWindows();
[[nodiscard]] static bool needsCompatibilityTool();
[[nodiscard]] Q_INVOKABLE bool isPatching() const; [[nodiscard]] Q_INVOKABLE bool isPatching() const;
[[nodiscard]] QNetworkAccessManager *mgr(); [[nodiscard]] QNetworkAccessManager *mgr();

View file

@ -31,6 +31,8 @@ QCoro::Task<bool> AssetUpdater::update()
qInfo(ASTRA_LOG) << "Checking for compatibility tool updates..."; qInfo(ASTRA_LOG) << "Checking for compatibility tool updates...";
m_dataDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); m_dataDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
if (LauncherCore::needsCompatibilityTool()) {
const QDir compatibilityToolDir = m_dataDir.absoluteFilePath(QStringLiteral("tool")); const QDir compatibilityToolDir = m_dataDir.absoluteFilePath(QStringLiteral("tool"));
m_wineDir = compatibilityToolDir.absoluteFilePath(QStringLiteral("wine")); m_wineDir = compatibilityToolDir.absoluteFilePath(QStringLiteral("wine"));
m_dxvkDir = compatibilityToolDir.absoluteFilePath(QStringLiteral("dxvk")); m_dxvkDir = compatibilityToolDir.absoluteFilePath(QStringLiteral("dxvk"));
@ -46,6 +48,7 @@ QCoro::Task<bool> AssetUpdater::update()
if (m_profile.wineType() == Profile::WineType::BuiltIn && !co_await checkRemoteDxvkVersion()) { if (m_profile.wineType() == Profile::WineType::BuiltIn && !co_await checkRemoteDxvkVersion()) {
co_return false; co_return false;
} }
}
if (!m_profile.dalamudEnabled()) { if (!m_profile.dalamudEnabled()) {
co_return true; co_return true;

View file

@ -302,7 +302,7 @@ bool LauncherCore::isSteamDeck() const
} }
} }
bool LauncherCore::isWindows() const bool LauncherCore::isWindows()
{ {
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
return true; return true;
@ -311,6 +311,11 @@ bool LauncherCore::isWindows() const
#endif #endif
} }
bool LauncherCore::needsCompatibilityTool()
{
return !isWindows();
}
bool LauncherCore::isPatching() const bool LauncherCore::isPatching() const
{ {
return m_isPatching; return m_isPatching;