summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/base
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
parentbeb61a93c58a2f97bc3f297ffdf3026b846fccca (diff)
Move constructing manual URL to ServerInfo class.
Change-Id: I4d2605b2389b4378e8311fc82057974e0eb238e6
Diffstat (limited to 'rbutil/rbutilqt/base')
-rw-r--r--rbutil/rbutilqt/base/serverinfo.cpp29
-rw-r--r--rbutil/rbutilqt/base/serverinfo.h3
2 files changed, 32 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);
}
}
}
diff --git a/rbutil/rbutilqt/base/serverinfo.h b/rbutil/rbutilqt/base/serverinfo.h
index ea68fd7fc4..94b2818f73 100644
--- a/rbutil/rbutilqt/base/serverinfo.h
+++ b/rbutil/rbutilqt/base/serverinfo.h
@@ -34,6 +34,9 @@ class ServerInfo : public QObject
CurStatus,
CurReleaseUrl,
CurDevelUrl,
+ ManualPdfUrl,
+ ManualHtmlUrl,
+ ManualZipUrl,
BleedingRevision,
BleedingDate,
RelCandidateVersion,