summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Repository.mk1
-rwxr-xr-xbin/check-elf-dynamic-objects2
-rw-r--r--solenv/gbuild/CppunitTest.mk1
-rw-r--r--vcl/Library_desktop_detector.mk73
-rw-r--r--vcl/Library_vcl.mk7
-rw-r--r--vcl/Module_vcl.mk1
-rw-r--r--vcl/inc/unx/desktops.hxx2
-rw-r--r--vcl/inc/vclpluginapi.h6
-rw-r--r--vcl/source/app/salplug.cxx21
-rw-r--r--vcl/unx/generic/desktopdetect/desktopdetector.cxx7
10 files changed, 10 insertions, 111 deletions
diff --git a/Repository.mk b/Repository.mk
index bee0b6ce5bca..29e2b00e0d45 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -515,7 +515,6 @@ $(eval $(call gb_Helper_register_plugins_for_install,OOOLIBS,ooo, \
acc \
$(if $(ENABLE_CUSTOMTARGET_COMPONENTS),components) \
cui \
- $(if $(USING_X11),desktop_detector) \
icg \
sdui \
$(if $(ENABLE_GEN),vclplug_gen) \
diff --git a/bin/check-elf-dynamic-objects b/bin/check-elf-dynamic-objects
index 415dea8f46ee..f636eadda1fa 100755
--- a/bin/check-elf-dynamic-objects
+++ b/bin/check-elf-dynamic-objects
@@ -165,7 +165,7 @@ local file="$1"
${kf5allowlist}"
fi
;;
- */libdesktop_detectorlo.so|*/oosplash|*/gengal.bin)
+ */oosplash|*/gengal.bin)
allowlist="${allowlist} ${x11allowlist}"
;;
*/libvclplug_genlo.so|*/libchartcorelo.so|*/libavmediaogl.so|*/libOGLTranslo.so|*/liboglcanvaslo.so)
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index adfcccce49fb..fc7351986b09 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -242,7 +242,6 @@ define gb_CppunitTest__use_vcl
$(call gb_CppunitTest_get_target,$(1)) : VCL := $(true)
$(call gb_CppunitTest_get_target,$(1)) : $(call gb_Library_get_target,vclbootstrapprotector)
ifeq ($(USING_X11),TRUE)
-$(call gb_CppunitTest_get_target,$(1)) : $(call gb_Library_get_target,desktop_detector)
$(call gb_CppunitTest_get_target,$(1)) : $(if $(filter $(2),$(true)),, \
$(call gb_Library_get_target,vclplug_gen) \
$(if $(ENABLE_GTK3),$(call gb_Library_get_target,vclplug_gtk3)) \
diff --git a/vcl/Library_desktop_detector.mk b/vcl/Library_desktop_detector.mk
deleted file mode 100644
index 2a2858fc4eae..000000000000
--- a/vcl/Library_desktop_detector.mk
+++ /dev/null
@@ -1,73 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# This file incorporates work covered by the following license notice:
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed
-# with this work for additional information regarding copyright
-# ownership. The ASF licenses this file to you under the Apache
-# License, Version 2.0 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.apache.org/licenses/LICENSE-2.0 .
-#
-
-$(eval $(call gb_Library_Library,desktop_detector))
-
-$(eval $(call gb_Library_set_plugin_for,desktop_detector,vcl))
-
-$(eval $(call gb_Library_set_include,desktop_detector,\
- $$(INCLUDE) \
- -I$(SRCDIR)/vcl/inc \
-))
-
-$(eval $(call gb_Library_add_defs,desktop_detector,\
- -DDESKTOP_DETECTOR_IMPLEMENTATION \
-))
-
-$(eval $(call gb_Library_use_sdk_api,desktop_detector))
-
-$(eval $(call gb_Library_use_libraries,desktop_detector,\
- tl \
- utl \
- sot \
- ucbhelper \
- basegfx \
- comphelper \
- cppuhelper \
- i18nlangtag \
- i18nutil \
- $(if $(ENABLE_JAVA), \
- jvmaccess) \
- cppu \
- sal \
-))
-
-$(eval $(call gb_Library_use_externals,desktop_detector,\
- boost_headers \
- icuuc \
-))
-
-$(eval $(call gb_Library_add_libs,desktop_detector,\
- -lX11 \
- -lXext \
- -lSM \
- -lICE \
-))
-
-$(eval $(call gb_Library_add_exception_objects,desktop_detector,\
- vcl/unx/generic/desktopdetect/desktopdetector \
-))
-
-ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
-$(eval $(call gb_Library_add_libs,desktop_detector,\
- -lm $(UNIX_DLAPI_LIBS) \
-))
-endif
-
-# vim: set noet sw=4 ts=4:
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index d4c72bfe9c0d..1bdb0fa700e5 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -46,7 +46,6 @@ $(eval $(call gb_Library_add_defs,vcl,\
-DVCL_DLLIMPLEMENTATION \
-DDLLIMPLEMENTATION_UITEST \
-DCUI_DLL_NAME=\"$(call gb_Library_get_runtime_filename,$(call gb_Library__get_name,cui))\" \
- -DDESKTOP_DETECTOR_DLL_NAME=\"$(call gb_Library_get_runtime_filename,$(call gb_Library__get_name,desktop_detector))\" \
-DTK_DLL_NAME=\"$(call gb_Library_get_runtime_filename,$(call gb_Library__get_name,tk))\" \
$(if $(SYSTEM_LIBFIXMATH),-DSYSTEM_LIBFIXMATH) \
))
@@ -571,6 +570,7 @@ endif
ifeq ($(USING_X11),TRUE)
$(eval $(call gb_Library_add_exception_objects,vcl,\
+ vcl/unx/generic/desktopdetect/desktopdetector \
vcl/unx/generic/window/sessioninhibitor \
vcl/unx/generic/printer/cpdmgr \
))
@@ -586,6 +586,11 @@ $(eval $(call gb_Library_add_libs,vcl,\
))
endif # USING_X11
+ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
+$(eval $(call gb_Library_add_libs,vcl,\
+ -lm $(UNIX_DLAPI_LIBS) \
+))
+endif
ifeq ($(DISABLE_GUI),TRUE)
$(eval $(call gb_Library_add_exception_objects,vcl,\
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index cc8667cad420..31d751a6e332 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -72,7 +72,6 @@ $(eval $(call gb_Module_add_l10n_targets,vcl,\
ifeq ($(USING_X11),TRUE)
$(eval $(call gb_Module_add_targets,vcl,\
$(if $(ENABLE_GEN),Library_vclplug_gen) \
- Library_desktop_detector \
Package_fontunxppds \
Package_fontunxpsprint \
))
diff --git a/vcl/inc/unx/desktops.hxx b/vcl/inc/unx/desktops.hxx
index b40004230f91..bf2c9bbc9279 100644
--- a/vcl/inc/unx/desktops.hxx
+++ b/vcl/inc/unx/desktops.hxx
@@ -36,4 +36,6 @@ enum SAL_DLLPUBLIC_RTTI DesktopType
DESKTOP_LXQT
}; // keep in sync with desktop_strings[] in salplug.cxx
+DesktopType get_desktop_environment();
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vclpluginapi.h b/vcl/inc/vclpluginapi.h
index 4211a581c979..88545ba9cef3 100644
--- a/vcl/inc/vclpluginapi.h
+++ b/vcl/inc/vclpluginapi.h
@@ -65,12 +65,6 @@
#define VCLPLUG_WIN_PUBLIC SAL_DLLPUBLIC_IMPORT
#endif
-#if defined DESKTOP_DETECTOR_IMPLEMENTATION
-#define DESKTOP_DETECTOR_PUBLIC SAL_DLLPUBLIC_EXPORT
-#else
-#define DESKTOP_DETECTOR_PUBLIC SAL_DLLPUBLIC_IMPORT
-#endif
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/app/salplug.cxx b/vcl/source/app/salplug.cxx
index 026867e99bf2..feb31dea77d4 100644
--- a/vcl/source/app/salplug.cxx
+++ b/vcl/source/app/salplug.cxx
@@ -168,32 +168,11 @@ SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = false )
#endif // !STATIC_SAL_INSTANCE
#if UNIX_DESKTOP_DETECT
-#ifndef DISABLE_DYNLOADING
-extern "C" typedef DesktopType Fn_get_desktop_environment();
-#else
-extern "C" DesktopType get_desktop_environment();
-#endif
DesktopType lcl_get_desktop_environment()
{
DesktopType ret = DESKTOP_UNKNOWN;
-#ifdef DISABLE_DYNLOADING
ret = get_desktop_environment();
-#else
- OUString aModule(DESKTOP_DETECTOR_DLL_NAME);
- oslModule aMod = osl_loadModuleRelative(
- reinterpret_cast< oslGenericFunction >( &tryInstance ), aModule.pData,
- SAL_LOADMODULE_DEFAULT );
- if( aMod )
- {
- Fn_get_desktop_environment * pSym
- = reinterpret_cast<Fn_get_desktop_environment *>(
- osl_getAsciiFunctionSymbol(aMod, "get_desktop_environment"));
- if( pSym )
- ret = pSym();
- }
- osl_unloadModule( aMod );
-#endif
return ret;
}
diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
index 8baeb303feed..a159c134b821 100644
--- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx
+++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
@@ -124,10 +124,7 @@ static bool is_plasma6_desktop()
return pFullVersion && pSessionVersion && (0 == strcmp(pSessionVersion, "6"));
}
-extern "C"
-{
-
-DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
+DesktopType get_desktop_environment()
{
static const char *pOverride = getenv( "OOO_FORCE_DESKTOP" );
@@ -259,6 +256,4 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
return ret;
}
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */