From 06c38459a2addc5c12fd9e296113ecda60ef1ca1 Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Wed, 19 May 2021 12:16:42 +0200 Subject: Fix --disable-scripting for DESKTOP build Change-Id: I89938a17307a363f5de808200914940503312829 --- Repository.mk | 2 +- accessibility/Library_acc.mk | 13 +++++++++---- accessibility/source/helper/acc_factory.cxx | 6 ++++++ configure.ac | 2 +- dbaccess/Module_dbaccess.mk | 2 ++ sc/Module_sc.mk | 2 ++ sccomp/Module_sccomp.mk | 2 +- scripting/Module_scripting.mk | 2 +- solenv/bin/image-sort.py | 2 +- svx/source/form/fmscriptingenv.cxx | 3 ++- sw/CppunitTest_sw_apitests.mk | 2 +- sw/CppunitTest_sw_macros_test.mk | 2 +- sw/CppunitTest_sw_uwriter.mk | 2 +- unotest/source/cpp/bootstrapfixturebase.cxx | 10 +++++++++- 14 files changed, 38 insertions(+), 14 deletions(-) diff --git a/Repository.mk b/Repository.mk index b186990a0446..47108ae8c66c 100644 --- a/Repository.mk +++ b/Repository.mk @@ -925,7 +925,7 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\ $(if $(ENABLE_SCRIPTING_BEANSHELL),scripting_ScriptsBeanShell) \ $(if $(ENABLE_SCRIPTING_JAVASCRIPT),scripting_ScriptsJavaScript) \ ) \ - $(if $(DISABLE_SCRIPTING),,scripting_scriptbindinglib) \ + $(if $(filter SCRIPTING,$(BUILD_TYPE)),scripting_scriptbindinglib) \ $(if $(filter $(OS),MACOSX),sysui_osxicons) \ wizards_basicshare \ wizards_basicsrvaccess2base \ diff --git a/accessibility/Library_acc.mk b/accessibility/Library_acc.mk index caf3d612330b..6e4c90eba50d 100644 --- a/accessibility/Library_acc.mk +++ b/accessibility/Library_acc.mk @@ -63,10 +63,6 @@ $(eval $(call gb_Library_add_exception_objects,acc,\ accessibility/source/extended/accessibleiconchoicectrlentry \ accessibility/source/extended/accessiblelistbox \ accessibility/source/extended/accessiblelistboxentry \ - accessibility/source/extended/accessibletabbar \ - accessibility/source/extended/accessibletabbarbase \ - accessibility/source/extended/accessibletabbarpage \ - accessibility/source/extended/accessibletabbarpagelist \ accessibility/source/extended/accessibletablistbox \ accessibility/source/extended/accessibletablistboxtable \ accessibility/source/extended/textwindowaccessibility \ @@ -110,4 +106,13 @@ $(eval $(call gb_Library_add_exception_objects,acc,\ accessibility/source/standard/vclxaccessibletoolboxitem \ )) +ifneq ($(filter SCRIPTING,$(BUILD_TYPE)),) +$(eval $(call gb_Library_add_exception_objects,acc,\ + accessibility/source/extended/accessibletabbar \ + accessibility/source/extended/accessibletabbarbase \ + accessibility/source/extended/accessibletabbarpage \ + accessibility/source/extended/accessibletabbarpagelist \ +)) +endif + # vim:set noet sw=4 ts=4: diff --git a/accessibility/source/helper/acc_factory.cxx b/accessibility/source/helper/acc_factory.cxx index fef3214b321f..7b0a4a52d494 100644 --- a/accessibility/source/helper/acc_factory.cxx +++ b/accessibility/source/helper/acc_factory.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include #include #include @@ -378,7 +379,12 @@ Reference< XAccessible > AccessibleFactory::createAccessibleIconChoiceCtrl( Reference< XAccessible > AccessibleFactory::createAccessibleTabBar( TabBar& _rTabBar ) const { +#if HAVE_FEATURE_SCRIPTING return new AccessibleTabBar( &_rTabBar ); +#else + (void)_rTabBar; + return nullptr; +#endif } Reference< XAccessibleContext > AccessibleFactory::createAccessibleTextWindowContext( diff --git a/configure.ac b/configure.ac index 7bfb94047a00..ac7664ce35f5 100644 --- a/configure.ac +++ b/configure.ac @@ -5417,6 +5417,7 @@ if test "$cross_compiling" = "yes"; then --disable-opencl \ --disable-pdfimport \ --disable-postgresql-sdbc \ + --disable-scripting \ --disable-skia \ --enable-icecream="$enable_icecream" \ --without-doxygen \ @@ -5460,7 +5461,6 @@ if test "$cross_compiling" = "yes"; then OPENSSL ORCUS PYTHON - SCRIPTING ZLIB " # converts BUILD_TYPE and PERMITTED_BUILD_TARGETS into non-whitespace, diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk index 49bd9d202c7f..55937faeaf9b 100644 --- a/dbaccess/Module_dbaccess.mk +++ b/dbaccess/Module_dbaccess.mk @@ -53,6 +53,7 @@ $(eval $(call gb_Module_add_check_targets,dbaccess,\ )) endif +ifneq ($(filter SCRIPTING,$(BUILD_TYPE)),) $(eval $(call gb_Module_add_check_targets,dbaccess,\ CppunitTest_dbaccess_dialog_save \ CppunitTest_dbaccess_empty_stdlib_save \ @@ -60,6 +61,7 @@ $(eval $(call gb_Module_add_check_targets,dbaccess,\ CppunitTest_dbaccess_macros_test \ CppunitTest_dbaccess_hsqlschema_import \ )) +endif # this test fails 50% of the time on the mac jenkins buildbots ifeq ($(ENABLE_JAVA),TRUE) diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk index 1d31df9b44fa..c069720b6166 100644 --- a/sc/Module_sc.mk +++ b/sc/Module_sc.mk @@ -36,6 +36,7 @@ $(eval $(call gb_Module_add_targets,sc,\ endif ifneq ($(OS),iOS) +ifneq ($(filter SCRIPTING,$(BUILD_TYPE)),) $(eval $(call gb_Module_add_check_targets,sc,\ Library_scqahelper \ $(if $(and $(filter $(COM),MSC),$(MERGELIBS)),, \ @@ -57,6 +58,7 @@ $(eval $(call gb_Module_add_check_targets,sc,\ CppunitTest_sc_cache_test \ CppunitTest_sc_shapetest \ )) +endif ifneq ($(DISABLE_GUI),TRUE) ifeq ($(OS),LINUX) diff --git a/sccomp/Module_sccomp.mk b/sccomp/Module_sccomp.mk index 8babadc3e41e..e211ee26f958 100644 --- a/sccomp/Module_sccomp.mk +++ b/sccomp/Module_sccomp.mk @@ -29,7 +29,7 @@ $(eval $(call gb_Module_add_l10n_targets,sccomp,\ $(eval $(call gb_Module_add_check_targets,sccomp,\ CppunitTest_sccomp_solver \ - $(if $(and $(filter INTEL,$(CPUNAME)),$(filter -fsanitize=%,$(gb_CXX))),,CppunitTest_sccomp_swarmsolvertest) \ + $(if $(and $(filter INTEL,$(CPUNAME)),$(filter -fsanitize=%,$(gb_CXX))),,$(if $(filter SCRIPTING,$(BUILD_TYPE)),CppunitTest_sccomp_swarmsolvertest)) \ )) # vim: set noet sw=4 ts=4: diff --git a/scripting/Module_scripting.mk b/scripting/Module_scripting.mk index 1d603d585a11..1d974e8e7c26 100644 --- a/scripting/Module_scripting.mk +++ b/scripting/Module_scripting.mk @@ -31,7 +31,7 @@ $(eval $(call gb_Module_add_targets,scripting,\ $(if $(ENABLE_SCRIPTING_BEANSHELL),Package_ScriptsBeanShell) \ $(if $(ENABLE_SCRIPTING_JAVASCRIPT),Package_ScriptsJavaScript) \ ) \ - $(if $(DISABLE_SCRIPTING),,Package_scriptbindinglib) \ + Package_scriptbindinglib \ $(if $(DISABLE_PYTHON),,\ Package_scriptproviderforpython \ Package_ScriptsPython \ diff --git a/solenv/bin/image-sort.py b/solenv/bin/image-sort.py index 75b5da6ce0e7..5d248684b4a6 100644 --- a/solenv/bin/image-sort.py +++ b/solenv/bin/image-sort.py @@ -30,7 +30,7 @@ def read_icons(fname): full_path = os.path.join(args.base_path, fname) if not os.path.exists(full_path): if not args.quiet: - print("Skipping non-existent {}\n".format(full_path), file=sys.stderr) + print("Skipping non-existent {}".format(full_path), file=sys.stderr) return images with open(full_path) as fp: for line in fp: diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx index 73ad3f83eceb..cdff131df959 100644 --- a/svx/source/form/fmscriptingenv.cxx +++ b/svx/source/form/fmscriptingenv.cxx @@ -793,6 +793,7 @@ namespace svxform impl_registerOrRevoke_throw( _rxManager, false ); } +#if HAVE_FEATURE_SCRIPTING namespace { class NewStyleUNOScript @@ -830,7 +831,7 @@ namespace svxform m_rObjectShell.CallXScript( m_sScriptCode, _rArguments, _rSynchronousResult, aOutArgsIndex, aOutArgs, true, aCaller.hasValue() ? &aCaller : nullptr ); } } - +#endif void FormScriptingEnvironment::doFireScriptEvent( const ScriptEvent& _rEvent, Any* _pSynchronousResult ) { diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk index d65c058fc97c..4124c32be618 100644 --- a/sw/CppunitTest_sw_apitests.mk +++ b/sw/CppunitTest_sw_apitests.mk @@ -53,7 +53,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_apitests, \ ucbhelper \ unotest \ utl \ - vbahelper \ + $(call gb_Helper_optional,SCRIPTING,vbahelper) \ vcl \ xo \ )) diff --git a/sw/CppunitTest_sw_macros_test.mk b/sw/CppunitTest_sw_macros_test.mk index 7f38c45180bb..bb675c609df3 100644 --- a/sw/CppunitTest_sw_macros_test.mk +++ b/sw/CppunitTest_sw_macros_test.mk @@ -48,7 +48,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_macros_test, \ ucbhelper \ unotest \ utl \ - vbahelper \ + $(call gb_Helper_optional,SCRIPTING,vbahelper) \ vcl \ xo \ )) diff --git a/sw/CppunitTest_sw_uwriter.mk b/sw/CppunitTest_sw_uwriter.mk index e6a490c5dff1..b0c36f396ba0 100644 --- a/sw/CppunitTest_sw_uwriter.mk +++ b/sw/CppunitTest_sw_uwriter.mk @@ -56,7 +56,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_uwriter, \ ucbhelper \ unotest \ utl \ - vbahelper \ + $(call gb_Helper_optional,SCRIPTING,vbahelper) \ vcl \ xmlreader \ xo \ diff --git a/unotest/source/cpp/bootstrapfixturebase.cxx b/unotest/source/cpp/bootstrapfixturebase.cxx index 5c5b3bcc3a9c..348ecb796e85 100644 --- a/unotest/source/cpp/bootstrapfixturebase.cxx +++ b/unotest/source/cpp/bootstrapfixturebase.cxx @@ -8,10 +8,13 @@ */ #include +#include #include #include +#if HAVE_FEATURE_SCRIPTING #include +#endif using namespace ::com::sun::star; @@ -30,6 +33,11 @@ void test::BootstrapFixtureBase::setUp() m_xSFactory.set(m_xFactory, uno::UNO_QUERY_THROW); } -void test::BootstrapFixtureBase::tearDown() { StarBASIC::DetachAllDocBasicItems(); } +void test::BootstrapFixtureBase::tearDown() +{ +#if HAVE_FEATURE_SCRIPTING + StarBASIC::DetachAllDocBasicItems() +#endif +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit