mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-20 19:57:45 +00:00
Make Dalamud version read more durable and future-proof
This commit is contained in:
parent
019933a103
commit
0658dd9a3e
1 changed files with 4 additions and 4 deletions
|
@ -26,10 +26,10 @@ Profile::Profile(LauncherCore &launcher, const QString &key, QObject *parent)
|
||||||
QJsonDocument doc = QJsonDocument::fromJson(depsJson.readAll());
|
QJsonDocument doc = QJsonDocument::fromJson(depsJson.readAll());
|
||||||
|
|
||||||
QString versionString;
|
QString versionString;
|
||||||
if (doc["targets"].toObject().contains(".NETCoreApp,Version=v5.0")) {
|
for (auto target : doc["targets"].toObject().keys()) {
|
||||||
versionString = doc["targets"].toObject()[".NETCoreApp,Version=v5.0"].toObject().keys().filter("Dalamud")[0];
|
if (target.contains(".NETCoreApp")) {
|
||||||
} else {
|
versionString = doc["targets"].toObject()[target].toObject().keys().filter("Dalamud/")[0];
|
||||||
versionString = doc["targets"].toObject()[".NETCoreApp,Version=v6.0"].toObject().keys().filter("Dalamud")[0];
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dalamudVersion = versionString.remove("Dalamud/");
|
dalamudVersion = versionString.remove("Dalamud/");
|
||||||
|
|
Loading…
Add table
Reference in a new issue