summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2009-01-25 17:22:06 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2009-01-25 17:22:06 +0000
commit07894de36dd2af7054db87fc00dc953f73c72f0d (patch)
treeda0ef1080f54f31f930eb0cd22f6823d9539577c /rbutil
parent21a0504d16bc15966bcd394239d5f757d284060b (diff)
downloadrockbox-07894de36dd2af7054db87fc00dc953f73c72f0d.tar.gz
rockbox-07894de36dd2af7054db87fc00dc953f73c72f0d.tar.bz2
rockbox-07894de36dd2af7054db87fc00dc953f73c72f0d.zip
Remove hard-coded release version numbers.
- get the target specific version number from the build-info file - disable Quick Start buttons until version info is available - only enable Quick Start buttons if a release is available. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19854 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/install.cpp3
-rw-r--r--rbutil/rbutilqt/rbsettings.cpp15
-rw-r--r--rbutil/rbutilqt/rbsettings.h2
-rw-r--r--rbutil/rbutilqt/rbutil.ini62
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp36
5 files changed, 25 insertions, 93 deletions
diff --git a/rbutil/rbutilqt/install.cpp b/rbutil/rbutilqt/install.cpp
index 34920e3951..0651e8ffe4 100644
--- a/rbutil/rbutilqt/install.cpp
+++ b/rbutil/rbutilqt/install.cpp
@@ -292,6 +292,9 @@ void Install::setVersionStrings(QMap<QString, QString> ver)
ui.radioArchived->setEnabled(false);
qDebug() << "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.
diff --git a/rbutil/rbutilqt/rbsettings.cpp b/rbutil/rbutilqt/rbsettings.cpp
index 30552e6f3b..28e507fd6a 100644
--- a/rbutil/rbutilqt/rbsettings.cpp
+++ b/rbutil/rbutilqt/rbsettings.cpp
@@ -113,12 +113,6 @@ QString RbSettings::bleedingUrl()
return devices->value("bleeding_url").toString();
}
-QString RbSettings::lastRelease(QString platform)
-{
- (void)platform;
- return deviceSettingCurGet("last_release").toString();
-}
-
QString RbSettings::cachePath()
{
return userSettings->value("cachepath", QDir::tempPath()).toString();
@@ -232,15 +226,6 @@ QString RbSettings::curManual()
devices->value("platform").toString()).toString();
}
-bool RbSettings::curReleased()
-{
- QString released = deviceSettingCurGet("released").toString();
- if(released == "yes")
- return true;
- else
- return false;
-}
-
QString RbSettings::curBootloaderMethod()
{
return deviceSettingCurGet("bootloadermethod").toString();
diff --git a/rbutil/rbutilqt/rbsettings.h b/rbutil/rbutilqt/rbsettings.h
index f232a66c85..beea602977 100644
--- a/rbutil/rbutilqt/rbsettings.h
+++ b/rbutil/rbutilqt/rbsettings.h
@@ -48,7 +48,6 @@ class RbSettings : public QObject
QString mountpoint();
QString manualUrl();
QString bleedingUrl();
- QString lastRelease(QString platform);
QString cachePath();
QString build(void);
QString bootloaderUrl();
@@ -96,7 +95,6 @@ class RbSettings : public QObject
QString curPlatform();
QString curPlatformName();
QString curManual();
- bool curReleased();
QString curBootloaderMethod();
QString curBootloaderName();
QString curVoiceName();
diff --git a/rbutil/rbutilqt/rbutil.ini b/rbutil/rbutilqt/rbutil.ini
index abf6bf78f5..fb500d4345 100644
--- a/rbutil/rbutilqt/rbutil.ini
+++ b/rbutil/rbutilqt/rbutil.ini
@@ -52,7 +52,6 @@ platform60=mrobe100
[player]
name="Jukebox Player 6000 / Jukebox Studio 5 / 10 / 20"
platform=player
-released=yes
needsbootloader=no
bootloadermethod=
bootloadername=
@@ -62,12 +61,10 @@ brand=Archos
voicename=player
targetid=1
encoder=lame
-last_release=3.1
[recorder]
name="Jukebox Recorder 6 / 10 / 15 / 20"
platform=recorder
-released=yes
needsbootloader=no
bootloadermethod=
bootloadername=
@@ -77,12 +74,10 @@ brand=Archos
voicename=recorder
targetid=2
encoder=lame
-last_release=3.1
[recorder8mb]
name="Jukebox Recorder 6 / 10 / 15 / 20 (with 8MiB memory)"
platform=recorder8mb
-released=yes
needsbootloader=no
bootloadermethod=
bootloadername=
@@ -92,12 +87,10 @@ brand=Archos
voicename=recorder
targetid=2
encoder=lame
-last_release=3.1
[recorderv2]
name="Jukebox Recorder v2 (20GB)"
platform=recorderv2
-released=yes
needsbootloader=no
bootloadermethod=
bootloadername=
@@ -107,12 +100,10 @@ brand=Archos
voicename=recorderv2
targetid=4
encoder=lame
-last_release=3.1
[fmrecorder]
name="Jukebox Recorder FM"
platform=fmrecorder
-released=yes
needsbootloader=no
bootloadermethod=
bootloadername=
@@ -122,12 +113,10 @@ brand=Archos
voicename=fmrecorder
targetid=3
encoder=lame
-last_release=3.1
[fmrecorder8mb]
name="Jukebox Recorder FM (with 8MiB memory)"
platform=fmrecorder8mb
-released=yes
needsbootloader=no
bootloadermethod=
bootloadername=
@@ -137,12 +126,10 @@ brand=Archos
voicename=fmrecorder
targetid=3
encoder=lame
-last_release=3.1
[ondiosp]
name="Ondio SP"
platform=ondiosp
-released=yes
needsbootloader=no
bootloadermethod=
bootloadername=
@@ -152,12 +139,10 @@ brand=Archos
voicename=ondiosp
targetid=7
encoder=lame
-last_release=3.1
[ondiofm]
name="Ondio FM"
platform=ondiofm
-released=yes
needsbootloader=no
bootloadermethod=
bootloadername=
@@ -167,12 +152,10 @@ brand=Archos
voicename=ondiofm
targetid=8
encoder=lame
-last_release=3.1
[h100]
name="iHP100 / iHP110"
platform=h100
-released=yes
needsbootloader=yes
bootloadermethod=hex
bootloadername=/iriver/bootloader-h100.bin
@@ -184,12 +167,10 @@ usbid=0x10063001
voicename=h100
targetid=11
encoder=rbspeex
-last_release=3.1
[h120]
name="iHP120 / iHP140 / H120 / H140"
platform=h120
-released=yes
needsbootloader=yes
bootloadermethod=hex
bootloadername=/iriver/bootloader-h120.bin
@@ -201,12 +182,10 @@ usbid=0x10063002
voicename=h120
targetid=9
encoder=rbspeex
-last_release=3.1
[h300]
name="H320 / H340"
platform=h300
-released=yes
needsbootloader=yes
bootloadermethod=hex
bootloadername=/iriver/bootloader-h300.bin
@@ -218,12 +197,10 @@ usbid=0x10063003
voicename=h300
targetid=10
encoder=rbspeex
-last_release=3.1
[h10_5gbums]
name="H10 (5 / 6GB) UMS"
platform=h10_5gb
-released=yes
needsbootloader=yes
bootloadermethod=mi4
bootloadername=/iriver/H10.mi4
@@ -235,12 +212,10 @@ usbid=0x41022002
voicename=h10_5gb
targetid=24
encoder=rbspeex
-last_release=3.1
[h10_5gbmtp]
name="H10 (5 / 6GB) MTP"
platform=h10_5gb
-released=yes
needsbootloader=yes
bootloadermethod=mi4
bootloadername=/iriver/H10_5GB-MTP/H10.mi4
@@ -252,12 +227,10 @@ usbid=0x41022105
voicename=h10_5gb
targetid=24
encoder=rbspeex
-last_release=3.1
[h10]
name="H10 (20GB)"
platform=h10
-released=yes
needsbootloader=yes
bootloadermethod=mi4
bootloadername=/iriver/H10_20GC.mi4
@@ -270,12 +243,10 @@ usberror=0x41022101
voicename=h10
targetid=22
encoder=rbspeex
-last_release=3.1
[ipod1g2g]
name="Ipod (1st / 2nd gen)"
platform=ipod1g2g
-released=yes
needsbootloader=yes
bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipod1g2g.ipod
@@ -285,12 +256,10 @@ brand=Apple
voicename=ipod1g2g
targetid=29
encoder=rbspeex
-last_release=3.1
[ipodcolor]
name="Ipod Colour / Photo / U2 (4th gen)"
platform=ipodcolor
-released=yes
needsbootloader=yes
bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipodcolor.ipod
@@ -300,12 +269,10 @@ brand=Apple
voicename=ipodcolor
targetid=13
encoder=rbspeex
-last_release=3.1
[ipodnano]
name="Ipod Nano (1st gen)"
platform=ipodnano
-released=yes
needsbootloader=yes
bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipodnano.ipod
@@ -316,12 +283,10 @@ usbincompat=0x05ac1260
voicename=ipodnano
targetid=14
encoder=rbspeex
-last_release=3.1
[ipod4gray]
name="Ipod (4th gen, greyscale)"
platform=ipod4gray
-released=yes
needsbootloader=yes
bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipod4g.ipod
@@ -331,12 +296,10 @@ brand=Apple
voicename=ipod4gray
targetid=17
encoder=rbspeex
-last_release=3.1
[ipodvideo]
name="Ipod Video (5th gen) 30GB"
platform=ipodvideo
-released=yes
needsbootloader=yes
bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipodvideo.ipod
@@ -346,12 +309,10 @@ brand=Apple
voicename=ipodvideo
targetid=15
encoder=rbspeex
-last_release=3.1
[ipodvideo64mb]
name="Ipod Video (5th gen) 60/80GB"
platform=ipodvideo64mb
-released=yes
needsbootloader=yes
bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipodvideo.ipod
@@ -362,12 +323,10 @@ voicename=ipodvideo
usbincompat=0x05ac1261
targetid=15
encoder=rbspeex
-last_release=3.1
[ipod3g]
name="Ipod (3rd gen)"
platform=ipod3g
-released=yes
needsbootloader=yes
bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipod3g.ipod
@@ -378,12 +337,10 @@ usbid=0x05ac1201
voicename=ipod3g
targetid=16
encoder=rbspeex
-last_release=3.1
[ipodmini1g]
name="Ipod Mini (1st gen)"
platform=ipodmini1g
-released=yes
needsbootloader=yes
bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipodmini.ipod
@@ -393,12 +350,10 @@ brand=Apple
voicename=ipodmini1g
targetid=18
encoder=rbspeex
-last_release=3.1
[ipodmini2g]
name="Ipod Mini (2nd gen)"
platform=ipodmini2g
-released=yes
needsbootloader=yes
bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipodmini2g.ipod
@@ -408,12 +363,10 @@ brand=Apple
voicename=ipodmini2g
targetid=21
encoder=rbspeex
-last_release=3.1
[iaudiox5]
name="iAudio X5 / X5L"
platform=iaudiox5
-released=yes
needsbootloader=yes
bootloadermethod=file
bootloadername=/iaudio/x5_fw.bin
@@ -425,12 +378,10 @@ usbid=0x0e210510, 0x0e210513
voicename=iaudiox5
targetid=12
encoder=rbspeex
-last_release=3.1
[iaudiox5v]
name="iAudio X5V"
platform=iaudiox5
-released=yes
needsbootloader=yes
bootloadermethod=file
bootloadername=/iaudio/x5v_fw.bin
@@ -441,12 +392,10 @@ brand=Cowon
voicename=iaudiox5v
targetid=12
encoder=rbspeex
-last_release=3.1
[iaudiom5]
name="iAudio M5 / M5L"
platform=iaudiom5
-released=yes
needsbootloader=yes
bootloadermethod=file
bootloadername=/iaudio/m5_fw.bin
@@ -458,12 +407,10 @@ usbid=0x0e210520
voicename=iaudiom5
targetid=28
encoder=rbspeex
-last_release=3.1
[iaudiom3]
name="iAudio M3 / M3L"
platform=iaudiom3
-released=no
needsbootloader=yes
bootloadermethod=file
bootloadername=/iaudio/cowon_m3.bin
@@ -475,12 +422,10 @@ usbid=0x0e210500
voicename=iaudiom3
targetid=37
encoder=rbspeex
-last_release=3.1
[gigabeatf]
name="Gigabeat F / X"
platform=gigabeatf
-released=yes
needsbootloader=yes
bootloadermethod=file
bootloadername=/gigabeat/FWIMG01.DAT
@@ -492,12 +437,10 @@ usbid=0x09300009
voicename=gigabeatf
targetid=20
encoder=rbspeex
-last_release=3.1
[sansae200]
name="Sansa E200"
platform=sansae200
-released=yes
needsbootloader=yes
bootloadermethod=sansa
bootloadername=/sandisk-sansa/e200/PP5022.mi4
@@ -510,12 +453,10 @@ usbincompat=0x07817422, 0x07817423
voicename=sansae200
targetid=23
encoder=rbspeex
-last_release=3.1
[sansac200]
name="Sansa C200"
platform=sansac200
-released=yes
needsbootloader=yes
bootloadermethod=sansa
bootloadername=/sandisk-sansa/c200/firmware.mi4
@@ -526,12 +467,10 @@ usbid=0x07817450, 0x07817451
voicename=sansac200
targetid=30
encoder=rbspeex
-last_release=3.1
[mrobe100]
name="m:robe100"
platform=mrobe100
-released=yes
needsbootloader=yes
bootloadermethod=mi4
bootloadername=/olympus/mrobe100/pp5020.mi4
@@ -543,7 +482,6 @@ usbid=0x07b40280
voicename=mrobe100
targetid=33
encoder=rbspeex
-last_release=3.1
[languages]
lang1=afrikaans
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index c9efb5e81a..5ef43b6732 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -79,6 +79,9 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent)
ui.treeInfo->setHeaderLabels(QStringList() << tr("File") << tr("Version"));
ui.treeInfo->expandAll();
ui.treeInfo->setColumnCount(2);
+ // disable quick install until version info is available
+ ui.buttonSmall->setEnabled(false);
+ ui.buttonComplete->setEnabled(false);
connect(ui.tabWidget, SIGNAL(currentChanged(int)), this, SLOT(updateTabs(int)));
connect(ui.actionAbout_Qt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
@@ -177,6 +180,19 @@ void RbUtilQt::downloadDone(bool error)
versmap.insert("arch_rev", info.value("dailies/rev").toString());
versmap.insert("arch_date", info.value("dailies/date").toString());
+ info.beginGroup("release");
+ versmap.insert("rel_rev", info.value(settings->curPlatform()).toString());
+ info.endGroup();
+
+ if(versmap.value("rel_rev").isEmpty()) {
+ ui.buttonSmall->setEnabled(false);
+ ui.buttonComplete->setEnabled(false);
+ }
+ else {
+ ui.buttonSmall->setEnabled(true);
+ ui.buttonComplete->setEnabled(true);
+ }
+
bleeding = new HttpGet(this);
connect(bleeding, SIGNAL(done(bool)), this, SLOT(downloadBleedingDone(bool)));
connect(bleeding, SIGNAL(requestFinished(int, bool)), this, SLOT(downloadDone(int, bool)));
@@ -215,7 +231,7 @@ void RbUtilQt::downloadBleedingDone(bool error)
versmap.insert("bleed_rev", info.value("bleeding/rev").toString());
versmap.insert("bleed_date", info.value("bleeding/timestamp").toString());
qDebug() << "versmap =" << versmap;
-
+
m_gotInfo = true;
}
@@ -362,7 +378,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(settings->lastRelease(settings->curPlatform())),
+ .arg(versmap.value("rel_rev")),
QMessageBox::Ok | QMessageBox::Cancel) != QMessageBox::Ok)
return;
// create logger
@@ -420,7 +436,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(settings->lastRelease(settings->curPlatform())),
+ .arg(versmap.value("rel_rev")),
QMessageBox::Ok | QMessageBox::Cancel) != QMessageBox::Ok)
return;
@@ -491,9 +507,8 @@ void RbUtilQt::installBtn()
bool RbUtilQt::installAuto()
{
QString file = QString("%1/%2/rockbox-%3-%4.zip")
- .arg(settings->releaseUrl(), settings->lastRelease(settings->curPlatform()),
- settings->curPlatform(), settings->lastRelease(settings->curPlatform()));
-
+ .arg(settings->releaseUrl(), versmap.value(settings->curPlatform()),
+ settings->curPlatform(), versmap.value(settings->curPlatform()));
buildInfo.open();
QSettings info(buildInfo.fileName(), QSettings::IniFormat, this);
buildInfo.close();
@@ -552,7 +567,7 @@ bool RbUtilQt::installAuto()
ZipInstaller* installer = new ZipInstaller(this);
installer->setUrl(file);
installer->setLogSection("Rockbox (Base)");
- installer->setLogVersion(settings->lastRelease(settings->curPlatform()));
+ installer->setLogVersion(versmap.value("rel_rev"));
if(!settings->cacheDisabled())
installer->setCache(true);
installer->setMountPoint(settings->mountpoint());
@@ -571,13 +586,6 @@ void RbUtilQt::install()
buildInfo.open();
QSettings info(buildInfo.fileName(), QSettings::IniFormat, this);
buildInfo.close();
-
- if(settings->curReleased()) {
- // only set the keys if needed -- querying will yield an empty string
- // if not set.
- versmap.insert("rel_rev", settings->lastRelease(settings->curPlatform()));
- versmap.insert("rel_date", ""); // FIXME: provide the release timestamp
- }
installWindow->setVersionStrings(versmap);
installWindow->show();