mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 07:23:09 +02:00
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:
@@ -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=""])
|
||||
|
@@ -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 \
|
||||
|
@@ -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);
|
||||
|
@@ -27,6 +27,7 @@
|
||||
|
||||
#ifndef __CEXTUPDATE__
|
||||
#define __CEXTUPDATE__
|
||||
#if ENABLE_EXTUPDATE
|
||||
|
||||
#include <gui/widget/menue.h>
|
||||
#include <system/helpers.h>
|
||||
@@ -114,4 +115,6 @@ static unsigned int timer_msec;
|
||||
snprintf(updateLogBuf, sizeof(updateLogBuf), "[update:%d] " fmt, __LINE__ , ## args); \
|
||||
updateLog(updateLogBuf);
|
||||
|
||||
#endif
|
||||
|
||||
#endif // __CEXTUPDATE__
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user