forked from len0rd/rockbox
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
This commit is contained in:
parent
3f5e61e094
commit
18b350c972
4 changed files with 37 additions and 8 deletions
|
@ -37,7 +37,8 @@ const static struct {
|
||||||
{ SystemInfo::BleedingUrl, "bleeding_url", "" },
|
{ SystemInfo::BleedingUrl, "bleeding_url", "" },
|
||||||
{ SystemInfo::BootloaderUrl, "bootloader_url", "" },
|
{ SystemInfo::BootloaderUrl, "bootloader_url", "" },
|
||||||
{ SystemInfo::BootloaderInfoUrl, "bootloader_info_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::DailyVoiceUrl, "daily_voice_url", "" },
|
||||||
{ SystemInfo::ReleaseVoiceUrl, "release_voice_url", "" },
|
{ SystemInfo::ReleaseVoiceUrl, "release_voice_url", "" },
|
||||||
{ SystemInfo::DoomUrl, "doom_url", "" },
|
{ SystemInfo::DoomUrl, "doom_url", "" },
|
||||||
|
|
|
@ -41,12 +41,13 @@ class SystemInfo : public QObject
|
||||||
BleedingUrl,
|
BleedingUrl,
|
||||||
BootloaderUrl,
|
BootloaderUrl,
|
||||||
BootloaderInfoUrl,
|
BootloaderInfoUrl,
|
||||||
FontUrl,
|
DailyUrl,
|
||||||
|
DailyFontUrl,
|
||||||
DailyVoiceUrl,
|
DailyVoiceUrl,
|
||||||
DoomUrl,
|
DoomUrl,
|
||||||
ReleaseUrl,
|
ReleaseUrl,
|
||||||
ReleaseVoiceUrl,
|
ReleaseVoiceUrl,
|
||||||
DailyUrl,
|
ReleaseFontUrl,
|
||||||
ServerConfUrl,
|
ServerConfUrl,
|
||||||
GenlangUrl,
|
GenlangUrl,
|
||||||
ThemesUrl,
|
ThemesUrl,
|
||||||
|
|
|
@ -20,7 +20,10 @@ themes_info_url=http://themes.rockbox.org/rbutilqt.php?target=%TARGET%&release=%
|
||||||
; server information
|
; server information
|
||||||
server_conf_url=http://download.rockbox.org/daily/build-info
|
server_conf_url=http://download.rockbox.org/daily/build-info
|
||||||
bleeding_info=http://build.rockbox.org/cvsmod/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
|
; other
|
||||||
manual_url=http://download.rockbox.org/daily/manual
|
manual_url=http://download.rockbox.org/daily/manual
|
||||||
|
|
|
@ -798,6 +798,15 @@ void RbUtilQt::installBootloaderPost(bool error)
|
||||||
void RbUtilQt::installFontsBtn()
|
void RbUtilQt::installFontsBtn()
|
||||||
{
|
{
|
||||||
if(chkConfig(true)) return;
|
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"),
|
if(QMessageBox::question(this, tr("Confirm Installation"),
|
||||||
tr("Do you really want to install the fonts package?"),
|
tr("Do you really want to install the fonts package?"),
|
||||||
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return;
|
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return;
|
||||||
|
@ -816,13 +825,28 @@ bool RbUtilQt::installFontsAuto()
|
||||||
|
|
||||||
void RbUtilQt::installFonts()
|
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
|
// create zip installer
|
||||||
installer = new ZipInstaller(this);
|
installer = new ZipInstaller(this);
|
||||||
|
installer->setUrl(fontsurl);
|
||||||
installer->setUrl(SystemInfo::value(SystemInfo::FontUrl).toString());
|
|
||||||
installer->setLogSection("Fonts");
|
installer->setLogSection("Fonts");
|
||||||
installer->setLogVersion(ServerInfo::value(ServerInfo::DailyDate).toString());
|
installer->setLogVersion(logversion);
|
||||||
installer->setMountPoint(RbSettings::value(RbSettings::Mountpoint).toString());
|
installer->setMountPoint(mountpoint);
|
||||||
if(!RbSettings::value(RbSettings::CacheDisabled).toBool())
|
if(!RbSettings::value(RbSettings::CacheDisabled).toBool())
|
||||||
installer->setCache(true);
|
installer->setCache(true);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue