summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorAntoine Cellerier <dionoea@videolan.org>2007-09-15 22:32:14 +0000
committerAntoine Cellerier <dionoea@videolan.org>2007-09-15 22:32:14 +0000
commitef425feeb36909e92c9a5e5d4646ac6b3e71beca (patch)
treea6221eca401ff84ddcec10c73787899ddebb2286 /rbutil
parent78d7ece5e914c3f307c42aea2dbb36cf33e7d81c (diff)
downloadrockbox-ef425feeb36909e92c9a5e5d4646ac6b3e71beca.tar.gz
rockbox-ef425feeb36909e92c9a5e5d4646ac6b3e71beca.tar.bz2
rockbox-ef425feeb36909e92c9a5e5d4646ac6b3e71beca.zip
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
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp78
-rw-r--r--rbutil/rbutilqt/rbutilqt.h1
2 files changed, 46 insertions, 33 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index 6a561e1b85..13f004de5a 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -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
diff --git a/rbutil/rbutilqt/rbutilqt.h b/rbutil/rbutilqt/rbutilqt.h
index 4d889284a3..d30732bb99 100644
--- a/rbutil/rbutilqt/rbutilqt.h
+++ b/rbutil/rbutilqt/rbutilqt.h
@@ -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);