mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
Fixes to the Complete and Small Installation routines: Don't try installing a bootloader if the target doesn't have one, Don't install doom WADs if the target doesn't have a doom plugin.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14717 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
78d7ece5e9
commit
ef425feeb3
2 changed files with 46 additions and 33 deletions
|
|
@ -327,18 +327,20 @@ void RbUtilQt::completeInstall()
|
|||
return;
|
||||
}
|
||||
// Bootloader
|
||||
m_error = false;
|
||||
m_installed = false;
|
||||
if(!installBootloaderAuto())
|
||||
return;
|
||||
else
|
||||
{
|
||||
// wait for boot loader installation finished
|
||||
while(!m_installed)
|
||||
QApplication::processEvents();
|
||||
if(devices->value("needsbootloader", "") == "yes") {
|
||||
m_error = false;
|
||||
m_installed = false;
|
||||
if(!installBootloaderAuto())
|
||||
return;
|
||||
else
|
||||
{
|
||||
// wait for boot loader installation finished
|
||||
while(!m_installed)
|
||||
QApplication::processEvents();
|
||||
}
|
||||
if(m_error) return;
|
||||
logger->undoAbort();
|
||||
}
|
||||
if(m_error) return;
|
||||
logger->undoAbort();
|
||||
|
||||
// Rockbox
|
||||
m_error = false;
|
||||
|
|
@ -369,17 +371,20 @@ void RbUtilQt::completeInstall()
|
|||
logger->undoAbort();
|
||||
|
||||
// Doom
|
||||
m_error = false;
|
||||
m_installed = false;
|
||||
if(!installDoomAuto())
|
||||
return;
|
||||
else
|
||||
if(hasDoom())
|
||||
{
|
||||
// wait for boot loader installation finished
|
||||
while(!m_installed)
|
||||
QApplication::processEvents();
|
||||
m_error = false;
|
||||
m_installed = false;
|
||||
if(!installDoomAuto())
|
||||
return;
|
||||
else
|
||||
{
|
||||
// wait for boot loader installation finished
|
||||
while(!m_installed)
|
||||
QApplication::processEvents();
|
||||
}
|
||||
if(m_error) return;
|
||||
}
|
||||
if(m_error) return;
|
||||
|
||||
|
||||
// theme
|
||||
|
|
@ -408,18 +413,20 @@ void RbUtilQt::smallInstall()
|
|||
return;
|
||||
}
|
||||
// Bootloader
|
||||
m_error = false;
|
||||
m_installed = false;
|
||||
if(!installBootloaderAuto())
|
||||
return;
|
||||
else
|
||||
{
|
||||
// wait for boot loader installation finished
|
||||
while(!m_installed)
|
||||
QApplication::processEvents();
|
||||
if(devices->value("needsbootloader", "") == "yes") {
|
||||
m_error = false;
|
||||
m_installed = false;
|
||||
if(!installBootloaderAuto())
|
||||
return;
|
||||
else
|
||||
{
|
||||
// wait for boot loader installation finished
|
||||
while(!m_installed)
|
||||
QApplication::processEvents();
|
||||
}
|
||||
if(m_error) return;
|
||||
logger->undoAbort();
|
||||
}
|
||||
if(m_error) return;
|
||||
logger->undoAbort();
|
||||
|
||||
// Rockbox
|
||||
m_error = false;
|
||||
|
|
@ -677,8 +684,7 @@ void RbUtilQt::installVoice()
|
|||
|
||||
void RbUtilQt::installDoomBtn()
|
||||
{
|
||||
QFile doomrock(userSettings->value("mountpoint").toString()+"/.rockbox/rocks/games/doom.rock");
|
||||
if(!doomrock.exists()){
|
||||
if(!hasDoom()){
|
||||
QMessageBox::critical(this, tr("Error"), tr("Your device doesn't have a doom plugin. Aborting."));
|
||||
return;
|
||||
}
|
||||
|
|
@ -699,6 +705,12 @@ bool RbUtilQt::installDoomAuto()
|
|||
return !m_error;
|
||||
}
|
||||
|
||||
bool RbUtilQt::hasDoom()
|
||||
{
|
||||
QFile doomrock(userSettings->value("mountpoint").toString()+"/.rockbox/rocks/games/doom.rock");
|
||||
return doomrock.exists();
|
||||
}
|
||||
|
||||
void RbUtilQt::installDoom()
|
||||
{
|
||||
// create zip installer
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ class RbUtilQt : public QMainWindow
|
|||
bool installFontsAuto(void);
|
||||
void installFonts(void);
|
||||
|
||||
bool hasDoom(void);
|
||||
void installDoomBtn(void);
|
||||
bool installDoomAuto(void);
|
||||
void installDoom(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue