summaryrefslogtreecommitdiff
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2010-06-06 12:56:27 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2010-06-06 12:56:27 +0000
commit32a2b3e3fa36767fdad90b565fc52a1050b39926 (patch)
tree6a6aeb1b0bc12ec97444e5bb745bb4a67c4a4b70 /rbutil
parent4320310fec2e86433e507cd4120d0551980d88af (diff)
downloadrockbox-32a2b3e3fa36767fdad90b565fc52a1050b39926.tar.gz
rockbox-32a2b3e3fa36767fdad90b565fc52a1050b39926.zip
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
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/rbutil.ini2
-rw-r--r--rbutil/rbutilqt/themesinstallwindow.cpp17
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
9prog_name=rockbox 9prog_name=rockbox
10bootloader_url=http://download.rockbox.org/bootloader 10bootloader_url=http://download.rockbox.org/bootloader
11themes_url=http://themes.rockbox.org/ 11themes_url=http://themes.rockbox.org/
12themes_info_url=http://themes.rockbox.org/rbutilqt.php?target=%TARGET% 12themes_info_url=http://themes.rockbox.org/rbutilqt.php?target=%TARGET%&release=%RELEASE%&revision=%REVISION%&rbutilver=%RBUTILVER%
13manual_url=http://download.rockbox.org/daily/manual 13manual_url=http://download.rockbox.org/daily/manual
14doom_url=http://download.rockbox.org/useful/rockdoom.zip 14doom_url=http://download.rockbox.org/useful/rockdoom.zip
15voice_url=http://download.rockbox.org/daily/voices/ 15voice_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 @@
26#include "utils.h" 26#include "utils.h"
27#include "rbsettings.h" 27#include "rbsettings.h"
28#include "systeminfo.h" 28#include "systeminfo.h"
29#include "rockboxinfo.h"
30#include "version.h"
29 31
30ThemesInstallWindow::ThemesInstallWindow(QWidget *parent) : QDialog(parent) 32ThemesInstallWindow::ThemesInstallWindow(QWidget *parent) : QDialog(parent)
31{ 33{
@@ -58,6 +60,18 @@ void ThemesInstallWindow::downloadInfo()
58{ 60{
59 // try to get the current build information 61 // try to get the current build information
60 getter = new HttpGet(this); 62 getter = new HttpGet(this);
63 RockboxInfo installInfo
64 = RockboxInfo(RbSettings::value(RbSettings::Mountpoint).toString());
65 QString revision;
66 QString release;
67 // installInfo.version() holds either the revision (as r<revision>-<date>)
68 // or the release version number.
69 if(installInfo.version().startsWith("r")) {
70 revision = installInfo.version().remove("r").replace(QRegExp("-.+$"), "");
71 }
72 else {
73 release = installInfo.version();
74 }
61 75
62 themesInfo.open(); 76 themesInfo.open();
63 qDebug() << "[Themes] downloading info to" << themesInfo.fileName(); 77 qDebug() << "[Themes] downloading info to" << themesInfo.fileName();
@@ -66,6 +80,9 @@ void ThemesInstallWindow::downloadInfo()
66 QString infoUrl = SystemInfo::value(SystemInfo::ThemesInfoUrl).toString(); 80 QString infoUrl = SystemInfo::value(SystemInfo::ThemesInfoUrl).toString();
67 infoUrl.replace("%TARGET%", 81 infoUrl.replace("%TARGET%",
68 SystemInfo::value(SystemInfo::CurConfigureModel).toString()); 82 SystemInfo::value(SystemInfo::CurConfigureModel).toString());
83 infoUrl.replace("%REVISION%", revision);
84 infoUrl.replace("%RELEASE%", release);
85 infoUrl.replace("%RBUTILVER%", VERSION);
69 QUrl url = QUrl(infoUrl); 86 QUrl url = QUrl(infoUrl);
70 qDebug() << "[Themes] Info URL:" << url << "Query:" << url.queryItems(); 87 qDebug() << "[Themes] Info URL:" << url << "Query:" << url.queryItems();
71 if(RbSettings::value(RbSettings::CacheOffline).toBool()) 88 if(RbSettings::value(RbSettings::CacheOffline).toBool())