forked from len0rd/rockbox
Read release candidate information from build-info.
Change-Id: I73ac0922f25dd247588f945eba1e78f4026d747d
This commit is contained in:
parent
94555a0b08
commit
d3ddad95be
2 changed files with 21 additions and 0 deletions
|
|
@ -32,6 +32,8 @@ const static struct {
|
||||||
} ServerInfoList[] = {
|
} ServerInfoList[] = {
|
||||||
{ ServerInfo::CurReleaseVersion, ":platform:/releaseversion", "" },
|
{ ServerInfo::CurReleaseVersion, ":platform:/releaseversion", "" },
|
||||||
{ ServerInfo::CurReleaseUrl, ":platform:/releaseurl", "" },
|
{ ServerInfo::CurReleaseUrl, ":platform:/releaseurl", "" },
|
||||||
|
{ ServerInfo::RelCandidateVersion, ":platform:/rcversion", "" },
|
||||||
|
{ ServerInfo::RelCandidateUrl, ":platform:/rcurl", "" },
|
||||||
{ ServerInfo::CurStatus, ":platform:/status", "Unknown" },
|
{ ServerInfo::CurStatus, ":platform:/status", "Unknown" },
|
||||||
{ ServerInfo::BleedingRevision, "bleedingrev", "" },
|
{ ServerInfo::BleedingRevision, "bleedingrev", "" },
|
||||||
{ ServerInfo::BleedingDate, "bleedingdate", "" },
|
{ ServerInfo::BleedingDate, "bleedingdate", "" },
|
||||||
|
|
@ -67,6 +69,8 @@ void ServerInfo::readBuildInfo(QString file)
|
||||||
variants = SystemInfo::platforms(SystemInfo::PlatformVariantDisabled, platforms.at(i));
|
variants = SystemInfo::platforms(SystemInfo::PlatformVariantDisabled, platforms.at(i));
|
||||||
QString releaseVersion;
|
QString releaseVersion;
|
||||||
QString releaseUrl;
|
QString releaseUrl;
|
||||||
|
QString relCandidateVersion;
|
||||||
|
QString relCandidateUrl;
|
||||||
info.beginGroup("release");
|
info.beginGroup("release");
|
||||||
if(keys.contains(platforms.at(i))) {
|
if(keys.contains(platforms.at(i))) {
|
||||||
releaseVersion = info.value(platforms.at(i)).toString();
|
releaseVersion = info.value(platforms.at(i)).toString();
|
||||||
|
|
@ -76,6 +80,17 @@ void ServerInfo::readBuildInfo(QString file)
|
||||||
releaseUrl.replace("%RELVERSION%", releaseVersion);
|
releaseUrl.replace("%RELVERSION%", releaseVersion);
|
||||||
}
|
}
|
||||||
info.endGroup();
|
info.endGroup();
|
||||||
|
// "release-candidate" section currently only support the 2nd format.
|
||||||
|
info.beginGroup("release-candidate");
|
||||||
|
if(keys.contains(platforms.at(i))) {
|
||||||
|
QStringList entry = info.value(platforms.at(i)).toStringList();
|
||||||
|
relCandidateVersion = entry.at(0);
|
||||||
|
if(entry.size() > 1) {
|
||||||
|
relCandidateUrl = entry.at(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
info.endGroup();
|
||||||
|
|
||||||
|
|
||||||
info.beginGroup("status");
|
info.beginGroup("status");
|
||||||
QString status = tr("Unknown");
|
QString status = tr("Unknown");
|
||||||
|
|
@ -106,6 +121,10 @@ void ServerInfo::readBuildInfo(QString file)
|
||||||
setPlatformValue(variants.at(j), ServerInfo::CurReleaseVersion, releaseVersion);
|
setPlatformValue(variants.at(j), ServerInfo::CurReleaseVersion, releaseVersion);
|
||||||
setPlatformValue(variants.at(j), ServerInfo::CurReleaseUrl, releaseUrl);
|
setPlatformValue(variants.at(j), ServerInfo::CurReleaseUrl, releaseUrl);
|
||||||
}
|
}
|
||||||
|
if(!relCandidateUrl.isEmpty()) {
|
||||||
|
setPlatformValue(variants.at(j), ServerInfo::RelCandidateVersion, relCandidateVersion);
|
||||||
|
setPlatformValue(variants.at(j), ServerInfo::RelCandidateUrl, relCandidateUrl);
|
||||||
|
}
|
||||||
setPlatformValue(variants.at(j), ServerInfo::CurDevelUrl, develUrl);
|
setPlatformValue(variants.at(j), ServerInfo::CurDevelUrl, develUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,8 @@ class ServerInfo : public QObject
|
||||||
CurDevelUrl,
|
CurDevelUrl,
|
||||||
BleedingRevision,
|
BleedingRevision,
|
||||||
BleedingDate,
|
BleedingDate,
|
||||||
|
RelCandidateVersion,
|
||||||
|
RelCandidateUrl,
|
||||||
};
|
};
|
||||||
|
|
||||||
//! read in buildinfo file
|
//! read in buildinfo file
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue