mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-20 19:57:45 +00:00
Don't install compatibility tool on Windows
This commit is contained in:
parent
474bd19337
commit
f5f143466b
3 changed files with 22 additions and 13 deletions
|
@ -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();
|
||||
|
|
|
@ -31,20 +31,23 @@ QCoro::Task<bool> 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()) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue