diff --git a/configure.ac b/configure.ac index 07a5fd643..f6e99f253 100644 --- a/configure.ac +++ b/configure.ac @@ -114,6 +114,15 @@ if test "$enable_upnp" = "yes"; then AC_DEFINE(ENABLE_UPNP,1,[include UPNP support - currently broken]) fi +AC_ARG_ENABLE(extupdate, + AS_HELP_STRING(--enable-extupdate,include extended update routine), + ,[enable_extupdate=no]) + +AM_CONDITIONAL(ENABLE_EXTUPDATE,test "$enable_extupdate" = "yes") +if test "$enable_extupdate" = "yes"; then + AC_DEFINE(ENABLE_EXTUPDATE,1,[include extended update routine]) +fi + AC_ARG_WITH(stb-hal-includes, [ --with-stb-hal-includes=PATH path for libstb-hal includes [[NONE]]], [STB_HAL_INC="$withval"],[STB_HAL_INC=""]) diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index d69fbc1e7..d30feaefb 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -101,7 +101,6 @@ libneutrino_gui_a_SOURCES = \ themes.cpp \ timeosd.cpp \ update.cpp \ - update_ext.cpp \ update_menue.cpp \ update_settings.cpp \ user_menue.cpp \ @@ -110,6 +109,11 @@ libneutrino_gui_a_SOURCES = \ videosettings.cpp \ zapit_setup.cpp +if ENABLE_EXTUPDATE +libneutrino_gui_a_SOURCES += \ + update_ext.cpp +endif + libneutrino_gui2_a_SOURCES = \ cam_menu.cpp \ color.cpp \ diff --git a/src/gui/update.cpp b/src/gui/update.cpp index 51ed5e007..d622f5e9c 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -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); diff --git a/src/gui/update_ext.h b/src/gui/update_ext.h index d327fab24..577c484c7 100644 --- a/src/gui/update_ext.h +++ b/src/gui/update_ext.h @@ -27,6 +27,7 @@ #ifndef __CEXTUPDATE__ #define __CEXTUPDATE__ +#if ENABLE_EXTUPDATE #include #include @@ -114,4 +115,6 @@ static unsigned int timer_msec; snprintf(updateLogBuf, sizeof(updateLogBuf), "[update:%d] " fmt, __LINE__ , ## args); \ updateLog(updateLogBuf); +#endif + #endif // __CEXTUPDATE__ diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp index c61f7e3c1..14a339404 100644 --- a/src/system/helpers.cpp +++ b/src/system/helpers.cpp @@ -409,8 +409,10 @@ bool CFileHelpers::copyDir(const char *Src, const char *Dst, bool backupMode) // is file else if (S_ISREG(FileInfo.st_mode)) { std::string save = ""; +#if ENABLE_EXTUPDATE if (backupMode && (CExtUpdate::getInstance()->isBlacklistEntry(srcPath))) save = ".save"; +#endif copyFile(srcPath, (dstPath + save).c_str(), FileInfo.st_mode & 0x0FFF); } }