mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 21:25:19 -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;
|
return;
|
||||||
}
|
}
|
||||||
// Bootloader
|
// Bootloader
|
||||||
m_error = false;
|
if(devices->value("needsbootloader", "") == "yes") {
|
||||||
m_installed = false;
|
m_error = false;
|
||||||
if(!installBootloaderAuto())
|
m_installed = false;
|
||||||
return;
|
if(!installBootloaderAuto())
|
||||||
else
|
return;
|
||||||
{
|
else
|
||||||
// wait for boot loader installation finished
|
{
|
||||||
while(!m_installed)
|
// wait for boot loader installation finished
|
||||||
QApplication::processEvents();
|
while(!m_installed)
|
||||||
|
QApplication::processEvents();
|
||||||
|
}
|
||||||
|
if(m_error) return;
|
||||||
|
logger->undoAbort();
|
||||||
}
|
}
|
||||||
if(m_error) return;
|
|
||||||
logger->undoAbort();
|
|
||||||
|
|
||||||
// Rockbox
|
// Rockbox
|
||||||
m_error = false;
|
m_error = false;
|
||||||
|
|
@ -369,17 +371,20 @@ void RbUtilQt::completeInstall()
|
||||||
logger->undoAbort();
|
logger->undoAbort();
|
||||||
|
|
||||||
// Doom
|
// Doom
|
||||||
m_error = false;
|
if(hasDoom())
|
||||||
m_installed = false;
|
|
||||||
if(!installDoomAuto())
|
|
||||||
return;
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
// wait for boot loader installation finished
|
m_error = false;
|
||||||
while(!m_installed)
|
m_installed = false;
|
||||||
QApplication::processEvents();
|
if(!installDoomAuto())
|
||||||
|
return;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// wait for boot loader installation finished
|
||||||
|
while(!m_installed)
|
||||||
|
QApplication::processEvents();
|
||||||
|
}
|
||||||
|
if(m_error) return;
|
||||||
}
|
}
|
||||||
if(m_error) return;
|
|
||||||
|
|
||||||
|
|
||||||
// theme
|
// theme
|
||||||
|
|
@ -408,18 +413,20 @@ void RbUtilQt::smallInstall()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Bootloader
|
// Bootloader
|
||||||
m_error = false;
|
if(devices->value("needsbootloader", "") == "yes") {
|
||||||
m_installed = false;
|
m_error = false;
|
||||||
if(!installBootloaderAuto())
|
m_installed = false;
|
||||||
return;
|
if(!installBootloaderAuto())
|
||||||
else
|
return;
|
||||||
{
|
else
|
||||||
// wait for boot loader installation finished
|
{
|
||||||
while(!m_installed)
|
// wait for boot loader installation finished
|
||||||
QApplication::processEvents();
|
while(!m_installed)
|
||||||
|
QApplication::processEvents();
|
||||||
|
}
|
||||||
|
if(m_error) return;
|
||||||
|
logger->undoAbort();
|
||||||
}
|
}
|
||||||
if(m_error) return;
|
|
||||||
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
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue