make the extupdate build conditional

extupdate is not very useful for most platforms, so only
build it if --enable-extupdate is passed to configure
This commit is contained in:
Stefan Seyfried
2013-02-22 17:14:38 +01:00
parent 901b7cbd38
commit 5b72a7fe3c
5 changed files with 27 additions and 2 deletions

View File

@@ -461,9 +461,11 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &actionKey)
sleep(2);
//flash it...
#if ENABLE_EXTUPDATE
if (ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_APPLY_SETTINGS), CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NEUTRINO_ICON_UPDATE) == CMessageBox::mbrYes)
if (!CExtUpdate::getInstance()->applySettings(filename, CExtUpdate::MODE_SOFTUPDATE))
return menu_return::RETURN_REPAINT;
#endif
#ifdef DEBUG1
if(1) {
@@ -635,8 +637,10 @@ void CFlashExpert::showMTDSelector(const std::string & actionkey)
sprintf(sActionKey, "%s%d", actionkey.c_str(), lx);
mtdselector->addItem(new CMenuForwarderNonLocalized(mtdInfo->getMTDName(lx).c_str(), enabled, NULL, this, sActionKey, CRCInput::convertDigitToKey(shortcut++)));
}
#if ENABLE_EXTUPDATE
if (actionkey == "writemtd")
mtdselector->addItem(new CMenuForwarderNonLocalized("systemFS with settings", true, NULL, this, "writemtd10", CRCInput::convertDigitToKey(shortcut++)));
#endif
mtdselector->exec(NULL,"");
delete mtdselector;
}
@@ -702,10 +706,13 @@ int CFlashExpert::exec(CMenuTarget* parent, const std::string & actionKey)
selectedMTD = iWritemtd;
showFileSelector("");
} else {
#if ENABLE_EXTUPDATE
if(selectedMTD == 10) {
CExtUpdate::getInstance()->applySettings(actionKey, CExtUpdate::MODE_EXPERT);
}
else if(selectedMTD==-1) {
else
#endif
if (selectedMTD == -1) {
writemtd(actionKey, MTD_OF_WHOLE_IMAGE);
} else {
writemtd(actionKey, selectedMTD);