summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2010-01-20 22:18:36 +0000
committerDominik Wenger <domonoky@googlemail.com>2010-01-20 22:18:36 +0000
commit8363619e666b37cf8e33f71ea1bfe44676b401e3 (patch)
tree2090e3f3c2bfbd5908c18b453c6d228de3d5c42e /rbutil
parentb5d16e79e191af7c4cb34be685770166e8dfcfa6 (diff)
downloadrockbox-8363619e666b37cf8e33f71ea1bfe44676b401e3.tar.gz
rockbox-8363619e666b37cf8e33f71ea1bfe44676b401e3.tar.bz2
rockbox-8363619e666b37cf8e33f71ea1bfe44676b401e3.zip
rbutil: store the info from the server centrally in RbSetttings. Dont download build-info multiple times. Rename install.cpp
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24301 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/base/rbsettings.cpp60
-rw-r--r--rbutil/rbutilqt/base/rbsettings.h17
-rw-r--r--rbutil/rbutilqt/installwindow.cpp (renamed from rbutil/rbutilqt/install.cpp)124
-rw-r--r--rbutil/rbutilqt/installwindow.h (renamed from rbutil/rbutilqt/install.h)6
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp106
-rw-r--r--rbutil/rbutilqt/rbutilqt.h1
-rw-r--r--rbutil/rbutilqt/rbutilqt.pro4
7 files changed, 195 insertions, 123 deletions
diff --git a/rbutil/rbutilqt/base/rbsettings.cpp b/rbutil/rbutilqt/base/rbsettings.cpp
index bd6f94f2f4..527312b108 100644
--- a/rbutil/rbutilqt/base/rbsettings.cpp
+++ b/rbutil/rbutilqt/base/rbsettings.cpp
@@ -94,9 +94,24 @@ const static struct {
{ RbSettings::EncoderVolume, ":encoder:/volume", "1.0" },
};
+// server settings
+const static struct {
+ RbSettings::ServerSettings setting;
+ const char* name;
+ const char* def;
+} ServerSettingsList[] = {
+ { RbSettings::CurReleaseVersion, ":platform:/releaseversion", "" },
+ { RbSettings::CurStatus, ":platform:/status", "" },
+ { RbSettings::DailyRevision, "dailyrev", "" },
+ { RbSettings::DailyDate, "dailydate", "" },
+ { RbSettings::BleedingRevision, "bleedingrev", "" },
+ { RbSettings::BleedingDate, "bleedingdate", "" },
+};
+
//! pointer to setting object to NULL
QSettings* RbSettings::systemSettings = NULL;
QSettings* RbSettings::userSettings = NULL;
+QSettings* RbSettings::serverSettings = NULL;
void RbSettings::ensureRbSettingsExists()
{
@@ -106,7 +121,13 @@ void RbSettings::ensureRbSettingsExists()
// only use built-in rbutil.ini
systemSettings = new QSettings(":/ini/rbutil.ini", QSettings::IniFormat, 0);
}
-
+
+ if(serverSettings == NULL)
+ {
+ serverSettings = new QSettings(QSettings::IniFormat,
+ QSettings::UserScope, "rockbox.org", "RockboxUtility",NULL);
+ }
+
if(userSettings == NULL)
{
// portable installation:
@@ -200,6 +221,20 @@ QVariant RbSettings::subValue(QString sub, enum UserSettings setting)
return userSettings->value(s, UserSettingsList[i].def);
}
+QVariant RbSettings::value(enum ServerSettings setting)
+{
+ ensureRbSettingsExists();
+
+ // locate setting item
+ int i = 0;
+ while(ServerSettingsList[i].setting != setting)
+ i++;
+
+ QString s = constructSettingPath(ServerSettingsList[i].name);
+ qDebug() << "[Settings] GET SERV:" << s << serverSettings->value(s, ServerSettingsList[i].def).toString();
+ return serverSettings->value(s, ServerSettingsList[i].def);
+}
+
void RbSettings::setValue(enum UserSettings setting , QVariant value)
{
QString empty;
@@ -216,8 +251,29 @@ void RbSettings::setSubValue(QString sub, enum UserSettings setting, QVariant va
i++;
QString s = constructSettingPath(UserSettingsList[i].name, sub);
- qDebug() << "[Settings] SET U:" << s << userSettings->value(s).toString();
userSettings->setValue(s, value);
+ qDebug() << "[Settings] SET U:" << s << userSettings->value(s).toString();
+}
+
+void RbSettings::setValue(enum ServerSettings setting, QVariant value)
+{
+ QString empty;
+ return setPlatformValue(empty, setting, value);
+}
+
+void RbSettings::setPlatformValue(QString platform, enum ServerSettings setting, QVariant value)
+{
+ ensureRbSettingsExists();
+
+ // locate setting item
+ int i = 0;
+ while(ServerSettingsList[i].setting != setting)
+ i++;
+
+ QString s = ServerSettingsList[i].name;
+ s.replace(":platform:", platform);
+ serverSettings->setValue(s, value);
+ qDebug() << "[Settings] SET SERV:" << s << serverSettings->value(s).toString();
}
diff --git a/rbutil/rbutilqt/base/rbsettings.h b/rbutil/rbutilqt/base/rbsettings.h
index b3f0430208..5e128e602d 100644
--- a/rbutil/rbutilqt/base/rbsettings.h
+++ b/rbutil/rbutilqt/base/rbsettings.h
@@ -97,6 +97,16 @@ class RbSettings : public QObject
CurConfigureModel,
};
+ //! All Server settings
+ enum ServerSettings {
+ CurReleaseVersion,
+ CurStatus,
+ DailyRevision,
+ DailyDate,
+ BleedingRevision,
+ BleedingDate,
+ };
+
//! call this to flush the user Settings
static void sync();
//! returns the filename of the usersettings file
@@ -115,12 +125,18 @@ class RbSettings : public QObject
static QVariant value(enum SystemSettings setting);
//! get a value from user settings
static QVariant value(enum UserSettings setting);
+ //! get a value from server settings
+ static QVariant value(enum ServerSettings setting);
//! set a user setting value
static void setValue(enum UserSettings setting , QVariant value);
+ //! set a server setting value
+ static void setValue(enum ServerSettings setting , QVariant value);
//! get a user setting from a subvalue (ie for encoders and tts engines)
static QVariant subValue(QString sub, enum UserSettings setting);
//! set a user setting from a subvalue (ie for encoders and tts engines)
static void setSubValue(QString sub, enum UserSettings setting, QVariant value);
+ //! set a value for a server settings for a named platform.
+ static void setPlatformValue(QString platform, enum ServerSettings setting, QVariant value);
//! get a value from system settings for a named platform.
static QVariant platformValue(QString platform, enum SystemSettings setting);
@@ -135,6 +151,7 @@ class RbSettings : public QObject
//! pointers to our setting objects
static QSettings *systemSettings;
static QSettings *userSettings;
+ static QSettings *serverSettings;
};
#endif
diff --git a/rbutil/rbutilqt/install.cpp b/rbutil/rbutilqt/installwindow.cpp
index 8deaf95c29..eb0dbf228d 100644
--- a/rbutil/rbutilqt/install.cpp
+++ b/rbutil/rbutilqt/installwindow.cpp
@@ -17,14 +17,14 @@
*
****************************************************************************/
-#include "install.h"
+#include "installwindow.h"
#include "ui_installfrm.h"
#include "rbzip.h"
#include "system.h"
#include "rbsettings.h"
#include "utils.h"
-Install::Install(QWidget *parent) : QDialog(parent)
+InstallWindow::InstallWindow(QWidget *parent) : QDialog(parent)
{
ui.setupUi(this);
@@ -52,10 +52,45 @@ Install::Install(QWidget *parent) : QDialog(parent)
ui.Backupgroup->hide();
}
backupCheckboxChanged(Qt::Unchecked);
+
+
+ if(RbSettings::value(RbSettings::DailyRevision).toString().isEmpty()) {
+ ui.radioArchived->setEnabled(false);
+ qDebug() << "[Install] no information about archived version available!";
+ }
+ if(RbSettings::value(RbSettings::CurReleaseVersion).toString().isEmpty()) {
+ ui.radioStable->setEnabled(false);
+ }
+
+ // try to use the old selection first. If no selection has been made
+ // in the past, use a preselection based on released status.
+ if(RbSettings::value(RbSettings::Build).toString() == "stable"
+ && !RbSettings::value(RbSettings::CurReleaseVersion).toString().isEmpty())
+ ui.radioStable->setChecked(true);
+ else if(RbSettings::value(RbSettings::Build).toString() == "archived")
+ ui.radioArchived->setChecked(true);
+ else if(RbSettings::value(RbSettings::Build).toString() == "current")
+ ui.radioCurrent->setChecked(true);
+ else if(!RbSettings::value(RbSettings::CurReleaseVersion).toString().isEmpty()) {
+ ui.radioStable->setChecked(true);
+ ui.radioStable->setEnabled(true);
+ QFont font;
+ font.setBold(true);
+ ui.radioStable->setFont(font);
+ }
+ else {
+ ui.radioCurrent->setChecked(true);
+ ui.radioStable->setEnabled(false);
+ ui.radioStable->setChecked(false);
+ QFont font;
+ font.setBold(true);
+ ui.radioCurrent->setFont(font);
+ }
+
}
-void Install::resizeEvent(QResizeEvent *e)
+void InstallWindow::resizeEvent(QResizeEvent *e)
{
(void)e;
@@ -64,7 +99,7 @@ void Install::resizeEvent(QResizeEvent *e)
}
-void Install::updateBackupLocation(void)
+void InstallWindow::updateBackupLocation(void)
{
ui.backupLocation->setText(QDir::toNativeSeparators(
fontMetrics().elidedText(tr("Backup to %1").arg(m_backupName),
@@ -72,7 +107,7 @@ void Install::updateBackupLocation(void)
}
-void Install::backupCheckboxChanged(int state)
+void InstallWindow::backupCheckboxChanged(int state)
{
if(state == Qt::Checked)
{
@@ -89,7 +124,7 @@ void Install::backupCheckboxChanged(int state)
}
-void Install::accept()
+void InstallWindow::accept()
{
logger = new ProgressLoggerGui(this);
logger->show();
@@ -107,26 +142,26 @@ void Install::accept()
if(ui.radioStable->isChecked()) {
file = RbSettings::value(RbSettings::ReleaseUrl).toString();
RbSettings::setValue(RbSettings::Build, "stable");
- myversion = version.value("rel_rev");
+ myversion = RbSettings::value(RbSettings::CurReleaseVersion).toString();
}
else if(ui.radioArchived->isChecked()) {
file = RbSettings::value(RbSettings::DailyUrl).toString();
RbSettings::setValue(RbSettings::Build, "archived");
- myversion = "r" + version.value("arch_rev") + "-" + version.value("arch_date");
+ myversion = "r" + RbSettings::value(RbSettings::DailyRevision).toString() + "-" + RbSettings::value(RbSettings::DailyDate).toString();
}
else if(ui.radioCurrent->isChecked()) {
file = RbSettings::value(RbSettings::BleedingUrl).toString();
RbSettings::setValue(RbSettings::Build, "current");
- myversion = "r" + version.value("bleed_rev");
+ myversion = "r" + RbSettings::value(RbSettings::BleedingRevision).toString();
}
else {
qDebug() << "[Install] no build selected -- this shouldn't happen";
return;
}
file.replace("%MODEL%", buildname);
- file.replace("%RELVERSION%", version.value("rel_rev"));
- file.replace("%REVISION%", version.value("arch_rev"));
- file.replace("%DATE%", version.value("arch_date"));
+ file.replace("%RELVERSION%", RbSettings::value(RbSettings::CurReleaseVersion).toString());
+ file.replace("%REVISION%", RbSettings::value(RbSettings::DailyRevision).toString());
+ file.replace("%DATE%", RbSettings::value(RbSettings::DailyDate).toString());
RbSettings::sync();
@@ -194,7 +229,7 @@ void Install::accept()
}
-void Install::changeBackupPath()
+void InstallWindow::changeBackupPath()
{
QString backupString = QFileDialog::getSaveFileName(this,
tr("Select Backup Filename"), m_backupName, "*.zip");
@@ -207,7 +242,7 @@ void Install::changeBackupPath()
// Zip installer has finished
-void Install::done(bool error)
+void InstallWindow::done(bool error)
{
qDebug() << "[Install] done, error:" << error;
@@ -227,14 +262,14 @@ void Install::done(bool error)
}
-void Install::setDetailsCurrent(bool show)
+void InstallWindow::setDetailsCurrent(bool show)
{
if(show) {
ui.labelDetails->setText(tr("This is the absolute up to the minute "
"Rockbox built. A current build will get updated every time "
"a change is made. Latest version is r%1 (%2).")
- .arg(version.value("bleed_rev"), version.value("bleed_date")));
- if(version.value("rel_rev").isEmpty())
+ .arg(RbSettings::value(RbSettings::BleedingRevision).toString(),RbSettings::value(RbSettings::BleedingDate).toString()));
+ if(RbSettings::value(RbSettings::CurReleaseVersion).toString().isEmpty())
ui.labelNote->setText(tr("<b>This is the recommended version.</b>"));
else
ui.labelNote->setText("");
@@ -242,23 +277,23 @@ void Install::setDetailsCurrent(bool show)
}
-void Install::setDetailsStable(bool show)
+void InstallWindow::setDetailsStable(bool show)
{
if(show) {
ui.labelDetails->setText(
tr("This is the last released version of Rockbox."));
- if(!version.value("rel_rev").isEmpty())
+ if(!RbSettings::value(RbSettings::CurReleaseVersion).toString().isEmpty())
ui.labelNote->setText(tr("<b>Note:</b> "
"The lastest released version is %1. "
"<b>This is the recommended version.</b>")
- .arg(version.value("rel_rev")));
+ .arg(RbSettings::value(RbSettings::CurReleaseVersion).toString()));
else ui.labelNote->setText("");
}
}
-void Install::setDetailsArchived(bool show)
+void InstallWindow::setDetailsArchived(bool show)
{
if(show) {
ui.labelDetails->setText(tr("These are automatically built each day "
@@ -266,54 +301,9 @@ void Install::setDetailsArchived(bool show)
"features than the last stable release but may be much less stable. "
"Features may change regularly."));
ui.labelNote->setText(tr("<b>Note:</b> archived version is r%1 (%2).")
- .arg(version.value("arch_rev"), version.value("arch_date")));
+ .arg(RbSettings::value(RbSettings::DailyRevision).toString(),RbSettings::value(RbSettings::DailyDate).toString()));
}
}
-void Install::setVersionStrings(QMap<QString, QString>& ver)
-{
- version = ver;
- // version strings map is as following:
- // rel_rev release version revision id
- // rel_date release version release date
- // same for arch_* and bleed_*
-
- if(version.value("arch_rev").isEmpty()) {
- ui.radioArchived->setEnabled(false);
- qDebug() << "[Install] no information about archived version available!";
- }
- if(version.value("rel_rev").isEmpty()) {
- ui.radioStable->setEnabled(false);
- }
-
- // try to use the old selection first. If no selection has been made
- // in the past, use a preselection based on released status.
- if(RbSettings::value(RbSettings::Build).toString() == "stable"
- && !version.value("rel_rev").isEmpty())
- ui.radioStable->setChecked(true);
- else if(RbSettings::value(RbSettings::Build).toString() == "archived")
- ui.radioArchived->setChecked(true);
- else if(RbSettings::value(RbSettings::Build).toString() == "current")
- ui.radioCurrent->setChecked(true);
- else if(!version.value("rel_rev").isEmpty()) {
- ui.radioStable->setChecked(true);
- ui.radioStable->setEnabled(true);
- QFont font;
- font.setBold(true);
- ui.radioStable->setFont(font);
- }
- else {
- ui.radioCurrent->setChecked(true);
- ui.radioStable->setEnabled(false);
- ui.radioStable->setChecked(false);
- QFont font;
- font.setBold(true);
- ui.radioCurrent->setFont(font);
- }
-
- qDebug() << "[Install] setting version strings to:" << version;
-}
-
-
diff --git a/rbutil/rbutilqt/install.h b/rbutil/rbutilqt/installwindow.h
index 4ac6f281af..e1a347099e 100644
--- a/rbutil/rbutilqt/install.h
+++ b/rbutil/rbutilqt/installwindow.h
@@ -28,12 +28,11 @@
#include "zipinstaller.h"
#include "progressloggergui.h"
-class Install : public QDialog
+class InstallWindow : public QDialog
{
Q_OBJECT
public:
- Install(QWidget *parent);
- void setVersionStrings(QMap<QString, QString>&);
+ InstallWindow(QWidget *parent);
public slots:
void accept(void);
@@ -45,7 +44,6 @@ class Install : public QDialog
QFile *target;
QString file;
ZipInstaller* installer;
- QMap<QString, QString> version;
QString m_backupName;
void resizeEvent(QResizeEvent*);
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index 8860acc3bb..85d990a775 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -24,7 +24,7 @@
#include "ui_rbutilqtfrm.h"
#include "ui_aboutbox.h"
#include "configure.h"
-#include "install.h"
+#include "installwindow.h"
#include "installtalkwindow.h"
#include "createvoicewindow.h"
#include "httpget.h"
@@ -167,8 +167,6 @@ void RbUtilQt::updateTabs(int count)
void RbUtilQt::downloadInfo()
{
- // make sure the version map is repopulated correctly later.
- versmap.clear();
// try to get the current build information
daily = new HttpGet(this);
connect(daily, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
@@ -196,23 +194,32 @@ void RbUtilQt::downloadDone(bool error)
}
qDebug() << "[RbUtil] network status:" << daily->error();
+ // read info into settings object
buildInfo.open();
QSettings info(buildInfo.fileName(), QSettings::IniFormat, this);
buildInfo.close();
- versmap.insert("arch_rev", info.value("dailies/rev").toString());
- versmap.insert("arch_date", info.value("dailies/date").toString());
-
+ RbSettings::setValue(RbSettings::DailyRevision,info.value("dailies/rev"));
+ QDate date = QDate::fromString(info.value("dailies/date").toString(), "yyyyMMdd");
+ RbSettings::setValue(RbSettings::DailyDate,date.toString());
+
info.beginGroup("release");
- versmap.insert("rel_rev", info.value(RbSettings::value(RbSettings::CurBuildserverModel).toString()).toString());
+ QStringList keys = info.allKeys();
+ for(int i=0; i < keys.size(); i++)
+ {
+ RbSettings::setPlatformValue(keys[i],RbSettings::CurReleaseVersion,info.value(keys[i]));
+ }
info.endGroup();
- bool installable = !versmap.value("rel_rev").isEmpty();
-
- ui.buttonSmall->setEnabled(installable);
- ui.buttonComplete->setEnabled(installable);
- ui.actionSmall_Installation->setEnabled(installable);
- ui.actionComplete_Installation->setEnabled(installable);
+ info.beginGroup("status");
+ keys = info.allKeys();
+ for(int i=0; i < keys.size(); i++)
+ {
+ RbSettings::setPlatformValue(keys[i],RbSettings::CurStatus,info.value(keys[i]));
+ }
+ info.endGroup();
+
+ //start bleeding info download
bleeding = new HttpGet(this);
connect(bleeding, SIGNAL(done(bool)), this, SLOT(downloadBleedingDone(bool)));
connect(bleeding, SIGNAL(requestFinished(int, bool)), this, SLOT(downloadDone(int, bool)));
@@ -223,22 +230,6 @@ void RbUtilQt::downloadDone(bool error)
bleeding->getFile(QUrl(RbSettings::value(RbSettings::BleedingInfo).toString()));
ui.statusbar->showMessage(tr("Downloading build information, please wait ..."));
- if(RbSettings::value(RbSettings::RbutilVersion) != PUREVERSION) {
- QApplication::processEvents();
- QMessageBox::information(this, tr("New installation"),
- tr("This is a new installation of Rockbox Utility, or a new version. "
- "The configuration dialog will now open to allow you to setup the program, "
- " or review your settings."));
- configDialog();
- }
- else if(chkConfig(false)) {
- QApplication::processEvents();
- QMessageBox::critical(this, tr("Configuration error"),
- tr("Your configuration is invalid. This is most likely due "
- "to a changed device path. The configuration dialog will "
- "now open to allow you to correct the problem."));
- configDialog();
- }
}
@@ -251,11 +242,12 @@ void RbUtilQt::downloadBleedingDone(bool error)
bleedingInfo.open();
QSettings info(bleedingInfo.fileName(), QSettings::IniFormat, this);
bleedingInfo.close();
- versmap.insert("bleed_rev", info.value("bleeding/rev").toString());
- versmap.insert("bleed_date", info.value("bleeding/timestamp").toString());
- qDebug() << "[RbUtil] version map:" << versmap;
- ui.statusbar->showMessage(tr("Download build information finished."), 5000);
+ RbSettings::setValue(RbSettings::BleedingRevision,info.value("bleeding/rev"));
+ QDateTime date = QDateTime::fromString(info.value("bleeding/timestamp").toString(), "yyyyMMddThhmmssZ");
+ RbSettings::setValue(RbSettings::BleedingDate,date.toString());
+ ui.statusbar->showMessage(tr("Download build information finished."), 5000);
+ updateSettings();
m_gotInfo = true;
//start check for updates
@@ -317,7 +309,6 @@ void RbUtilQt::configDialog()
{
Config *cw = new Config(this);
connect(cw, SIGNAL(settingsUpdated()), this, SLOT(updateSettings()));
- connect(cw, SIGNAL(settingsUpdated()), this, SLOT(downloadInfo()));
cw->show();
}
@@ -338,6 +329,23 @@ void RbUtilQt::updateSettings()
}
HttpGet::setGlobalCache(RbSettings::value(RbSettings::CachePath).toString());
HttpGet::setGlobalDumbCache(RbSettings::value(RbSettings::CacheOffline).toBool());
+
+ if(RbSettings::value(RbSettings::RbutilVersion) != PUREVERSION) {
+ QApplication::processEvents();
+ QMessageBox::information(this, tr("New installation"),
+ tr("This is a new installation of Rockbox Utility, or a new version. "
+ "The configuration dialog will now open to allow you to setup the program, "
+ " or review your settings."));
+ configDialog();
+ }
+ else if(chkConfig(false)) {
+ QApplication::processEvents();
+ QMessageBox::critical(this, tr("Configuration error"),
+ tr("Your configuration is invalid. This is most likely due "
+ "to a changed device path. The configuration dialog will "
+ "now open to allow you to correct the problem."));
+ configDialog();
+ }
}
@@ -373,6 +381,13 @@ void RbUtilQt::updateDevice()
if(mountpoint.isEmpty()) mountpoint = "&lt;invalid&gt;";
ui.labelDevice->setText(tr("<b>%1 %2</b> at <b>%3</b>")
.arg(brand, name, QDir::toNativeSeparators(mountpoint)));
+
+ // hide quickstart buttons if no release available
+ bool installable = !RbSettings::value(RbSettings::CurReleaseVersion).toString().isEmpty();
+ ui.buttonSmall->setEnabled(installable);
+ ui.buttonComplete->setEnabled(installable);
+ ui.actionSmall_Installation->setEnabled(installable);
+ ui.actionComplete_Installation->setEnabled(installable);
}
@@ -411,7 +426,7 @@ void RbUtilQt::completeInstall()
"This will install Rockbox %1. To install the most recent "
"development build available press \"Cancel\" and "
"use the \"Installation\" tab.")
- .arg(versmap.value("rel_rev")),
+ .arg(RbSettings::value(RbSettings::CurReleaseVersion).toString()),
QMessageBox::Ok | QMessageBox::Cancel) != QMessageBox::Ok)
return;
// create logger
@@ -469,7 +484,7 @@ void RbUtilQt::smallInstall()
"This will install Rockbox %1. To install the most recent "
"development build available press \"Cancel\" and "
"use the \"Installation\" tab.")
- .arg(versmap.value("rel_rev")),
+ .arg(RbSettings::value(RbSettings::CurReleaseVersion).toString()),
QMessageBox::Ok | QMessageBox::Cancel) != QMessageBox::Ok)
return;
@@ -543,7 +558,7 @@ bool RbUtilQt::installAuto()
{
QString file = RbSettings::value(RbSettings::ReleaseUrl).toString();
file.replace("%MODEL%", RbSettings::value(RbSettings::CurBuildserverModel).toString());
- file.replace("%RELVERSION%", versmap.value("rel_rev"));
+ file.replace("%RELVERSION%", RbSettings::value(RbSettings::CurReleaseVersion).toString());
// check installed Version and Target
QString warning = check(false);
@@ -600,7 +615,7 @@ bool RbUtilQt::installAuto()
ZipInstaller* installer = new ZipInstaller(this);
installer->setUrl(file);
installer->setLogSection("Rockbox (Base)");
- installer->setLogVersion(versmap.value("rel_rev"));
+ installer->setLogVersion(RbSettings::value(RbSettings::CurReleaseVersion).toString());
if(!RbSettings::value(RbSettings::CacheDisabled).toBool())
installer->setCache(true);
installer->setMountPoint(RbSettings::value(RbSettings::Mountpoint).toString());
@@ -617,10 +632,7 @@ bool RbUtilQt::installAuto()
void RbUtilQt::install()
{
- Install *installWindow = new Install(this);
-
- installWindow->setVersionStrings(versmap);
-
+ InstallWindow *installWindow = new InstallWindow(this);
installWindow->show();
}
@@ -837,7 +849,7 @@ void RbUtilQt::installFonts()
installer->setUrl(RbSettings::value(RbSettings::FontUrl).toString());
installer->setLogSection("Fonts");
- installer->setLogVersion(versmap.value("arch_date"));
+ installer->setLogVersion(RbSettings::value(RbSettings::DailyDate).toString());
installer->setMountPoint(RbSettings::value(RbSettings::Mountpoint).toString());
if(!RbSettings::value(RbSettings::CacheDisabled).toBool())
installer->setCache(true);
@@ -876,12 +888,12 @@ void RbUtilQt::installVoice()
QString voiceurl = RbSettings::value(RbSettings::VoiceUrl).toString();
voiceurl += RbSettings::value(RbSettings::CurBuildserverModel).toString() + "-" +
- versmap.value("arch_date") + "-english.zip";
+ RbSettings::value(RbSettings::DailyDate).toString() + "-english.zip";
qDebug() << "[RbUtil] voicefile URL:" << voiceurl;
installer->setUrl(voiceurl);
installer->setLogSection("Voice");
- installer->setLogVersion(versmap.value("arch_date"));
+ installer->setLogVersion(RbSettings::value(RbSettings::DailyDate).toString());
installer->setMountPoint(RbSettings::value(RbSettings::Mountpoint).toString());
if(!RbSettings::value(RbSettings::CacheDisabled).toBool())
installer->setCache(true);
@@ -931,7 +943,7 @@ void RbUtilQt::installDoom()
installer->setUrl(RbSettings::value(RbSettings::DoomUrl).toString());
installer->setLogSection("Game Addons");
- installer->setLogVersion(versmap.value("arch_date"));
+ installer->setLogVersion(RbSettings::value(RbSettings::DailyDate).toString());
installer->setMountPoint(RbSettings::value(RbSettings::Mountpoint).toString());
if(!RbSettings::value(RbSettings::CacheDisabled).toBool())
installer->setCache(true);
@@ -1050,7 +1062,7 @@ void RbUtilQt::downloadManual(void)
if(manual.isEmpty())
manual = "rockbox-" + RbSettings::value(RbSettings::Platform).toString();
- QString date = versmap.value("arch_date");
+ QString date = RbSettings::value(RbSettings::DailyDate).toString();
QString manualurl;
QString target;
diff --git a/rbutil/rbutilqt/rbutilqt.h b/rbutil/rbutilqt/rbutilqt.h
index 31bae73630..c47926e5a2 100644
--- a/rbutil/rbutilqt/rbutilqt.h
+++ b/rbutil/rbutilqt/rbutilqt.h
@@ -55,7 +55,6 @@ class RbUtilQt : public QMainWindow
ProgressLoggerGui *logger;
ZipInstaller *installer;
QUrl proxy(void);
- QMap<QString, QString> versmap;
bool chkConfig(bool);
volatile bool m_installed;
diff --git a/rbutil/rbutilqt/rbutilqt.pro b/rbutil/rbutilqt/rbutilqt.pro
index e335797409..731a4a24ae 100644
--- a/rbutil/rbutilqt/rbutilqt.pro
+++ b/rbutil/rbutilqt/rbutilqt.pro
@@ -65,7 +65,7 @@ QMAKE_EXTRA_TARGETS += lrelease
SOURCES += rbutilqt.cpp \
main.cpp \
- install.cpp \
+ installwindow.cpp \
base/httpget.cpp \
configure.cpp \
zip/zip.cpp \
@@ -115,7 +115,7 @@ SOURCES += rbutilqt.cpp \
../../tools/iriver.c \
HEADERS += rbutilqt.h \
- install.h \
+ installwindow.h \
base/httpget.h \
configure.h \
zip/zip.h \