summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/serverinfo.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-06-17 11:21:04 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-06-17 11:21:04 +0200
commitd3ddad95be5acac99b4f6e2a45336cc2b99a2ab2 (patch)
tree235e7681238b6a45b48cd27b3f184bf63c04ded4 /rbutil/rbutilqt/base/serverinfo.cpp
parent94555a0b08534ba6345d8ba65eef808b6e3d1dca (diff)
downloadrockbox-d3ddad95be5acac99b4f6e2a45336cc2b99a2ab2.tar.gz
rockbox-d3ddad95be5acac99b4f6e2a45336cc2b99a2ab2.tar.bz2
rockbox-d3ddad95be5acac99b4f6e2a45336cc2b99a2ab2.zip
Read release candidate information from build-info.
Change-Id: I73ac0922f25dd247588f945eba1e78f4026d747d
Diffstat (limited to 'rbutil/rbutilqt/base/serverinfo.cpp')
-rw-r--r--rbutil/rbutilqt/base/serverinfo.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/base/serverinfo.cpp b/rbutil/rbutilqt/base/serverinfo.cpp
index 4abaeb2aa7..eef7b1bdfe 100644
--- a/rbutil/rbutilqt/base/serverinfo.cpp
+++ b/rbutil/rbutilqt/base/serverinfo.cpp
@@ -32,6 +32,8 @@ const static struct {
} ServerInfoList[] = {
{ ServerInfo::CurReleaseVersion, ":platform:/releaseversion", "" },
{ ServerInfo::CurReleaseUrl, ":platform:/releaseurl", "" },
+ { ServerInfo::RelCandidateVersion, ":platform:/rcversion", "" },
+ { ServerInfo::RelCandidateUrl, ":platform:/rcurl", "" },
{ ServerInfo::CurStatus, ":platform:/status", "Unknown" },
{ ServerInfo::BleedingRevision, "bleedingrev", "" },
{ ServerInfo::BleedingDate, "bleedingdate", "" },
@@ -67,6 +69,8 @@ void ServerInfo::readBuildInfo(QString file)
variants = SystemInfo::platforms(SystemInfo::PlatformVariantDisabled, platforms.at(i));
QString releaseVersion;
QString releaseUrl;
+ QString relCandidateVersion;
+ QString relCandidateUrl;
info.beginGroup("release");
if(keys.contains(platforms.at(i))) {
releaseVersion = info.value(platforms.at(i)).toString();
@@ -76,6 +80,17 @@ void ServerInfo::readBuildInfo(QString file)
releaseUrl.replace("%RELVERSION%", releaseVersion);
}
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");
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::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);
}
}