From 63e297bd8bfe9cb20244c1e72c6e957510c32851 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 6 Jun 2025 19:29:39 +0800 Subject: Make the viewer installable & runnable on Windows Turns out the CMAKE_BUILD_TYPE setting is necessary, otherwise it would be built in RelWithDebInfo configuration. Reorganise the contributors generation and general CPack settings in indra/newview/CMakeLists.txt. Running sed when cross-comping for Linux, on FreeBSD, doesn't need to use Linux's sed, so no need for ${CMAKE_SYSROOT}/usr/bin prefix, this way that section can be reused for Windows. I still couldn't get CPack to make NSIS not use the version numbers as part of the default installation destination. Using TARGETS for installing llwebrtc would cause the .lib to be installed too, which isn't necessary, that's why we use PROGRAMS. contributors.txt still gets generated wrongly. The executable icon is still SL's test icon. ColladaDOM's failure to link to Boost throw_exception, from its use of Boost Regex, is not fixed yet. I got to this stage by temporarily removing the offending lines in daeURI.cpp (which are the lines where Boost Regex is used). --- indra/llplugin/slplugin/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llplugin') diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index d29731894f..2100e6f556 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -66,14 +66,14 @@ if (BUILD_SHARED_LIBS) endif () if (INSTALL) - if (DARWIN) + if (DARWIN OR WINDOWS) install(TARGETS ${PROJECT_NAME} DESTINATION .) elseif (${LINUX_DISTRO} MATCHES arch) install(TARGETS ${PROJECT_NAME} DESTINATION lib/${VIEWER_BINARY_NAME}) - else (DARWIN) + else () install(TARGETS ${PROJECT_NAME} DESTINATION libexec/${VIEWER_BINARY_NAME}) - endif (DARWIN) -endif (INSTALL) + endif () +endif () if (LL_TESTS) ll_deploy_sharedlibs_command(SLPlugin) -- cgit v1.3 From 5fa174cd7c27719d2f03fbb704a19e5fa3440ccd Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 8 Jun 2025 19:30:05 +0800 Subject: Re-enable gSavedSettings & CEF logging on Windows I started with disabling it for having BUILD_SHARED_LIBS on. Then I enabled it for macOS when I added internal browser support for macOS. Then I enabled it for Linux when I added internal browser support for Linux. Then I enabled it for FreeBSD when I added internal browser support attempt for FreeBSD. I should have left it enabled by default except for platforms that surely are not supported to have internal browser. --- indra/llplugin/llpluginclassmedia.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/llplugin') diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 17f403e8e8..5eb22332d4 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -33,9 +33,7 @@ #include "llpluginmessageclasses.h" #include "llcontrol.h" -#if LL_DARWIN || LL_LINUX || __FreeBSD__ extern LLControlGroup gSavedSettings; -#endif #if LL_DARWIN extern bool gHiDPISupport; #endif @@ -936,10 +934,8 @@ 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); -#if LL_DARWIN || LL_LINUX || __FreeBSD__ bool cef_verbose_log = gSavedSettings.getBOOL("CefVerboseLog"); message.setValueBoolean("cef_verbose_log", cef_verbose_log); -#endif sendMessage(message); } -- cgit v1.3 From f8a13d8e14c5b420d2d76363f859febd11ee62ee Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 9 Jun 2025 21:12:07 +0800 Subject: Fix all media plugins failure on Windows Uncomment a couple of commented out lines out in indra/llplugin/slplugin.cpp and adjust to something like: LLError::setTagLevel("Plugin", LLError::LEVEL_DEBUG); LLError::logToFile("C:\\Users\\erik\\AppData\\Roaming\\Megapahit\\logs\\slplugin.log"); I got "The requested service provider could not be loaded or initialized" This really helped me solve it: https://travis-ci.community/t/socket-the-requested-service-provider-could-not-be-loaded-or-initialized/1127 --- indra/llplugin/llpluginprocessparent.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/llplugin') diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp index 19a0ce639a..9e4640d20a 100644 --- a/indra/llplugin/llpluginprocessparent.cpp +++ b/indra/llplugin/llpluginprocessparent.cpp @@ -275,6 +275,9 @@ void LLPluginProcessParent::init(const std::string &launcher_filename, const std { mProcessParams.executable = launcher_filename; mProcessParams.cwd = plugin_dir; +#if LL_WINDOWS + mProcessParams.envs.add(llformat("SYSTEMROOT=%s", getenv("SYSTEMROOT"))); +#endif mPluginFile = plugin_filename; mPluginDir = plugin_dir; mCPUUsage = 0.0f; -- cgit v1.3 From 98e99812072e6125411174236e1421d9312a50da Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 23 Jun 2025 07:01:30 +0800 Subject: Link clog too to Windows arm64 SLPlugin Referred from cpuinfo. --- 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 2100e6f556..03a057fbcb 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -49,6 +49,10 @@ target_link_libraries(SLPlugin ll::pluginlibraries ) +if ($ENV{MSYSTEM_CARCH} MATCHES aarch64) + target_link_libraries(${PROJECT_NAME} clog) +endif () + if (DARWIN) # Make sure the app bundle has a Resources directory (it will get populated by viewer-manifest.py later) add_custom_command( -- cgit v1.3 From 692c047a9e952779b81bda0d8b040e9729e1793c Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 25 Jun 2025 17:37:48 +0800 Subject: Revert "Link clog too to Windows arm64 SLPlugin" This reverts commit 98e99812072e6125411174236e1421d9312a50da. --- indra/llplugin/slplugin/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/llplugin') diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 03a057fbcb..2100e6f556 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -49,10 +49,6 @@ target_link_libraries(SLPlugin ll::pluginlibraries ) -if ($ENV{MSYSTEM_CARCH} MATCHES aarch64) - target_link_libraries(${PROJECT_NAME} clog) -endif () - if (DARWIN) # Make sure the app bundle has a Resources directory (it will get populated by viewer-manifest.py later) add_custom_command( -- cgit v1.3