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

@@ -114,6 +114,15 @@ if test "$enable_upnp" = "yes"; then
AC_DEFINE(ENABLE_UPNP,1,[include UPNP support - currently broken]) AC_DEFINE(ENABLE_UPNP,1,[include UPNP support - currently broken])
fi 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, AC_ARG_WITH(stb-hal-includes,
[ --with-stb-hal-includes=PATH path for libstb-hal includes [[NONE]]], [ --with-stb-hal-includes=PATH path for libstb-hal includes [[NONE]]],
[STB_HAL_INC="$withval"],[STB_HAL_INC=""]) [STB_HAL_INC="$withval"],[STB_HAL_INC=""])

View File

@@ -101,7 +101,6 @@ libneutrino_gui_a_SOURCES = \
themes.cpp \ themes.cpp \
timeosd.cpp \ timeosd.cpp \
update.cpp \ update.cpp \
update_ext.cpp \
update_menue.cpp \ update_menue.cpp \
update_settings.cpp \ update_settings.cpp \
user_menue.cpp \ user_menue.cpp \
@@ -110,6 +109,11 @@ libneutrino_gui_a_SOURCES = \
videosettings.cpp \ videosettings.cpp \
zapit_setup.cpp zapit_setup.cpp
if ENABLE_EXTUPDATE
libneutrino_gui_a_SOURCES += \
update_ext.cpp
endif
libneutrino_gui2_a_SOURCES = \ libneutrino_gui2_a_SOURCES = \
cam_menu.cpp \ cam_menu.cpp \
color.cpp \ color.cpp \

View File

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

View File

@@ -27,6 +27,7 @@
#ifndef __CEXTUPDATE__ #ifndef __CEXTUPDATE__
#define __CEXTUPDATE__ #define __CEXTUPDATE__
#if ENABLE_EXTUPDATE
#include <gui/widget/menue.h> #include <gui/widget/menue.h>
#include <system/helpers.h> #include <system/helpers.h>
@@ -114,4 +115,6 @@ static unsigned int timer_msec;
snprintf(updateLogBuf, sizeof(updateLogBuf), "[update:%d] " fmt, __LINE__ , ## args); \ snprintf(updateLogBuf, sizeof(updateLogBuf), "[update:%d] " fmt, __LINE__ , ## args); \
updateLog(updateLogBuf); updateLog(updateLogBuf);
#endif
#endif // __CEXTUPDATE__ #endif // __CEXTUPDATE__

View File

@@ -409,8 +409,10 @@ bool CFileHelpers::copyDir(const char *Src, const char *Dst, bool backupMode)
// is file // is file
else if (S_ISREG(FileInfo.st_mode)) { else if (S_ISREG(FileInfo.st_mode)) {
std::string save = ""; std::string save = "";
#if ENABLE_EXTUPDATE
if (backupMode && (CExtUpdate::getInstance()->isBlacklistEntry(srcPath))) if (backupMode && (CExtUpdate::getInstance()->isBlacklistEntry(srcPath)))
save = ".save"; save = ".save";
#endif
copyFile(srcPath, (dstPath + save).c_str(), FileInfo.st_mode & 0x0FFF); copyFile(srcPath, (dstPath + save).c_str(), FileInfo.st_mode & 0x0FFF);
} }
} }