diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2010-06-06 12:56:27 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2010-06-06 12:56:27 +0000 |
commit | 32a2b3e3fa36767fdad90b565fc52a1050b39926 (patch) | |
tree | 6a6aeb1b0bc12ec97444e5bb745bb4a67c4a4b70 | |
parent | 4320310fec2e86433e507cd4120d0551980d88af (diff) |
Transmit installed build revision and release version to theme site.
To allow the theme site handling different versions of the theme syntax
transmit the revision number and release number (whatever applies) to the
server. A later update to the theme site can then return a theme list with
themes compatible, and include the correct download links.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26625 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | rbutil/rbutilqt/rbutil.ini | 2 | ||||
-rw-r--r-- | rbutil/rbutilqt/themesinstallwindow.cpp | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/rbutil/rbutilqt/rbutil.ini b/rbutil/rbutilqt/rbutil.ini index 8fe6395d7c..9e9c872fdd 100644 --- a/rbutil/rbutilqt/rbutil.ini +++ b/rbutil/rbutilqt/rbutil.ini @@ -9,7 +9,7 @@ font_url=http://download.rockbox.org/daily/fonts/rockbox-fonts.zip prog_name=rockbox bootloader_url=http://download.rockbox.org/bootloader themes_url=http://themes.rockbox.org/ -themes_info_url=http://themes.rockbox.org/rbutilqt.php?target=%TARGET% +themes_info_url=http://themes.rockbox.org/rbutilqt.php?target=%TARGET%&release=%RELEASE%&revision=%REVISION%&rbutilver=%RBUTILVER% manual_url=http://download.rockbox.org/daily/manual doom_url=http://download.rockbox.org/useful/rockdoom.zip voice_url=http://download.rockbox.org/daily/voices/ diff --git a/rbutil/rbutilqt/themesinstallwindow.cpp b/rbutil/rbutilqt/themesinstallwindow.cpp index 9a2c126ae8..935c703193 100644 --- a/rbutil/rbutilqt/themesinstallwindow.cpp +++ b/rbutil/rbutilqt/themesinstallwindow.cpp @@ -26,6 +26,8 @@ #include "utils.h" #include "rbsettings.h" #include "systeminfo.h" +#include "rockboxinfo.h" +#include "version.h" ThemesInstallWindow::ThemesInstallWindow(QWidget *parent) : QDialog(parent) { @@ -58,6 +60,18 @@ void ThemesInstallWindow::downloadInfo() { // try to get the current build information getter = new HttpGet(this); + RockboxInfo installInfo + = RockboxInfo(RbSettings::value(RbSettings::Mountpoint).toString()); + QString revision; + QString release; + // installInfo.version() holds either the revision (as r<revision>-<date>) + // or the release version number. + if(installInfo.version().startsWith("r")) { + revision = installInfo.version().remove("r").replace(QRegExp("-.+$"), ""); + } + else { + release = installInfo.version(); + } themesInfo.open(); qDebug() << "[Themes] downloading info to" << themesInfo.fileName(); @@ -66,6 +80,9 @@ void ThemesInstallWindow::downloadInfo() QString infoUrl = SystemInfo::value(SystemInfo::ThemesInfoUrl).toString(); infoUrl.replace("%TARGET%", SystemInfo::value(SystemInfo::CurConfigureModel).toString()); + infoUrl.replace("%REVISION%", revision); + infoUrl.replace("%RELEASE%", release); + infoUrl.replace("%RBUTILVER%", VERSION); QUrl url = QUrl(infoUrl); qDebug() << "[Themes] Info URL:" << url << "Query:" << url.queryItems(); if(RbSettings::value(RbSettings::CacheOffline).toBool()) |