summaryrefslogtreecommitdiff
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-06-03 00:50:01 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-06-03 00:50:01 +0200
commitf4b0e316c3da6b4f1693d645cd62bdb57fe2b6c2 (patch)
tree86282c2f8bce481e4c5bf396a9c5357678930788 /rbutil
parentb73c9616830df6337c0c426ca0e4e1a6cd54cdf6 (diff)
Update for single build-info file.
The server now provides a single build-info file (instead of two separate ones for development builds and stable releases). Update to use the new file, since it simplifies things. Change-Id: If3b949f4d78eecb54e47622da887f51005f6d155
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/base/serverinfo.cpp23
-rw-r--r--rbutil/rbutilqt/base/serverinfo.h9
-rw-r--r--rbutil/rbutilqt/base/systeminfo.cpp3
-rw-r--r--rbutil/rbutilqt/base/systeminfo.h3
-rw-r--r--rbutil/rbutilqt/gui/manualwidget.cpp4
-rw-r--r--rbutil/rbutilqt/installwindow.cpp1
-rw-r--r--rbutil/rbutilqt/rbutil.ini7
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp41
-rw-r--r--rbutil/rbutilqt/rbutilqt.h1
9 files changed, 21 insertions, 71 deletions
diff --git a/rbutil/rbutilqt/base/serverinfo.cpp b/rbutil/rbutilqt/base/serverinfo.cpp
index e288bbfe34..b60245c3d5 100644
--- a/rbutil/rbutilqt/base/serverinfo.cpp
+++ b/rbutil/rbutilqt/base/serverinfo.cpp
@@ -32,20 +32,20 @@ const static struct {
} ServerInfoList[] = {
{ ServerInfo::CurReleaseVersion, ":platform:/releaseversion", "" },
{ ServerInfo::CurStatus, ":platform:/status", "Unknown" },
- { ServerInfo::DailyDate, "dailydate", "" },
{ ServerInfo::BleedingRevision, "bleedingrev", "" },
{ ServerInfo::BleedingDate, "bleedingdate", "" },
-};
+};
QMap<QString, QVariant> ServerInfo::serverInfos;
void ServerInfo::readBuildInfo(QString file)
{
QSettings info(file, QSettings::IniFormat);
-
- QDate date = QDate::fromString(info.value("dailies/date").toString(), "yyyyMMdd");
- setValue(ServerInfo::DailyDate,date.toString(Qt::ISODate));
-
+
+ setValue(ServerInfo::BleedingRevision,info.value("bleeding/rev"));
+ QDateTime date = QDateTime::fromString(info.value("bleeding/timestamp").toString(), "yyyyMMddThhmmssZ");
+ setValue(ServerInfo::BleedingDate,date.toString(Qt::ISODate));
+
info.beginGroup("release");
QStringList keys = info.allKeys();
info.endGroup();
@@ -87,19 +87,10 @@ void ServerInfo::readBuildInfo(QString file)
setPlatformValue(variants.at(j), ServerInfo::CurStatus, status);
setPlatformValue(variants.at(j), ServerInfo::CurReleaseVersion, release);
}
-
}
}
-void ServerInfo::readBleedingInfo(QString file)
-{
- QSettings info(file, QSettings::IniFormat);
-
- setValue(ServerInfo::BleedingRevision,info.value("bleeding/rev"));
- QDateTime date = QDateTime::fromString(info.value("bleeding/timestamp").toString(), "yyyyMMddThhmmssZ");
- setValue(ServerInfo::BleedingDate,date.toString(Qt::ISODate));
-}
-
+
QVariant ServerInfo::value(enum ServerInfos info)
{
// locate info item
diff --git a/rbutil/rbutilqt/base/serverinfo.h b/rbutil/rbutilqt/base/serverinfo.h
index 37a0953e3d..69aa26f3e6 100644
--- a/rbutil/rbutilqt/base/serverinfo.h
+++ b/rbutil/rbutilqt/base/serverinfo.h
@@ -27,25 +27,22 @@ class ServerInfo : public QObject
{
Q_OBJECT
public:
-
+
//! All Server infos
enum ServerInfos {
CurReleaseVersion,
CurStatus,
- DailyDate,
BleedingRevision,
BleedingDate,
};
-
+
//! read in buildinfo file
static void readBuildInfo(QString file);
- //! read in bleeding info file
- static void readBleedingInfo(QString file);
//! get a value from server info
static QVariant value(enum ServerInfos setting);
//! get a value from server info for a named platform.
static QVariant platformValue(QString platform, enum ServerInfos setting);
-
+
private:
//! set a server info value
static void setValue(enum ServerInfos setting , QVariant value);
diff --git a/rbutil/rbutilqt/base/systeminfo.cpp b/rbutil/rbutilqt/base/systeminfo.cpp
index 44bcf3c84d..eddfb26b34 100644
--- a/rbutil/rbutilqt/base/systeminfo.cpp
+++ b/rbutil/rbutilqt/base/systeminfo.cpp
@@ -43,12 +43,11 @@ const static struct {
{ SystemInfo::DoomUrl, "doom_url", "" },
{ SystemInfo::ReleaseUrl, "release_url", "" },
{ SystemInfo::DailyUrl, "daily_url", "" },
- { SystemInfo::ServerConfUrl, "server_conf_url", "" },
+ { SystemInfo::BuildInfoUrl, "build_info_url", "" },
{ SystemInfo::GenlangUrl, "genlang_url", "" },
{ SystemInfo::ThemesUrl, "themes_url", "" },
{ SystemInfo::ThemesInfoUrl, "themes_info_url", "" },
{ SystemInfo::RbutilUrl, "rbutil_url", "" },
- { SystemInfo::BleedingInfo, "bleeding_info", "" },
{ SystemInfo::CurPlatformName, ":platform:/name", "" },
{ SystemInfo::CurManual, ":platform:/manualname","rockbox-:platform:" },
{ SystemInfo::CurBootloaderMethod, ":platform:/bootloadermethod", "none" },
diff --git a/rbutil/rbutilqt/base/systeminfo.h b/rbutil/rbutilqt/base/systeminfo.h
index 420dbf3c80..9eddd5ed38 100644
--- a/rbutil/rbutilqt/base/systeminfo.h
+++ b/rbutil/rbutilqt/base/systeminfo.h
@@ -47,12 +47,11 @@ class SystemInfo : public QObject
ReleaseUrl,
ReleaseVoiceUrl,
ReleaseFontUrl,
- ServerConfUrl,
+ BuildInfoUrl,
GenlangUrl,
ThemesUrl,
ThemesInfoUrl,
RbutilUrl,
- BleedingInfo,
CurPlatformName,
CurManual,
CurBootloaderMethod,
diff --git a/rbutil/rbutilqt/gui/manualwidget.cpp b/rbutil/rbutilqt/gui/manualwidget.cpp
index ae38980479..7be9145162 100644
--- a/rbutil/rbutilqt/gui/manualwidget.cpp
+++ b/rbutil/rbutilqt/gui/manualwidget.cpp
@@ -104,8 +104,6 @@ void ManualWidget::downloadManual(void)
manual = "rockbox-" + SystemInfo::value(SystemInfo::CurBuildserverModel).toString();
}
- QDate date = QDate::fromString(ServerInfo::value(
- ServerInfo::DailyDate).toString(), Qt::ISODate);
QString manualurl;
ProgressLoggerGui* logger = new ProgressLoggerGui(this);
@@ -123,7 +121,7 @@ void ManualWidget::downloadManual(void)
else {
manualurl = manualUrl(ManualZip);
installer->setLogSection("Manual (HTML)");
- installer->setTarget("/" + manual + "-" + date.toString("yyyyMMdd") + "-html.zip");
+ installer->setTarget("/" + manual + "-" + "-html.zip");
}
qDebug() << "[ManualWidget] Manual URL:" << manualurl;
diff --git a/rbutil/rbutilqt/installwindow.cpp b/rbutil/rbutilqt/installwindow.cpp
index 8abc342690..7a78154561 100644
--- a/rbutil/rbutilqt/installwindow.cpp
+++ b/rbutil/rbutilqt/installwindow.cpp
@@ -144,7 +144,6 @@ void InstallWindow::accept()
}
file.replace("%MODEL%", buildname);
file.replace("%RELVERSION%", ServerInfo::value(ServerInfo::CurReleaseVersion).toString());
- file.replace("%DATE%", ServerInfo::value(ServerInfo::DailyDate).toString());
RbSettings::sync();
diff --git a/rbutil/rbutilqt/rbutil.ini b/rbutil/rbutilqt/rbutil.ini
index 4f0bf19e12..fd3605ac9d 100644
--- a/rbutil/rbutilqt/rbutil.ini
+++ b/rbutil/rbutilqt/rbutil.ini
@@ -1,12 +1,10 @@
[general]
; builds
release_url=http://download.rockbox.org/release/%RELVERSION%/rockbox-%MODEL%-%RELVERSION%.zip
-daily_url=http://download.rockbox.org/daily/%MODEL%/rockbox-%MODEL%.zip
bleeding_url=http://build.rockbox.org/data/rockbox-%MODEL%.zip
; voice files
release_voice_url=http://download.rockbox.org/release/%RELVERSION%/%MODEL%-%RELVERSION%-english.zip
-daily_voice_url=http://download.rockbox.org/daily/voices/%MODEL%-%DATE%-english.zip
genlang_url=http://www.rockbox.org/genlang/?lang=%LANG%&t=%TARGET%&rev=%REVISION%&f=%FEATURES%
; bootloader
@@ -18,15 +16,14 @@ themes_url=http://themes.rockbox.org/
themes_info_url=http://themes.rockbox.org/rbutilqt.php?target=%TARGET%&release=%RELEASE%&revision=%REVISION%&rbutilver=%RBUTILVER%
; server information
-server_conf_url=http://download.rockbox.org/daily/build-info
-bleeding_info=http://build.rockbox.org/cvsmod/build-info
+build_info_url=http://download.rockbox.org/build-info
; fonts
release_font_url=http://download.rockbox.org/release/%RELEASEVER%/rockbox-fonts-%RELEASEVER%.zip
daily_font_url=http://download.rockbox.org/daily/fonts/rockbox-fonts.zip
; other
-manual_url=http://download.rockbox.org/daily/manual/%MANUALBASENAME%.%EXTENSION%
+manual_url=http://download.rockbox.org/manual/%MANUALBASENAME%.%EXTENSION%
doom_url=http://download.rockbox.org/useful/rockdoom.zip
rbutil_url=http://download.rockbox.org/rbutil/
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index 9c72f13d05..279b73b5be 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -227,7 +227,7 @@ void RbUtilQt::downloadInfo()
ui.statusbar->showMessage(tr("Downloading build information, please wait ..."));
qDebug() << "[RbUtil] downloading build info";
daily->setFile(&buildInfo);
- daily->getFile(QUrl(SystemInfo::value(SystemInfo::ServerConfUrl).toString()));
+ daily->getFile(QUrl(SystemInfo::value(SystemInfo::BuildInfoUrl).toString()));
}
@@ -249,42 +249,13 @@ void RbUtilQt::downloadDone(bool error)
ServerInfo::readBuildInfo(buildInfo.fileName());
buildInfo.close();
- // start bleeding info download
- bleeding = new HttpGet(this);
- connect(bleeding, SIGNAL(done(bool)), this, SLOT(downloadBleedingDone(bool)));
- connect(qApp, SIGNAL(lastWindowClosed()), bleeding, SLOT(abort()));
- if(RbSettings::value(RbSettings::CacheOffline).toBool())
- bleeding->setCache(true);
- bleeding->setFile(&bleedingInfo);
- bleeding->getFile(QUrl(SystemInfo::value(SystemInfo::BleedingInfo).toString()));
- ui.statusbar->showMessage(tr("Downloading build information, please wait ..."));
-
-}
-
-
-void RbUtilQt::downloadBleedingDone(bool error)
-{
- if(error) {
- qDebug() << "[RbUtil] network error:" << bleeding->error();
- ui.statusbar->showMessage(tr("Can't get version information!"));
- QMessageBox::critical(this, tr("Network error"),
- tr("Can't get version information.\n"
- "Network error: %1. Please check your network and proxy settings.")
- .arg(bleeding->errorString()));
- return;
- }
- else {
- bleedingInfo.open();
- ServerInfo::readBleedingInfo(bleedingInfo.fileName());
- bleedingInfo.close();
+ ui.statusbar->showMessage(tr("Download build information finished."), 5000);
+ updateSettings();
+ m_gotInfo = true;
- ui.statusbar->showMessage(tr("Download build information finished."), 5000);
- updateSettings();
- m_gotInfo = true;
+ //start check for updates
+ checkUpdate();
- //start check for updates
- checkUpdate();
- }
}
diff --git a/rbutil/rbutilqt/rbutilqt.h b/rbutil/rbutilqt/rbutilqt.h
index 5c0694a019..67fbff78e1 100644
--- a/rbutil/rbutilqt/rbutilqt.h
+++ b/rbutil/rbutilqt/rbutilqt.h
@@ -105,7 +105,6 @@ class RbUtilQt : public QMainWindow
void createTalkFiles(void);
void createVoiceFile(void);
void downloadDone(bool);
- void downloadBleedingDone(bool);
void downloadInfo(void);
void installVoice(void);