From e08b527caf6462f2fe94130249aec8ad44a8c83e Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 12 Jul 2023 17:04:41 +0800 Subject: FreeBSD follows Darwin & Linux on llplugin --- indra/llplugin/llpluginsharedmemory.cpp | 2 ++ indra/llplugin/slplugin/slplugin.cpp | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/llplugin') diff --git a/indra/llplugin/llpluginsharedmemory.cpp b/indra/llplugin/llpluginsharedmemory.cpp index 63ff5085c6..c4e70f51e0 100644 --- a/indra/llplugin/llpluginsharedmemory.cpp +++ b/indra/llplugin/llpluginsharedmemory.cpp @@ -47,6 +47,8 @@ #define USE_SHM_OPEN_SHARED_MEMORY 1 #elif LL_LINUX #define USE_SHM_OPEN_SHARED_MEMORY 1 +#elif LL_FREEBSD + #define USE_SHM_OPEN_SHARED_MEMORY 1 #endif diff --git a/indra/llplugin/slplugin/slplugin.cpp b/indra/llplugin/slplugin/slplugin.cpp index 5c54705c71..3e9dc8cd31 100644 --- a/indra/llplugin/slplugin/slplugin.cpp +++ b/indra/llplugin/slplugin/slplugin.cpp @@ -46,7 +46,7 @@ using namespace std; #include "slplugin-objc.h" #endif -#if LL_DARWIN || LL_LINUX +#if LL_DARWIN || LL_LINUX || LL_FREEBSD #include #endif @@ -64,7 +64,7 @@ using namespace std; Now that SLPlugin is a bundled app on the Mac, this is no longer necessary (it can just use a regular Info.plist file), but I'm leaving this comment in for posterity. */ -#if LL_DARWIN || LL_LINUX +#if LL_DARWIN || LL_LINUX || LL_FREEBSD // Signal handlers to make crashes not show an OS dialog... static void crash_handler(int sig) { @@ -182,7 +182,7 @@ int main(int argc, char **argv) // display a crash message if something bad happens. The host app will // see the missing heartbeat and log appropriately. initExceptionHandler(); -#elif LL_DARWIN || LL_LINUX +#elif LL_DARWIN || LL_LINUX || LL_FREEBSD if(argc < 2) { LL_ERRS("slplugin") << "usage: " << argv[0] << " launcher_port" << LL_ENDL; -- cgit v1.2.3 From 6e4f095baa8e33effe80b68ddf834a3b80f2bb67 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 29 Jul 2023 20:58:27 +0800 Subject: Setting BUILD_SHARED_LIBS on is now possible by removing cyclic dependencies, and allowing shlib undefined on SLPlugin alone. --- indra/llplugin/slplugin/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llplugin') diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 0ea6495eac..f1a75ff97f 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -60,6 +60,11 @@ if (DARWIN) ) endif (DARWIN) +if (BUILD_SHARED_LIBS) + set_target_properties(SLPlugin PROPERTIES LINK_FLAGS_RELEASE + "${LINK_FLAGS_RELEASE} -Wl,--allow-shlib-undefined") +endif () + if (LL_TESTS) ll_deploy_sharedlibs_command(SLPlugin) endif (LL_TESTS) -- cgit v1.2.3 From 665a55a1a232877ccb499dbfd17806f438385e82 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 29 Jul 2023 21:07:13 +0800 Subject: The Linden libraries can be installed now Useful when installed as shared libraries, so other viewer executables can share these libraries. --- indra/llplugin/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llplugin') diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt index 14a69afe6e..19ce47d357 100644 --- a/indra/llplugin/CMakeLists.txt +++ b/indra/llplugin/CMakeLists.txt @@ -46,3 +46,4 @@ target_include_directories( llplugin INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries( llplugin llcommon llmath llrender llmessage ) add_subdirectory(slplugin) +include(LibraryInstall) -- cgit v1.2.3 From 9aac948d59cee9bce12098b060d94aeba33efa86 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 30 Jul 2023 17:26:55 +0800 Subject: llplugin not refer to gSavedSettings when no CEF so SLPlugin wouldn't lose reference to it when the libraries are built as dynamic. --- indra/llplugin/llpluginclassmedia.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llplugin') diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 3e72710366..e0b3f6ef56 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -33,7 +33,9 @@ #include "llpluginmessageclasses.h" #include "llcontrol.h" +#ifndef LL_USESYSTEMLIBS extern LLControlGroup gSavedSettings; +#endif #if LL_DARWIN extern BOOL gHiDPISupport; #endif @@ -934,8 +936,10 @@ void LLPluginClassMedia::setUserDataPath(const std::string &user_data_path_cache message.setValue("username", username); // cef shares cache between users but creates user-based contexts message.setValue("cef_log_file", user_data_path_cef_log); +#ifndef LL_USESYSTEMLIBS bool cef_verbose_log = gSavedSettings.getBOOL("CefVerboseLog"); message.setValueBoolean("cef_verbose_log", cef_verbose_log); +#endif sendMessage(message); } -- cgit v1.2.3 From e08ad14176502a8cc26b401c48b7161ce8c39140 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 30 Jul 2023 19:02:54 +0800 Subject: SLPlugin is in libexec when installed to system --- indra/llplugin/slplugin/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llplugin') diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index f1a75ff97f..871d858b58 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -65,6 +65,10 @@ if (BUILD_SHARED_LIBS) "${LINK_FLAGS_RELEASE} -Wl,--allow-shlib-undefined") endif () +if (INSTALL) + install(TARGETS ${PROJECT_NAME} DESTINATION ${APP_LIBEXEC_DIR}) +endif () + if (LL_TESTS) ll_deploy_sharedlibs_command(SLPlugin) endif (LL_TESTS) -- cgit v1.2.3 From 7dd1149e3649057f0962b85bdc467f4e9299b235 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 21 Aug 2023 17:35:54 +0800 Subject: Darwin not (directly) relying on Carbon & Obj-C HiDPI support & multi threaded OpenGL haven't been used since we switched to SDL2 on Darwin, and so far there hasn't been any sign that things aren't working any more significantly. --- indra/llplugin/llpluginclassmedia.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llplugin') diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index e0b3f6ef56..2d19e3df90 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -36,7 +36,7 @@ #ifndef LL_USESYSTEMLIBS extern LLControlGroup gSavedSettings; #endif -#if LL_DARWIN +#if LL_DARWIN && !LL_SDL extern BOOL gHiDPISupport; #endif @@ -370,7 +370,7 @@ void LLPluginClassMedia::setSizeInternal(void) mRequestedMediaHeight = nextPowerOf2(mRequestedMediaHeight); } -#if LL_DARWIN +#if LL_DARWIN && !LL_SDL if (!gHiDPISupport) #endif { -- cgit v1.2.3 From 00be9e00107c51a35c04f64fe917c559b8325564 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 26 Aug 2023 15:46:12 +0800 Subject: CPack for packaging (when PACKAGE set to on) Since we could use the dynamic versioning from the configuration phase of CMake, the inclusion is put in BuildVersion.cmake. Other CPACK variables are usually static so can be set when running cmake. CPack somehow doesn't pick up the DESTINATION values in ViewerInstall (slplugin & libvlc too) from UnixInstall, so they're they're partially hardcoded again there. --- indra/llplugin/slplugin/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llplugin') diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 871d858b58..e86ddd8a32 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -66,7 +66,7 @@ if (BUILD_SHARED_LIBS) endif () if (INSTALL) - install(TARGETS ${PROJECT_NAME} DESTINATION ${APP_LIBEXEC_DIR}) + install(TARGETS ${PROJECT_NAME} DESTINATION libexec/${VIEWER_BINARY_NAME}) endif () if (LL_TESTS) -- cgit v1.2.3 From 62626f175b6549b62ba8538800957cab613b7ffa Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 7 Sep 2023 11:29:17 +0800 Subject: Implementations without shm_unlink can use APR --- indra/llplugin/llpluginsharedmemory.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llplugin') diff --git a/indra/llplugin/llpluginsharedmemory.cpp b/indra/llplugin/llpluginsharedmemory.cpp index c4e70f51e0..3204bbd715 100644 --- a/indra/llplugin/llpluginsharedmemory.cpp +++ b/indra/llplugin/llpluginsharedmemory.cpp @@ -45,6 +45,8 @@ #define USE_WIN32_SHARED_MEMORY 1 #elif LL_DARWIN #define USE_SHM_OPEN_SHARED_MEMORY 1 +#elif _POSIX_SHARED_MEMORY_OBJECTS == -1 + #define USE_APR_SHARED_MEMORY 1 #elif LL_LINUX #define USE_SHM_OPEN_SHARED_MEMORY 1 #elif LL_FREEBSD -- cgit v1.2.3