Kaydet (Commit) a2e715e8 authored tarafından Katarina Behrens's avatar Katarina Behrens Kaydeden (comit) Andras Timar

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 e9e3da3c
...@@ -156,6 +156,7 @@ export ENABLE_MEDIAWIKI=@ENABLE_MEDIAWIKI@ ...@@ -156,6 +156,7 @@ export ENABLE_MEDIAWIKI=@ENABLE_MEDIAWIKI@
export ENABLE_MARIADBC=@ENABLE_MARIADBC@ export ENABLE_MARIADBC=@ENABLE_MARIADBC@
export ENABLE_NPAPI_FROM_BROWSER=@ENABLE_NPAPI_FROM_BROWSER@ export ENABLE_NPAPI_FROM_BROWSER=@ENABLE_NPAPI_FROM_BROWSER@
export ENABLE_ONLINE_UPDATE=@ENABLE_ONLINE_UPDATE@ export ENABLE_ONLINE_UPDATE=@ENABLE_ONLINE_UPDATE@
export ENABLE_EXTENSION_UPDATE=@ENABLE_EXTENSION_UPDATE@
export ENABLE_OOENV=@ENABLE_OOENV@ export ENABLE_OOENV=@ENABLE_OOENV@
export ENABLE_OPENGL=@ENABLE_OPENGL@ export ENABLE_OPENGL=@ENABLE_OPENGL@
export ENABLE_OPENGL_CANVAS=@ENABLE_OPENGL_CANVAS@ 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, ...@@ -1318,6 +1318,11 @@ AC_ARG_ENABLE(online-update,
LibreOffice. By default, it is enabled on Windows and Mac, disabled on Linux.]), 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, AC_ARG_ENABLE(release-build,
AS_HELP_STRING([--enable-release-build], AS_HELP_STRING([--enable-release-build],
[Enable release build. [Enable release build.
...@@ -11738,6 +11743,22 @@ else ...@@ -11738,6 +11743,22 @@ else
fi fi
AC_SUBST(ENABLE_ONLINE_UPDATE) 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 ===================================================================
dnl Test whether to create MSI with LIMITUI=1 (silent install) dnl Test whether to create MSI with LIMITUI=1 (silent install)
dnl =================================================================== dnl ===================================================================
...@@ -12984,6 +13005,7 @@ AC_CONFIG_FILES([config_host.mk ...@@ -12984,6 +13005,7 @@ AC_CONFIG_FILES([config_host.mk
AC_CONFIG_HEADERS([config_host/config_buildid.h]) AC_CONFIG_HEADERS([config_host/config_buildid.h])
AC_CONFIG_HEADERS([config_host/config_clang.h]) AC_CONFIG_HEADERS([config_host/config_clang.h])
AC_CONFIG_HEADERS([config_host/config_eot.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_cairo_canvas.h])
AC_CONFIG_HEADERS([config_host/config_cups.h]) AC_CONFIG_HEADERS([config_host/config_cups.h])
AC_CONFIG_HEADERS([config_host/config_features.h]) AC_CONFIG_HEADERS([config_host/config_features.h])
......
...@@ -364,7 +364,9 @@ MENU_COMMAND ExtBoxWithBtns_Impl::ShowPopupMenu( const Point & rPos, const long ...@@ -364,7 +364,9 @@ MENU_COMMAND ExtBoxWithBtns_Impl::ShowPopupMenu( const Point & rPos, const long
PopupMenu aPopup; PopupMenu aPopup;
#if ENABLE_EXTENSION_UPDATE
aPopup.InsertItem( CMD_UPDATE, DialogHelper::getResourceString( RID_CTX_ITEM_CHECK_UPDATE ) ); aPopup.InsertItem( CMD_UPDATE, DialogHelper::getResourceString( RID_CTX_ITEM_CHECK_UPDATE ) );
#endif
if ( ! GetEntryData( nPos )->m_bLocked ) if ( ! GetEntryData( nPos )->m_bLocked )
{ {
...@@ -700,7 +702,6 @@ ExtMgrDialog::ExtMgrDialog(vcl::Window *pParent, TheExtensionManager *pManager, ...@@ -700,7 +702,6 @@ ExtMgrDialog::ExtMgrDialog(vcl::Window *pParent, TheExtensionManager *pManager,
m_pAddBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleAddBtn ) ); m_pAddBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleAddBtn ) );
m_pCloseBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleCloseBtn ) ); m_pCloseBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleCloseBtn ) );
m_pUpdateBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleUpdateBtn ) );
m_pGetExtensions->SetClickHdl( LINK( this, ExtMgrDialog, HandleHyperlink ) ); m_pGetExtensions->SetClickHdl( LINK( this, ExtMgrDialog, HandleHyperlink ) );
m_pCancelBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleCancelBtn ) ); m_pCancelBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleCancelBtn ) );
...@@ -714,7 +715,12 @@ ExtMgrDialog::ExtMgrDialog(vcl::Window *pParent, TheExtensionManager *pManager, ...@@ -714,7 +715,12 @@ ExtMgrDialog::ExtMgrDialog(vcl::Window *pParent, TheExtensionManager *pManager,
m_pProgressBar->Hide(); m_pProgressBar->Hide();
#if ENABLE_EXTENSION_UPDATE
m_pUpdateBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleUpdateBtn ) );
m_pUpdateBtn->Enable(false); m_pUpdateBtn->Enable(false);
#else
m_pUpdateBtn->Hide();
#endif
m_aIdle.SetPriority(SchedulerPriority::LOWEST); m_aIdle.SetPriority(SchedulerPriority::LOWEST);
m_aIdle.SetIdleHdl( LINK( this, ExtMgrDialog, TimeOutHdl ) ); m_aIdle.SetIdleHdl( LINK( this, ExtMgrDialog, TimeOutHdl ) );
...@@ -1075,8 +1081,9 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleExtTypeCbx) ...@@ -1075,8 +1081,9 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleExtTypeCbx)
IMPL_LINK_NOARG(ExtMgrDialog, HandleUpdateBtn) IMPL_LINK_NOARG(ExtMgrDialog, HandleUpdateBtn)
{ {
#if ENABLE_EXTENSION_UPDATE
m_pManager->checkUpdates( false, true ); m_pManager->checkUpdates( false, true );
#endif
return 1; return 1;
} }
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_DIALOG2_HXX #ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_DIALOG2_HXX
#define 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/dialog.hxx>
#include <vcl/button.hxx> #include <vcl/button.hxx>
#include <vcl/fixed.hxx> #include <vcl/fixed.hxx>
......
...@@ -947,7 +947,11 @@ ProfileItem gid_Brand_Profileitem_Version_Extensionupdateurl ...@@ -947,7 +947,11 @@ ProfileItem gid_Brand_Profileitem_Version_Extensionupdateurl
Section = "Version"; Section = "Version";
Order = 18; Order = 18;
Key = "ExtensionUpdateURL"; 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 End
ProfileItem gid_Brand_Profileitem_Version_ReferenceOOoMajorMinor 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