mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-21 04:07:46 +00:00
Move Dalamud version info reading to it's own function in Profile
This commit is contained in:
parent
f6c418d7d6
commit
092e13e513
1 changed files with 5 additions and 6 deletions
|
@ -21,7 +21,11 @@ Profile::Profile(LauncherCore &launcher, const QString &key, QObject *parent)
|
||||||
{
|
{
|
||||||
readGameVersion();
|
readGameVersion();
|
||||||
readWineInfo();
|
readWineInfo();
|
||||||
|
readDalamudInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Profile::readDalamudInfo()
|
||||||
|
{
|
||||||
const QDir dataDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
|
const QDir dataDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
|
||||||
|
|
||||||
const QDir dalamudDir = dataDir.absoluteFilePath(QStringLiteral("dalamud"));
|
const QDir dalamudDir = dataDir.absoluteFilePath(QStringLiteral("dalamud"));
|
||||||
|
@ -132,17 +136,13 @@ QString Profile::winePath() const
|
||||||
switch (wineType()) {
|
switch (wineType()) {
|
||||||
case WineType::System: // system wine
|
case WineType::System: // system wine
|
||||||
return "/usr/local/bin/wine64";
|
return "/usr/local/bin/wine64";
|
||||||
break;
|
|
||||||
case WineType::Custom: // custom path
|
case WineType::Custom: // custom path
|
||||||
return m_config->winePath();
|
return m_config->winePath();
|
||||||
break;
|
|
||||||
case WineType::Builtin: // ffxiv built-in (for mac users)
|
case WineType::Builtin: // ffxiv built-in (for mac users)
|
||||||
return "/Applications/FINAL FANTASY XIV "
|
return "/Applications/FINAL FANTASY XIV "
|
||||||
"ONLINE.app/Contents/SharedSupport/finalfantasyxiv/FINAL FANTASY XIV ONLINE/wine";
|
"ONLINE.app/Contents/SharedSupport/finalfantasyxiv/FINAL FANTASY XIV ONLINE/wine";
|
||||||
break;
|
|
||||||
case WineType::XIVOnMac:
|
case WineType::XIVOnMac:
|
||||||
return "/Applications/XIV on Mac.app/Contents/Resources/wine/bin/wine64";
|
return "/Applications/XIV on Mac.app/Contents/Resources/wine/bin/wine64";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -150,11 +150,10 @@ QString Profile::winePath() const
|
||||||
switch (wineType()) {
|
switch (wineType()) {
|
||||||
case WineType::System: // system wine (should be in $PATH)
|
case WineType::System: // system wine (should be in $PATH)
|
||||||
return QStringLiteral("wine");
|
return QStringLiteral("wine");
|
||||||
break;
|
|
||||||
case WineType::Custom: // custom pth
|
case WineType::Custom: // custom pth
|
||||||
return m_config->winePath();
|
return m_config->winePath();
|
||||||
default:
|
default:
|
||||||
break;
|
return {};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue