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:
Antoine Cellerier 2007-09-15 22:32:14 +00:00
parent 78d7ece5e9
commit ef425feeb3
2 changed files with 46 additions and 33 deletions

View file

@ -327,6 +327,7 @@ void RbUtilQt::completeInstall()
return; return;
} }
// Bootloader // Bootloader
if(devices->value("needsbootloader", "") == "yes") {
m_error = false; m_error = false;
m_installed = false; m_installed = false;
if(!installBootloaderAuto()) if(!installBootloaderAuto())
@ -339,6 +340,7 @@ void RbUtilQt::completeInstall()
} }
if(m_error) return; if(m_error) return;
logger->undoAbort(); logger->undoAbort();
}
// Rockbox // Rockbox
m_error = false; m_error = false;
@ -369,6 +371,8 @@ void RbUtilQt::completeInstall()
logger->undoAbort(); logger->undoAbort();
// Doom // Doom
if(hasDoom())
{
m_error = false; m_error = false;
m_installed = false; m_installed = false;
if(!installDoomAuto()) if(!installDoomAuto())
@ -380,6 +384,7 @@ void RbUtilQt::completeInstall()
QApplication::processEvents(); QApplication::processEvents();
} }
if(m_error) return; if(m_error) return;
}
// theme // theme
@ -408,6 +413,7 @@ void RbUtilQt::smallInstall()
return; return;
} }
// Bootloader // Bootloader
if(devices->value("needsbootloader", "") == "yes") {
m_error = false; m_error = false;
m_installed = false; m_installed = false;
if(!installBootloaderAuto()) if(!installBootloaderAuto())
@ -420,6 +426,7 @@ void RbUtilQt::smallInstall()
} }
if(m_error) return; if(m_error) return;
logger->undoAbort(); logger->undoAbort();
}
// Rockbox // Rockbox
m_error = false; m_error = false;
@ -677,8 +684,7 @@ void RbUtilQt::installVoice()
void RbUtilQt::installDoomBtn() void RbUtilQt::installDoomBtn()
{ {
QFile doomrock(userSettings->value("mountpoint").toString()+"/.rockbox/rocks/games/doom.rock"); if(!hasDoom()){
if(!doomrock.exists()){
QMessageBox::critical(this, tr("Error"), tr("Your device doesn't have a doom plugin. Aborting.")); QMessageBox::critical(this, tr("Error"), tr("Your device doesn't have a doom plugin. Aborting."));
return; return;
} }
@ -699,6 +705,12 @@ bool RbUtilQt::installDoomAuto()
return !m_error; return !m_error;
} }
bool RbUtilQt::hasDoom()
{
QFile doomrock(userSettings->value("mountpoint").toString()+"/.rockbox/rocks/games/doom.rock");
return doomrock.exists();
}
void RbUtilQt::installDoom() void RbUtilQt::installDoom()
{ {
// create zip installer // create zip installer

View file

@ -83,6 +83,7 @@ class RbUtilQt : public QMainWindow
bool installFontsAuto(void); bool installFontsAuto(void);
void installFonts(void); void installFonts(void);
bool hasDoom(void);
void installDoomBtn(void); void installDoomBtn(void);
bool installDoomAuto(void); bool installDoomAuto(void);
void installDoom(void); void installDoom(void);