forked from len0rd/rockbox
Move constructing manual URL to ServerInfo class.
Change-Id: I4d2605b2389b4378e8311fc82057974e0eb238e6
This commit is contained in:
parent
beb61a93c5
commit
4f4e1d1f0e
5 changed files with 39 additions and 50 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@ class ServerInfo : public QObject
|
|||
CurStatus,
|
||||
CurReleaseUrl,
|
||||
CurDevelUrl,
|
||||
ManualPdfUrl,
|
||||
ManualHtmlUrl,
|
||||
ManualZipUrl,
|
||||
BleedingRevision,
|
||||
BleedingDate,
|
||||
RelCandidateVersion,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue