mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-16 00:22:29 -05:00
rbutil: Don't try to install voice file if it's not available.
Change-Id: I42f70d6cf76298216bb626fd0fe760c0ce0a9835
This commit is contained in:
parent
0d2257d1f7
commit
1a3d12ceea
1 changed files with 28 additions and 28 deletions
|
|
@ -506,38 +506,38 @@ void SelectiveInstallWidget::installFonts(void)
|
||||||
|
|
||||||
void SelectiveInstallWidget::installVoicefile(void)
|
void SelectiveInstallWidget::installVoicefile(void)
|
||||||
{
|
{
|
||||||
if(ui.voiceCheckbox->isChecked()) {
|
if(ui.voiceCheckbox->isChecked() && ui.voiceCheckbox->isEnabled()) {
|
||||||
LOG_INFO() << "installing Voice file";
|
LOG_INFO() << "installing Voice file";
|
||||||
QString lang = ui.voiceCombobox->currentData().toString();
|
QString lang = ui.voiceCombobox->currentData().toString();
|
||||||
|
|
||||||
RockboxInfo installInfo(m_mountpoint);
|
RockboxInfo installInfo(m_mountpoint);
|
||||||
QString voiceurl;
|
QString voiceurl;
|
||||||
QString logversion;
|
QString logversion;
|
||||||
QString relversion = installInfo.release();
|
QString relversion = installInfo.release();
|
||||||
if(m_buildtype != SystemInfo::BuildRelease) {
|
if(m_buildtype != SystemInfo::BuildRelease) {
|
||||||
// release is empty for non-release versions (i.e. daily / current)
|
// release is empty for non-release versions (i.e. daily / current)
|
||||||
logversion = installInfo.release();
|
logversion = installInfo.release();
|
||||||
}
|
}
|
||||||
voiceurl = SystemInfo::value(SystemInfo::VoiceUrl, m_buildtype).toString();
|
voiceurl = SystemInfo::value(SystemInfo::VoiceUrl, m_buildtype).toString();
|
||||||
voiceurl.replace("%RELVERSION%", m_versions[m_buildtype]);
|
voiceurl.replace("%RELVERSION%", m_versions[m_buildtype]);
|
||||||
voiceurl.replace("%MODEL%", m_target);
|
voiceurl.replace("%MODEL%", m_target);
|
||||||
voiceurl.replace("%LANGUAGE%", lang);
|
voiceurl.replace("%LANGUAGE%", lang);
|
||||||
|
|
||||||
// create new zip installer
|
// create new zip installer
|
||||||
if(m_zipinstaller != nullptr) m_zipinstaller->deleteLater();
|
if(m_zipinstaller != nullptr) m_zipinstaller->deleteLater();
|
||||||
m_zipinstaller = new ZipInstaller(this);
|
m_zipinstaller = new ZipInstaller(this);
|
||||||
m_zipinstaller->setUrl(voiceurl);
|
m_zipinstaller->setUrl(voiceurl);
|
||||||
m_zipinstaller->setLogSection("Voice (" + lang + ")");
|
m_zipinstaller->setLogSection("Voice (" + lang + ")");
|
||||||
m_zipinstaller->setLogVersion(logversion);
|
m_zipinstaller->setLogVersion(logversion);
|
||||||
m_zipinstaller->setMountPoint(m_mountpoint);
|
m_zipinstaller->setMountPoint(m_mountpoint);
|
||||||
if(!RbSettings::value(RbSettings::CacheDisabled).toBool())
|
if(!RbSettings::value(RbSettings::CacheDisabled).toBool())
|
||||||
m_zipinstaller->setCache(true);
|
m_zipinstaller->setCache(true);
|
||||||
|
|
||||||
connect(m_zipinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool)));
|
connect(m_zipinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool)));
|
||||||
connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int)));
|
connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int)));
|
||||||
connect(m_zipinstaller, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int)));
|
connect(m_zipinstaller, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int)));
|
||||||
connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort()));
|
connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort()));
|
||||||
m_zipinstaller->install();
|
m_zipinstaller->install();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LOG_INFO() << "Voice install disabled.";
|
LOG_INFO() << "Voice install disabled.";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue