summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2010-06-07 17:04:02 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2010-06-07 17:04:02 +0000
commit18b350c972fc7271d374e2f35b0e88437237d35c (patch)
treeb5f82f45cf108a0d16bc3c1fd3a934773226ab78 /rbutil
parent3f5e61e094e98ddcd5fc4baabc271bf2a2b677d4 (diff)
downloadrockbox-18b350c972fc7271d374e2f35b0e88437237d35c.tar.gz
rockbox-18b350c972fc7271d374e2f35b0e88437237d35c.tar.bz2
rockbox-18b350c972fc7271d374e2f35b0e88437237d35c.zip
Distinguish between release and current build when installing fonts.
As with the voice file installation changed in r26637 the same issue exists for fonts. While the fonts package rarely changes and therefore this shouldn't have had a negative impact in the past use the correct font package anyway. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26667 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/base/systeminfo.cpp3
-rw-r--r--rbutil/rbutilqt/base/systeminfo.h5
-rw-r--r--rbutil/rbutilqt/rbutil.ini5
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp32
4 files changed, 37 insertions, 8 deletions
diff --git a/rbutil/rbutilqt/base/systeminfo.cpp b/rbutil/rbutilqt/base/systeminfo.cpp
index c1bb35ab4d..b493168699 100644
--- a/rbutil/rbutilqt/base/systeminfo.cpp
+++ b/rbutil/rbutilqt/base/systeminfo.cpp
@@ -37,7 +37,8 @@ const static struct {
{ SystemInfo::BleedingUrl, "bleeding_url", "" },
{ SystemInfo::BootloaderUrl, "bootloader_url", "" },
{ SystemInfo::BootloaderInfoUrl, "bootloader_info_url", "" },
- { SystemInfo::FontUrl, "font_url", "" },
+ { SystemInfo::ReleaseFontUrl, "release_font_url", "" },
+ { SystemInfo::DailyFontUrl, "daily_font_url", "" },
{ SystemInfo::DailyVoiceUrl, "daily_voice_url", "" },
{ SystemInfo::ReleaseVoiceUrl, "release_voice_url", "" },
{ SystemInfo::DoomUrl, "doom_url", "" },
diff --git a/rbutil/rbutilqt/base/systeminfo.h b/rbutil/rbutilqt/base/systeminfo.h
index 5e5b60770a..214e423a51 100644
--- a/rbutil/rbutilqt/base/systeminfo.h
+++ b/rbutil/rbutilqt/base/systeminfo.h
@@ -41,12 +41,13 @@ class SystemInfo : public QObject
BleedingUrl,
BootloaderUrl,
BootloaderInfoUrl,
- FontUrl,
+ DailyUrl,
+ DailyFontUrl,
DailyVoiceUrl,
DoomUrl,
ReleaseUrl,
ReleaseVoiceUrl,
- DailyUrl,
+ ReleaseFontUrl,
ServerConfUrl,
GenlangUrl,
ThemesUrl,
diff --git a/rbutil/rbutilqt/rbutil.ini b/rbutil/rbutilqt/rbutil.ini
index 273486fc2a..8f1591ac9c 100644
--- a/rbutil/rbutilqt/rbutil.ini
+++ b/rbutil/rbutilqt/rbutil.ini
@@ -20,7 +20,10 @@ themes_info_url=http://themes.rockbox.org/rbutilqt.php?target=%TARGET%&release=%
; server information
server_conf_url=http://download.rockbox.org/daily/build-info
bleeding_info=http://build.rockbox.org/cvsmod/build-info
-font_url=http://download.rockbox.org/daily/fonts/rockbox-fonts.zip
+
+; 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
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index d503da00e4..4485bacaec 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -798,6 +798,15 @@ void RbUtilQt::installBootloaderPost(bool error)
void RbUtilQt::installFontsBtn()
{
if(chkConfig(true)) return;
+ QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString();
+ RockboxInfo installInfo(mountpoint);
+ if(installInfo.revision().isEmpty() && installInfo.release().isEmpty()) {
+ QMessageBox::critical(this, tr("No Rockbox installation found"),
+ tr("Could not determine the installed Rockbox version. "
+ "Please install a Rockbox build before installing "
+ "fonts."));
+ return;
+ }
if(QMessageBox::question(this, tr("Confirm Installation"),
tr("Do you really want to install the fonts package?"),
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return;
@@ -816,13 +825,28 @@ bool RbUtilQt::installFontsAuto()
void RbUtilQt::installFonts()
{
+ QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString();
+ RockboxInfo installInfo(mountpoint);
+ QString fontsurl;
+ QString logversion;
+ QString relversion = installInfo.release();
+ if(relversion.isEmpty()) {
+ // release is empty for non-release versions (i.e. daily / current)
+ fontsurl = SystemInfo::value(SystemInfo::DailyFontUrl).toString();
+ logversion = installInfo.revision();
+ }
+ else {
+ fontsurl = SystemInfo::value(SystemInfo::ReleaseFontUrl).toString();
+ logversion = installInfo.release();
+ }
+ fontsurl.replace("%RELEASEVER%", relversion);
+
// create zip installer
installer = new ZipInstaller(this);
-
- installer->setUrl(SystemInfo::value(SystemInfo::FontUrl).toString());
+ installer->setUrl(fontsurl);
installer->setLogSection("Fonts");
- installer->setLogVersion(ServerInfo::value(ServerInfo::DailyDate).toString());
- installer->setMountPoint(RbSettings::value(RbSettings::Mountpoint).toString());
+ installer->setLogVersion(logversion);
+ installer->setMountPoint(mountpoint);
if(!RbSettings::value(RbSettings::CacheDisabled).toBool())
installer->setCache(true);