Kaydet (Commit) e069404a authored tarafından Katarina Behrens's avatar Katarina Behrens Kaydeden (comit) Michael Stahl

Build time option --disable-extension-update

to disable the possibility to update installed extensions

Change-Id: Ifdee0f3b13ee3e2bcb288c8ded98cb9805a6e55a
Reviewed-on: https://gerrit.libreoffice.org/16059Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 72bd4796
......@@ -156,6 +156,7 @@ export ENABLE_MEDIAWIKI=@ENABLE_MEDIAWIKI@
export ENABLE_MARIADBC=@ENABLE_MARIADBC@
export ENABLE_NPAPI_FROM_BROWSER=@ENABLE_NPAPI_FROM_BROWSER@
export ENABLE_ONLINE_UPDATE=@ENABLE_ONLINE_UPDATE@
export ENABLE_EXTENSION_UPDATE=@ENABLE_EXTENSION_UPDATE@
export ENABLE_OOENV=@ENABLE_OOENV@
export ENABLE_OPENGL=@ENABLE_OPENGL@
export ENABLE_OPENGL_CANVAS=@ENABLE_OPENGL_CANVAS@
......
#ifndef CONFIG_EXTENSION_UPDATE
#define CONFIG_EXTENSION_UPDATE
#define ENABLE_EXTENSION_UPDATE 0
#endif
......@@ -1318,6 +1318,11 @@ AC_ARG_ENABLE(online-update,
LibreOffice. By default, it is enabled on Windows and Mac, disabled on Linux.]),
,)
AC_ARG_ENABLE(extension-update,
AS_HELP_STRING([--disable-extension-update],
[Disable possibility to update installed extensions.]),
,)
AC_ARG_ENABLE(release-build,
AS_HELP_STRING([--enable-release-build],
[Enable release build.
......@@ -11738,6 +11743,22 @@ else
fi
AC_SUBST(ENABLE_ONLINE_UPDATE)
dnl ===================================================================
dnl Test whether to enable extension update
dnl ===================================================================
AC_MSG_CHECKING([whether to enable extension update])
ENABLE_EXTENSION_UPDATE=
if test "x$enable_extension_update" = "xno"; then
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([yes])
ENABLE_EXTENSION_UPDATE="TRUE"
AC_DEFINE(ENABLE_EXTENSION_UPDATE)
SCPDEFS="$SCPDEFS -DENABLE_EXTENSION_UPDATE"
fi
AC_SUBST(ENABLE_EXTENSION_UPDATE)
dnl ===================================================================
dnl Test whether to create MSI with LIMITUI=1 (silent install)
dnl ===================================================================
......@@ -12984,6 +13005,7 @@ AC_CONFIG_FILES([config_host.mk
AC_CONFIG_HEADERS([config_host/config_buildid.h])
AC_CONFIG_HEADERS([config_host/config_clang.h])
AC_CONFIG_HEADERS([config_host/config_eot.h])
AC_CONFIG_HEADERS([config_host/config_extension_update.h])
AC_CONFIG_HEADERS([config_host/config_cairo_canvas.h])
AC_CONFIG_HEADERS([config_host/config_cups.h])
AC_CONFIG_HEADERS([config_host/config_features.h])
......
......@@ -364,7 +364,9 @@ MENU_COMMAND ExtBoxWithBtns_Impl::ShowPopupMenu( const Point & rPos, const long
PopupMenu aPopup;
#if ENABLE_EXTENSION_UPDATE
aPopup.InsertItem( CMD_UPDATE, DialogHelper::getResourceString( RID_CTX_ITEM_CHECK_UPDATE ) );
#endif
if ( ! GetEntryData( nPos )->m_bLocked )
{
......@@ -700,7 +702,6 @@ ExtMgrDialog::ExtMgrDialog(vcl::Window *pParent, TheExtensionManager *pManager,
m_pAddBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleAddBtn ) );
m_pCloseBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleCloseBtn ) );
m_pUpdateBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleUpdateBtn ) );
m_pGetExtensions->SetClickHdl( LINK( this, ExtMgrDialog, HandleHyperlink ) );
m_pCancelBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleCancelBtn ) );
......@@ -714,7 +715,12 @@ ExtMgrDialog::ExtMgrDialog(vcl::Window *pParent, TheExtensionManager *pManager,
m_pProgressBar->Hide();
#if ENABLE_EXTENSION_UPDATE
m_pUpdateBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleUpdateBtn ) );
m_pUpdateBtn->Enable(false);
#else
m_pUpdateBtn->Hide();
#endif
m_aIdle.SetPriority(SchedulerPriority::LOWEST);
m_aIdle.SetIdleHdl( LINK( this, ExtMgrDialog, TimeOutHdl ) );
......@@ -1075,8 +1081,9 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleExtTypeCbx)
IMPL_LINK_NOARG(ExtMgrDialog, HandleUpdateBtn)
{
#if ENABLE_EXTENSION_UPDATE
m_pManager->checkUpdates( false, true );
#endif
return 1;
}
......
......@@ -20,6 +20,8 @@
#ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_DIALOG2_HXX
#define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_DIALOG2_HXX
#include <config_extension_update.h>
#include <vcl/dialog.hxx>
#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
......
......@@ -947,7 +947,11 @@ ProfileItem gid_Brand_Profileitem_Version_Extensionupdateurl
Section = "Version";
Order = 18;
Key = "ExtensionUpdateURL";
Value = "http://updateexte.libreoffice.org/ExtensionUpdateService/check.Update";
#if defined(ENABLE_EXTENSION_UPDATE)
Value = "http://updateexte.libreoffice.org/ExtensionUpdateService/check.Update";
#else
Value = "";
#endif
End
ProfileItem gid_Brand_Profileitem_Version_ReferenceOOoMajorMinor
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment