summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/serverinfo.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-06-18 23:16:17 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-06-18 23:18:32 +0200
commit4f4e1d1f0ea3dd23dc2571716a5959ca4fe3273a (patch)
treefab150784747872e0afa20faa499b47e55c9fdf1 /rbutil/rbutilqt/base/serverinfo.cpp
parentbeb61a93c58a2f97bc3f297ffdf3026b846fccca (diff)
downloadrockbox-4f4e1d1f0ea3dd23dc2571716a5959ca4fe3273a.tar.gz
rockbox-4f4e1d1f0ea3dd23dc2571716a5959ca4fe3273a.tar.bz2
rockbox-4f4e1d1f0ea3dd23dc2571716a5959ca4fe3273a.zip
Move constructing manual URL to ServerInfo class.
Change-Id: I4d2605b2389b4378e8311fc82057974e0eb238e6
Diffstat (limited to 'rbutil/rbutilqt/base/serverinfo.cpp')
-rw-r--r--rbutil/rbutilqt/base/serverinfo.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/base/serverinfo.cpp b/rbutil/rbutilqt/base/serverinfo.cpp
index fd46f13a8b..8d91309e66 100644
--- a/rbutil/rbutilqt/base/serverinfo.cpp
+++ b/rbutil/rbutilqt/base/serverinfo.cpp
@@ -35,6 +35,9 @@ const static struct {
{ ServerInfo::RelCandidateVersion, ":platform:/rcversion", "" },
{ ServerInfo::RelCandidateUrl, ":platform:/rcurl", "" },
{ ServerInfo::CurStatus, ":platform:/status", "Unknown" },
+ { ServerInfo::ManualPdfUrl, ":platform:/manual_pdf", "" },
+ { ServerInfo::ManualHtmlUrl, ":platform:/manual_html", "" },
+ { ServerInfo::ManualZipUrl, ":platform:/manual_zip", "" },
{ ServerInfo::BleedingRevision, "bleedingrev", "" },
{ ServerInfo::BleedingDate, "bleedingdate", "" },
{ ServerInfo::CurDevelUrl, ":platform:/develurl", "" },
@@ -126,6 +129,28 @@ void ServerInfo::readBuildInfo(QString file)
break;
}
info.endGroup();
+
+ // manual URLs
+ QString manualPdfUrl = manualBaseUrl;
+ QString manualHtmlUrl = manualBaseUrl;
+ QString manualZipUrl = manualBaseUrl;
+
+ QString buildservermodel = SystemInfo::platformValue(platforms.at(i),
+ SystemInfo::CurBuildserverModel).toString();
+ QString modelman = SystemInfo::platformValue(platforms.at(i),
+ SystemInfo::CurManual).toString();
+ QString manualBaseName = "rockbox-";
+
+ if(modelman.isEmpty()) manualBaseName += buildservermodel;
+ else manualBaseName += modelman;
+
+ manualPdfUrl.replace("%EXTENSION%", "pdf");
+ manualPdfUrl.replace("%MANUALBASENAME%", manualBaseName);
+ manualHtmlUrl.replace("%EXTENSION%", "html");
+ manualHtmlUrl.replace("%MANUALBASENAME%", manualBaseName + "/rockbox-build");
+ manualZipUrl.replace("%EXTENSION%", "zip");
+ manualZipUrl.replace("%MANUALBASENAME%", manualBaseName + "-html");
+
// set variants (if any)
for(int j = 0; j < variants.size(); ++j) {
setPlatformValue(variants.at(j), ServerInfo::CurStatus, status);
@@ -138,6 +163,10 @@ void ServerInfo::readBuildInfo(QString file)
setPlatformValue(variants.at(j), ServerInfo::RelCandidateUrl, relCandidateUrl);
}
setPlatformValue(variants.at(j), ServerInfo::CurDevelUrl, develUrl);
+
+ setPlatformValue(variants.at(j), ServerInfo::ManualPdfUrl, manualPdfUrl);
+ setPlatformValue(variants.at(j), ServerInfo::ManualHtmlUrl, manualHtmlUrl);
+ setPlatformValue(variants.at(j), ServerInfo::ManualZipUrl, manualZipUrl);
}
}
}