summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);