From 3aba124c4df8c5fa7a34adaefa3e95c309fc6809 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 31 May 2025 13:40:38 +0800 Subject: Squeeze 1 more person into the team --- indra/newview/skins/default/xui/en/floater_about.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index 89c6e41a85..09b134eac5 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -70,7 +70,7 @@ follows="all" left="10" name="megapahit_credits_panel" - height="405" + height="420" top="10"> Date: Sat, 31 May 2025 00:11:44 -0600 Subject: DisableLookAtAnimation persistence Make DisableLookAtAnimation setting persistent across restarts. --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index dee3ffa7e4..85ac38aa49 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -14980,7 +14980,7 @@ Comment Avatar follows cursor with avatars eyes, when disabled, avatar will look forward Persist - 0 + 1 Type Boolean Value -- cgit v1.3 From 564c9b34ab7ad19345a02c215bbef939e7d01eb2 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 1 Jun 2025 14:07:52 +0800 Subject: Add install eselect-repository to Gentoo steps and remove the necessity of using sudo to su on FreeBSD, just like on Gentoo. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a5fd7a08e0..78978a33f1 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ $ megapahit ### FreeBSD ``` -$ sudo su - +$ su - # portmaster devel/cmake devel/pkgconf audio/freealut devel/apr1 devel/boost-libs x11-toolkits/fltk math/glm textproc/hunspell misc/meshoptimizer archivers/minizip graphics/nanosvg www/libnghttp2 graphics/openjpeg devel/sdl20 multimedia/vlc audio/libvorbis devel/xxhash # exit $ setenv LL_BUILD "-O3 -std=c++20 -fPIC" @@ -75,6 +75,7 @@ $ megapahit ### Gentoo ``` $ su - +# emerge -a eselect-repository # eselect repository add megapahit git git://megapahit.org/ebuild.git # emaint sync -r megapahit # emerge -a megapahit -- cgit v1.3 From d3efdf379d38a1b54e41b22a0cad4ad3cafc907c Mon Sep 17 00:00:00 2001 From: secretfoxtail Date: Sun, 1 Jun 2025 15:01:53 -0600 Subject: Update openSUSE Tumbleweed readme & cmakelists Update libboost package names. --- README.md | 2 +- indra/newview/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 78978a33f1..b6dfa754c1 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ $ open newview/Megapahit.app ### openSUSE Tumbleweed ``` -$ sudo zypper install gcc-c++ patchelf apr-util-devel boost-devel libboost_program_options-devel libboost_url1_87_0-devel libboost_context-devel libboost_fiber-devel libboost_filesystem-devel libboost_regex-devel libboost_system-devel libboost_thread-devel libexpat-devel fltk-devel glu-devel hunspell-devel minizip-devel nanosvg-devel libnghttp2-devel openjpeg2-devel pipewire-devel libpulse-devel libSDL2_gfx-1_0-0 libSDL2_gfx-devel sdl2-compat-devel vlc-devel libvorbis-devel xxhash-devel zlib-ng-devel libXrender-devel libXcursor-devel libXfixes-devel libXext-devel libXft-devel libXinerama-devel freetype2-devel fontconfig-devel libjpeg8-devel libjpeg8-devel freealut-devel +$ sudo zypper install gcc-c++ patchelf apr-util-devel boost-devel libboost_program_options-devel libboost_url1_88_0-devel libboost_context-devel libboost_fiber-devel libboost_filesystem-devel libboost_regex-devel libboost_system-devel libboost_thread-devel libexpat-devel fltk-devel glu-devel hunspell-devel minizip-devel nanosvg-devel libnghttp2-devel openjpeg2-devel pipewire-devel libpulse-devel libSDL2_gfx-1_0-0 libSDL2_gfx-devel sdl2-compat-devel vlc-devel libvorbis-devel xxhash-devel zlib-ng-devel libXrender-devel libXcursor-devel libXfixes-devel libXext-devel libXft-devel libXinerama-devel freetype2-devel fontconfig-devel libjpeg8-devel libjpeg8-devel freealut-devel $ export LL_BUILD="-O3 -std=c++20 -fPIC -DLL_LINUX=1" $ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra $ make -j`nproc` diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 80f0b60f98..32afa2ba5f 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2196,7 +2196,7 @@ if (LINUX) set(CPACK_RPM_PACKAGE_REQUIRES "apr-util, boost-fiber, boost-program-options, boost-regex, boost-thread, boost-url, expat, fltk, mesa-libGLU, hunspell, libnghttp2, openjpeg2, SDL2, vlc-libs, vlc-plugins-base, libvorbis" CACHE STRING "RPM package requirements.") else () - set(CPACK_RPM_PACKAGE_REQUIRES "libapr-util1-0, libboost_fiber1_87_0, libboost_program_options1_87_0, libboost_regex1_87_0, libboost_thread1_87_0, libboost_url1_87_0, libboost_url1_87_0-x86-64-v3, expat, libfltk1_3, libGLU1, libhunspell-1_7-0, libnghttp2-14, openjpeg2, libSDL2-2_0-0, libvlc5, vlc-codecs, libvorbis0" + set(CPACK_RPM_PACKAGE_REQUIRES "libapr-util1-0, libboost_fiber1_88_0, libboost_program_options1_88_0, libboost_regex1_88_0, libboost_thread1_88_0, libboost_url1_88_0, libboost_url1_88_0-x86-64-v3, expat, libfltk1_3, libGLU1, libhunspell-1_7-0, libnghttp2-14, openjpeg2, libSDL2-2_0-0, libvlc5, vlc-codecs, libvorbis0" CACHE STRING "RPM package requirements.") endif () endif () -- cgit v1.3 From fcdef29504a32ad85ce32c3d95ea8648aa169004 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 2 Jun 2025 07:09:27 +0800 Subject: Stop trying to force OpenGL version on non-macOS Turns out my old GPU is detected as complying only to 4.5 when on Linux. The fact that it's been detected as complying to 4.6 on FreeBSD this whole time, is quite ironic. I've only tested that the viewer runs with 4.6 without this on FreeBSD (the implication works), will test Linux distros next. --- indra/llwindow/llwindowsdl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 69332e36b6..53092e4f2e 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -376,11 +376,9 @@ bool LLWindowSDL::createContext(int x, int y, int width, int height, int bits, b SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, depthBits); SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, stencilBits); - SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4); #if LL_DARWIN + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1); -#else - SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 6); #endif SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); -- cgit v1.3 From 2e6dd2843b6b7c287783393ade1892568896a5a0 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 2 Jun 2025 08:02:39 +0800 Subject: Revert "Stop trying to force OpenGL version on non-macOS" This reverts commit fcdef29504a32ad85ce32c3d95ea8648aa169004. The moment 1 or 2 lines got removed, we lost core profile again. --- indra/llwindow/llwindowsdl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 53092e4f2e..69332e36b6 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -376,9 +376,11 @@ bool LLWindowSDL::createContext(int x, int y, int width, int height, int bits, b SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, depthBits); SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, stencilBits); -#if LL_DARWIN SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4); +#if LL_DARWIN SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1); +#else + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 6); #endif SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); -- cgit v1.3 From 08d4f307b0c2281f5aa4a11329c6c6e8c625e6ea Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 2 Jun 2025 11:16:09 +0800 Subject: Revert "Make using the system browser for links works" This reverts commit 0b62583eb7dd6e193d5daa2e24646bbb9f3c74e5. We have SDL for opening URLs now. --- indra/newview/ViewerInstall.cmake | 10 ---------- indra/newview/linux_tools/launch_url.sh | 1 - 2 files changed, 11 deletions(-) diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake index 1281136cef..353ec290ec 100644 --- a/indra/newview/ViewerInstall.cmake +++ b/indra/newview/ViewerInstall.cmake @@ -90,16 +90,6 @@ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME} DESTINATION bin ) -if (${LINUX_DISTRO} MATCHES arch) - install(PROGRAMS linux_tools/launch_url.sh - DESTINATION lib/${VIEWER_BINARY_NAME} - ) -else (${LINUX_DISTRO} MATCHES arch) - install(PROGRAMS linux_tools/launch_url.sh - DESTINATION libexec/${VIEWER_BINARY_NAME} - ) -endif (${LINUX_DISTRO} MATCHES arch) - if (LINUX) if (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu)) set(_LIB lib/${ARCH}-linux-gnu) diff --git a/indra/newview/linux_tools/launch_url.sh b/indra/newview/linux_tools/launch_url.sh index 7c4ebf2291..404ea36f26 100755 --- a/indra/newview/linux_tools/launch_url.sh +++ b/indra/newview/linux_tools/launch_url.sh @@ -61,7 +61,6 @@ fi # will be tried first, which is a debian alternative. BROWSER_COMMANDS=" \ x-www-browser \ - chrome \ firefox \ mozilla-firefox \ iceweasel \ -- cgit v1.3 From 9bae19198fdc7bfb71f900cfe6c1982cb2a80e4f Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 3 Jun 2025 16:20:27 +0800 Subject: Revert "Fix up llexception.h's cross-platform SEH wrapper." This reverts commit 5ed8df22cd59680a685c4ada7daa5555bf59d4fe. --- indra/llcommon/always_return.h | 16 ------ indra/llcommon/llexception.cpp | 24 ++++++--- indra/llcommon/llexception.h | 104 +++++++++++++++------------------------ indra/llwindow/llwindowwin32.cpp | 2 +- indra/test/test.cpp | 2 +- 5 files changed, 59 insertions(+), 89 deletions(-) diff --git a/indra/llcommon/always_return.h b/indra/llcommon/always_return.h index b99eb49096..a206471da5 100644 --- a/indra/llcommon/always_return.h +++ b/indra/llcommon/always_return.h @@ -79,22 +79,6 @@ namespace LL DESIRED mDefault; }; - // specialize for AlwaysReturn - template <> - struct AlwaysReturn - { - public: - AlwaysReturn() {} - - // callable returns a type not convertible to DESIRED, return default - template - void operator()(CALLABLE&& callable, ARGS&&... args) - { - // discard whatever callable(args) returns - std::forward(callable)(std::forward(args)...); - } - }; - /** * always_return(some_function, some_args...) calls * some_function(some_args...). It is guaranteed to return a value of type diff --git a/indra/llcommon/llexception.cpp b/indra/llcommon/llexception.cpp index 107fdc2b2d..74b33f1e3b 100644 --- a/indra/llcommon/llexception.cpp +++ b/indra/llcommon/llexception.cpp @@ -101,36 +101,44 @@ void annotate_exception_(boost::exception& exc) static constexpr U32 STATUS_MSC_EXCEPTION = 0xE06D7363; // compiler specific static constexpr U32 STATUS_STACK_FULL = 0xC00000FD; -void LL::seh::fill_stacktrace(std::string& stacktrace, U32 code) +U32 ll_seh_filter( + std::string& stacktrace, + std::function filter, + U32 code, + struct _EXCEPTION_POINTERS* exception_infop) { - // Sadly, despite its diagnostic importance, trying to capture a - // stacktrace when the stack is already blown only terminates us faster. + // By the time the handler gets control, the stack has been unwound, + // so report the stack trace now at filter() time. + // Even though stack overflow is a problem we would very much like to + // diagnose, calling another function when the stack is already blown only + // terminates us faster. if (code == STATUS_STACK_FULL) { stacktrace = "(stack overflow, no traceback)"; } else { - stacktrace = to_string(boost::stacktrace::stacktrace()); + stacktrace = boost::stacktrace::stacktrace().to_string(); } + + return filter(code, exception_infop); } -U32 LL::seh::common_filter(U32 code, struct _EXCEPTION_POINTERS*) +U32 seh_filter(U32 code, struct _EXCEPTION_POINTERS*) { if (code == STATUS_MSC_EXCEPTION) { - // C++ exception, don't stop at this handler + // C++ exception, go on return EXCEPTION_CONTINUE_SEARCH; } else { // This is a non-C++ exception, e.g. hardware check. - // Pass control into the handler block. return EXCEPTION_EXECUTE_HANDLER; } } -void LL::seh::rethrow(U32 code, const std::string& stacktrace) +void seh_rethrow(U32 code, const std::string& stacktrace) { std::ostringstream out; out << "Windows exception 0x" << std::hex << code; diff --git a/indra/llcommon/llexception.h b/indra/llcommon/llexception.h index f58a553eb3..3e50678b44 100644 --- a/indra/llcommon/llexception.h +++ b/indra/llcommon/llexception.h @@ -12,7 +12,6 @@ #if ! defined(LL_LLEXCEPTION_H) #define LL_LLEXCEPTION_H -#include "always_return.h" #include #include #include @@ -107,111 +106,90 @@ void log_unhandled_exception_(const char*, int, const char*, const std::string&) * Structured Exception Handling *****************************************************************************/ // this is used in platform-generic code -- define outside #if LL_WINDOWS -struct Windows_SEH_exception: public LLException +struct Windows_SEH_exception: public std::runtime_error { - Windows_SEH_exception(const std::string& what): LLException(what) {} + Windows_SEH_exception(const std::string& what): std::runtime_error(what) {} }; -namespace LL -{ -namespace seh -{ - #if LL_WINDOWS //------------------------------------------------------------- -void fill_stacktrace(std::string& stacktrace, U32 code); - -// wrapper around caller's U32 filter(U32 code, struct _EXCEPTION_POINTERS*) -// filter function: capture a stacktrace, if possible, before forwarding the -// call to the caller's filter() function -template -U32 filter_(std::string& stacktrace, FILTER&& filter, - U32 code, struct _EXCEPTION_POINTERS* exptrs) -{ - // By the time the handler gets control, the stack has been unwound, - // so report the stack trace now at filter() time. - fill_stacktrace(stacktrace, code); - return std::forward(filter)(code, exptrs); -} +#include +// triadic variant specifies try(), filter(U32, struct _EXCEPTION_POINTERS*), +// handler(U32, const std::string& stacktrace) +// stacktrace may or may not be available template -auto catcher_inner(std::string& stacktrace, - TRYCODE&& trycode, FILTER&& filter, HANDLER&& handler) +auto seh_catcher(TRYCODE&& trycode, FILTER&& filter, HANDLER&& handler) { + // don't try to construct a std::function at the moment of Structured Exception + std::function + filter_function(std::forward(filter)); + std::string stacktrace; __try { return std::forward(trycode)(); } - __except (filter_(stacktrace, - std::forward(filter), - GetExceptionCode(), GetExceptionInformation())) + __except (ll_seh_filter( + stacktrace, + filter_function, + GetExceptionCode(), + GetExceptionInformation())) { - return always_return( - std::forward(handler), GetExceptionCode(), stacktrace); + return std::forward(handler)(GetExceptionCode(), stacktrace); } } -// triadic variant specifies try(), filter(U32, struct _EXCEPTION_POINTERS*), -// handler(U32, const std::string& stacktrace) -// stacktrace may or may not be available -template -auto catcher(TRYCODE&& trycode, FILTER&& filter, HANDLER&& handler) -{ - // Construct and destroy this stacktrace string in the outer function - // because we can't do either in the function with __try/__except. - std::string stacktrace; - return catcher_inner(stacktrace, - std::forward(trycode), - std::forward(filter), - std::forward(handler)); -} - -// common_filter() handles the typical case in which we want our handler -// clause to handle only Structured Exceptions rather than explicitly-thrown -// C++ exceptions -U32 common_filter(U32 code, struct _EXCEPTION_POINTERS*); - -// dyadic variant specifies try(), handler(U32, stacktrace), assumes common_filter() +// dyadic variant specifies try(), handler(U32, stacktrace), assumes default filter template -auto catcher(TRYCODE&& trycode, HANDLER&& handler) +auto seh_catcher(TRYCODE&& trycode, HANDLER&& handler) { - return catcher(std::forward(trycode), - common_filter, - std::forward(handler)); + return seh_catcher( + std::forward(trycode), + seh_filter, + std::forward(handler)); } // monadic variant specifies try(), assumes default filter and handler template -auto catcher(TRYCODE&& trycode) +auto seh_catcher(TRYCODE&& trycode) { - return catcher(std::forward(trycode), rethrow); + return seh_catcher( + std::forward(trycode), + seh_filter, + seh_rethrow); } -[[noreturn]] void rethrow(U32 code, const std::string& stacktrace); +// SEH exception filtering for use in __try __except +// Separates C++ exceptions from C SEH exceptions +// Todo: might be good idea to do some kind of seh_to_msc_wrapper(function, ARGS&&); +U32 ll_seh_filter( + std::string& stacktrace, + std::function filter, + U32 code, + struct _EXCEPTION_POINTERS* exception_infop); +U32 seh_filter(U32 code, struct _EXCEPTION_POINTERS* exception_infop); +void seh_rethrow(U32 code, const std::string& stacktrace); #else // not LL_WINDOWS ----------------------------------------------------- template -auto catcher(TRYCODE&& trycode, FILTER&&, HANDLER&&) +auto seh_catcher(TRYCODE&& trycode, FILTER&&, HANDLER&&) { return std::forward(trycode)(); } template -auto catcher(TRYCODE&& trycode, HANDLER&&) +auto seh_catcher(TRYCODE&& trycode, HANDLER&&) { return std::forward(trycode)(); } template -auto catcher(TRYCODE&& trycode) +auto seh_catcher(TRYCODE&& trycode) { return std::forward(trycode)(); } #endif // not LL_WINDOWS ----------------------------------------------------- -} // namespace LL::seh -} // namespace LL - #endif /* ! defined(LL_LLEXCEPTION_H) */ diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index a781e638ee..97bd789134 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -160,7 +160,7 @@ HGLRC SafeCreateContext(HDC &hdc) GLuint SafeChoosePixelFormat(HDC &hdc, const PIXELFORMATDESCRIPTOR *ppfd) { - return LL::seh::catcher([hdc, ppfd]{ return ChoosePixelFormat(hdc, ppfd); }); + return seh_catcher(ChoosePixelFormat(hdc, ppfd)); } //static diff --git a/indra/test/test.cpp b/indra/test/test.cpp index 6e280819df..536c252d97 100644 --- a/indra/test/test.cpp +++ b/indra/test/test.cpp @@ -638,7 +638,7 @@ int main(int argc, char **argv) // a chained_callback subclass must be linked with previous mycallback->link(); - LL::seh::catcher( + seh_catcher( // __try [test_group] { -- cgit v1.3 From bbe51e86249114cac4716c391e267c499a52847a Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 3 Jun 2025 16:21:58 +0800 Subject: Revert "Promote seh_catcher() et al. to llexception.{h,cpp} for general use." This reverts commit 71d777ea126e7f02cb46c11bdb606094ca06f75c. --- indra/llcommon/llexception.cpp | 50 ++++------------------ indra/llcommon/llexception.h | 86 ++------------------------------------ indra/llwindow/llwindowwin32.cpp | 13 +++++- indra/newview/llappviewerwin32.cpp | 36 ++++++++++++++-- indra/test/test.cpp | 68 +++++++++++++++++++++++++++++- 5 files changed, 121 insertions(+), 132 deletions(-) diff --git a/indra/llcommon/llexception.cpp b/indra/llcommon/llexception.cpp index 74b33f1e3b..c0154a569f 100644 --- a/indra/llcommon/llexception.cpp +++ b/indra/llcommon/llexception.cpp @@ -15,12 +15,7 @@ #include "llexception.h" // STL headers // std headers -#include -#include #include -#if LL_WINDOWS -#include -#endif // LL_WINDOWS // external library headers #include #include @@ -34,6 +29,7 @@ // On Windows, header-only implementation causes macro collisions -- use // prebuilt library #define BOOST_STACKTRACE_LINK +#include #endif // LL_WINDOWS #include @@ -98,34 +94,15 @@ void annotate_exception_(boost::exception& exc) // For windows SEH exception handling we sometimes need a filter that will // separate C++ exceptions from C SEH exceptions -static constexpr U32 STATUS_MSC_EXCEPTION = 0xE06D7363; // compiler specific -static constexpr U32 STATUS_STACK_FULL = 0xC00000FD; +static const U32 STATUS_MSC_EXCEPTION = 0xE06D7363; // compiler specific -U32 ll_seh_filter( - std::string& stacktrace, - std::function filter, - U32 code, - struct _EXCEPTION_POINTERS* exception_infop) +U32 msc_exception_filter(U32 code, struct _EXCEPTION_POINTERS *exception_infop) { - // By the time the handler gets control, the stack has been unwound, - // so report the stack trace now at filter() time. - // Even though stack overflow is a problem we would very much like to - // diagnose, calling another function when the stack is already blown only - // terminates us faster. - if (code == STATUS_STACK_FULL) - { - stacktrace = "(stack overflow, no traceback)"; - } - else - { - stacktrace = boost::stacktrace::stacktrace().to_string(); - } - - return filter(code, exception_infop); -} + const auto stack = to_string(boost::stacktrace::stacktrace()); + LL_WARNS() << "SEH Exception handled (that probably shouldn't be): Code " << code + << "\n Stack trace: \n" + << stack << LL_ENDL; -U32 seh_filter(U32 code, struct _EXCEPTION_POINTERS*) -{ if (code == STATUS_MSC_EXCEPTION) { // C++ exception, go on @@ -133,20 +110,9 @@ U32 seh_filter(U32 code, struct _EXCEPTION_POINTERS*) } else { - // This is a non-C++ exception, e.g. hardware check. + // handle it return EXCEPTION_EXECUTE_HANDLER; } } -void seh_rethrow(U32 code, const std::string& stacktrace) -{ - std::ostringstream out; - out << "Windows exception 0x" << std::hex << code; - if (! stacktrace.empty()) - { - out << '\n' << stacktrace; - } - LLTHROW(Windows_SEH_exception(out.str())); -} - #endif //LL_WINDOWS diff --git a/indra/llcommon/llexception.h b/indra/llcommon/llexception.h index 3e50678b44..68e609444e 100644 --- a/indra/llcommon/llexception.h +++ b/indra/llcommon/llexception.h @@ -102,94 +102,14 @@ void crash_on_unhandled_exception_(const char*, int, const char*, const std::str log_unhandled_exception_(__FILE__, __LINE__, BOOST_CURRENT_FUNCTION, CONTEXT) void log_unhandled_exception_(const char*, int, const char*, const std::string&); -/***************************************************************************** -* Structured Exception Handling -*****************************************************************************/ -// this is used in platform-generic code -- define outside #if LL_WINDOWS -struct Windows_SEH_exception: public std::runtime_error -{ - Windows_SEH_exception(const std::string& what): std::runtime_error(what) {} -}; - -#if LL_WINDOWS //------------------------------------------------------------- - -#include - -// triadic variant specifies try(), filter(U32, struct _EXCEPTION_POINTERS*), -// handler(U32, const std::string& stacktrace) -// stacktrace may or may not be available -template -auto seh_catcher(TRYCODE&& trycode, FILTER&& filter, HANDLER&& handler) -{ - // don't try to construct a std::function at the moment of Structured Exception - std::function - filter_function(std::forward(filter)); - std::string stacktrace; - __try - { - return std::forward(trycode)(); - } - __except (ll_seh_filter( - stacktrace, - filter_function, - GetExceptionCode(), - GetExceptionInformation())) - { - return std::forward(handler)(GetExceptionCode(), stacktrace); - } -} - -// dyadic variant specifies try(), handler(U32, stacktrace), assumes default filter -template -auto seh_catcher(TRYCODE&& trycode, HANDLER&& handler) -{ - return seh_catcher( - std::forward(trycode), - seh_filter, - std::forward(handler)); -} -// monadic variant specifies try(), assumes default filter and handler -template -auto seh_catcher(TRYCODE&& trycode) -{ - return seh_catcher( - std::forward(trycode), - seh_filter, - seh_rethrow); -} +#if LL_WINDOWS // SEH exception filtering for use in __try __except // Separates C++ exceptions from C SEH exceptions // Todo: might be good idea to do some kind of seh_to_msc_wrapper(function, ARGS&&); -U32 ll_seh_filter( - std::string& stacktrace, - std::function filter, - U32 code, - struct _EXCEPTION_POINTERS* exception_infop); -U32 seh_filter(U32 code, struct _EXCEPTION_POINTERS* exception_infop); -void seh_rethrow(U32 code, const std::string& stacktrace); - -#else // not LL_WINDOWS ----------------------------------------------------- - -template -auto seh_catcher(TRYCODE&& trycode, FILTER&&, HANDLER&&) -{ - return std::forward(trycode)(); -} - -template -auto seh_catcher(TRYCODE&& trycode, HANDLER&&) -{ - return std::forward(trycode)(); -} - -template -auto seh_catcher(TRYCODE&& trycode) -{ - return std::forward(trycode)(); -} +U32 msc_exception_filter(U32 code, struct _EXCEPTION_POINTERS *exception_infop); -#endif // not LL_WINDOWS ----------------------------------------------------- +#endif //LL_WINDOWS #endif /* ! defined(LL_LLEXCEPTION_H) */ diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 97bd789134..4fca74497f 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -160,7 +160,18 @@ HGLRC SafeCreateContext(HDC &hdc) GLuint SafeChoosePixelFormat(HDC &hdc, const PIXELFORMATDESCRIPTOR *ppfd) { - return seh_catcher(ChoosePixelFormat(hdc, ppfd)); + __try + { + return ChoosePixelFormat(hdc, ppfd); + } + __except (EXCEPTION_EXECUTE_HANDLER) + { + // convert to C++ styled exception + // C exception don't allow classes, so it's a regular char array + char integer_string[32]; + sprintf(integer_string, "SEH, code: %lu\n", GetExceptionCode()); + throw std::exception(integer_string); + } } //static diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index ef609026ad..4f5fa53312 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -396,10 +396,17 @@ void ll_nvapi_init(NvDRSSessionHandle hSession) } } -int APIENTRY wWinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - PWSTR pCmdLine, - int nCmdShow) +//#define DEBUGGING_SEH_FILTER 1 +#if DEBUGGING_SEH_FILTER +# define WINMAIN DebuggingWinMain +#else +# define WINMAIN wWinMain +#endif + +int APIENTRY WINMAIN(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + PWSTR pCmdLine, + int nCmdShow) { // Call Tracy first thing to have it allocate memory // https://github.com/wolfpld/tracy/issues/196 @@ -548,6 +555,27 @@ int APIENTRY wWinMain(HINSTANCE hInstance, return 0; } +#if DEBUGGING_SEH_FILTER +// The compiler doesn't like it when you use __try/__except blocks +// in a method that uses object destructors. Go figure. +// This winmain just calls the real winmain inside __try. +// The __except calls our exception filter function. For debugging purposes. +int APIENTRY wWinMain(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + PWSTR lpCmdLine, + int nCmdShow) +{ + __try + { + WINMAIN(hInstance, hPrevInstance, lpCmdLine, nCmdShow); + } + __except( viewer_windows_exception_handler( GetExceptionInformation() ) ) + { + _tprintf( _T("Exception handled.\n") ); + } +} +#endif + void LLAppViewerWin32::disableWinErrorReporting() { std::string executable_name = gDirUtilp->getExecutableFilename(); diff --git a/indra/test/test.cpp b/indra/test/test.cpp index 536c252d97..09147a65a3 100644 --- a/indra/test/test.cpp +++ b/indra/test/test.cpp @@ -36,7 +36,6 @@ #include "linden_common.h" #include "llerrorcontrol.h" -#include "llexception.h" #include "lltut.h" #include "chained_callback.h" #include "stringize.h" @@ -57,6 +56,13 @@ #include #include +// On Mac, got: +// #error "Boost.Stacktrace requires `_Unwind_Backtrace` function. Define +// `_GNU_SOURCE` macro or `BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED` if +// _Unwind_Backtrace is available without `_GNU_SOURCE`." +#define BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED +#include + #include void wouldHaveCrashed(const std::string& message); @@ -506,6 +512,64 @@ void wouldHaveCrashed(const std::string& message) static LLTrace::ThreadRecorder* sMasterThreadRecorder = NULL; +// this is used in platform-generic code -- define outside #if LL_WINDOWS +struct Windows_SEH_exception: public std::runtime_error +{ + Windows_SEH_exception(const std::string& what): std::runtime_error(what) {} +}; + +#if LL_WINDOWS + +static constexpr U32 STATUS_MSC_EXCEPTION = 0xE06D7363; // compiler specific +static constexpr U32 STATUS_STACK_FULL = 0xC00000FD; + +U32 seh_filter(U32 code, struct _EXCEPTION_POINTERS*) +{ + if (code == STATUS_MSC_EXCEPTION) + { + // C++ exception, go on -- but TUT is supposed to have caught those already?! + return EXCEPTION_CONTINUE_SEARCH; + } + else + { + // This is a non-C++ exception, e.g. hardware check. + // By the time the handler gets control, the stack has been unwound, + // so report the stack trace now at filter() time. + // Sadly, even though, at the time of this writing, stack overflow is + // the problem we would most like to diagnose, calling another + // function when the stack is already blown only terminates us faster. + if (code != STATUS_STACK_FULL) + { + std::cerr << boost::stacktrace::stacktrace() << std::endl; + } + // pass control into the handler block + return EXCEPTION_EXECUTE_HANDLER; + } +} + +template +void seh_catcher(CALLABLE0&& trycode, CALLABLE1&& handler) +{ + __try + { + trycode(); + } + __except (seh_filter(GetExceptionCode(), GetExceptionInformation())) + { + handler(GetExceptionCode()); + } +} + +#else // not LL_WINDOWS + +template +void seh_catcher(CALLABLE0&& trycode, CALLABLE1&&) +{ + trycode(); +} + +#endif // not LL_WINDOWS + int main(int argc, char **argv) { ll_init_apr(); @@ -652,7 +716,7 @@ int main(int argc, char **argv) } }, // __except - [mycallback](U32 code, const std::string& /*stacktrace*/) + [mycallback](U32 code) { static std::map codes = { { 0xC0000005, "Access Violation" }, -- cgit v1.3 From 9ac2e961e3649ca03e333103d851005f2003ddbb Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 3 Jun 2025 16:57:51 +0800 Subject: Re-include GLEXT.cmake, but for Windows only There doesn't seem to be glext.h on Windows, so we'll just use the package from LL for now. --- indra/cmake/CMakeLists.txt | 1 + indra/cmake/GLEXT.cmake | 4 +++- indra/cmake/LLWindow.cmake | 2 +- indra/llwindow/CMakeLists.txt | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 746d242560..5525ac9f24 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -24,6 +24,7 @@ set(cmake_SOURCE_FILES FindAutobuild.cmake FMODSTUDIO.cmake FreeType.cmake + GLEXT.cmake GLH.cmake GLM.cmake Havok.cmake diff --git a/indra/cmake/GLEXT.cmake b/indra/cmake/GLEXT.cmake index a780966f0c..f45b27e7b8 100644 --- a/indra/cmake/GLEXT.cmake +++ b/indra/cmake/GLEXT.cmake @@ -3,7 +3,9 @@ include(Prebuilt) include(GLH) add_library( ll::glext INTERFACE IMPORTED ) -use_system_binary(glext) +#use_system_binary(glext) +if (WINDOWS) use_prebuilt_binary(glext) +endif () diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index 34df3ad33b..007b8dfba6 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -1,7 +1,7 @@ # -*- cmake -*- include(Variables) -include(GLH) +include(GLEXT) include(Prebuilt) include_guard() diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index 1f0820a9f6..d29bd5cde4 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -55,6 +55,7 @@ set(llwindow_LINK_LIBRARIES llfilesystem llxml ll::glm + ll::glext ll::uilibraries ll::SDL ) -- cgit v1.3 From 36842acf763d664002cd89b8a76679ab8bbcda24 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 3 Jun 2025 17:04:09 +0800 Subject: Instruction for disabling VS fatal warnings otherwise we'd have to deal with every warning. Instruction for building from the command line too. Add MSBuild binary directory to PATH, and MSBuild needs its .exe extension typed too for it to be found, unlike other commands such as cmake, vcpkg, pkg-config, and so on. By default, MSBuild builds using the RelWithDebInfo configuration, hence the -p:Configuration parameter to have Release instead. I guess that's why CMake would consider CMAKE_BUILD_TYPE as not being used by the project. --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b6dfa754c1..c1eea48788 100644 --- a/README.md +++ b/README.md @@ -123,10 +123,11 @@ $ megapahit ``` $ vcpkg install pkgconf python3 freealut apr-util boost freetype glm hunspell libjpeg-turbo meshoptimizer minizip nghttp2 openjpeg libvorbis libxml2[tools] xxhash $ export LL_BUILD="/MD /O2 /Ob2 /std:c++20 /Zc:wchar_t- /Zi /GR /DLL_RELEASE=1 /DLL_RELEASE_FOR_DOWNLOAD=1 /DNDEBUG /D_SECURE_STL=0 /D_HAS_ITERATOR_DEBUGGING=0 /DWIN32 /D_WINDOWS /DLL_WINDOWS=1 /DUNICODE /D_UNICODE /DWINVER=0x0602 /D_WIN32_WINNT=0x0602" -$ export PATH="/c/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:$VCPKG_ROOT/downloads/tools/msys2/21caed2f81ec917b/mingw64/bin:$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/tools/libxml2:$PATH" +$ export PATH="/c/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:/c/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin:$VCPKG_ROOT/downloads/tools/msys2/21caed2f81ec917b/mingw64/bin:$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/tools/libxml2:$PATH" $ export PKG_CONFIG_LIBDIR="$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/lib/pkgconfig" $ export PYTHON="$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/tools/python3/python.exe" -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=OFF -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=OFF -DPACKAGE:BOOL=OFF ../indra +$ cmake -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=OFF -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=OFF -DPACKAGE:BOOL=OFF -DVS_DISABLE_FATAL_WARNINGS:BOOL=ON ../indra +$ MSBuild.exe Megapahit.sln -p:Configuration=Release ``` ## Contribute -- cgit v1.3 From 2bf9d234aac30ed4a85282730da0ffc83acf9adf Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 3 Jun 2025 17:10:49 +0800 Subject: Use LL's prebuilt Windows Boost for now I got "definition of dllimport function not allowed" errors when using vcpkg's Boost. Someone else got this problem too: https://github.com/boostorg/serialization/issues/278 Hopefully later we can get back to using vcpkg's Boost. --- README.md | 2 +- indra/cmake/Boost.cmake | 52 +++++++++++++++++++++++++------------------------ 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index c1eea48788..6dfba3459c 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ $ megapahit ### Windows ``` -$ vcpkg install pkgconf python3 freealut apr-util boost freetype glm hunspell libjpeg-turbo meshoptimizer minizip nghttp2 openjpeg libvorbis libxml2[tools] xxhash +$ vcpkg install pkgconf python3 freealut apr-util freetype glm hunspell libjpeg-turbo meshoptimizer minizip nghttp2 openjpeg libvorbis libxml2[tools] xxhash $ export LL_BUILD="/MD /O2 /Ob2 /std:c++20 /Zc:wchar_t- /Zi /GR /DLL_RELEASE=1 /DLL_RELEASE_FOR_DOWNLOAD=1 /DNDEBUG /D_SECURE_STL=0 /D_HAS_ITERATOR_DEBUGGING=0 /DWIN32 /D_WINDOWS /DLL_WINDOWS=1 /DUNICODE /D_UNICODE /DWINVER=0x0602 /D_WIN32_WINNT=0x0602" $ export PATH="/c/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:/c/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin:$VCPKG_ROOT/downloads/tools/msys2/21caed2f81ec917b/mingw64/bin:$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/tools/libxml2:$PATH" $ export PKG_CONFIG_LIBDIR="$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/lib/pkgconfig" diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 9ea1f6c9a6..2c4ec193e7 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -4,38 +4,40 @@ include(Prebuilt) include_guard() add_library( ll::boost INTERFACE IMPORTED ) - -if (DARWIN) - target_include_directories( ll::boost SYSTEM INTERFACE /opt/local/libexec/boost/1.87/include) - target_link_directories( ll::boost INTERFACE /opt/local/libexec/boost/1.87/lib) - set(sfx -mt) -elseif (WINDOWS) - target_include_directories( ll::boost SYSTEM INTERFACE ${prefix_result}/../include) - target_link_directories( ll::boost INTERFACE ${prefix_result}) - set(sfx -vc143-mt-x64-1_88) -else () - find_package( Boost REQUIRED ) -endif () -target_link_libraries( ll::boost INTERFACE - boost_context${sfx} - boost_fiber${sfx} - boost_filesystem${sfx} - boost_program_options${sfx} - boost_regex${sfx} - boost_system${sfx} - boost_thread${sfx} - boost_url${sfx} - ) -target_compile_definitions( ll::boost INTERFACE BOOST_BIND_GLOBAL_PLACEHOLDERS ) -return() - if( USE_CONAN ) target_link_libraries( ll::boost INTERFACE CONAN_PKG::boost ) target_compile_definitions( ll::boost INTERFACE BOOST_ALLOW_DEPRECATED_HEADERS BOOST_BIND_GLOBAL_PLACEHOLDERS ) return() endif() +if (WINDOWS) use_prebuilt_binary(boost) + target_include_directories( ll::boost SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) +else () + if (DARWIN) + target_include_directories( ll::boost SYSTEM INTERFACE /opt/local/libexec/boost/1.87/include) + target_link_directories( ll::boost INTERFACE /opt/local/libexec/boost/1.87/lib) + set(sfx -mt) + elseif (WINDOWS) + target_include_directories( ll::boost SYSTEM INTERFACE ${prefix_result}/../include) + target_link_directories( ll::boost INTERFACE ${prefix_result}) + set(sfx -vc143-mt-x64-1_88) + else () + find_package( Boost REQUIRED ) + endif () + target_link_libraries( ll::boost INTERFACE + boost_context${sfx} + boost_fiber${sfx} + boost_filesystem${sfx} + boost_program_options${sfx} + boost_regex${sfx} + boost_system${sfx} + boost_thread${sfx} + boost_url${sfx} + ) + target_compile_definitions( ll::boost INTERFACE BOOST_BIND_GLOBAL_PLACEHOLDERS ) + return() +endif () # As of sometime between Boost 1.67 and 1.72, Boost libraries are suffixed # with the address size. -- cgit v1.3 From 163d425479ba305306e74701a453bd32eb9d34f6 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 3 Jun 2025 17:25:23 +0800 Subject: Make vcpkg APR able to find sockaddr_in6 definition and get rid of the error: 'apr_sockaddr_t::sin6' uses undefined struct 'sockaddr_in6' --- indra/llcommon/llwin32headers.h | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/llcommon/llwin32headers.h b/indra/llcommon/llwin32headers.h index df433deb7a..32139821d5 100644 --- a/indra/llcommon/llwin32headers.h +++ b/indra/llcommon/llwin32headers.h @@ -29,6 +29,7 @@ #ifdef LL_WINDOWS #include // Does not include winsock.h because WIN32_LEAN_AND_MEAN is defined +#include #include // Requires windows.h #endif -- cgit v1.3 From a1d368a4528585d694340858939a7b2de35d7481 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 3 Jun 2025 17:51:57 +0800 Subject: Fix vcpkg APR library names to link with --- indra/cmake/APR.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index fa3b8a4ffb..58a00c74da 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -8,7 +8,7 @@ add_library( ll::apr INTERFACE IMPORTED ) if (WINDOWS) target_include_directories(ll::apr SYSTEM INTERFACE ${prefix_result}/../include) target_link_directories(ll::apr INTERFACE ${prefix_result}) - target_link_libraries(ll::apr INTERFACE apr-1 apr-util-1) + target_link_libraries(ll::apr INTERFACE libapr-1 libaprutil-1) else () include(FindPkgConfig) pkg_check_modules(Apr REQUIRED apr-1 apr-util-1) -- cgit v1.3 From a9ff91e4124b58761539f44bc66979599b9f9c5b Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 3 Jun 2025 17:52:32 +0800 Subject: Fix ftsystem path for including vcpkg's FT one --- indra/llrender/llfontfreetype.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp index 41d0a1af31..e93c98970b 100644 --- a/indra/llrender/llfontfreetype.cpp +++ b/indra/llrender/llfontfreetype.cpp @@ -32,7 +32,7 @@ // Freetype stuff #include #ifdef LL_WINDOWS -#include +#include #endif #include "llfontfreetypesvg.h" -- cgit v1.3 From dad8be14580b75af6fa0b97e41d5f8103e23acbe Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 3 Jun 2025 17:59:37 +0800 Subject: Exclude Windows from compiling SDL related files --- indra/llwindow/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index d29bd5cde4..6debd54665 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -64,7 +64,7 @@ include_directories(${CMAKE_SOURCE_DIR}/llrender) # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level -if (NOT DARWIN) +if (NOT (DARWIN OR WINDOWS)) list(APPEND viewer_SOURCE_FILES llkeyboardsdl.cpp llwindowsdl.cpp -- cgit v1.3 From befce1b8547d7dadb692b9246339433dca869a45 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 3 Jun 2025 18:00:34 +0800 Subject: Exclude Windows from using -Wno-unused-but-set-variable compile flag. --- indra/newview/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 32afa2ba5f..e61bb26c7e 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2045,8 +2045,9 @@ endif() set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "Path to artwork files.") -set_source_files_properties(llinventorygallery.cpp PROPERTIES COMPILE_FLAGS - -Wno-unused-but-set-variable) +if (NOT WINDOWS) + set_source_files_properties(llinventorygallery.cpp PROPERTIES COMPILE_FLAGS -Wno-unused-but-set-variable) +endif () if (CMAKE_CXX_COMPILER_ID MATCHES Clang) set_source_files_properties(llappviewerlinux.cpp PROPERTIES COMPILE_FLAGS -Wno-dangling-gsl -- cgit v1.3 From 837d872bcdf809c88925e5e07bc4590ddf5e6510 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 3 Jun 2025 18:01:59 +0800 Subject: Simple usleep implementation for Windows Just copying from this site and adjusting it for now: https://filipivianna.blogspot.com/2010/07/usleep-on-windows-win32.html --- indra/newview/llappviewer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 7580100977..e1e26372df 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1544,7 +1544,15 @@ bool LLAppViewer::doFrame() if(fpsLimitSleepFor) { +#if LL_WINDOWS + U64 time1 = 0, time2 = 0; + QueryPerformanceCounter((LARGE_INTEGER *)&time1); + do { + QueryPerformanceCounter((LARGE_INTEGER *)&time2); + } while ((time2-time1) < fpsLimitSleepFor); +#else usleep(fpsLimitSleepFor); +#endif } // yield some time to the os based on command line option -- cgit v1.3 From f0de1898e0b6a3b9f1ee1bcc762ba334b78bbcc6 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 3 Jun 2025 18:04:14 +0800 Subject: Exclude Windows from referring to LibVLC headers for now, until we are ready to enable media plugins on Windows. --- indra/newview/llappviewer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e1e26372df..3f716cc4ef 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -131,10 +131,12 @@ #include "stringize.h" #include "llcoros.h" #include "llexception.h" +#if !LL_WINDOWS #if LL_DARWIN || LL_LINUX || __FreeBSD__ #include "cef/dullahan_version.h" -#endif +#endif // LL_DARWIN || LL_LINUX || __FreeBSD__ #include "vlc/libvlc_version.h" +#endif // !LL_WINDOWS #if LL_DARWIN #if LL_SDL @@ -3461,7 +3463,7 @@ LLSD LLAppViewer::getViewerInfo() const info["LIBCEF_VERSION"] = "Undefined"; #endif -//#if !LL_LINUX +#if !LL_WINDOWS std::ostringstream vlc_ver_codec; vlc_ver_codec << LIBVLC_VERSION_MAJOR; vlc_ver_codec << "."; @@ -3469,11 +3471,9 @@ LLSD LLAppViewer::getViewerInfo() const vlc_ver_codec << "."; vlc_ver_codec << LIBVLC_VERSION_REVISION; info["LIBVLC_VERSION"] = vlc_ver_codec.str(); -/* #else info["LIBVLC_VERSION"] = "Undefined"; #endif -*/ S32 packets_in = (S32)LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_IN); if (packets_in > 0) -- cgit v1.3 From 8e096fdcdcfa4f8db762dfb9a2b8dd4e29c78eea Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 4 Jun 2025 06:16:17 +0800 Subject: Exclude Windows from compiling llappviewerlinux That's why it was trying to find llwindowsdl.h, through llappviewerlinux.cpp. I had to scroll up a bit to find out that it was trying to compile llappviewerlinux.cpp. The last error message only complained about missing SDL/SDL.h (referred from llwindowsdl.h). --- indra/newview/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e61bb26c7e..6657eee0b2 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1492,7 +1492,7 @@ if (DARWIN) list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES}) endif (DARWIN) -if (NOT DARWIN) +if (NOT (DARWIN OR WINDOWS)) LIST(APPEND viewer_SOURCE_FILES llappviewerlinux.cpp) set_source_files_properties( llappviewerlinux.cpp -- cgit v1.3 From d8db0ff30cd1775a66694bd0f1e02795c85722be Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Tue, 3 Jun 2025 17:50:15 -0700 Subject: First commit - bare bones of it working - pointing to test page on S3 --- indra/newview/CMakeLists.txt | 2 + indra/newview/app_settings/commands.xml | 4 +- indra/newview/app_settings/settings.xml | 11 ++++ indra/newview/llfloateravatarwelcomepack.cpp | 58 ++++++++++++++++++++++ indra/newview/llfloateravatarwelcomepack.h | 45 +++++++++++++++++ indra/newview/llviewerfloaterreg.cpp | 2 + indra/newview/llviewerwindow.cpp | 8 +++ .../default/xui/en/floater_avatar_welcome_pack.xml | 25 ++++++++++ indra/newview/skins/default/xui/en/menu_viewer.xml | 6 +-- indra/newview/skins/default/xui/en/strings.xml | 2 +- 10 files changed, 157 insertions(+), 6 deletions(-) create mode 100644 indra/newview/llfloateravatarwelcomepack.cpp create mode 100644 indra/newview/llfloateravatarwelcomepack.h create mode 100644 indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 98151e2f4d..172c7f4b1f 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -178,6 +178,7 @@ set(viewer_SOURCE_FILES llflexibleobject.cpp llfloater360capture.cpp llfloaterabout.cpp + llfloateravatarwelcomepack.cpp llfloaterbvhpreview.cpp llfloateraddpaymentmethod.cpp llfloaterauction.cpp @@ -849,6 +850,7 @@ set(viewer_HEADER_FILES llflexibleobject.h llfloater360capture.h llfloaterabout.h + llfloateravatarwelcomepack.h llfloaterbvhpreview.h llfloateraddpaymentmethod.h llfloaterauction.h diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 4a3dfffde1..7bcfecf9fa 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -26,9 +26,9 @@ label_ref="Command_Avatar_Label" tooltip_ref="Command_Avatar_Tooltip" execute_function="Floater.ToggleOrBringToFront" - execute_parameters="avatar" + execute_parameters="avatar_welcome_pack" is_running_function="Floater.IsOpen" - is_running_parameters="avatar" + is_running_parameters="avatar_welcome_pack" /> Value http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/avatars.html + AvatarWelcomePack + + Comment + Avatar Welcome Pack contents + Persist + 1 + Type + String + Value + https://sl-viewer-media-system.s3.amazonaws.com/vawp/index.html + AvatarBakedTextureUploadTimeout diff --git a/indra/newview/llfloateravatarwelcomepack.cpp b/indra/newview/llfloateravatarwelcomepack.cpp new file mode 100644 index 0000000000..82e44d1398 --- /dev/null +++ b/indra/newview/llfloateravatarwelcomepack.cpp @@ -0,0 +1,58 @@ +/** + * @file llfloateravatarwelcomepack.cpp + * @author Callum Prentice (callum@lindenlab.com) + * @brief Floater container for the Avatar Welcome Pack we app + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloateravatarwelcomepack.h" +#include "lluictrlfactory.h" +#include "llmediactrl.h" + +LLFloaterAvatarWelcomePack::LLFloaterAvatarWelcomePack(const LLSD& key) + : LLFloater(key) +{ +} + +LLFloaterAvatarWelcomePack::~LLFloaterAvatarWelcomePack() +{ + if (mAvatarPicker) + { + mAvatarPicker->navigateStop(); + mAvatarPicker->clearCache(); //images are reloading each time already + mAvatarPicker->unloadMediaSource(); + } +} + +bool LLFloaterAvatarWelcomePack::postBuild() +{ + mAvatarPicker = findChild("avatar_picker_contents"); + if (mAvatarPicker) + { + mAvatarPicker->clearCache(); + } + + return true; +} diff --git a/indra/newview/llfloateravatarwelcomepack.h b/indra/newview/llfloateravatarwelcomepack.h new file mode 100644 index 0000000000..a332d46708 --- /dev/null +++ b/indra/newview/llfloateravatarwelcomepack.h @@ -0,0 +1,45 @@ +/** + * @file llfloateravatarwelcomepack.h + * @author Callum Prentice (callum@lindenlab.com) + * @brief Floater container for the Avatar Welcome Pack we app + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#pragma once + +#include "llfloater.h" + +class LLMediaCtrl; + +class LLFloaterAvatarWelcomePack: + public LLFloater +{ + friend class LLFloaterReg; + + private: + LLFloaterAvatarWelcomePack(const LLSD& key); + ~LLFloaterAvatarWelcomePack(); + bool postBuild() override; + + LLMediaCtrl* mAvatarPicker; +}; diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 4d9c2f3281..c4daa6dd8b 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -40,6 +40,7 @@ #include "llfloaterautoreplacesettings.h" #include "llfloateravatar.h" #include "llfloateravatarpicker.h" +#include "llfloateravatarwelcomepack.h" #include "llfloateravatarrendersettings.h" #include "llfloateravatartextures.h" #include "llfloaterbanduration.h" @@ -333,6 +334,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar", "floater_avatar.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("avatar_welcome_pack", "floater_avatar_welcome_pack.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar_render_settings", "floater_avatar_render_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index d2685bcc48..a279664522 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2299,6 +2299,14 @@ void LLViewerWindow::initWorldUI() url = LLWeb::expandURLSubstitutions(url, LLSD()); avatar_picker->navigateTo(url, HTTP_CONTENT_TEXT_HTML); } + LLMediaCtrl* avatar_welcome_pack = LLFloaterReg::getInstance("avatar_welcome_pack")->findChild("avatar_picker_contents"); + if (avatar_welcome_pack) + { + avatar_welcome_pack->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); + std::string url = gSavedSettings.getString("AvatarWelcomePack"); + url = LLWeb::expandURLSubstitutions(url, LLSD()); + avatar_welcome_pack->navigateTo(url, HTTP_CONTENT_TEXT_HTML); + } } } diff --git a/indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml b/indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml new file mode 100644 index 0000000000..0ea79e68c2 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml @@ -0,0 +1,25 @@ + + + + diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 343f0c0059..040fae3256 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -411,11 +411,11 @@ + label="Avatar Welcome Pack..." + name="Avatar Welcome Pack"> + parameter="avatar_welcome_pack" /> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index faa751bbf1..532d536589 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -4186,7 +4186,7 @@ Try enclosing path to the editor with double quotes. name="Command_360_Capture_Label">360 snapshot About land Outfits - Complete avatars + Avatar Welcome Pack Build Chat Conversations -- cgit v1.3 From 8d3d6ee56ad5615f8ffd4790e15b81909590a5f4 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Tue, 3 Jun 2025 19:24:04 -0700 Subject: Remove the old avatar selector (Complete Avatars) - replaced by Avatar Welcome Pack --- indra/newview/CMakeLists.txt | 2 -- indra/newview/app_settings/settings.xml | 11 ------ indra/newview/llfloateravatar.cpp | 61 --------------------------------- indra/newview/llfloateravatar.h | 46 ------------------------- indra/newview/llviewerfloaterreg.cpp | 2 -- indra/newview/llviewerwindow.cpp | 8 ----- 6 files changed, 130 deletions(-) delete mode 100644 indra/newview/llfloateravatar.cpp delete mode 100644 indra/newview/llfloateravatar.h diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 172c7f4b1f..dc331b7330 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -183,7 +183,6 @@ set(viewer_SOURCE_FILES llfloateraddpaymentmethod.cpp llfloaterauction.cpp llfloaterautoreplacesettings.cpp - llfloateravatar.cpp llfloateravatarpicker.cpp llfloateravatarrendersettings.cpp llfloateravatartextures.cpp @@ -855,7 +854,6 @@ set(viewer_HEADER_FILES llfloateraddpaymentmethod.h llfloaterauction.h llfloaterautoreplacesettings.h - llfloateravatar.h llfloateravatarpicker.h llfloateravatarrendersettings.h llfloateravatartextures.h diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 90da70763f..0f0593c625 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -621,17 +621,6 @@ Value 16.0 - AvatarPickerURL - - Comment - Avatar picker contents - Persist - 1 - Type - String - Value - http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/avatars.html - AvatarWelcomePack Comment diff --git a/indra/newview/llfloateravatar.cpp b/indra/newview/llfloateravatar.cpp deleted file mode 100644 index 404316275d..0000000000 --- a/indra/newview/llfloateravatar.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/** - * @file llfloateravatar.h - * @author Leyla Farazha - * @brief floater for the avatar changer - * - * $LicenseInfo:firstyear=2011&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2011, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llfloateravatar.h" -#include "lluictrlfactory.h" -#include "llmediactrl.h" - - -LLFloaterAvatar::LLFloaterAvatar(const LLSD& key) - : LLFloater(key) -{ -} - -LLFloaterAvatar::~LLFloaterAvatar() -{ - if (mAvatarPicker) - { - mAvatarPicker->navigateStop(); - mAvatarPicker->clearCache(); //images are reloading each time already - mAvatarPicker->unloadMediaSource(); - } -} - -bool LLFloaterAvatar::postBuild() -{ - mAvatarPicker = findChild("avatar_picker_contents"); - if (mAvatarPicker) - { - mAvatarPicker->clearCache(); - } - enableResizeCtrls(true, true, false); - return true; -} - - diff --git a/indra/newview/llfloateravatar.h b/indra/newview/llfloateravatar.h deleted file mode 100644 index fb591c8306..0000000000 --- a/indra/newview/llfloateravatar.h +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @file llfloateravatar.h - * @author Leyla Farazha - * @brief floater for the avatar changer - * - * $LicenseInfo:firstyear=2011&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2011, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_FLOATER_AVATAR_H -#define LL_FLOATER_AVATAR_H - -#include "llfloater.h" -class LLMediaCtrl; - -class LLFloaterAvatar: - public LLFloater -{ - friend class LLFloaterReg; -private: - LLFloaterAvatar(const LLSD& key); - ~LLFloaterAvatar(); - bool postBuild() override; - - LLMediaCtrl* mAvatarPicker; -}; - -#endif diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index c4daa6dd8b..4b3af6d7e8 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -38,7 +38,6 @@ #include "llfloateraddpaymentmethod.h" #include "llfloaterauction.h" #include "llfloaterautoreplacesettings.h" -#include "llfloateravatar.h" #include "llfloateravatarpicker.h" #include "llfloateravatarwelcomepack.h" #include "llfloateravatarrendersettings.h" @@ -332,7 +331,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("appearance", "floater_my_appearance.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("associate_listing", "floater_associate_listing.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("avatar", "floater_avatar.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar_welcome_pack", "floater_avatar_welcome_pack.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar_render_settings", "floater_avatar_render_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index a279664522..e8a285f494 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2291,14 +2291,6 @@ void LLViewerWindow::initWorldUI() url = LLWeb::expandURLSubstitutions(url, LLSD()); destinations->navigateTo(url, HTTP_CONTENT_TEXT_HTML); } - LLMediaCtrl* avatar_picker = LLFloaterReg::getInstance("avatar")->findChild("avatar_picker_contents"); - if (avatar_picker) - { - avatar_picker->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); - std::string url = gSavedSettings.getString("AvatarPickerURL"); - url = LLWeb::expandURLSubstitutions(url, LLSD()); - avatar_picker->navigateTo(url, HTTP_CONTENT_TEXT_HTML); - } LLMediaCtrl* avatar_welcome_pack = LLFloaterReg::getInstance("avatar_welcome_pack")->findChild("avatar_picker_contents"); if (avatar_welcome_pack) { -- cgit v1.3 From 2971fde36e3a04772f317a08e5d1335161637e3c Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 4 Jun 2025 14:10:51 +0800 Subject: Self-build ColladaDOM on Windows Plus simplifying the SHARED to STATIC stream editing by not using the global 'g' key, cause it's only 1 instance to edit. For now, BOOST_CFLAGS & BOOST_LIBS are set to refer to SLv prebuilt binary installation, along with its library suffix. try_compile doesn't seem to "compile" it, but it does configure it, so we just execute MSBuild.exe afterwards. Last time I tried, it didn't finish building or didn't build successfully, though. So what I did is manually run MSBuild.exe on ColladaDOM's solution file, and the next CMake configuration picked up the generated library, renamed to be the same as expected when using SLv prebuilt one, so that we don't have to adjust more lines for this, it has to be copied/moved anyway, might as well rename it the same. About the WIN32 definition stream editing, somehow WIN32 is not defined in daeUtils.cpp, that it would fail at deciding which commands to compile. I did try adding /DWIN32 to CXX_FLAGS but it ruined it for the Minizip header directory search. So the hack is to just forcefully define WIN32 in that file. --- indra/cmake/LLPrimitive.cmake | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index 3429a744f5..a8b328b84b 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -22,7 +22,7 @@ if( LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD ) # Build of the collada-dom for Linux and FreeBSD is done in # indra/llprimitive/CMakeLists.txt return() -elseif ( NOT WINDOWS ) +else () include(FindPkgConfig) pkg_check_modules(Minizip REQUIRED minizip) pkg_check_modules(Libxml2 REQUIRED libxml-2.0) @@ -41,13 +41,16 @@ elseif ( NOT WINDOWS ) ) if ( WINDOWS ) execute_process( - COMMAND sed -i "s/SHARED/STATIC/g" CMakeLists.txt + COMMAND sed -i "s/SHARED/STATIC/" CMakeLists.txt WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/src/1.4 ) - set(BOOST_LIBRARY_SUFFIX -vc143-mt-x64-1_88) + execute_process( + COMMAND sed -i "/#include /a #define WIN32" daeUtils.cpp + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/src/dae + ) else () execute_process( - COMMAND sed -i "" -e "s/SHARED/STATIC/g" CMakeLists.txt + COMMAND sed -i "" -e "s/SHARED/STATIC/" CMakeLists.txt WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/src/1.4 ) endif () @@ -55,6 +58,10 @@ elseif ( NOT WINDOWS ) set(BOOST_CFLAGS -I${Libxml2_LIBRARY_DIRS}exec/boost/1.87/include) set(BOOST_LIBS -L${Minizip_LIBRARY_DIRS}exec/boost/1.87/lib) set(BOOST_LIBRARY_SUFFIX -mt) + elseif( WINDOWS ) + set(BOOST_CFLAGS -I${LIBS_PREBUILT_DIR}/include) + set(BOOST_LIBS -L${ARCH_PREBUILT_DIRS_RELEASE}) + set(BOOST_LIBRARY_SUFFIX -mt-x${ADDRESS_SIZE}) endif() file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/collada/1.4) try_compile(COLLADADOM_RESULT @@ -88,17 +95,34 @@ elseif ( NOT WINDOWS ) ${ARCH_PREBUILT_DIRS}/libcollada14dom.a ${ARCH_PREBUILT_DIRS_RELEASE}/libcollada14dom.a ) - file(WRITE ${PREBUILD_TRACKING_DIR}/colladadom_installed "${colladadom_installed}") + elseif ( WINDOWS ) + execute_process( + COMMAND MSBuild.exe ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/Project.sln -p:Configuration=Release + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8 + OUTPUT_VARIABLE colladadom_installed + ) + file(REMOVE_RECURSE ${LIBS_PREBUILT_DIR}/include/collada) + file( + COPY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/include + DESTINATION ${LIBS_PREBUILT_DIR}/include + ) + file(RENAME + ${LIBS_PREBUILT_DIR}/include/include + ${LIBS_PREBUILT_DIR}/include/collada + ) + file(RENAME + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/src/1.4/Release/collada14dom.lib + ${ARCH_PREBUILT_DIRS_RELEASE}/libcollada14dom23-s.lib + ) endif() + file(WRITE ${PREBUILD_TRACKING_DIR}/colladadom_installed "${colladadom_installed}") endif() endif() -#use_system_binary( colladadom ) +if( FALSE ) +use_system_binary( colladadom ) -if (WINDOWS) use_prebuilt_binary(colladadom) -endif () -if( FALSE ) use_prebuilt_binary(minizip-ng) # needed for colladadom use_prebuilt_binary(libxml2) -- cgit v1.3 From 4497b343cb96b12567f2eedfa93d33d0a5b66f76 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 4 Jun 2025 18:09:06 +0800 Subject: Revert "Use LL's prebuilt Windows Boost for now" This reverts commit 2bf9d234aac30ed4a85282730da0ffc83acf9adf. --- README.md | 2 +- indra/cmake/Boost.cmake | 52 ++++++++++++++++++++++++------------------------- 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 6dfba3459c..c1eea48788 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ $ megapahit ### Windows ``` -$ vcpkg install pkgconf python3 freealut apr-util freetype glm hunspell libjpeg-turbo meshoptimizer minizip nghttp2 openjpeg libvorbis libxml2[tools] xxhash +$ vcpkg install pkgconf python3 freealut apr-util boost freetype glm hunspell libjpeg-turbo meshoptimizer minizip nghttp2 openjpeg libvorbis libxml2[tools] xxhash $ export LL_BUILD="/MD /O2 /Ob2 /std:c++20 /Zc:wchar_t- /Zi /GR /DLL_RELEASE=1 /DLL_RELEASE_FOR_DOWNLOAD=1 /DNDEBUG /D_SECURE_STL=0 /D_HAS_ITERATOR_DEBUGGING=0 /DWIN32 /D_WINDOWS /DLL_WINDOWS=1 /DUNICODE /D_UNICODE /DWINVER=0x0602 /D_WIN32_WINNT=0x0602" $ export PATH="/c/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:/c/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin:$VCPKG_ROOT/downloads/tools/msys2/21caed2f81ec917b/mingw64/bin:$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/tools/libxml2:$PATH" $ export PKG_CONFIG_LIBDIR="$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/lib/pkgconfig" diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 2c4ec193e7..9ea1f6c9a6 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -4,40 +4,38 @@ include(Prebuilt) include_guard() add_library( ll::boost INTERFACE IMPORTED ) + +if (DARWIN) + target_include_directories( ll::boost SYSTEM INTERFACE /opt/local/libexec/boost/1.87/include) + target_link_directories( ll::boost INTERFACE /opt/local/libexec/boost/1.87/lib) + set(sfx -mt) +elseif (WINDOWS) + target_include_directories( ll::boost SYSTEM INTERFACE ${prefix_result}/../include) + target_link_directories( ll::boost INTERFACE ${prefix_result}) + set(sfx -vc143-mt-x64-1_88) +else () + find_package( Boost REQUIRED ) +endif () +target_link_libraries( ll::boost INTERFACE + boost_context${sfx} + boost_fiber${sfx} + boost_filesystem${sfx} + boost_program_options${sfx} + boost_regex${sfx} + boost_system${sfx} + boost_thread${sfx} + boost_url${sfx} + ) +target_compile_definitions( ll::boost INTERFACE BOOST_BIND_GLOBAL_PLACEHOLDERS ) +return() + if( USE_CONAN ) target_link_libraries( ll::boost INTERFACE CONAN_PKG::boost ) target_compile_definitions( ll::boost INTERFACE BOOST_ALLOW_DEPRECATED_HEADERS BOOST_BIND_GLOBAL_PLACEHOLDERS ) return() endif() -if (WINDOWS) use_prebuilt_binary(boost) - target_include_directories( ll::boost SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) -else () - if (DARWIN) - target_include_directories( ll::boost SYSTEM INTERFACE /opt/local/libexec/boost/1.87/include) - target_link_directories( ll::boost INTERFACE /opt/local/libexec/boost/1.87/lib) - set(sfx -mt) - elseif (WINDOWS) - target_include_directories( ll::boost SYSTEM INTERFACE ${prefix_result}/../include) - target_link_directories( ll::boost INTERFACE ${prefix_result}) - set(sfx -vc143-mt-x64-1_88) - else () - find_package( Boost REQUIRED ) - endif () - target_link_libraries( ll::boost INTERFACE - boost_context${sfx} - boost_fiber${sfx} - boost_filesystem${sfx} - boost_program_options${sfx} - boost_regex${sfx} - boost_system${sfx} - boost_thread${sfx} - boost_url${sfx} - ) - target_compile_definitions( ll::boost INTERFACE BOOST_BIND_GLOBAL_PLACEHOLDERS ) - return() -endif () # As of sometime between Boost 1.67 and 1.72, Boost libraries are suffixed # with the address size. -- cgit v1.3 From b7c12f52ef1848afec6e31ccea32ca86cd7ceef2 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 4 Jun 2025 22:09:25 +0800 Subject: Set ColladaDOM to refer to vcpkg Boost Turns out I couldn't repeat self-building ColladaDOM using SLv prebuilt Boost successfully, because of the zlib, minizip, libxml2 header directories search confusion, no matter how I tried tinkering with LL's ColladaDOM fork CXX_FLAGS and/or EXTRA_COMPILE_FLAGS settings. With vcpkg Boost, self-building ColladaDOM in the viewer CMake configuration stage goes smoothly (compiling ColladaDOM on Windows could take a while, though.. at least on my system). --- indra/cmake/LLPrimitive.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index a8b328b84b..6a24f62619 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -59,9 +59,9 @@ else () set(BOOST_LIBS -L${Minizip_LIBRARY_DIRS}exec/boost/1.87/lib) set(BOOST_LIBRARY_SUFFIX -mt) elseif( WINDOWS ) - set(BOOST_CFLAGS -I${LIBS_PREBUILT_DIR}/include) - set(BOOST_LIBS -L${ARCH_PREBUILT_DIRS_RELEASE}) - set(BOOST_LIBRARY_SUFFIX -mt-x${ADDRESS_SIZE}) + set(BOOST_CFLAGS -I${prefix_result}/../include) + set(BOOST_LIBS -L${prefix_result}) + set(BOOST_LIBRARY_SUFFIX -vc143-mt-x64-1_88) endif() file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/collada/1.4) try_compile(COLLADADOM_RESULT -- cgit v1.3 From 7be4892f658d2ac1a63c656bed4cb5628898be98 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 4 Jun 2025 22:15:10 +0800 Subject: Fix vcpkg Boost JSON linking errors The error was "definition of dllimport static data member not allowed", and not "definition of dllimport function not allowed" as mentioned in commit 2bf9d234aac30ed4a85282730da0ffc83acf9adf description. Basically there were about 5 offending files, and all had BOOST_JSON_REQUIRE_CONST_INIT in them. Not including json/src.hpp (that includes them among others), fixes those errors, but then there are definitions in them that are actually used by llsdjson. After doing so many searches, I came across this: https://stackoverflow.com/questions/3491990/c-definition-of-dllimport-static-data-member and just from the first paragraph in the accepted answer, I realised llsdjson can still have those definitions, just not from the offending headers, but by simply linking to Boost JSON compiled library instead. --- indra/cmake/Boost.cmake | 1 + indra/llcommon/llsdjson.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 9ea1f6c9a6..764019408b 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -20,6 +20,7 @@ target_link_libraries( ll::boost INTERFACE boost_context${sfx} boost_fiber${sfx} boost_filesystem${sfx} + boost_json${sfx} boost_program_options${sfx} boost_regex${sfx} boost_system${sfx} diff --git a/indra/llcommon/llsdjson.cpp b/indra/llcommon/llsdjson.cpp index 655869a704..a3f80b7c2e 100644 --- a/indra/llcommon/llsdjson.cpp +++ b/indra/llcommon/llsdjson.cpp @@ -35,7 +35,7 @@ #include "llerror.h" #include "../llmath/llmath.h" -#include +#include //========================================================================= LLSD LlsdFromJson(const boost::json::value& val) -- cgit v1.3 From 628c200400dc9aa687c06a419d076a558651b1b9 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 4 Jun 2025 22:25:29 +0800 Subject: No link to vcpkg absent Boost Regex library file --- indra/cmake/Boost.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 764019408b..df5f05a200 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -22,11 +22,13 @@ target_link_libraries( ll::boost INTERFACE boost_filesystem${sfx} boost_json${sfx} boost_program_options${sfx} - boost_regex${sfx} boost_system${sfx} boost_thread${sfx} boost_url${sfx} ) +if (NOT WINDOWS) + target_link_libraries( ll::boost INTERFACE boost_regex${sfx}) +endif () target_compile_definitions( ll::boost INTERFACE BOOST_BIND_GLOBAL_PLACEHOLDERS ) return() -- cgit v1.3 From 68232dc0b59f339139b42b19fb8fc7d7206f2fc8 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 4 Jun 2025 22:30:36 +0800 Subject: Re-enable GL extension loading function pointers on Windows, which might have been because I was still using MinGW back then. --- indra/llrender/llgl.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 70a28a1740..ac66faaf5a 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -238,8 +238,6 @@ PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC wglBlitContextFramebufferAMD = n PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = nullptr; PFNWGLGETSWAPINTERVALEXTPROC wglGetSwapIntervalEXT = nullptr; -/* - // GL_VERSION_1_2 //PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements = nullptr; //PFNGLTEXIMAGE3DPROC glTexImage3D = nullptr; @@ -984,7 +982,6 @@ PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC glMultiDrawArraysIndirectCount = nullpt PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC glMultiDrawElementsIndirectCount = nullptr; PFNGLPOLYGONOFFSETCLAMPPROC glPolygonOffsetClamp = nullptr; -*/ #endif LLGLManager gGLManager; @@ -1434,7 +1431,6 @@ void LLGLManager::initExtensions() mInited = true; -/* #if LL_WINDOWS LL_DEBUGS("RenderInit") << "GL Probe: Getting symbols" << LL_ENDL; @@ -2272,7 +2268,6 @@ void LLGLManager::initExtensions() glPolygonOffsetClamp = (PFNGLPOLYGONOFFSETCLAMPPROC)GLH_EXT_GET_PROC_ADDRESS("glPolygonOffsetClamp"); #endif -*/ } void rotate_quat(LLQuaternion& rotation) -- cgit v1.3 From a32a60727b1d49807cee4dfa189f4eda48ee44fb Mon Sep 17 00:00:00 2001 From: secretfoxtail Date: Wed, 4 Jun 2025 10:09:36 -0600 Subject: floater_about.xml -> List credits in 2 columns Use monospace font to manually format credits list in 2 columns, also fix annoying indent in licences tab --- .../newview/skins/default/xui/en/floater_about.xml | 90 ++++++++++------------ 1 file changed, 41 insertions(+), 49 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index 09b134eac5..40cb1b2c43 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -70,7 +70,7 @@ follows="all" left="10" name="megapahit_credits_panel" - height="420" + height="405" top="10"> -Erik Kundiman -LinneNoir -milo (observeur) -Fritigern Gothly -Kou Ayashi -Hadet Sonnenkern -Remmy (Secret Foxtail) -Eris Ravenwood -gwigz (nya) -EmilyAmiee -Bavid Dailey -Aria (Tashia Redrose) -Cate (32a) -Hiroo Ono -Melodey -Keysin (scoutkeysin) -Yikes Lopez -~ ( ^-^ ) ~ (cutie_qu) - + enabled="false" + font="Monospace" + follows="top|left" + height="200" + bg_readonly_color="Transparent" + left="5" + text_color="LtGray" + max_length="65536" + top_pad="5" + width="475" + word_wrap="false"> + Erik Kundiman EmilyAmiee + LinneNoir Bavid Dailey + milo (observeur) Aria (Tashia Redrose) + Fritigern Gothly Cate (32a) + Kou Ayashi Hiroo Ono + Hadet Sonnenkern Melodey + Remmy (Secret Foxtail) Keysin (scoutkeysin) + Eris Ravenwood Yikes Lopez + gwigz (nya) ~ ( ^-^ ) ~ (cutie_qu) + - 3Dconnexion SDK Copyright (C) 1992-2009 3Dconnexion - APR Copyright (C) 2011 The Apache Software Foundation - Collada DOM Copyright 2006 Sony Computer Entertainment Inc. - cURL Copyright (C) 1996-2010, Daniel Stenberg, (daniel@haxx.se) - expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd. - FreeType Copyright (C) 1996-2002, 2006 David Turner, Robert Wilhelm, and Werner Lemberg. - GL Copyright (C) 1999-2004 Brian Paul. - jpeglib Copyright (C) 1991-1998, Thomas G. Lane. - llphysicsextensions_tpv Copyright (c) 2010, Linden Research, Inc. - meshoptimizer Copyright (c) 2016-2021 Arseny Kapoulkine - ogg/vorbis Copyright (C) 2002, Xiphophorus - OpenSSL Copyright (C) 1998-2008 The OpenSSL Project. - PCRE Copyright (c) 1997-2012 University of Cambridge - SDL Copyright (C) 1997-2024 Sam Lantinga - SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - xxHash Copyright (C) 2012-2020 Yann Collet. - zlib Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler. +3Dconnexion SDK Copyright (C) 1992-2009 3Dconnexion +APR Copyright (C) 2011 The Apache Software Foundation +Collada DOM Copyright 2006 Sony Computer Entertainment Inc. +cURL Copyright (C) 1996-2010, Daniel Stenberg, (daniel@haxx.se) +expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd. +FreeType Copyright (C) 1996-2002, 2006 David Turner, Robert Wilhelm, and Werner Lemberg. +GL Copyright (C) 1999-2004 Brian Paul. +jpeglib Copyright (C) 1991-1998, Thomas G. Lane. +llphysicsextensions_tpv Copyright (c) 2010, Linden Research, Inc. +meshoptimizer Copyright (c) 2016-2021 Arseny Kapoulkine +ogg/vorbis Copyright (C) 2002, Xiphophorus +OpenSSL Copyright (C) 1998-2008 The OpenSSL Project. +PCRE Copyright (c) 1997-2012 University of Cambridge +SDL Copyright (C) 1997-2024 Sam Lantinga +SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) +xxHash Copyright (C) 2012-2020 Yann Collet. +zlib Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler. - This software contains source code provided by NVIDIA Corporation. +This software contains source code provided by NVIDIA Corporation. - All rights reserved. See licenses.txt for details. +All rights reserved. See licenses.txt for details. -- cgit v1.3 From f65bb5ecfb8930d7299f20dfeac2ccea95c798c6 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Wed, 4 Jun 2025 15:51:39 -0700 Subject: Miniscule change to make the aspect ratio of the non-resizeable floater look better --- indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml b/indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml index 0ea79e68c2..86aaf2a5c4 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml @@ -5,9 +5,9 @@ can_minimize="true" can_close="true" can_resize="false" - min_height="600" + min_height="660" min_width="800" - height="600" + height="660" layout="topleft" name="Avatar Welcome Pack" single_instance="true" @@ -17,7 +17,7 @@ width="800"> Date: Thu, 5 Jun 2025 14:04:32 +0800 Subject: Only Windows link to Boost JSON library file Adding another library file to link means adding many more lines for other platform(s), at least for macOS with its bundling. It's much simpler to make the condition on 2 files. --- indra/cmake/Boost.cmake | 5 +++-- indra/llcommon/llsdjson.cpp | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index df5f05a200..5a9e10b38b 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -20,13 +20,14 @@ target_link_libraries( ll::boost INTERFACE boost_context${sfx} boost_fiber${sfx} boost_filesystem${sfx} - boost_json${sfx} boost_program_options${sfx} boost_system${sfx} boost_thread${sfx} boost_url${sfx} ) -if (NOT WINDOWS) +if (WINDOWS) + target_link_libraries( ll::boost INTERFACE boost_json${sfx}) +else () target_link_libraries( ll::boost INTERFACE boost_regex${sfx}) endif () target_compile_definitions( ll::boost INTERFACE BOOST_BIND_GLOBAL_PLACEHOLDERS ) diff --git a/indra/llcommon/llsdjson.cpp b/indra/llcommon/llsdjson.cpp index a3f80b7c2e..a4b45ed80d 100644 --- a/indra/llcommon/llsdjson.cpp +++ b/indra/llcommon/llsdjson.cpp @@ -35,7 +35,11 @@ #include "llerror.h" #include "../llmath/llmath.h" +#if LL_WINDOWS #include +#else +#include +#endif //========================================================================= LLSD LlsdFromJson(const boost::json::value& val) -- cgit v1.3 From 9be003f3ed0b3977760ec9764a6d8281de2a69aa Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 5 Jun 2025 14:21:08 +0800 Subject: Combine 2 ColladaDOM sed process in 1 execution and make the if, else, & endif styles more consistent. --- indra/cmake/LLPrimitive.cmake | 61 ++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 32 deletions(-) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index 6a24f62619..6dc0659bd8 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -18,7 +18,7 @@ if( USE_CONAN ) "${CONAN_INCLUDE_DIRS_COLLADADOM}/collada-dom/1.4/" ) endif() -if( LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD ) +if (LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) # Build of the collada-dom for Linux and FreeBSD is done in # indra/llprimitive/CMakeLists.txt return() @@ -28,41 +28,38 @@ else () pkg_check_modules(Libxml2 REQUIRED libxml-2.0) target_link_libraries( ll::minizip-ng INTERFACE ${Minizip_LIBRARIES} ) target_link_libraries( ll::libxml INTERFACE ${Libxml2_LIBRARIES} ) - if( ${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/colladadom_installed OR NOT ${colladadom_installed} EQUAL 0 ) - if( NOT EXISTS ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8.tar.gz ) + if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/colladadom_installed OR NOT ${colladadom_installed} EQUAL 0) + if (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8.tar.gz) file(DOWNLOAD https://github.com/secondlife/3p-colladadom/archive/refs/tags/v2.3-r8.tar.gz ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8.tar.gz ) - endif() + endif () file(ARCHIVE_EXTRACT INPUT ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8.tar.gz DESTINATION ${CMAKE_BINARY_DIR} ) - if ( WINDOWS ) - execute_process( - COMMAND sed -i "s/SHARED/STATIC/" CMakeLists.txt - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/src/1.4 - ) + if (WINDOWS) execute_process( - COMMAND sed -i "/#include /a #define WIN32" daeUtils.cpp - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/src/dae + COMMAND sed -i "s/SHARED/STATIC/" 1.4/CMakeLists.txt + COMMAND sed -i "/#include /a #define WIN32" dae/daeUtils.cpp + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/src ) else () execute_process( - COMMAND sed -i "" -e "s/SHARED/STATIC/" CMakeLists.txt - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/src/1.4 + COMMAND sed -i "" -e "s/SHARED/STATIC/" src/1.4/CMakeLists.txt + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8 ) endif () - if( DARWIN ) + if (DARWIN) set(BOOST_CFLAGS -I${Libxml2_LIBRARY_DIRS}exec/boost/1.87/include) set(BOOST_LIBS -L${Minizip_LIBRARY_DIRS}exec/boost/1.87/lib) set(BOOST_LIBRARY_SUFFIX -mt) - elseif( WINDOWS ) + elseif (WINDOWS) set(BOOST_CFLAGS -I${prefix_result}/../include) set(BOOST_LIBS -L${prefix_result}) set(BOOST_LIBRARY_SUFFIX -vc143-mt-x64-1_88) - endif() + endif () file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/collada/1.4) try_compile(COLLADADOM_RESULT PROJECT colladadom @@ -85,17 +82,7 @@ else () -DOPT_COLLADA14:BOOL=ON -DCOLLADA_DOM_INCLUDE_INSTALL_DIR:PATH=${LIBS_PREBUILT_DIR}/include/collada ) - if( ${COLLADADOM_RESULT} ) - execute_process( - COMMAND ${CMAKE_MAKE_PROGRAM} install - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8 - OUTPUT_VARIABLE colladadom_installed - ) - file(RENAME - ${ARCH_PREBUILT_DIRS}/libcollada14dom.a - ${ARCH_PREBUILT_DIRS_RELEASE}/libcollada14dom.a - ) - elseif ( WINDOWS ) + if (WINDOWS) execute_process( COMMAND MSBuild.exe ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/Project.sln -p:Configuration=Release WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8 @@ -114,12 +101,22 @@ else () ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/src/1.4/Release/collada14dom.lib ${ARCH_PREBUILT_DIRS_RELEASE}/libcollada14dom23-s.lib ) - endif() + elseif (${COLLADADOM_RESULT}) + execute_process( + COMMAND ${CMAKE_MAKE_PROGRAM} install + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8 + OUTPUT_VARIABLE colladadom_installed + ) + file(RENAME + ${ARCH_PREBUILT_DIRS}/libcollada14dom.a + ${ARCH_PREBUILT_DIRS_RELEASE}/libcollada14dom.a + ) + endif () file(WRITE ${PREBUILD_TRACKING_DIR}/colladadom_installed "${colladadom_installed}") - endif() -endif() + endif () +endif () -if( FALSE ) +if (FALSE) use_system_binary( colladadom ) use_prebuilt_binary(colladadom) @@ -137,7 +134,7 @@ if (WINDOWS) else() target_link_libraries( ll::libxml INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libxml2.a) endif() -endif( FALSE ) +endif (FALSE) target_include_directories( ll::colladadom SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/collada -- cgit v1.3 From 936f22befc7a5cdf1c1cf94b35f6bb44fb504eb8 Mon Sep 17 00:00:00 2001 From: secretfoxtail Date: Thu, 5 Jun 2025 09:06:43 -0600 Subject: floater_about.xml -> credits cleanup Correct indendation in list of names and simplify special thanks text --- .../newview/skins/default/xui/en/floater_about.xml | 60 +++++++++++----------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index 40cb1b2c43..d6fa9cdd49 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -81,30 +81,30 @@ top="0" width="435" wrap="true"> -Megapahit is brought to you by (in order of appearance): +Megapahit is brought to you by: - Erik Kundiman EmilyAmiee - LinneNoir Bavid Dailey - milo (observeur) Aria (Tashia Redrose) - Fritigern Gothly Cate (32a) - Kou Ayashi Hiroo Ono - Hadet Sonnenkern Melodey - Remmy (Secret Foxtail) Keysin (scoutkeysin) - Eris Ravenwood Yikes Lopez - gwigz (nya) ~ ( ^-^ ) ~ (cutie_qu) - + enabled="false" + font="Monospace" + follows="top|left" + height="200" + bg_readonly_color="Transparent" + left="5" + text_color="LtGray" + max_length="65536" + top_pad="5" + width="475" + word_wrap="false"> +Erik Kundiman EmilyAmiee +LinneNoir Bavid Dailey +milo (observeur) Aria (Tashia Redrose) +Fritigern Gothly Cate (32a) +Kou Ayashi Hiroo Ono +Hadet Sonnenkern Melodey +Remmy (Secret Foxtail) Keysin (scoutkeysin) +Eris Ravenwood Yikes Lopez +gwigz (nya) ~ ( ^-^ ) ~ (cutie_qu) + -with special thanks to (in order of appearance): +with special thanks to: -Chorazin Allen and Nicky Perian for involving Erik Kundiman in viewer developments; -JenniWindrider for the pre-MP donation that was used to help build the website; -Vir Linden for making it possible for the project to have a place (in every sense of the word) in SL; -nutsobvious for the early testing and video proof; -Soft Linden for the security testing; and -Kyle Linden for selling TPV parcel 2 to Erik Kundiman at L$0 price. +Chorazin Allen and Nicky Perian - Involving Erik Kundiman in viewer development +JenniWindrider - Pre-MP donation used to help build the website +Vir Linden - Making it possible for the project to have a place in SL +nutsobvious - Early testing and video proof +Soft Linden - Security testing +Kyle Linden - Giving TPV parcel 2 to Erik Kundiman @@ -189,7 +189,7 @@ Dummy Name replaced at run time Date: Thu, 5 Jun 2025 22:27:28 +0800 Subject: Fix 2 wstring linking errors to Boost filesystem The errors were: llfilesystem.lib(lldiskcache.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl boost::filesystem::detail::path_traits::convert(char const *,char const *,class std::basic_string,cla ss std::allocator > &,class std::codecvt const *)" (__imp_?convert@path_traits@detail@filesystem@boost@@YAXPEBD0AEAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@PEBV?$codecvt@GDU_Mbstatet@@@6@@Z) refe renced in function "public: void __cdecl LLDiskCache::purge(void)" (?purge@LLDiskCache@@QEAAXXZ) [C:\Users\erik\Documents\Megapahit\viewer\build-mingw64_nt-10.0-19045-x86_64\newview\megapahit.vcxproj] Hint on symbols that are defined and could potentially match: "__declspec(dllimport) void __cdecl boost::filesystem::detail::path_traits::convert(char const *,char const *,class std::basic_string,class std::allocator > &,class std::codecvt const *)" (__imp_?convert@path_traits@detail@filesystem@boost@@YAXPEBD0AEAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@PEBV?$codecvt@_WDU_Mbstatet@@@6@@Z) "__declspec(dllimport) void __cdecl boost::filesystem::detail::path_traits::convert(wchar_t const *,wchar_t const *,class std::basic_string,class std::allocator > &,class std::codecvt const *) " (__imp_?convert@path_traits@detail@filesystem@boost@@YAXPEB_W0AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBV?$codecvt@_WDU_Mbstatet@@@6@@Z) llfilesystem.lib(lldir.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl boost::filesystem::detail::path_traits::convert(unsigned short const *,unsigned short const *,class std::basic_string,class std ::allocator > &,class std::codecvt const *)" (__imp_?convert@path_traits@detail@filesystem@boost@@YAXPEBG0AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBV?$codecvt@GDU_Mbstatet@@@6@@Z) referenced in functi on "public: class std::vector,class std::allocator >,class std::allocator,class std::allocator > > > __cdecl LLDir::getFilesInDir(class std: :basic_string,class std::allocator > const &)" (?getFilesInDir@LLDir@@QEAA?AV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@st d@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@@Z) [C:\Users\erik\Documents\Megapahit\viewer\build-mingw64_nt-10.0-19045-x86_64\newview\megapahit.vcxproj] --- indra/llfilesystem/lldir.cpp | 4 ++++ indra/llfilesystem/lldiskcache.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/indra/llfilesystem/lldir.cpp b/indra/llfilesystem/lldir.cpp index e8e5d6538b..d12080aafa 100644 --- a/indra/llfilesystem/lldir.cpp +++ b/indra/llfilesystem/lldir.cpp @@ -121,7 +121,11 @@ std::vector LLDir::getFilesInDir(const std::string &dirname) { if (boost::filesystem::is_regular_file(dir_itr->status())) { +#if LL_WINDOWS + v.push_back(utf16str_to_utf8str(dir_itr->path().filename().wstring())); +#else v.push_back(dir_itr->path().filename().string()); +#endif } } } diff --git a/indra/llfilesystem/lldiskcache.cpp b/indra/llfilesystem/lldiskcache.cpp index 49904911a9..58bbb995b0 100644 --- a/indra/llfilesystem/lldiskcache.cpp +++ b/indra/llfilesystem/lldiskcache.cpp @@ -159,7 +159,11 @@ void LLDiskCache::purge() } if (should_remove) { +#if LL_WINDOWS + boost::filesystem::remove(utf8str_to_utf16str(entry.second.second), ec); +#else boost::filesystem::remove(entry.second.second, ec); +#endif if (ec.failed()) { LL_WARNS() << "Failed to delete cache file " << entry.second.second << ": " << ec.message() << LL_ENDL; -- cgit v1.3 From 29983baebecfd0df7d16ec4de567628b6a61677f Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 5 Jun 2025 23:11:52 +0800 Subject: Rearrange the MP bringer names cause I see the order as per row, going right first, then down left, then right again, then down left again, and so on. --- indra/newview/skins/default/xui/en/floater_about.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index d6fa9cdd49..de047f5010 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -95,15 +95,15 @@ Megapahit is brought to you by: top_pad="5" width="475" word_wrap="false"> -Erik Kundiman EmilyAmiee -LinneNoir Bavid Dailey -milo (observeur) Aria (Tashia Redrose) -Fritigern Gothly Cate (32a) -Kou Ayashi Hiroo Ono -Hadet Sonnenkern Melodey -Remmy (Secret Foxtail) Keysin (scoutkeysin) -Eris Ravenwood Yikes Lopez -gwigz (nya) ~ ( ^-^ ) ~ (cutie_qu) +Erik Kundiman LinneNoir +milo (observeur) Fritigern Gothly +Kou Ayashi Hadet Sonnenkern +Remmy (Secret Foxtail) Eris Ravenwood +gwigz (nya) EmilyAmiee +Bavid Dailey Aria (Tashia Redrose) +Cate (32a) Hiroo Ono +Melodey Keysin (scoutkeysin) +Yikes Lopez ~ ( ^-^ ) ~ (cutie_qu) Date: Fri, 6 Jun 2025 00:14:35 +0800 Subject: Fix another wstring Boost filesystem linking error Basically string() functions call this convert(). The error was: llfilesystem.lib(lldiriterator.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl boost::filesystem::detail::path_traits::convert(unsigned short const *,unsigned short const *,class std::basic_string,c lass std::allocator > &,class std::codecvt const *)" (__imp_?convert@path_traits@detail@filesystem@boost@@YAXPEBG0AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBV?$codecvt@GDU_Mbstatet@@@6@@Z) [C:\Users\er ik\Documents\Megapahit\viewer\build-mingw64_nt-10.0-19045-x86_64\newview\megapahit.vcxproj] Hint on symbols that are defined and could potentially match: "__declspec(dllimport) void __cdecl boost::filesystem::detail::path_traits::convert(char const *,char const *,class std::basic_string,class std::allocator > &,class std::codecvt const *)" (__imp_?convert@path_traits@detail@filesystem@boost@@YAXPEBD0AEAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@PEBV?$codecvt@_WDU_Mbstatet@@@6@@Z) "__declspec(dllimport) void __cdecl boost::filesystem::detail::path_traits::convert(wchar_t const *,wchar_t const *,class std::basic_string,class std::allocator > &,class std::codecvt const *) " (__imp_?convert@path_traits@detail@filesystem@boost@@YAXPEB_W0AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBV?$codecvt@_WDU_Mbstatet@@@6@@Z) --- indra/llfilesystem/lldiriterator.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/llfilesystem/lldiriterator.cpp b/indra/llfilesystem/lldiriterator.cpp index 61f768c512..cd99c79357 100644 --- a/indra/llfilesystem/lldiriterator.cpp +++ b/indra/llfilesystem/lldiriterator.cpp @@ -72,7 +72,11 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask) if (!is_dir) { +#if LL_WINDOWS + LL_WARNS() << "Invalid path: \"" << utf16str_to_utf8str(dir_path.wstring()) << "\"" << LL_ENDL; +#else LL_WARNS() << "Invalid path: \"" << dir_path.string() << "\"" << LL_ENDL; +#endif return; } @@ -130,7 +134,11 @@ bool LLDirIterator::Impl::next(std::string &fname) while (mIter != end_itr && !found) { boost::smatch match; +#if LL_WINDOWS + std::string name = utf16str_to_utf8str(mIter->path().filename().wstring()); +#else std::string name = mIter->path().filename().string(); +#endif found = ll_regex_match(name, match, mFilterExp); if (found) { -- cgit v1.3 From 66251e9e06fb314b5d403d5faa83305f74b35a25 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 6 Jun 2025 10:28:39 +0800 Subject: Fix another wstring Boost filesystem linking error I couldn't get the LL_WARNS to link on Windows yet, so they're just disabled for now, they're only warnings to the users anyway. The error was: llfilesystem.lib(lldiskcache.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl boost::filesystem::detail::path_traits::convert(unsigned short const *,unsigned short const *,class std::basic_string,cla ss std::allocator > &,class std::codecvt const *)" (__imp_?convert@path_traits@detail@filesystem@boost@@YAXPEBG0AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBV?$codecvt@GDU_Mbstatet@@@6@@Z) referenced in function "public: void __cdecl LLDiskCache::clearCache(void)" (?clearCache@LLDiskCache@@QEAAXXZ) [C:\Users\erik\Documents\Megapahit\viewer\build-mingw64_nt-10.0-19045-x86_64\newview\megapahit.vcxproj] --- indra/llfilesystem/lldiskcache.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/indra/llfilesystem/lldiskcache.cpp b/indra/llfilesystem/lldiskcache.cpp index 58bbb995b0..d9b223fb49 100644 --- a/indra/llfilesystem/lldiskcache.cpp +++ b/indra/llfilesystem/lldiskcache.cpp @@ -114,14 +114,22 @@ void LLDiskCache::purge() { if (boost::filesystem::is_regular_file(*iter, ec) && !ec.failed()) { +#if LL_WINDOWS + if (utf16str_to_utf8str((*iter).path().wstring()).find(CACHE_FILENAME_PREFIX) != std::string::npos) +#else if ((*iter).path().string().find(CACHE_FILENAME_PREFIX) != std::string::npos) +#endif { uintmax_t file_size = boost::filesystem::file_size(*iter, ec); if (ec.failed()) { continue; } +#if LL_WINDOWS + const std::string file_path = utf16str_to_utf8str((*iter).path().wstring()); +#else const std::string file_path = (*iter).path().string(); +#endif const std::time_t file_time = boost::filesystem::last_write_time(*iter, ec); if (ec.failed()) { @@ -166,7 +174,9 @@ void LLDiskCache::purge() #endif if (ec.failed()) { +#if !LL_WINDOWS LL_WARNS() << "Failed to delete cache file " << entry.second.second << ": " << ec.message() << LL_ENDL; +#endif } } } @@ -241,12 +251,18 @@ void LLDiskCache::clearCache() { if (boost::filesystem::is_regular_file(*iter, ec) && !ec.failed()) { +#if LL_WINDOWS + if (utf16str_to_utf8str((*iter).path().wstring()).find(CACHE_FILENAME_PREFIX) != std::string::npos) +#else if ((*iter).path().string().find(CACHE_FILENAME_PREFIX) != std::string::npos) +#endif { boost::filesystem::remove(*iter, ec); if (ec.failed()) { +#if !LL_WINDOWS LL_WARNS() << "Failed to delete cache file " << *iter << ": " << ec.message() << LL_ENDL; +#endif } } } @@ -274,13 +290,20 @@ void LLDiskCache::removeOldVFSFiles() { if (boost::filesystem::is_regular_file(*iter, ec) && !ec.failed()) { +#if LL_WINDOWS + if ((utf16str_to_utf8str((*iter).path().wstring()).find(CACHE_FORMAT) != std::string::npos) || + (utf16str_to_utf8str((*iter).path().wstring()).find(DB_FORMAT) != std::string::npos)) +#else if (((*iter).path().string().find(CACHE_FORMAT) != std::string::npos) || ((*iter).path().string().find(DB_FORMAT) != std::string::npos)) +#endif { boost::filesystem::remove(*iter, ec); if (ec.failed()) { +#if !LL_WINDOWS LL_WARNS() << "Failed to delete cache file " << *iter << ": " << ec.message() << LL_ENDL; +#endif } } } @@ -315,7 +338,11 @@ uintmax_t LLDiskCache::dirFileSize(const std::string& dir) { if (boost::filesystem::is_regular_file(*iter, ec) && !ec.failed()) { +#if LL_WINDOWS + if (utf16str_to_utf8str((*iter).path().wstring()).find(CACHE_FILENAME_PREFIX) != std::string::npos) +#else if ((*iter).path().string().find(CACHE_FILENAME_PREFIX) != std::string::npos) +#endif { uintmax_t file_size = boost::filesystem::file_size(*iter, ec); if (!ec.failed()) -- cgit v1.3 From ddbcf74a8f171adabf3b61a8ce3419eea0d1e018 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Thu, 5 Jun 2025 22:31:43 -0700 Subject: Open Avatar Welcome Pack floater on first login (or cleared settings) and move it to the center of the screen. Adjust the size of the floater (height) slightly. --- indra/newview/llfloateravatarwelcomepack.cpp | 1 + indra/newview/llstartup.cpp | 20 +++++++++++++++++--- .../default/xui/en/floater_avatar_welcome_pack.xml | 12 ++++++------ 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/indra/newview/llfloateravatarwelcomepack.cpp b/indra/newview/llfloateravatarwelcomepack.cpp index 82e44d1398..06b6de0cbf 100644 --- a/indra/newview/llfloateravatarwelcomepack.cpp +++ b/indra/newview/llfloateravatarwelcomepack.cpp @@ -48,6 +48,7 @@ LLFloaterAvatarWelcomePack::~LLFloaterAvatarWelcomePack() bool LLFloaterAvatarWelcomePack::postBuild() { + center(); mAvatarPicker = findChild("avatar_picker_contents"); if (mAvatarPicker) { diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index cc4f49c0b4..f065d286c8 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2103,9 +2103,6 @@ bool idle_startup() do_startup_frame(); - // We're successfully logged in. - gSavedSettings.setBOOL("FirstLoginThisInstall", false); - LLFloaterReg::showInitialVisibleInstances(); LLFloaterGridStatus::getInstance()->startGridStatusTimer(); @@ -2451,6 +2448,23 @@ bool idle_startup() LLPerfStats::StatsRecorder::setAutotuneInit(); + // Display Avatar Welcome Pack the first time a user logs in + // (or clears their settings....) + if (gSavedSettings.getBOOL("FirstLoginThisInstall")) + { + LLFloater* avatar_welcome_pack_floater = LLFloaterReg::findInstance("avatar_welcome_pack"); + if (avatar_welcome_pack_floater != nullptr) + { + avatar_welcome_pack_floater->center(); + avatar_welcome_pack_floater->setVisible(true); + } + } + + //// We're successfully logged in. + // 2025-06 Moved lower down in the state machine so the Avatar Welcome Pack + // floater display can be triggered correctly. + gSavedSettings.setBOOL("FirstLoginThisInstall", false); + return true; } diff --git a/indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml b/indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml index 86aaf2a5c4..1b0f91c7ea 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml @@ -5,20 +5,20 @@ can_minimize="true" can_close="true" can_resize="false" - min_height="660" - min_width="800" - height="660" + min_height="420" + min_width="500" + height="420" layout="topleft" name="Avatar Welcome Pack" single_instance="true" save_rect="true" save_visibility="true" title="AVATAR WELCOME PACK" - width="800"> + width="500"> -- cgit v1.3 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). --- README.md | 4 +- indra/llplugin/slplugin/CMakeLists.txt | 8 +- indra/llwebrtc/CMakeLists.txt | 13 +- indra/newview/CMakeLists.txt | 231 +++++++++++++++++---------------- indra/newview/ViewerInstall.cmake | 72 ++++++++++ 5 files changed, 209 insertions(+), 119 deletions(-) diff --git a/README.md b/README.md index c1eea48788..21099e881a 100644 --- a/README.md +++ b/README.md @@ -126,8 +126,10 @@ $ export LL_BUILD="/MD /O2 /Ob2 /std:c++20 /Zc:wchar_t- /Zi /GR /DLL_RELEASE=1 / $ export PATH="/c/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:/c/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin:$VCPKG_ROOT/downloads/tools/msys2/21caed2f81ec917b/mingw64/bin:$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/tools/libxml2:$PATH" $ export PKG_CONFIG_LIBDIR="$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/lib/pkgconfig" $ export PYTHON="$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/tools/python3/python.exe" -$ cmake -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=OFF -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=OFF -DPACKAGE:BOOL=OFF -DVS_DISABLE_FATAL_WARNINGS:BOOL=ON ../indra +$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=OFF -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=Megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DVS_DISABLE_FATAL_WARNINGS:BOOL=ON ../indra $ MSBuild.exe Megapahit.sln -p:Configuration=Release +$ cpack -G NSIS +$ start Megapahit-`cat newview/viewer_version.txt`-win64.exe ``` ## Contribute 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) diff --git a/indra/llwebrtc/CMakeLists.txt b/indra/llwebrtc/CMakeLists.txt index 6c0216234c..a64a3e4dac 100644 --- a/indra/llwebrtc/CMakeLists.txt +++ b/indra/llwebrtc/CMakeLists.txt @@ -82,8 +82,13 @@ if (INSTALL) set(_LIB lib/${ARCH}-linux-gnu) elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR (${LINUX_DISTRO} MATCHES gentoo)) set(_LIB lib${ADDRESS_SIZE}) - else (DARWIN) + else () set(_LIB lib) - endif (DARWIN) - install(TARGETS ${PROJECT_NAME} DESTINATION ${_LIB}) -endif (INSTALL) + endif () + + if (WINDOWS) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${PROJECT_NAME}.dll DESTINATION .) + else () + install(TARGETS ${PROJECT_NAME} DESTINATION ${_LIB}) + endif () +endif () diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 6657eee0b2..4e6531e22b 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1750,6 +1750,62 @@ list(APPEND EVENT_HOST_SCRIPTS ${EVENT_HOST_SCRIPT_GLOB_LIST}) set(PACKAGE ON CACHE BOOL "Add a package target that builds an installer package.") +if (PACKAGE) + set(CPACK_PACKAGE_NAME ${VIEWER_BINARY_NAME} + CACHE STRING "Viewer binary name.") + set(CPACK_PACKAGE_VERSION ${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION} + CACHE STRING "Viewer major.minor.patch.revision versions.") + set(VIEWER_PACKAGE_COMMENT "A fork of the Second Life viewer") + set(VIEWER_PACKAGE_DESCRIPTION "An entrance to virtual empires in only megabytes. A shelter for the metaverse refugees, especially those from less supported operating systems.") + set(VIEWER_PACKAGE_DOMAIN_NAME ${VIEWER_BINARY_NAME}.net) +endif () + +if (CMAKE_COMMAND MATCHES /usr/bin/cmake OR WINDOWS) + add_custom_command( + TARGET ${VIEWER_BINARY_NAME} POST_BUILD + COMMAND sed + ARGS -e '/Linden Lab.*/d' ${CMAKE_HOME_DIRECTORY}/../doc/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '/following residents.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '/along with.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '/^$$/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '/\t.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '/^ .*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sort + ARGS -R contributions.txt -o ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND paste + ARGS -s -d, ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt + COMMAND sed + ARGS -i 's/,/, /g' ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt + ) +else () + add_custom_command( + TARGET ${VIEWER_BINARY_NAME} POST_BUILD + COMMAND sed + ARGS -e '/Linden Lab.*/d' ${CMAKE_HOME_DIRECTORY}/../doc/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '' -e '/following residents.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '' -e '/along with.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '' -e '/^$$/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '' -e '/\t.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '' -e '/^ .*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sort + ARGS -R contributions.txt -o ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND paste + ARGS -s -d, ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt + COMMAND sed + ARGS -i '' -e 's/,/, /g' ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt + ) +endif () + if(USE_PRECOMPILED_HEADERS) target_precompile_headers( ${VIEWER_BINARY_NAME} PRIVATE llviewerprecompiledheaders.h ) endif(USE_PRECOMPILED_HEADERS) @@ -1907,6 +1963,15 @@ if (WINDOWS) endif (NOT UNATTENDED) if (PACKAGE) + + set(CPACK_NSIS_DISPLAY_NAME ${VIEWER_BINARY_NAME}) + set(CPACK_NSIS_PACKAGE_NAME ${VIEWER_BINARY_NAME}) + set(CPACK_NSIS_HELP_LINK https://${VIEWER_PACKAGE_DOMAIN_NAME}) + set(CPACK_NSIS_URL_INFO_ABOUT https://${VIEWER_PACKAGE_DOMAIN_NAME}) + set(CPACK_NSIS_CONTACT $ENV{USER}@${VIEWER_PACKAGE_DOMAIN_NAME}) + set(CPACK_NSIS_WELCOME_TITLE "Welcome to ${VIEWER_BINARY_NAME}!") + + if (FALSE) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.xz COMMAND ${PYTHON_EXECUTABLE} @@ -1953,6 +2018,7 @@ if (WINDOWS) # temporarily disable packaging of event_host until hg subrepos get # sorted out on the parabuild cluster... #${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.xz) + endif (FALSE) endif (PACKAGE) elseif (DARWIN) @@ -2124,38 +2190,47 @@ foreach(elem ${country_codes}) configure_file(${emoji_mapping_src_file} ${emoji_mapping_dst_file} COPYONLY) endforeach() -if (PACKAGE) - set(CPACK_PACKAGE_NAME ${VIEWER_BINARY_NAME} - CACHE STRING "Viewer binary name.") - set(CPACK_PACKAGE_VERSION ${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION} - CACHE STRING "Viewer major.minor.patch.revision versions.") - set(VIEWER_PACKAGE_COMMENT "A fork of the Second Life viewer") - set(VIEWER_PACKAGE_DESCRIPTION "An entrance to virtual empires in only megabytes. A shelter for the metaverse refugees, especially those from less supported operating systems.") - set(VIEWER_PACKAGE_DOMAIN_NAME ${VIEWER_BINARY_NAME}.net) -endif () - if (LINUX) - add_custom_command( - TARGET ${VIEWER_BINARY_NAME} POST_BUILD - COMMAND ${CMAKE_SYSROOT}/usr/bin/sed - ARGS -e '/Linden Lab.*/d' ${CMAKE_HOME_DIRECTORY}/../doc/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND ${CMAKE_SYSROOT}/usr/bin/sed - ARGS -i '/following residents.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND ${CMAKE_SYSROOT}/usr/bin/sed - ARGS -i '/along with.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND ${CMAKE_SYSROOT}/usr/bin/sed - ARGS -i '/^$$/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND ${CMAKE_SYSROOT}/usr/bin/sed - ARGS -i '/\t.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND ${CMAKE_SYSROOT}/usr/bin/sed - ARGS -i '/^ .*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND sort - ARGS -R contributions.txt -o ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND paste - ARGS -s -d, ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt - COMMAND ${CMAKE_SYSROOT}/usr/bin/sed - ARGS -i 's/,/, /g' ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt + if (FALSE) + set(product SecondLife-${ARCH}-${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}) + + # These are the generated targets that are copied to package/ + set(COPY_INPUT_DEPENDENCIES + ${VIEWER_BINARY_NAME} + SLPlugin + #media_plugin_gstreamer010 + llcommon ) + + #if (NOT USE_BUGSPLAT) + # LIST(APPEND COPY_INPUT_DEPENDENCIES linux-crash-logger) + #endif (NOT USE_BUGSPLAT) + + add_custom_command( + OUTPUT ${product}.tar.xz + COMMAND ${PYTHON_EXECUTABLE} + ARGS + ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + --arch=${ARCH} + --artwork=${ARTWORK_DIR} + "--bugsplat=${BUGSPLAT_DB}" + "--openal=${USE_OPENAL}" + "--tracy=${USE_TRACY}" + --build=${CMAKE_CURRENT_BINARY_DIR} + --buildtype=${CMAKE_BUILD_TYPE} + "--channel=${VIEWER_CHANNEL}" + --configuration=${CMAKE_CFG_INTDIR} + --dest=${CMAKE_CURRENT_BINARY_DIR}/packaged + --grid=${GRID} + --source=${CMAKE_CURRENT_SOURCE_DIR} + --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched + --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + ${COPY_INPUT_DEPENDENCIES} + ) + endif (FALSE) + if (PACKAGE) if (${LINUX_DISTRO} MATCHES arch) configure_file( @@ -2204,47 +2279,6 @@ if (LINUX) endif (PACKAGE) if (FALSE) - set(product SecondLife-${ARCH}-${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}) - - # These are the generated targets that are copied to package/ - set(COPY_INPUT_DEPENDENCIES - ${VIEWER_BINARY_NAME} - SLPlugin - #media_plugin_gstreamer010 - llcommon - ) - - #if (NOT USE_BUGSPLAT) - # LIST(APPEND COPY_INPUT_DEPENDENCIES linux-crash-logger) - #endif (NOT USE_BUGSPLAT) - - add_custom_command( - OUTPUT ${product}.tar.xz - COMMAND ${PYTHON_EXECUTABLE} - ARGS - ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py - --arch=${ARCH} - --artwork=${ARTWORK_DIR} - "--bugsplat=${BUGSPLAT_DB}" - "--openal=${USE_OPENAL}" - "--tracy=${USE_TRACY}" - --build=${CMAKE_CURRENT_BINARY_DIR} - --buildtype=${CMAKE_BUILD_TYPE} - "--channel=${VIEWER_CHANNEL}" - --configuration=${CMAKE_CFG_INTDIR} - --dest=${CMAKE_CURRENT_BINARY_DIR}/packaged - --grid=${GRID} - --source=${CMAKE_CURRENT_SOURCE_DIR} - --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched - --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py - ${COPY_INPUT_DEPENDENCIES} - ) - - if (PACKAGE) - endif (PACKAGE) - add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.copy_touched COMMAND ${PYTHON_EXECUTABLE} @@ -2280,45 +2314,22 @@ if (LINUX) endif (PACKAGE) endif (FALSE) -else (LINUX) - add_custom_command( - TARGET ${VIEWER_BINARY_NAME} POST_BUILD - COMMAND sed - ARGS -e '/Linden Lab.*/d' ${CMAKE_HOME_DIRECTORY}/../doc/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND sed - ARGS -i '' -e '/following residents.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND sed - ARGS -i '' -e '/along with.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND sed - ARGS -i '' -e '/^$$/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND sed - ARGS -i '' -e '/\t.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND sed - ARGS -i '' -e '/^ .*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND sort - ARGS -R contributions.txt -o ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND paste - ARGS -s -d, ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt - COMMAND sed - ARGS -i '' -e 's/,/, /g' ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt - ) - if (CMAKE_SYSTEM_NAME MATCHES FreeBSD AND PACKAGE) - set(CPACK_BINARY_FREEBSD ON CACHE BOOL "Able to package FreeBSD PKG.") - set(CPACK_FREEBSD_PACKAGE_COMMENT ${VIEWER_PACKAGE_COMMENT} - CACHE STRING "FreeBSD package comment.") - set(CPACK_FREEBSD_PACKAGE_DESCRIPTION ${VIEWER_PACKAGE_DESCRIPTION} - CACHE STRING "FreeBSD package description.") - set(CPACK_FREEBSD_PACKAGE_WWW https://${VIEWER_PACKAGE_DOMAIN_NAME} - CACHE STRING "FreeBSD package WWW.") - set(CPACK_FREEBSD_PACKAGE_LICENSE LGPL21 - CACHE STRING "FreeBSD package license.") - set(CPACK_FREEBSD_PACKAGE_MAINTAINER $ENV{USER}@${VIEWER_PACKAGE_DOMAIN_NAME} - CACHE STRING "FreeBSD package maintainer.") - set(CPACK_FREEBSD_PACKAGE_ORIGIN net/${VIEWER_BINARY_NAME} - CACHE STRING "FreeBSD package origin.") - set(CPACK_FREEBSD_PACKAGE_DEPS "audio/freealut;devel/apr;devel/boost-libs;x11-toolkits/fltk;textproc/hunspell;misc/meshoptimizer;archivers/minizip;www/libnghttp2;graphics/openjpeg;devel/sdl2;multimedia/vlc;audio/libvorbis" - CACHE STRING "FreeBSD package dependencies.") - endif () +elseif (CMAKE_SYSTEM_NAME MATCHES FreeBSD AND PACKAGE) + set(CPACK_BINARY_FREEBSD ON CACHE BOOL "Able to package FreeBSD PKG.") + set(CPACK_FREEBSD_PACKAGE_COMMENT ${VIEWER_PACKAGE_COMMENT} + CACHE STRING "FreeBSD package comment.") + set(CPACK_FREEBSD_PACKAGE_DESCRIPTION ${VIEWER_PACKAGE_DESCRIPTION} + CACHE STRING "FreeBSD package description.") + set(CPACK_FREEBSD_PACKAGE_WWW https://${VIEWER_PACKAGE_DOMAIN_NAME} + CACHE STRING "FreeBSD package WWW.") + set(CPACK_FREEBSD_PACKAGE_LICENSE LGPL21 + CACHE STRING "FreeBSD package license.") + set(CPACK_FREEBSD_PACKAGE_MAINTAINER $ENV{USER}@${VIEWER_PACKAGE_DOMAIN_NAME} + CACHE STRING "FreeBSD package maintainer.") + set(CPACK_FREEBSD_PACKAGE_ORIGIN net/${VIEWER_BINARY_NAME} + CACHE STRING "FreeBSD package origin.") + set(CPACK_FREEBSD_PACKAGE_DEPS "audio/freealut;devel/apr;devel/boost-libs;x11-toolkits/fltk;textproc/hunspell;misc/meshoptimizer;archivers/minizip;www/libnghttp2;graphics/openjpeg;devel/sdl2;multimedia/vlc;audio/libvorbis" + CACHE STRING "FreeBSD package dependencies.") endif (LINUX) diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake index 353ec290ec..084f103822 100644 --- a/indra/newview/ViewerInstall.cmake +++ b/indra/newview/ViewerInstall.cmake @@ -84,6 +84,78 @@ if (DARWIN) endif (PACKAGE) install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake) +elseif (WINDOWS) + + install(DIRECTORY + app_settings + character + fonts + skins + DESTINATION . + ) + + install(FILES + ${AUTOBUILD_INSTALL_DIR}/ca-bundle.crt + cube.dae + featuretable.txt + DESTINATION . + ) + + install(FILES + licenses-win32.txt + RENAME licenses.txt + DESTINATION . + ) + + install(FILES + ${SCRIPTS_DIR}/messages/message_template.msg + ${SCRIPTS_DIR}/../etc/message.xml + ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt + DESTINATION app_settings + ) + + install(DIRECTORY + ${AUTOBUILD_INSTALL_DIR}/dictionaries + DESTINATION app_settings + ) + + install( + PROGRAMS + ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${VIEWER_BINARY_NAME}.exe + ${prefix_result}/../bin/OpenAL32.dll + ${prefix_result}/../bin/alut.dll + ${prefix_result}/../bin/boost_context-vc143-mt-x${ADDRESS_SIZE}-1_88.dll + ${prefix_result}/../bin/boost_fiber-vc143-mt-x${ADDRESS_SIZE}-1_88.dll + ${prefix_result}/../bin/boost_filesystem-vc143-mt-x${ADDRESS_SIZE}-1_88.dll + ${prefix_result}/../bin/boost_json-vc143-mt-x${ADDRESS_SIZE}-1_88.dll + ${prefix_result}/../bin/boost_program_options-vc143-mt-x${ADDRESS_SIZE}-1_88.dll + ${prefix_result}/../bin/boost_thread-vc143-mt-x${ADDRESS_SIZE}-1_88.dll + ${prefix_result}/../bin/boost_url-vc143-mt-x${ADDRESS_SIZE}-1_88.dll + ${prefix_result}/../bin/brotlicommon.dll + ${prefix_result}/../bin/brotlidec.dll + ${prefix_result}/../bin/bz2.dll + ${prefix_result}/../bin/fmt.dll + ${prefix_result}/../bin/freetype.dll + ${prefix_result}/../bin/hunspell-1.7-0.dll + ${prefix_result}/../bin/iconv-2.dll + ${prefix_result}/../bin/jpeg62.dll + ${prefix_result}/../bin/libapr-1.dll + ${prefix_result}/../bin/libaprutil-1.dll + ${prefix_result}/../bin/libexpat.dll + ${prefix_result}/../bin/libpng16.dll + ${prefix_result}/../bin/libxml2.dll + ${prefix_result}/../bin/meshoptimizer.dll + ${prefix_result}/../bin/minizip.dll + ${prefix_result}/../bin/nghttp2.dll + ${prefix_result}/../bin/ogg.dll + ${prefix_result}/../bin/openjp2.dll + ${prefix_result}/../bin/vorbis.dll + ${prefix_result}/../bin/vorbisenc.dll + ${prefix_result}/../bin/vorbisfile.dll + ${prefix_result}/../bin/zlib1.dll + DESTINATION . + ) + else (DARWIN) install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME} -- cgit v1.3 From 8f44cd4d043bcaa400ce0cc47d3c03196bb8defe Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 6 Jun 2025 20:18:18 +0800 Subject: Revert "Exclude Windows from referring to LibVLC headers" This reverts commit f0de1898e0b6a3b9f1ee1bcc762ba334b78bbcc6. --- indra/newview/llappviewer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 3f716cc4ef..e1e26372df 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -131,12 +131,10 @@ #include "stringize.h" #include "llcoros.h" #include "llexception.h" -#if !LL_WINDOWS #if LL_DARWIN || LL_LINUX || __FreeBSD__ #include "cef/dullahan_version.h" -#endif // LL_DARWIN || LL_LINUX || __FreeBSD__ +#endif #include "vlc/libvlc_version.h" -#endif // !LL_WINDOWS #if LL_DARWIN #if LL_SDL @@ -3463,7 +3461,7 @@ LLSD LLAppViewer::getViewerInfo() const info["LIBCEF_VERSION"] = "Undefined"; #endif -#if !LL_WINDOWS +//#if !LL_LINUX std::ostringstream vlc_ver_codec; vlc_ver_codec << LIBVLC_VERSION_MAJOR; vlc_ver_codec << "."; @@ -3471,9 +3469,11 @@ LLSD LLAppViewer::getViewerInfo() const vlc_ver_codec << "."; vlc_ver_codec << LIBVLC_VERSION_REVISION; info["LIBVLC_VERSION"] = vlc_ver_codec.str(); +/* #else info["LIBVLC_VERSION"] = "Undefined"; #endif +*/ S32 packets_in = (S32)LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_IN); if (packets_in > 0) -- cgit v1.3 From b6c930833bce5d501f4c4496935b7fbf13ed34aa Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 6 Jun 2025 21:44:26 +0800 Subject: Enable media plugins on Windows Put the necessary files into place. But, none of them is working just yet. --- README.md | 2 +- indra/cmake/LibVLCPlugin.cmake | 7 +++++- indra/media_plugins/cef/CMakeLists.txt | 39 +++++++++++++++++++++++++++---- indra/media_plugins/libvlc/CMakeLists.txt | 14 +++++++---- 4 files changed, 52 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 21099e881a..2de2b4a00f 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ $ export LL_BUILD="/MD /O2 /Ob2 /std:c++20 /Zc:wchar_t- /Zi /GR /DLL_RELEASE=1 / $ export PATH="/c/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:/c/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin:$VCPKG_ROOT/downloads/tools/msys2/21caed2f81ec917b/mingw64/bin:$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/tools/libxml2:$PATH" $ export PKG_CONFIG_LIBDIR="$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/lib/pkgconfig" $ export PYTHON="$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/tools/python3/python.exe" -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=OFF -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=Megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DVS_DISABLE_FATAL_WARNINGS:BOOL=ON ../indra +$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=Megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DVS_DISABLE_FATAL_WARNINGS:BOOL=ON ../indra $ MSBuild.exe Megapahit.sln -p:Configuration=Release $ cpack -G NSIS $ start Megapahit-`cat newview/viewer_version.txt`-win64.exe diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake index 5ed77af0c2..45ef25a63c 100644 --- a/indra/cmake/LibVLCPlugin.cmake +++ b/indra/cmake/LibVLCPlugin.cmake @@ -27,6 +27,12 @@ if (DARWIN) target_include_directories( ll::libvlc SYSTEM INTERFACE /Volumes/VLC\ media\ player/VLC.app/Contents/MacOS/include) target_link_directories( ll::libvlc INTERFACE /Volumes/VLC\ media\ player/VLC.app/Contents/MacOS/lib) target_link_libraries( ll::libvlc INTERFACE vlc vlccore ) +elseif (WINDOWS) +use_prebuilt_binary(vlc-bin) + target_link_libraries( ll::libvlc INTERFACE + libvlc.lib + libvlccore.lib + ) else () include(FindPkgConfig) pkg_check_modules(Libvlc REQUIRED libvlc vlc-plugin) @@ -35,7 +41,6 @@ else () target_link_libraries( ll::libvlc INTERFACE ${Libvlc_LIBRARIES} ) endif () -#use_prebuilt_binary(vlc-bin) set(LIBVLCPLUGIN ON CACHE BOOL "LIBVLCPLUGIN support for the llplugin/llmedia test apps.") diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index 9142a4516a..97b82ba050 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -193,8 +193,39 @@ if (INSTALL) DIRECTORY ${AUTOBUILD_INSTALL_DIR}/resources/locales DESTINATION ${_LIB} ) - else (DARWIN) + elseif (WINDOWS) + set(_LIB llplugin) + install( + PROGRAMS + ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${PROJECT_NAME}.dll + ${AUTOBUILD_INSTALL_DIR}/bin/release/chrome_elf.dll + ${AUTOBUILD_INSTALL_DIR}/bin/release/d3dcompiler_47.dll + ${AUTOBUILD_INSTALL_DIR}/bin/release/dullahan_host.exe + ${AUTOBUILD_INSTALL_DIR}/bin/release/libEGL.dll + ${AUTOBUILD_INSTALL_DIR}/bin/release/libGLESv2.dll + ${AUTOBUILD_INSTALL_DIR}/bin/release/libcef.dll + ${AUTOBUILD_INSTALL_DIR}/bin/release/libvlc.dll + ${AUTOBUILD_INSTALL_DIR}/bin/release/libvlccore.dll + DESTINATION llplugin + ) + install( + FILES + ${AUTOBUILD_INSTALL_DIR}/resources/chrome_100_percent.pak + ${AUTOBUILD_INSTALL_DIR}/resources/chrome_200_percent.pak + ${AUTOBUILD_INSTALL_DIR}/resources/icudtl.dat + ${AUTOBUILD_INSTALL_DIR}/resources/resources.pak + ${AUTOBUILD_INSTALL_DIR}/bin/release/snapshot_blob.bin + ${AUTOBUILD_INSTALL_DIR}/bin/release/v8_context_snapshot.bin + DESTINATION llplugin + ) + install( + DIRECTORY ${AUTOBUILD_INSTALL_DIR}/resources/locales + DESTINATION llplugin + ) + else () set(_LIB lib) - endif (DARWIN) - install(TARGETS ${PROJECT_NAME} DESTINATION ${_LIB}) -endif (INSTALL) + endif () + if (NOT WINDOWS) + install(TARGETS ${PROJECT_NAME} DESTINATION ${_LIB}) + endif () +endif () diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt index e99f25a1df..c7b12b17dc 100644 --- a/indra/media_plugins/libvlc/CMakeLists.txt +++ b/indra/media_plugins/libvlc/CMakeLists.txt @@ -95,8 +95,14 @@ if (INSTALL) set(_LIB lib/${ARCH}-linux-gnu) elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR (${LINUX_DISTRO} MATCHES gentoo)) set(_LIB lib${ADDRESS_SIZE}) - else (DARWIN) + elseif (WINDOWS) + set(_LIB llplugin) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${PROJECT_NAME}.dll DESTINATION llplugin) + install(DIRECTORY ${AUTOBUILD_INSTALL_DIR}/bin/release/plugins DESTINATION llplugin) + else () set(_LIB lib) - endif (DARWIN) - install(TARGETS ${PROJECT_NAME} DESTINATION ${_LIB}) -endif (INSTALL) + endif () + if (NOT WINDOWS) + install(TARGETS ${PROJECT_NAME} DESTINATION ${_LIB}) + endif () +endif () -- cgit v1.3 From a366a49daff63af865aa5e3bda9186d8b0db4814 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Fri, 6 Jun 2025 17:21:19 -0700 Subject: tweak the size of the AWP floater to take account of new image sizes. Do not center floater anymore because it obscures the avatar. --- indra/newview/llfloateravatarwelcomepack.cpp | 1 - indra/newview/llstartup.cpp | 6 +++++- .../skins/default/xui/en/floater_avatar_welcome_pack.xml | 12 ++++++------ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/indra/newview/llfloateravatarwelcomepack.cpp b/indra/newview/llfloateravatarwelcomepack.cpp index 06b6de0cbf..82e44d1398 100644 --- a/indra/newview/llfloateravatarwelcomepack.cpp +++ b/indra/newview/llfloateravatarwelcomepack.cpp @@ -48,7 +48,6 @@ LLFloaterAvatarWelcomePack::~LLFloaterAvatarWelcomePack() bool LLFloaterAvatarWelcomePack::postBuild() { - center(); mAvatarPicker = findChild("avatar_picker_contents"); if (mAvatarPicker) { diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index f065d286c8..6bf0a50d1c 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2455,7 +2455,11 @@ bool idle_startup() LLFloater* avatar_welcome_pack_floater = LLFloaterReg::findInstance("avatar_welcome_pack"); if (avatar_welcome_pack_floater != nullptr) { - avatar_welcome_pack_floater->center(); + // There is a (very - 1 in ~50 times) hard to repro bug where the login + // page is not hidden when the AWP floater is presented. This (agressive) + // approach to always close it seems like the best fix for now. + LLPanelLogin::closePanel(); + avatar_welcome_pack_floater->setVisible(true); } } diff --git a/indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml b/indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml index 1b0f91c7ea..795d642755 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml @@ -5,20 +5,20 @@ can_minimize="true" can_close="true" can_resize="false" - min_height="420" - min_width="500" - height="420" + min_height="438" + min_width="530" + height="438" layout="topleft" name="Avatar Welcome Pack" single_instance="true" save_rect="true" save_visibility="true" title="AVATAR WELCOME PACK" - width="500"> + width="530"> -- cgit v1.3 From 9bd50d8dcfd00aaf08eb80e290cb0481ee79e5d8 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 7 Jun 2025 15:30:14 +0800 Subject: Install DLLs needed by media plugins to llplugin --- indra/newview/ViewerInstall.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake index 084f103822..e2fe13c9ab 100644 --- a/indra/newview/ViewerInstall.cmake +++ b/indra/newview/ViewerInstall.cmake @@ -156,6 +156,16 @@ elseif (WINDOWS) DESTINATION . ) + install( + PROGRAMS + ${prefix_result}/../bin/boost_context-vc143-mt-x${ADDRESS_SIZE}-1_88.dll + ${prefix_result}/../bin/boost_fiber-vc143-mt-x${ADDRESS_SIZE}-1_88.dll + ${prefix_result}/../bin/libapr-1.dll + ${prefix_result}/../bin/libaprutil-1.dll + ${prefix_result}/../bin/libexpat.dll + DESTINATION llplugin + ) + else (DARWIN) install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME} -- cgit v1.3 From d1251b24f42ab5116336060abb698474a3fbc740 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 7 Jun 2025 17:35:53 +0800 Subject: Overwrite SL test icons with MP's with same names Less diffs. And only a couple. --- indra/newview/icons/test/secondlife.ico | Bin 76861 -> 9662 bytes indra/newview/icons/test/secondlife_256.BMP | Bin 196662 -> 262954 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/indra/newview/icons/test/secondlife.ico b/indra/newview/icons/test/secondlife.ico index ceb8e8e6eb..c8430a6bd3 100644 Binary files a/indra/newview/icons/test/secondlife.ico and b/indra/newview/icons/test/secondlife.ico differ diff --git a/indra/newview/icons/test/secondlife_256.BMP b/indra/newview/icons/test/secondlife_256.BMP index e23fcfdbe9..829db82c52 100644 Binary files a/indra/newview/icons/test/secondlife_256.BMP and b/indra/newview/icons/test/secondlife_256.BMP differ -- cgit v1.3 From 62e707f043028401e2e433578f7078d02539ef3e Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 7 Jun 2025 17:37:44 +0800 Subject: Adjust info for Windows viewer app properties --- indra/newview/res/viewerRes.rc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc index 4ee26a312a..b01f5e700d 100755 --- a/indra/newview/res/viewerRes.rc +++ b/indra/newview/res/viewerRes.rc @@ -152,13 +152,13 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "CompanyName", "Linden Lab" - VALUE "FileDescription", "Second Life" + VALUE "CompanyName", "Megapahit" + VALUE "FileDescription", "Megapahit viewer" VALUE "FileVersion", "${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION}" - VALUE "InternalName", "Second Life" - VALUE "LegalCopyright", "Copyright (c) 2020, Linden Research, Inc." - VALUE "OriginalFilename", "SecondLife.exe" - VALUE "ProductName", "Second Life" + VALUE "InternalName", "Megapahit" + VALUE "LegalCopyright", "Copyright (c) 2025, Megapahit." + VALUE "OriginalFilename", "Megapahit.exe" + VALUE "ProductName", "Megapahit viewer" VALUE "ProductVersion", "${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION}" END END -- cgit v1.3 From 74cd194dc61373cb49279f87e802516963f3d172 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 7 Jun 2025 18:10:01 +0800 Subject: Fix ColladaDOM link error to Boost throw_exception in viewer linking stage on Windows. throw_exception is user defined (it's not picking up its definition from anywhere on Windows, at least when using vcpkg's Boost). (Link target) -> libcollada14dom23-s.lib(daeURI.obj) : error LNK2019: unresolved external symbol void __cdecl boost::throw_exception(class std::exception const &) (?throw_exception@boost@@YAXAEBVexception@std@@@Z) referenced in function void __cdecl boost::re_detail_500::raise_runtime_error(class boost::regex_error const &) (??$raise_runtime_error@Vregex_error@boost@@@re_detail_500@boost@@YAXAEBVregex_error@1@@Z) [C:\Users\erik\Documents\Megapahit\viewer\build-mingw64_nt-10.0-19045-x86_64\newview\megapahit.vcxproj] --- indra/cmake/LLPrimitive.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index 6dc0659bd8..7aa266d2db 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -43,6 +43,7 @@ else () execute_process( COMMAND sed -i "s/SHARED/STATIC/" 1.4/CMakeLists.txt COMMAND sed -i "/#include /a #define WIN32" dae/daeUtils.cpp + COMMAND sed -i "/using namespace cdom;/a namespace boost{void boost::throw_exception(class std::exception const &){}}" dae/daeURI.cpp WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/src ) else () -- cgit v1.3 From c9fdaad8df2741b3a94151b66c574a63a0845529 Mon Sep 17 00:00:00 2001 From: secretfoxtail Date: Sat, 7 Jun 2025 09:22:02 -0600 Subject: FS search cleanup -> Categories dropdown button Move categories dropdown button so that it is not cut off by the edge of the floater, also fix "Arts and Culture" & "Parks and Nature" places categories displaying "MissingString" --- .../skins/default/xui/en/panel_fs_search_legacy_classifieds.xml | 6 +++--- .../newview/skins/default/xui/en/panel_fs_search_legacy_events.xml | 6 +++--- .../newview/skins/default/xui/en/panel_fs_search_legacy_places.xml | 6 +++--- indra/newview/skins/default/xui/en/strings.xml | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_classifieds.xml b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_classifieds.xml index 66c35558b1..cdbfd4ac56 100644 --- a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_classifieds.xml +++ b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_classifieds.xml @@ -36,16 +36,16 @@ left_delta="0" name="classifieds_edit" top="29" - width="651" /> + width="650" /> + width="120"> diff --git a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_events.xml b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_events.xml index 57cb4990e4..00f5de5ed4 100644 --- a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_events.xml +++ b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_events.xml @@ -74,15 +74,15 @@ left="6" name="events_edit" top="29" - width="651" /> + width="650" /> + width="120"> diff --git a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_places.xml b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_places.xml index 09c142b8fc..c63818f8e3 100644 --- a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_places.xml +++ b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_places.xml @@ -36,16 +36,16 @@ left_delta="0" name="places_edit" top="29" - width="651" /> + width="650" /> + width="120"> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index c5a59fac2a..c3cbfed9fb 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2942,13 +2942,13 @@ Expected .wav, .tga, .bmp, .jpg, .jpeg, or .anim None Linden Location Adult - Arts & Culture + Arts and Culture Business Educational Gaming Hangout Newcomer Friendly - Parks & Nature + Parks and Nature Residential Stage -- cgit v1.3 From d4f3a8c3d6c24b97f9be2445659b3a67baf3a414 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 8 Jun 2025 18:49:27 +0800 Subject: Make sure Windows include CEF & Dullahan headers and minimise diff related to LibVLC headers. --- indra/newview/llappviewer.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e1e26372df..cee39fc651 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -131,10 +131,10 @@ #include "stringize.h" #include "llcoros.h" #include "llexception.h" -#if LL_DARWIN || LL_LINUX || __FreeBSD__ +#if 1 // !LL_LINUX #include "cef/dullahan_version.h" -#endif #include "vlc/libvlc_version.h" +#endif // LL_LINUX #if LL_DARWIN #if LL_SDL @@ -3431,7 +3431,7 @@ LLSD LLAppViewer::getViewerInfo() const info["VOICE_VERSION"] = LLTrans::getString("NotConnected"); } -#if LL_DARWIN || LL_LINUX || __FreeBSD__ +#if 1 // !LL_LINUX std::ostringstream cef_ver_codec; cef_ver_codec << "Dullahan: "; cef_ver_codec << DULLAHAN_VERSION_MAJOR; @@ -3461,7 +3461,7 @@ LLSD LLAppViewer::getViewerInfo() const info["LIBCEF_VERSION"] = "Undefined"; #endif -//#if !LL_LINUX +#if 1 // !LL_LINUX std::ostringstream vlc_ver_codec; vlc_ver_codec << LIBVLC_VERSION_MAJOR; vlc_ver_codec << "."; @@ -3469,11 +3469,9 @@ LLSD LLAppViewer::getViewerInfo() const vlc_ver_codec << "."; vlc_ver_codec << LIBVLC_VERSION_REVISION; info["LIBVLC_VERSION"] = vlc_ver_codec.str(); -/* #else info["LIBVLC_VERSION"] = "Undefined"; #endif -*/ S32 packets_in = (S32)LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_IN); if (packets_in > 0) -- cgit v1.3 From b3ab1336dcf2ecd51ce4792c8977771d73790a4b Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 8 Jun 2025 18:51:04 +0800 Subject: Windows x86-64 without SSE2 will be crashed too --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index cee39fc651..d91d2d3f4c 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -987,7 +987,7 @@ bool LLAppViewer::init() return false; } -#if defined(__i386__) || defined(__x86_64__) || defined(__amd64__) +#if defined(__i386__) || defined(__x86_64__) || defined(__amd64__) || _M_X64 // Without SSE2 support we will crash almost immediately, warn here. if (!gSysCPU.hasSSE2()) { -- cgit v1.3 From e593649e42e70a45db16aaecce2a38c2f34dda69 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 8 Jun 2025 18:52:14 +0800 Subject: Fix tab to space and simplify logics --- indra/media_plugins/libvlc/CMakeLists.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt index c7b12b17dc..1919f54a82 100644 --- a/indra/media_plugins/libvlc/CMakeLists.txt +++ b/indra/media_plugins/libvlc/CMakeLists.txt @@ -95,14 +95,13 @@ if (INSTALL) set(_LIB lib/${ARCH}-linux-gnu) elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR (${LINUX_DISTRO} MATCHES gentoo)) set(_LIB lib${ADDRESS_SIZE}) - elseif (WINDOWS) - set(_LIB llplugin) - install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${PROJECT_NAME}.dll DESTINATION llplugin) - install(DIRECTORY ${AUTOBUILD_INSTALL_DIR}/bin/release/plugins DESTINATION llplugin) else () set(_LIB lib) endif () - if (NOT WINDOWS) + if (WINDOWS) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${PROJECT_NAME}.dll DESTINATION llplugin) + install(DIRECTORY ${AUTOBUILD_INSTALL_DIR}/bin/release/plugins DESTINATION llplugin) + else () install(TARGETS ${PROJECT_NAME} DESTINATION ${_LIB}) endif () endif () -- 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(-) 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(+) 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 dd05837c7aa5314a553235f46d13c88df8e448a9 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 9 Jun 2025 22:37:39 +0800 Subject: Fix usleep implementation for Windows https://stackoverflow.com/questions/5801813/c-usleep-is-obsolete-workarounds-for-windows-mingw --- indra/newview/llappviewer.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d91d2d3f4c..94e8fabcb2 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1545,11 +1545,7 @@ bool LLAppViewer::doFrame() if(fpsLimitSleepFor) { #if LL_WINDOWS - U64 time1 = 0, time2 = 0; - QueryPerformanceCounter((LARGE_INTEGER *)&time1); - do { - QueryPerformanceCounter((LARGE_INTEGER *)&time2); - } while ((time2-time1) < fpsLimitSleepFor); + std::this_thread::sleep_for(std::chrono::microseconds(fpsLimitSleepFor)); #else usleep(fpsLimitSleepFor); #endif -- cgit v1.3 From 78f85aa6efdeb8ada9afb5083dc75e645aa34e8c Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 10 Jun 2025 12:21:41 +0800 Subject: Windows menu shortcut & InstallDir without version Referring to cpack-generators(7) manual, I don't know what to replace the in CPACK_NSIS__INSTALL_DIRECTORY with, but in CPACK_NSIS_INSTALL_ROOT explanation, it mentions the full directory presented to the end user, and from that we can conclude the variable we need to set for customisation is just CPACK_PACKAGE_INSTALL_DIRECTORY. --- indra/newview/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 4e6531e22b..d7d2860fd9 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1970,6 +1970,8 @@ if (WINDOWS) set(CPACK_NSIS_URL_INFO_ABOUT https://${VIEWER_PACKAGE_DOMAIN_NAME}) set(CPACK_NSIS_CONTACT $ENV{USER}@${VIEWER_PACKAGE_DOMAIN_NAME}) set(CPACK_NSIS_WELCOME_TITLE "Welcome to ${VIEWER_BINARY_NAME}!") + set(CPACK_NSIS_MENU_LINKS Megapahit.exe "Megapahit Viewer") + set(CPACK_PACKAGE_INSTALL_DIRECTORY ${VIEWER_BINARY_NAME}) if (FALSE) add_custom_command( -- cgit v1.3 From f1fa6c55b57b188d3c84711f51a2499a98b9b9e8 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 11 Jun 2025 23:56:20 +0800 Subject: Update Windows build instructions There's a different section for Windows arm64, cause there are different patterns in the commands that are too difficult to generalise. BuildTools is used instead of the full Visual Studio IDE, and BuildTools is installed in Program Files (x86) on both Windows x64 and arm64. The CMake used is the one automatically installed by vcpkg, and it can find the compilers when the toolchain file setting is set to the file provided by vcpkg. This way we don't have to install VS CMake component that depends on x64/x86 build tools, which we don't need for Windows arm64. The pkg-config used is the other one downloaded, as the path to it is common on both Windows arm64 and x64. cURL is installed on arm64 cause there doesn't seem to be any easy way to build OpenSSL 1.1 for Windows arm64 (which LL's cURL fork depends on). --- README.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2de2b4a00f..555ffc9626 100644 --- a/README.md +++ b/README.md @@ -119,14 +119,28 @@ $ sudo apt install ./megapahit-`cat newview/viewer_version.txt`-Linux.deb $ megapahit ``` -### Windows +### Windows arm64 +``` +$ vcpkg install pkgconf python3 freealut apr-util boost curl freetype glm hunspell libjpeg-turbo meshoptimizer minizip nghttp2 openjpeg libvorbis libxml2[tools] xxhash +$ vcpkg install --allow-unsupported boost-fiber +$ export LL_BUILD="/MD /O2 /Ob2 /std:c++20 /Zc:wchar_t- /Zi /GR /DLL_RELEASE=1 /DLL_RELEASE_FOR_DOWNLOAD=1 /DNDEBUG /D_SECURE_STL=0 /D_HAS_ITERATOR_DEBUGGING=0 /DWIN32 /D_WINDOWS /DLL_WINDOWS=1 /DUNICODE /D_UNICODE /DWINVER=0x0602 /D_WIN32_WINNT=0x0602 /Zc:preprocessor" +$ export PATH="$VCPKG_ROOT/downloads/tools/cmake-3.30.1-windows/cmake-3.30.1-windows-arm64/bin:$VCPKG_ROOT/downloads/tools/msys2/2db36fb050d01f45/usr/bin:$VCPKG_ROOT/installed/arm64-windows/tools/libxml2:/c/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin:$PATH" +$ export PKG_CONFIG_LIBDIR="$VCPKG_ROOT/installed/arm64-windows/lib/pkgconfig" +$ export PYTHON="$VCPKG_ROOT/installed/arm64-windows/tools/python3/python.exe" +$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=OFF -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=Megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DCMAKE_TOOLCHAIN_FILE:FILEPATH=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVS_DISABLE_FATAL_WARNINGS:BOOL=ON ../indra +$ MSBuild.exe Megapahit.sln -p:Configuration=Release +$ cpack -G NSIS +$ start Megapahit-`cat newview/viewer_version.txt`-win64.exe +``` + +### Windows x64 ``` $ vcpkg install pkgconf python3 freealut apr-util boost freetype glm hunspell libjpeg-turbo meshoptimizer minizip nghttp2 openjpeg libvorbis libxml2[tools] xxhash $ export LL_BUILD="/MD /O2 /Ob2 /std:c++20 /Zc:wchar_t- /Zi /GR /DLL_RELEASE=1 /DLL_RELEASE_FOR_DOWNLOAD=1 /DNDEBUG /D_SECURE_STL=0 /D_HAS_ITERATOR_DEBUGGING=0 /DWIN32 /D_WINDOWS /DLL_WINDOWS=1 /DUNICODE /D_UNICODE /DWINVER=0x0602 /D_WIN32_WINNT=0x0602" -$ export PATH="/c/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:/c/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin:$VCPKG_ROOT/downloads/tools/msys2/21caed2f81ec917b/mingw64/bin:$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/tools/libxml2:$PATH" -$ export PKG_CONFIG_LIBDIR="$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/lib/pkgconfig" -$ export PYTHON="$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/tools/python3/python.exe" -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=Megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DVS_DISABLE_FATAL_WARNINGS:BOOL=ON ../indra +$ export PATH="$VCPKG_ROOT/downloads/tools/cmake-3.30.1-windows/cmake-3.30.1-windows-i386/bin:$VCPKG_ROOT/downloads/tools/msys2/2db36fb050d01f45/usr/bin:$VCPKG_ROOT/installed/x64-windows/tools/libxml2:/c/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin:$PATH" +$ export PKG_CONFIG_LIBDIR="$VCPKG_ROOT/installed/x64-windows/lib/pkgconfig" +$ export PYTHON="$VCPKG_ROOT/installed/x64-windows/tools/python3/python.exe" +$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=Megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DCMAKE_TOOLCHAIN_FILE:FILEPATH=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVS_DISABLE_FATAL_WARNINGS:BOOL=ON ../indra $ MSBuild.exe Megapahit.sln -p:Configuration=Release $ cpack -G NSIS $ start Megapahit-`cat newview/viewer_version.txt`-win64.exe -- cgit v1.3 From 63ef595c301dfb32122f15cac1b1e3b9f110a9bb Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Wed, 11 Jun 2025 09:05:29 -0700 Subject: Point the URL for the Avatar Welconme Pack at the production location (Eventually - marshalled by [GIRD LOWER]) --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 0f0593c625..ac121999a3 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -630,7 +630,7 @@ Type String Value - https://sl-viewer-media-system.s3.amazonaws.com/vawp/index.html + http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/vawp/index.html AvatarBakedTextureUploadTimeout -- cgit v1.3 From 0c6dad371514dd004d936ad0f73f7c2a38f10fb5 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 12 Jun 2025 00:29:47 +0800 Subject: Exclude Windows arm64 from WebRTC Crow Misia's libwebrtc-bin, the one we've been relying on for WebRTC binaries, doesn't seem to be providing Windows arm64 binaries yet. --- indra/CMakeLists.txt | 2 +- indra/cmake/WebRTC.cmake | 2 +- indra/newview/CMakeLists.txt | 4 +- indra/newview/llvoiceclient.cpp | 82 ++++++++++++++++++++--------------------- 4 files changed, 45 insertions(+), 45 deletions(-) diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index b1970fba35..85591782f2 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -59,7 +59,7 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llmessage) add_subdirectory(${LIBS_OPEN_PREFIX}llprimitive) add_subdirectory(${LIBS_OPEN_PREFIX}llrender) add_subdirectory(${LIBS_OPEN_PREFIX}llfilesystem) -if (NOT CMAKE_SYSTEM_NAME MATCHES FreeBSD) +if (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR $ENV{MSYSTEM_CARCH} MATCHES aarch64)) add_subdirectory(${LIBS_OPEN_PREFIX}llwebrtc) endif () add_subdirectory(${LIBS_OPEN_PREFIX}llwindow) diff --git a/indra/cmake/WebRTC.cmake b/indra/cmake/WebRTC.cmake index 454ed8c0a1..ce012d31be 100644 --- a/indra/cmake/WebRTC.cmake +++ b/indra/cmake/WebRTC.cmake @@ -8,7 +8,7 @@ add_library( ll::webrtc INTERFACE IMPORTED ) target_include_directories( ll::webrtc SYSTEM INTERFACE "${LIBS_PREBUILT_DIR}/include/webrtc" "${LIBS_PREBUILT_DIR}/include/webrtc/third_party/abseil-cpp") if (${LINUX_DISTRO} MATCHES debian OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64 OR WINDOWS) use_prebuilt_binary(webrtc) -elseif (NOT CMAKE_SYSTEM_NAME MATCHES FreeBSD) +elseif (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR $ENV{MSYSTEM_CARCH} MATCHES aarch64)) target_compile_definitions(ll::webrtc INTERFACE CM_WEBRTC=1) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/webrtc_installed OR NOT ${webrtc_installed} EQUAL 0) if (DARWIN) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index d7d2860fd9..e171a513f9 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -745,7 +745,7 @@ set(viewer_SOURCE_FILES rlvhandler.cpp ) -if (CMAKE_SYSTEM_NAME MATCHES FreeBSD) +if (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR $ENV{MSYSTEM_CARCH} MATCHES aarch64) list(REMOVE_ITEM viewer_SOURCE_FILES llvoicewebrtc.cpp) endif () @@ -2091,7 +2091,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ll::openxr ) -if (NOT CMAKE_SYSTEM_NAME MATCHES FreeBSD) +if (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR $ENV{MSYSTEM_CARCH} MATCHES aarch64)) target_link_libraries(${VIEWER_BINARY_NAME} llwebrtc ) endif () diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index e5eb2f8008..9b1f54437e 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -26,7 +26,7 @@ #include "llvoiceclient.h" #include "llvoicevivox.h" -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 #include "llvoicewebrtc.h" #endif #include "llviewernetwork.h" @@ -122,7 +122,7 @@ LLVoiceModuleInterface *getVoiceModule(const std::string &voice_server_type) { return (LLVoiceModuleInterface *) LLVivoxVoiceClient::getInstance(); } -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 else if (voice_server_type == WEBRTC_VOICE_SERVER_TYPE) { return (LLVoiceModuleInterface *) LLWebRTCVoiceClient::getInstance(); @@ -169,7 +169,7 @@ void LLVoiceClient::init(LLPumpIO *pump) { // Initialize all of the voice modules m_servicePump = pump; -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 LLWebRTCVoiceClient::getInstance()->init(pump); #endif LLVivoxVoiceClient::getInstance()->init(pump); @@ -182,7 +182,7 @@ void LLVoiceClient::userAuthorized(const std::string& user_id, const LLUUID &age mRegionChangedCallbackSlot.disconnect(); } mRegionChangedCallbackSlot = gAgent.addRegionChangedCallback(boost::bind(&LLVoiceClient::onRegionChanged, this)); -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 LLWebRTCVoiceClient::getInstance()->userAuthorized(user_id, agentID); #endif LLVivoxVoiceClient::getInstance()->userAuthorized(user_id, agentID); @@ -294,7 +294,7 @@ void LLVoiceClient::setNonSpatialVoiceModule(const std::string &voice_server_typ void LLVoiceClient::setHidden(bool hidden) { LL_INFOS("Voice") << "( " << (hidden ? "true" : "false") << " )" << LL_ENDL; -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 LLWebRTCVoiceClient::getInstance()->setHidden(hidden); #endif LLVivoxVoiceClient::getInstance()->setHidden(hidden); @@ -337,7 +337,7 @@ void LLVoiceClient::updateSettings() updateMicMuteLogic(); -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 LLWebRTCVoiceClient::getInstance()->updateSettings(); #endif LLVivoxVoiceClient::getInstance()->updateSettings(); @@ -348,7 +348,7 @@ void LLVoiceClient::updateSettings() void LLVoiceClient::tuningStart() { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 LLWebRTCVoiceClient::getInstance()->tuningStart(); #endif LLVivoxVoiceClient::getInstance()->tuningStart(); @@ -356,7 +356,7 @@ void LLVoiceClient::tuningStart() void LLVoiceClient::tuningStop() { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 LLWebRTCVoiceClient::getInstance()->tuningStop(); #endif LLVivoxVoiceClient::getInstance()->tuningStop(); @@ -364,7 +364,7 @@ void LLVoiceClient::tuningStop() bool LLVoiceClient::inTuningMode() { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 return LLWebRTCVoiceClient::getInstance()->inTuningMode(); #else return LLVivoxVoiceClient::getInstance()->inTuningMode(); @@ -373,7 +373,7 @@ bool LLVoiceClient::inTuningMode() void LLVoiceClient::tuningSetMicVolume(float volume) { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 LLWebRTCVoiceClient::getInstance()->tuningSetMicVolume(volume); #else LLVivoxVoiceClient::getInstance()->tuningSetMicVolume(volume); @@ -382,7 +382,7 @@ void LLVoiceClient::tuningSetMicVolume(float volume) void LLVoiceClient::tuningSetSpeakerVolume(float volume) { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 LLWebRTCVoiceClient::getInstance()->tuningSetSpeakerVolume(volume); #else LLVivoxVoiceClient::getInstance()->tuningSetSpeakerVolume(volume); @@ -391,7 +391,7 @@ void LLVoiceClient::tuningSetSpeakerVolume(float volume) float LLVoiceClient::tuningGetEnergy(void) { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 return LLWebRTCVoiceClient::getInstance()->tuningGetEnergy(); #else return LLVivoxVoiceClient::getInstance()->tuningGetEnergy(); @@ -403,7 +403,7 @@ float LLVoiceClient::tuningGetEnergy(void) bool LLVoiceClient::deviceSettingsAvailable() { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 return LLWebRTCVoiceClient::getInstance()->deviceSettingsAvailable(); #else return LLVivoxVoiceClient::getInstance()->deviceSettingsAvailable(); @@ -412,7 +412,7 @@ bool LLVoiceClient::deviceSettingsAvailable() bool LLVoiceClient::deviceSettingsUpdated() { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 return LLWebRTCVoiceClient::getInstance()->deviceSettingsUpdated(); #else return LLVivoxVoiceClient::getInstance()->deviceSettingsUpdated(); @@ -421,7 +421,7 @@ bool LLVoiceClient::deviceSettingsUpdated() void LLVoiceClient::refreshDeviceLists(bool clearCurrentList) { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 LLWebRTCVoiceClient::getInstance()->refreshDeviceLists(clearCurrentList); #else LLVivoxVoiceClient::getInstance()->refreshDeviceLists(clearCurrentList); @@ -431,7 +431,7 @@ void LLVoiceClient::refreshDeviceLists(bool clearCurrentList) void LLVoiceClient::setCaptureDevice(const std::string& name) { LLVivoxVoiceClient::getInstance()->setCaptureDevice(name); -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 LLWebRTCVoiceClient::getInstance()->setCaptureDevice(name); #endif } @@ -439,14 +439,14 @@ void LLVoiceClient::setCaptureDevice(const std::string& name) void LLVoiceClient::setRenderDevice(const std::string& name) { LLVivoxVoiceClient::getInstance()->setRenderDevice(name); -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 LLWebRTCVoiceClient::getInstance()->setRenderDevice(name); #endif } const LLVoiceDeviceList& LLVoiceClient::getCaptureDevices() { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 return LLWebRTCVoiceClient::getInstance()->getCaptureDevices(); #else return LLVivoxVoiceClient::getInstance()->getCaptureDevices(); @@ -456,7 +456,7 @@ const LLVoiceDeviceList& LLVoiceClient::getCaptureDevices() const LLVoiceDeviceList& LLVoiceClient::getRenderDevices() { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 return LLWebRTCVoiceClient::getInstance()->getRenderDevices(); #else return LLVivoxVoiceClient::getInstance()->getRenderDevices(); @@ -469,7 +469,7 @@ const LLVoiceDeviceList& LLVoiceClient::getRenderDevices() void LLVoiceClient::getParticipantList(std::set &participants) const { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 LLWebRTCVoiceClient::getInstance()->getParticipantList(participants); #endif LLVivoxVoiceClient::getInstance()->getParticipantList(participants); @@ -477,7 +477,7 @@ void LLVoiceClient::getParticipantList(std::set &participants) const bool LLVoiceClient::isParticipant(const LLUUID &speaker_id) const { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 return LLWebRTCVoiceClient::getInstance()->isParticipant(speaker_id) || #else return @@ -574,7 +574,7 @@ void LLVoiceClient::activateSpatialChannel(bool activate) bool LLVoiceClient::isCurrentChannel(const LLSD& channelInfo) { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 return LLWebRTCVoiceClient::getInstance()->isCurrentChannel(channelInfo) || #else return @@ -584,7 +584,7 @@ bool LLVoiceClient::isCurrentChannel(const LLSD& channelInfo) bool LLVoiceClient::compareChannels(const LLSD &channelInfo1, const LLSD &channelInfo2) { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 return LLWebRTCVoiceClient::getInstance()->compareChannels(channelInfo1, channelInfo2) || #else return @@ -630,7 +630,7 @@ LLVoiceP2POutgoingCallInterface *LLVoiceClient::getOutgoingCallInterface(const L void LLVoiceClient::setVoiceVolume(F32 volume) { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 LLWebRTCVoiceClient::getInstance()->setVoiceVolume(volume); #endif LLVivoxVoiceClient::getInstance()->setVoiceVolume(volume); @@ -638,7 +638,7 @@ void LLVoiceClient::setVoiceVolume(F32 volume) void LLVoiceClient::setMicGain(F32 gain) { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 LLWebRTCVoiceClient::getInstance()->setMicGain(gain); #endif LLVivoxVoiceClient::getInstance()->setMicGain(gain); @@ -687,7 +687,7 @@ bool LLVoiceClient::voiceEnabled() void LLVoiceClient::setVoiceEnabled(bool enabled) { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 if (LLWebRTCVoiceClient::instanceExists()) { LLWebRTCVoiceClient::getInstance()->setVoiceEnabled(enabled); @@ -715,7 +715,7 @@ void LLVoiceClient::updateMicMuteLogic() // Either of these always overrides any other PTT setting. new_mic_mute = true; } -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 LLWebRTCVoiceClient::getInstance()->setMuteMic(new_mic_mute); #endif LLVivoxVoiceClient::getInstance()->setMuteMic(new_mic_mute); @@ -812,7 +812,7 @@ bool LLVoiceClient::getVoiceEnabled(const LLUUID& id) const std::string LLVoiceClient::getDisplayName(const LLUUID& id) const { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 std::string result = LLWebRTCVoiceClient::getInstance()->getDisplayName(id); if (result.empty()) { @@ -826,7 +826,7 @@ std::string LLVoiceClient::getDisplayName(const LLUUID& id) const bool LLVoiceClient::isVoiceWorking() const { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 return LLVivoxVoiceClient::getInstance()->isVoiceWorking() || LLWebRTCVoiceClient::getInstance()->isVoiceWorking(); #else @@ -846,7 +846,7 @@ bool LLVoiceClient::isOnlineSIP(const LLUUID& id) bool LLVoiceClient::getIsSpeaking(const LLUUID& id) { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 return LLWebRTCVoiceClient::getInstance()->getIsSpeaking(id) || #else return @@ -858,7 +858,7 @@ bool LLVoiceClient::getIsModeratorMuted(const LLUUID& id) { // don't bother worrying about p2p calls, as // p2p calls don't have mute. -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 return LLWebRTCVoiceClient::getInstance()->getIsModeratorMuted(id) || #else return @@ -868,7 +868,7 @@ bool LLVoiceClient::getIsModeratorMuted(const LLUUID& id) F32 LLVoiceClient::getCurrentPower(const LLUUID& id) { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 return std::fmax(LLVivoxVoiceClient::getInstance()->getCurrentPower(id), LLWebRTCVoiceClient::getInstance()->getCurrentPower(id)); #else @@ -885,7 +885,7 @@ bool LLVoiceClient::getOnMuteList(const LLUUID& id) F32 LLVoiceClient::getUserVolume(const LLUUID& id) { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 return std::fmax(LLVivoxVoiceClient::getInstance()->getUserVolume(id), LLWebRTCVoiceClient::getInstance()->getUserVolume(id)); #else return LLVivoxVoiceClient::getInstance()->getUserVolume(id); @@ -894,7 +894,7 @@ F32 LLVoiceClient::getUserVolume(const LLUUID& id) void LLVoiceClient::setUserVolume(const LLUUID& id, F32 volume) { -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 LLWebRTCVoiceClient::getInstance()->setUserVolume(id, volume); #endif LLVivoxVoiceClient::getInstance()->setUserVolume(id, volume); @@ -906,7 +906,7 @@ void LLVoiceClient::setUserVolume(const LLUUID& id, F32 volume) void LLVoiceClient::addObserver(LLVoiceClientStatusObserver* observer) { LLVivoxVoiceClient::getInstance()->addObserver(observer); -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 LLWebRTCVoiceClient::getInstance()->addObserver(observer); #endif } @@ -917,7 +917,7 @@ void LLVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer) { LLVivoxVoiceClient::getInstance()->removeObserver(observer); } -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 if (LLWebRTCVoiceClient::instanceExists()) { LLWebRTCVoiceClient::getInstance()->removeObserver(observer); @@ -928,7 +928,7 @@ void LLVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer) void LLVoiceClient::addObserver(LLFriendObserver* observer) { LLVivoxVoiceClient::getInstance()->addObserver(observer); -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 LLWebRTCVoiceClient::getInstance()->addObserver(observer); #endif } @@ -939,7 +939,7 @@ void LLVoiceClient::removeObserver(LLFriendObserver* observer) { LLVivoxVoiceClient::getInstance()->removeObserver(observer); } -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 if (LLWebRTCVoiceClient::instanceExists()) { LLWebRTCVoiceClient::getInstance()->removeObserver(observer); @@ -950,7 +950,7 @@ void LLVoiceClient::removeObserver(LLFriendObserver* observer) void LLVoiceClient::addObserver(LLVoiceClientParticipantObserver* observer) { LLVivoxVoiceClient::getInstance()->addObserver(observer); -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 LLWebRTCVoiceClient::getInstance()->addObserver(observer); #endif } @@ -961,7 +961,7 @@ void LLVoiceClient::removeObserver(LLVoiceClientParticipantObserver* observer) { LLVivoxVoiceClient::getInstance()->removeObserver(observer); } -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 if (LLWebRTCVoiceClient::instanceExists()) { LLWebRTCVoiceClient::getInstance()->removeObserver(observer); @@ -1029,7 +1029,7 @@ class LLViewerRequiredVoiceVersion : public LLHTTPNode { voiceModule = (LLVoiceModuleInterface *) LLVivoxVoiceClient::getInstance(); } -#if !__FreeBSD__ +#if !__FreeBSD__ && !_M_ARM64 else if (voice_server_type == "webrtc") { voiceModule = (LLVoiceModuleInterface *) LLWebRTCVoiceClient::getInstance(); -- cgit v1.3 From 3908abc96cb742623b2945eb382ad72628b234a0 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 12 Jun 2025 00:32:22 +0800 Subject: Use system (vcpkg) OpenSSL & cURL on Windows arm64 cURL is installed on arm64 cause there doesn't seem to be any easy way to build OpenSSL 1.1 for Windows arm64 (which LL's cURL fork depends on). --- indra/cmake/CURL.cmake | 5 +++-- indra/cmake/OpenSSL.cmake | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index 06d5927174..211c3ae9a0 100644 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -5,8 +5,9 @@ include(Linking) include_guard() add_library( ll::libcurl INTERFACE IMPORTED ) -#use_system_binary(libcurl) -if (LINUX AND CMAKE_SYSTEM_PROCESSOR MATCHES x86_64 OR DARWIN OR WINDOWS) +if ($ENV{MSYSTEM_CARCH} MATCHES aarch64) +use_system_binary(libcurl) +elseif (LINUX AND CMAKE_SYSTEM_PROCESSOR MATCHES x86_64 OR DARWIN OR WINDOWS) use_prebuilt_binary(curl) if (DARWIN) execute_process( diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake index ef90068993..afa2ba377d 100644 --- a/indra/cmake/OpenSSL.cmake +++ b/indra/cmake/OpenSSL.cmake @@ -5,8 +5,9 @@ include(Linking) include_guard() add_library( ll::openssl INTERFACE IMPORTED ) -#use_system_binary(openssl) -if (LINUX AND CMAKE_SYSTEM_PROCESSOR MATCHES x86_64 OR DARWIN OR WINDOWS) +if ($ENV{MSYSTEM_CARCH} MATCHES aarch64) +use_system_binary(openssl) +elseif (LINUX AND CMAKE_SYSTEM_PROCESSOR MATCHES x86_64 OR DARWIN OR WINDOWS) use_prebuilt_binary(openssl) if (DARWIN) execute_process( -- cgit v1.3 From cd97226eed97742f1823da4c85bfd14c32e9d265 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 12 Jun 2025 00:33:27 +0800 Subject: Get SSE2NEON for Windows arm64 too --- indra/llcommon/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 6c1e1ef64a..f9b36738b5 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -285,7 +285,7 @@ target_link_libraries( target_include_directories(llcommon INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(llcommon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -if (CMAKE_OSX_ARCHITECTURES MATCHES arm64 OR CMAKE_SYSTEM_PROCESSOR MATCHES aarch64) +if (CMAKE_OSX_ARCHITECTURES MATCHES arm64 OR CMAKE_SYSTEM_PROCESSOR MATCHES aarch64 OR $ENV{MSYSTEM_CARCH} MATCHES aarch64) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/sse2neon_installed OR NOT ${sse2neon_installed} EQUAL 0) file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/sse2neon) if (NOT EXISTS ${LIBS_PREBUILT_DIR}/include/sse2neon/sse2neon.h) -- cgit v1.3 From 6619b030ef33101eaff4b0360858867f2e379e79 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Geenz\" Goodman" Date: Wed, 11 Jun 2025 17:38:00 -0400 Subject: Update viewer version. --- indra/newview/VIEWER_VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 099f298456..6329380f96 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -7.1.14 +7.1.15 -- cgit v1.3 From 7302558beb8790eab71ed270a9c29f12ab0c1a4d Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 12 Jun 2025 14:49:37 +0800 Subject: Put MSYSTEM_CARCH env setting check in parentheses Parsing failed on macOS' CMake (could be MacPorts, could be the version) for some reason. --- indra/CMakeLists.txt | 2 +- indra/cmake/WebRTC.cmake | 2 +- indra/llcommon/CMakeLists.txt | 2 +- indra/newview/CMakeLists.txt | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 85591782f2..9224b04549 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -59,7 +59,7 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llmessage) add_subdirectory(${LIBS_OPEN_PREFIX}llprimitive) add_subdirectory(${LIBS_OPEN_PREFIX}llrender) add_subdirectory(${LIBS_OPEN_PREFIX}llfilesystem) -if (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR $ENV{MSYSTEM_CARCH} MATCHES aarch64)) +if (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64))) add_subdirectory(${LIBS_OPEN_PREFIX}llwebrtc) endif () add_subdirectory(${LIBS_OPEN_PREFIX}llwindow) diff --git a/indra/cmake/WebRTC.cmake b/indra/cmake/WebRTC.cmake index ce012d31be..5a750fe7f3 100644 --- a/indra/cmake/WebRTC.cmake +++ b/indra/cmake/WebRTC.cmake @@ -8,7 +8,7 @@ add_library( ll::webrtc INTERFACE IMPORTED ) target_include_directories( ll::webrtc SYSTEM INTERFACE "${LIBS_PREBUILT_DIR}/include/webrtc" "${LIBS_PREBUILT_DIR}/include/webrtc/third_party/abseil-cpp") if (${LINUX_DISTRO} MATCHES debian OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64 OR WINDOWS) use_prebuilt_binary(webrtc) -elseif (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR $ENV{MSYSTEM_CARCH} MATCHES aarch64)) +elseif (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64))) target_compile_definitions(ll::webrtc INTERFACE CM_WEBRTC=1) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/webrtc_installed OR NOT ${webrtc_installed} EQUAL 0) if (DARWIN) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index f9b36738b5..04d14ff321 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -285,7 +285,7 @@ target_link_libraries( target_include_directories(llcommon INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(llcommon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -if (CMAKE_OSX_ARCHITECTURES MATCHES arm64 OR CMAKE_SYSTEM_PROCESSOR MATCHES aarch64 OR $ENV{MSYSTEM_CARCH} MATCHES aarch64) +if (CMAKE_OSX_ARCHITECTURES MATCHES arm64 OR CMAKE_SYSTEM_PROCESSOR MATCHES aarch64 OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64)) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/sse2neon_installed OR NOT ${sse2neon_installed} EQUAL 0) file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/sse2neon) if (NOT EXISTS ${LIBS_PREBUILT_DIR}/include/sse2neon/sse2neon.h) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e171a513f9..c8fba68e7c 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -745,7 +745,7 @@ set(viewer_SOURCE_FILES rlvhandler.cpp ) -if (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR $ENV{MSYSTEM_CARCH} MATCHES aarch64) +if (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64)) list(REMOVE_ITEM viewer_SOURCE_FILES llvoicewebrtc.cpp) endif () @@ -2091,7 +2091,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ll::openxr ) -if (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR $ENV{MSYSTEM_CARCH} MATCHES aarch64)) +if (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64))) target_link_libraries(${VIEWER_BINARY_NAME} llwebrtc ) endif () -- cgit v1.3 From f1b4f562785d5b911bf1ab8181ca037db4d9d8af Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 12 Jun 2025 14:52:10 +0800 Subject: Get rid of C5104 warnings on arm64 I felt like they slowed down the flow. https://developercommunity.visualstudio.com/t/warnings-in-a-windows-sdk-header-when-compiling-wi/897227 --- indra/llcommon/llpreprocessor.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index e9f07f6fdf..268109e8b7 100644 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -169,7 +169,11 @@ #define LL_TO_STRING_HELPER(x) #x #define LL_TO_STRING(x) LL_TO_STRING_HELPER(x) +#if _M_ARM64 +#define LL_TO_WSTRING_HELPER(x) L## #x +#else #define LL_TO_WSTRING_HELPER(x) L#x +#endif #define LL_TO_WSTRING(x) LL_TO_WSTRING_HELPER(x) #define LL_FILE_LINENO_MSG(msg) __FILE__ "(" LL_TO_STRING(__LINE__) ") : " msg #define LL_GLUE_IMPL(x, y) x##y -- cgit v1.3 From 1cd2a89bd82a3c35dc4fd21d32211d8f81817050 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 13 Jun 2025 04:11:39 +0200 Subject: Fix implicit instantiation of undefined template 'std::char_traits' on FreeBSD. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282329 --- indra/llcommon/llstring.cpp | 2 +- indra/llcommon/llstring.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index 07adf71d18..bb6d091a97 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -260,7 +260,7 @@ S32 utf16str_wstring_length(const llutf16string &utf16str, const S32 utf16_len) { S32 surrogate_pairs = 0; // ... craziness to make gcc happy (llutf16string.c_str() is tweaked on linux): - const U16 *const utf16_chars = &(*(utf16str.begin())); + const auto *const utf16_chars = &(*(utf16str.begin())); S32 i = 0; while (i < utf16_len) { diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 7a8edc176d..2e579a4d2d 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -635,7 +635,11 @@ LL_COMMON_API std::string rawstr_to_utf8(const std::string& raw); // // This typedef may or may not be identical to std::wstring, depending on // LL_WCHAR_T_NATIVE. +#if __FreeBSD__ +typedef std::basic_string llutf16string; +#else typedef std::basic_string llutf16string; +#endif // Considering wchar_t, llwchar and U16, there are three relevant cases: #if LLWCHAR_IS_WCHAR_T // every which way but Windows -- cgit v1.3 From 358260af531dd617195cc373ed4504048689b3ef Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 13 Jun 2025 17:51:59 +0800 Subject: Remove ../lib rpath from dullahan_host for all It's irrelevant on any distro anyway. --- indra/cmake/CEFPlugin.cmake | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 70e6c366a4..b70be7926f 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -88,12 +88,10 @@ else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) use_prebuilt_binary(dullahan) endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) -if (${LINUX_DISTRO} MATCHES fedora) - execute_process( - COMMAND patchelf --remove-rpath bin/release/dullahan_host - WORKING_DIRECTORY ${LIBS_PREBUILT_DIR} - ) -endif (${LINUX_DISTRO} MATCHES fedora) +execute_process( + COMMAND patchelf --remove-rpath bin/release/dullahan_host + WORKING_DIRECTORY ${LIBS_PREBUILT_DIR} + ) target_include_directories( ll::cef SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/cef) -- cgit v1.3 From 1b7df922b23fa2b7ba74c8958f2799c7ebc1d0ae Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 13 Jun 2025 19:33:43 +0800 Subject: FMOD has been upgraded from 2.02.28 to 2.02.29 --- indra/cmake/FMODSTUDIO.cmake | 32 ++++++++++++++++---------------- indra/newview/ViewerInstall.cmake | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index fb4734fe7b..8cac756ead 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -34,7 +34,7 @@ if (USE_FMODSTUDIO) file(MAKE_DIRECTORY ${ARCH_PREBUILT_DIRS_RELEASE}) if (DARWIN) execute_process( - COMMAND hdiutil attach -noverify fmodstudioapi20228mac-installer.dmg + COMMAND hdiutil attach -noverify fmodstudioapi20229mac-installer.dmg WORKING_DIRECTORY $ENV{HOME}/Downloads ) file( @@ -64,36 +64,36 @@ if (USE_FMODSTUDIO) file(WRITE ${PREBUILD_TRACKING_DIR}/fmodstudio_installed "${fmodstudio_installed}") else () file(ARCHIVE_EXTRACT - INPUT $ENV{HOME}/Downloads/fmodstudioapi20228linux.tar.gz + INPUT $ENV{HOME}/Downloads/fmodstudioapi20229linux.tar.gz DESTINATION ${CMAKE_BINARY_DIR} ) file( COPY - ${CMAKE_BINARY_DIR}/fmodstudioapi20228linux/api/core/inc/fmod.h - ${CMAKE_BINARY_DIR}/fmodstudioapi20228linux/api/core/inc/fmod.hpp - ${CMAKE_BINARY_DIR}/fmodstudioapi20228linux/api/core/inc/fmod_codec.h - ${CMAKE_BINARY_DIR}/fmodstudioapi20228linux/api/core/inc/fmod_common.h - ${CMAKE_BINARY_DIR}/fmodstudioapi20228linux/api/core/inc/fmod_dsp.h - ${CMAKE_BINARY_DIR}/fmodstudioapi20228linux/api/core/inc/fmod_dsp_effects.h - ${CMAKE_BINARY_DIR}/fmodstudioapi20228linux/api/core/inc/fmod_errors.h - ${CMAKE_BINARY_DIR}/fmodstudioapi20228linux/api/core/inc/fmod_output.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20229linux/api/core/inc/fmod.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20229linux/api/core/inc/fmod.hpp + ${CMAKE_BINARY_DIR}/fmodstudioapi20229linux/api/core/inc/fmod_codec.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20229linux/api/core/inc/fmod_common.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20229linux/api/core/inc/fmod_dsp.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20229linux/api/core/inc/fmod_dsp_effects.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20229linux/api/core/inc/fmod_errors.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20229linux/api/core/inc/fmod_output.h DESTINATION ${LIBS_PREBUILT_DIR}/include/fmodstudio ) if (CMAKE_SYSTEM_PROCESSOR MATCHES aarch64) file( COPY - ${CMAKE_BINARY_DIR}/fmodstudioapi20228linux/api/core/lib/arm64/libfmod.so - ${CMAKE_BINARY_DIR}/fmodstudioapi20228linux/api/core/lib/arm64/libfmod.so.13 - ${CMAKE_BINARY_DIR}/fmodstudioapi20228linux/api/core/lib/arm64/libfmod.so.13.28 + ${CMAKE_BINARY_DIR}/fmodstudioapi20229linux/api/core/lib/arm64/libfmod.so + ${CMAKE_BINARY_DIR}/fmodstudioapi20229linux/api/core/lib/arm64/libfmod.so.13 + ${CMAKE_BINARY_DIR}/fmodstudioapi20229linux/api/core/lib/arm64/libfmod.so.13.29 DESTINATION ${ARCH_PREBUILT_DIRS_RELEASE} FOLLOW_SYMLINK_CHAIN ) else () file( COPY - ${CMAKE_BINARY_DIR}/fmodstudioapi20228linux/api/core/lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so - ${CMAKE_BINARY_DIR}/fmodstudioapi20228linux/api/core/lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so.13 - ${CMAKE_BINARY_DIR}/fmodstudioapi20228linux/api/core/lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so.13.28 + ${CMAKE_BINARY_DIR}/fmodstudioapi20229linux/api/core/lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so + ${CMAKE_BINARY_DIR}/fmodstudioapi20229linux/api/core/lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so.13 + ${CMAKE_BINARY_DIR}/fmodstudioapi20229linux/api/core/lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so.13.29 DESTINATION ${ARCH_PREBUILT_DIRS_RELEASE} FOLLOW_SYMLINK_CHAIN ) diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake index e2fe13c9ab..27427c7145 100644 --- a/indra/newview/ViewerInstall.cmake +++ b/indra/newview/ViewerInstall.cmake @@ -184,7 +184,7 @@ if (LINUX) install(FILES ${ARCH_PREBUILT_DIRS_RELEASE}/libfmod.so ${ARCH_PREBUILT_DIRS_RELEASE}/libfmod.so.13 - ${ARCH_PREBUILT_DIRS_RELEASE}/libfmod.so.13.28 + ${ARCH_PREBUILT_DIRS_RELEASE}/libfmod.so.13.29 DESTINATION ${_LIB}) endif (USE_FMODSTUDIO) endif (LINUX) -- cgit v1.3 From 32c60e931a0c5c2dd4c562f84a27286ce419456b Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 13 Jun 2025 22:16:46 +0800 Subject: Add Windows to the build list, sort alphabetically --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 555ffc9626..dbc225c327 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ As a third party maintained fork of the [Second Life][] viewer, which includes A ## Download -Most people use a pre-built viewer release to access Second Life. macOS, GNU/Linux and FreeBSD builds are +Most people use a pre-built viewer release to access Second Life. FreeBSD, GNU/Linux, macOS and Windows builds are [published on the official website][download]. More experimental viewers, such as release candidates and project viewers, would be detailed on the same page, [in-world group][] notices, or [Discord][] server. -- cgit v1.3 From a7c229914e1a88689b0e772baa1196b2ebd6142f Mon Sep 17 00:00:00 2001 From: secretfoxtail Date: Fri, 13 Jun 2025 09:08:47 -0600 Subject: panel_group_info_sidetray.xml adjustment move button_row_ls up a little bit so that the buttons are not cut off by the bottom edge of the floater. --- indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml index da900c783b..7b404ef5ca 100644 --- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml @@ -203,7 +203,7 @@ background_visible="false" name="button_row_ls" left="6" orientation="horizontal" - top_pad="5" + top_pad="2" width="297"> Date: Sun, 15 Jun 2025 15:50:28 +0800 Subject: Make sure lib/release exists on Windows arm64 before using it for ColladaDOM library file, cause it seems that ColladaDOM is the first one that gets built on Windows arm64 before any other package gets installed and implicitly creating that folder. --- indra/cmake/LLPrimitive.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index 7aa266d2db..00e3c73851 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -85,7 +85,7 @@ else () ) if (WINDOWS) execute_process( - COMMAND MSBuild.exe ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/Project.sln -p:Configuration=Release + COMMAND MSBuild.exe ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/Project.sln -p:Configuration=${CMAKE_BUILD_TYPE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8 OUTPUT_VARIABLE colladadom_installed ) @@ -98,8 +98,9 @@ else () ${LIBS_PREBUILT_DIR}/include/include ${LIBS_PREBUILT_DIR}/include/collada ) + file(MAKE_DIRECTORY ${ARCH_PREBUILT_DIRS_RELEASE}) file(RENAME - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/src/1.4/Release/collada14dom.lib + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/src/1.4/${CMAKE_BUILD_TYPE}/collada14dom.lib ${ARCH_PREBUILT_DIRS_RELEASE}/libcollada14dom23-s.lib ) elseif (${COLLADADOM_RESULT}) -- cgit v1.3 From 1e2c621af65cd1bde8ad122be4d4a6d4bb578f25 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 19 Jun 2025 17:41:15 +0800 Subject: Alternative to rdtsc, for Windows arm64 Just copying from this: https://forum.juce.com/t/windows-arm64-support/47572/6 This commit is for getting rid of the compile error for now, we don't know yet if this will work correctly or not. --- indra/llcommon/llfasttimer.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index a69a03e419..8499655bfa 100644 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -99,7 +99,11 @@ public: #if LL_FASTTIMER_USE_RDTSC static U32 getCPUClockCount32() { +#if _M_ARM64 + unsigned __int64 val = _ReadStatusReg(ARM64_PMCCNTR_EL0); +#else unsigned __int64 val = __rdtsc(); +#endif val = val >> 8; return static_cast(val); } @@ -107,7 +111,11 @@ public: // return full timer value, *not* shifted by 8 bits static U64 getCPUClockCount64() { +#if _M_ARM64 + return static_cast( _ReadStatusReg(ARM64_PMCCNTR_EL0) ); +#else return static_cast( __rdtsc() ); +#endif } #else -- cgit v1.3 From 32871ee579bfbd4828f7888550897f619fdfd9d7 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 19 Jun 2025 17:42:53 +0800 Subject: Attempt to replace __cpuid, on arm64 using cpuinfo This commit is for getting rid of the compile error for now, we don't know yet if this will work correctly or not. --- indra/cmake/cpuinfo.cmake | 5 ++++ indra/llcommon/CMakeLists.txt | 7 +++++ indra/llcommon/llprocessor.cpp | 63 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 indra/cmake/cpuinfo.cmake diff --git a/indra/cmake/cpuinfo.cmake b/indra/cmake/cpuinfo.cmake new file mode 100644 index 0000000000..10fcab8e40 --- /dev/null +++ b/indra/cmake/cpuinfo.cmake @@ -0,0 +1,5 @@ +include(Prebuilt) + +add_library( ll::cpuinfo INTERFACE IMPORTED ) + +use_system_binary(cpuinfo) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 04d14ff321..670eb0fd0b 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -11,6 +11,9 @@ include(LLSharedLibs) include(ZLIBNG) include(Tracy) +if ($ENV{MSYSTEM_CARCH} MATCHES aarch64) + include(cpuinfo) +endif () set(llcommon_SOURCE_FILES apply.cpp @@ -282,6 +285,10 @@ target_link_libraries( ll::tracy ) +if ($ENV{MSYSTEM_CARCH} MATCHES aarch64) + target_link_libraries(llcommon ll::cpuinfo) +endif () + target_include_directories(llcommon INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(llcommon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index 9b3cdf4df5..434501af77 100644 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -40,6 +40,9 @@ # include # undef _interlockedbittestandset # undef _interlockedbittestandreset +#if _M_ARM64 +# include +#endif #endif #include "llsd.h" @@ -439,13 +442,21 @@ static F64 calculate_cpu_frequency(U32 measure_msecs) //// completed now (serialization) //__asm cpuid int cpu_info[4] = {-1}; +#if _M_ARM64 + std::fill(cpu_info, cpu_info + 4, 0); +#else __cpuid(cpu_info, 0); +#endif // We ask the high-res timer for the start time QueryPerformanceCounter((LARGE_INTEGER *) &starttime); // Then we get the current cpu clock and store it +#if _M_ARM64 + start = _ReadStatusReg(ARM64_PMCCNTR_EL0); +#else start = __rdtsc(); +#endif // Now we wart for some msecs _Delay(measure_msecs); @@ -455,7 +466,11 @@ static F64 calculate_cpu_frequency(U32 measure_msecs) QueryPerformanceCounter((LARGE_INTEGER *) &endtime); // And also for the end cpu clock +#if _M_ARM64 + end = _ReadStatusReg(ARM64_PMCCNTR_EL0); +#else end = __rdtsc(); +#endif // Now we can restore the default process and thread priorities SetProcessAffinityMask(hProcess, dwProcessMask); @@ -495,17 +510,60 @@ private: // the other three array elements. The CPU identification string is // not in linear order. The code below arranges the information // in a human readable form. +#if _M_ARM64 + cpuinfo_initialize(); +#else int cpu_info[4] = {-1}; __cpuid(cpu_info, 0); unsigned int ids = (unsigned int)cpu_info[0]; setConfig(eMaxID, (S32)ids); +#endif char cpu_vendor[0x20]; memset(cpu_vendor, 0, sizeof(cpu_vendor)); +#if _M_ARM64 + switch (cpuinfo_get_current_core()->vendor) + { + case cpuinfo_vendor_unknown: + setInfo(eVendor, "Unknown"); + break; + case cpuinfo_vendor_arm: + setInfo(eVendor, "ARM"); + break; + case cpuinfo_vendor_qualcomm: + setInfo(eVendor, "Qualcomm"); + break; + case cpuinfo_vendor_apple: + setInfo(eVendor, "Apple"); + break; + case cpuinfo_vendor_samsung: + setInfo(eVendor, "Samsung"); + break; + case cpuinfo_vendor_nvidia: + setInfo(eVendor, "Nvidia"); + break; + case cpuinfo_vendor_cavium: + setInfo(eVendor, "Cavium"); + break; + case cpuinfo_vendor_broadcom: + setInfo(eVendor, "Broadcom"); + break; + case cpuinfo_vendor_apm: + setInfo(eVendor, "APM"); + break; + case cpuinfo_vendor_huawei: + setInfo(eVendor, "Huawei"); + break; + default: + setInfo(eVendor, "Unknown"); + break; + } +#else *((int*)cpu_vendor) = cpu_info[1]; *((int*)(cpu_vendor+4)) = cpu_info[3]; *((int*)(cpu_vendor+8)) = cpu_info[2]; setInfo(eVendor, cpu_vendor); +#endif std::string cmp_vendor(cpu_vendor); bool is_amd = false; if (cmp_vendor == "AuthenticAMD") @@ -513,6 +571,10 @@ private: is_amd = true; } +#if _M_ARM64 + setInfo(eModel, cpuinfo_get_package(0)->name); + setInfo(eType, cpuinfo_get_uarch(0)->uarch); +#else // Get the information associated with each valid Id for(unsigned int i=0; i<=ids; ++i) { @@ -623,6 +685,7 @@ private: setConfig(eCacheSizeK, (cpu_info[2] >> 16) & 0xffff); } } +#endif } }; -- cgit v1.3 From 75012c4f0c0b852c8bfa0b5632bf82c82f240754 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 19 Jun 2025 17:48:03 +0800 Subject: GLM_FORCE_NEON for Windows arm64 too though there are still so many compile errors, but it should be in the right direction, cause firstly we can't let it use GLM_FORCE_SSE2 otherwise it would include x/emmintrin headers, and secondly, if none of the GLM_FORCEs is used then the errors are much fewer but related to __m128 which should be translatable by SSE2NEON (that's why I believe GLM_FORCE_NEON should be ON for Windows arm64 too). --- indra/cmake/00-Common.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 0e3b89e98e..c8520b53ab 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -33,7 +33,7 @@ add_compile_definitions( ADDRESS_SIZE=${ADDRESS_SIZE}) # -- which we do. Without one or the other, we get a ton of Boost warnings. add_compile_definitions(BOOST_BIND_GLOBAL_PLACEHOLDERS) -if(CMAKE_OSX_ARCHITECTURES MATCHES arm64 OR CMAKE_SYSTEM_PROCESSOR MATCHES aarch64) +if(CMAKE_OSX_ARCHITECTURES MATCHES arm64 OR CMAKE_SYSTEM_PROCESSOR MATCHES aarch64 OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64)) add_compile_definitions(GLM_FORCE_DEFAULT_ALIGNED_GENTYPES=1 GLM_FORCE_NEON=1 GLM_ENABLE_EXPERIMENTAL=1) else() # Force enable SSE2 instructions in GLM per the manual -- cgit v1.3 From 0c303fa9d33405435b67435146045a8edcc5f51e Mon Sep 17 00:00:00 2001 From: secretfoxtail Date: Thu, 19 Jun 2025 05:07:49 -0600 Subject: floater_about.xml -> Space out licenses tab Make licenses more readable, neater looking. --- indra/newview/skins/default/xui/en/floater_about.xml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index de047f5010..a251b3c5c5 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -189,7 +189,7 @@ Dummy Name replaced at run time 3Dconnexion SDK Copyright (C) 1992-2009 3Dconnexion + APR Copyright (C) 2011 The Apache Software Foundation + Collada DOM Copyright 2006 Sony Computer Entertainment Inc. + cURL Copyright (C) 1996-2010, Daniel Stenberg, (daniel@haxx.se) + expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd. + FreeType Copyright (C) 1996-2002, 2006 David Turner, Robert Wilhelm, and Werner Lemberg. + GL Copyright (C) 1999-2004 Brian Paul. + jpeglib Copyright (C) 1991-1998, Thomas G. Lane. + llphysicsextensions_tpv Copyright (c) 2010, Linden Research, Inc. + meshoptimizer Copyright (c) 2016-2021 Arseny Kapoulkine + ogg/vorbis Copyright (C) 2002, Xiphophorus + OpenSSL Copyright (C) 1998-2008 The OpenSSL Project. + PCRE Copyright (c) 1997-2012 University of Cambridge + SDL Copyright (C) 1997-2024 Sam Lantinga + SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + xxHash Copyright (C) 2012-2020 Yann Collet. + zlib Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler. This software contains source code provided by NVIDIA Corporation. -- cgit v1.3 From 55d9c2f3973882477f04d052fd027e5af621ddff Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 19 Jun 2025 20:54:17 +0800 Subject: Bring back 3p logos to the viewer, mainly for FMOD I checked out the related files from 45249de1ca418324c4077312eefc7edc7e22c401, before the merge with upstream logo removal, but then I had to reapply c2d491905b668702d5640c7c5472629f7acc27e0, the MotD dynamic resizing, and remove the unused commented out vivox-related part since we're not redistributing it. --- indra/newview/llprogressview.cpp | 132 +++++++++++++++++++++ indra/newview/llprogressview.h | 19 +++ .../skins/default/textures/3p_icons/fmod_logo.png | Bin 0 -> 14486 bytes .../skins/default/textures/3p_icons/havok_logo.png | Bin 0 -> 41488 bytes .../skins/default/xui/de/panel_progress.xml | 2 + .../skins/default/xui/en/panel_progress.xml | 32 +++++ .../skins/default/xui/es/panel_progress.xml | 2 + .../skins/default/xui/fr/panel_progress.xml | 2 + .../skins/default/xui/it/panel_progress.xml | 2 + .../skins/default/xui/ja/panel_progress.xml | 4 + .../skins/default/xui/pl/panel_progress.xml | 5 + .../skins/default/xui/pt/panel_progress.xml | 2 + 12 files changed, 202 insertions(+) create mode 100644 indra/newview/skins/default/textures/3p_icons/fmod_logo.png create mode 100644 indra/newview/skins/default/textures/3p_icons/havok_logo.png diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index 2c09943b83..c77fc6dc84 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -81,6 +81,8 @@ bool LLProgressView::postBuild() { mProgressBar = getChild("login_progress_bar"); + mLogosLabel = getChild("logos_lbl"); + mProgressText = getChild("progress_text"); mMessageText = getChild("message_text"); mMessageTextRectInitial = mMessageText->getRect(); // auto resizes, save initial size @@ -239,6 +241,33 @@ void LLProgressView::drawStartTexture(F32 alpha) gGL.popMatrix(); } +void LLProgressView::drawLogos(F32 alpha) +{ + if (mLogosList.empty()) + { + return; + } + + // logos are tied to label, + // due to potential resizes we have to figure offsets out on draw or resize + S32 offset_x, offset_y; + mLogosLabel->localPointToScreen(0, 0, &offset_x, &offset_y); + std::vector::const_iterator iter = mLogosList.begin(); + std::vector::const_iterator end = mLogosList.end(); + for (; iter != end; iter++) + { + gl_draw_scaled_image_with_border(iter->mDrawRect.mLeft + offset_x, + iter->mDrawRect.mBottom + offset_y, + iter->mDrawRect.getWidth(), + iter->mDrawRect.getHeight(), + iter->mTexturep.get(), + UI_VERTEX_COLOR % alpha, + false, + iter->mClipRect, + iter->mOffsetRect); + } +} + void LLProgressView::draw() { static LLTimer timer; @@ -254,6 +283,7 @@ void LLProgressView::draw() } LLPanel::draw(); + drawLogos(alpha); return; } @@ -266,6 +296,7 @@ void LLProgressView::draw() drawStartTexture(alpha); LLPanel::draw(); + drawLogos(alpha); // faded out completely - remove panel and reveal world if (mFadeToWorldTimer.getElapsedTimeF32() > FADE_TO_WORLD_TIME ) @@ -300,6 +331,7 @@ void LLProgressView::draw() drawStartTexture(1.0f); // draw children LLPanel::draw(); + drawLogos(1.0f); } void LLProgressView::setText(const std::string& text) @@ -330,6 +362,98 @@ void LLProgressView::setMessage(const std::string& msg) } } +void LLProgressView::loadLogo(const std::string &path, + const U8 image_codec, + const LLRect &pos_rect, + const LLRectf &clip_rect, + const LLRectf &offset_rect) +{ + // We need these images very early, so we have to force-load them, otherwise they might not load in time. + if (!gDirUtilp->fileExists(path)) + { + return; + } + + LLPointer start_image_frmted = LLImageFormatted::createFromType(image_codec); + if (!start_image_frmted->load(path)) + { + LL_WARNS("AppInit") << "Image load failed: " << path << LL_ENDL; + return; + } + + LLPointer raw = new LLImageRaw; + if (!start_image_frmted->decode(raw, 0.0f)) + { + LL_WARNS("AppInit") << "Image decode failed " << path << LL_ENDL; + return; + } + // HACK: getLocalTexture allows only power of two dimentions + raw->expandToPowerOfTwo(); + + TextureData data; + data.mTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), false); + data.mDrawRect = pos_rect; + data.mClipRect = clip_rect; + data.mOffsetRect = offset_rect; + mLogosList.push_back(data); +} + +void LLProgressView::initLogos() +{ + mLogosList.clear(); + +#if LL_FMODSTUDIO || LL_HAVOK + const U8 image_codec = IMG_CODEC_PNG; + const LLRectf default_clip(0.f, 1.f, 1.f, 0.f); + //const S32 default_height = 28; + const S32 default_pad = 15; + + S32 icon_width, icon_height; + + // We don't know final screen rect yet, so we can't precalculate position fully + S32 texture_start_x = (S32)mLogosLabel->getFont()->getWidthF32(mLogosLabel->getWText().c_str()) + default_pad; + S32 texture_start_y = -7; +#endif //LL_FMODSTUDIO || LL_HAVOK + + // Normally we would just preload these textures from textures.xml, + // and display them via icon control, but they are only needed on + // startup and preloaded/UI ones stay forever + // (and this code was done already so simply reused it) + std::string temp_str = gDirUtilp->getExpandedFilename(LL_PATH_DEFAULT_SKIN, "textures", "3p_icons"); + + temp_str += gDirUtilp->getDirDelimiter(); + +#ifdef LL_FMODSTUDIO + // original image size is 264x96, it is on longer side but + // with no internal paddings so it gets additional padding + icon_width = 77; + icon_height = 21; + S32 pad_fmod_y = 4; + texture_start_x++; + loadLogo(temp_str + "fmod_logo.png", + image_codec, + LLRect(texture_start_x, texture_start_y + pad_fmod_y + icon_height, texture_start_x + icon_width, texture_start_y + pad_fmod_y), + default_clip, + default_clip); + + texture_start_x += icon_width + default_pad + 1; +#endif //LL_FMODSTUDIO +#ifdef LL_HAVOK + // original image size is 342x113, central element is on a larger side + // plus internal padding, so it gets slightly more height than desired 32 + icon_width = 88; + icon_height = 29; + S32 pad_havok_y = -1; + loadLogo(temp_str + "havok_logo.png", + image_codec, + LLRect(texture_start_x, texture_start_y + pad_havok_y + icon_height, texture_start_x + icon_width, texture_start_y + pad_havok_y), + default_clip, + default_clip); + + texture_start_x += icon_width + default_pad; +#endif //LL_HAVOK +} + void LLProgressView::initStartTexture(S32 location_id, bool is_in_production) { if (gStartTexture.notNull()) @@ -408,11 +532,19 @@ void LLProgressView::initStartTexture(S32 location_id, bool is_in_production) void LLProgressView::initTextures(S32 location_id, bool is_in_production) { initStartTexture(location_id, is_in_production); + initLogos(); + + childSetVisible("panel_icons", !mLogosList.empty()); + childSetVisible("panel_top_spacer", mLogosList.empty()); } void LLProgressView::releaseTextures() { gStartTexture = NULL; + mLogosList.clear(); + + childSetVisible("panel_top_spacer", true); + childSetVisible("panel_icons", false); } void LLProgressView::setCancelButtonVisible(bool b, const std::string& label) diff --git a/indra/newview/llprogressview.h b/indra/newview/llprogressview.h index 250ee511d7..f529c16c1d 100644 --- a/indra/newview/llprogressview.h +++ b/indra/newview/llprogressview.h @@ -53,6 +53,7 @@ public: /*virtual*/ void draw(); void drawStartTexture(F32 alpha); + void drawLogos(F32 alpha); /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask); /*virtual*/ bool handleKeyHere(KEY key, MASK mask); @@ -85,6 +86,7 @@ public: protected: LLProgressBar* mProgressBar; LLMediaCtrl* mMediaCtrl; + LLTextBox* mLogosLabel = nullptr; LLTextBox* mProgressText = nullptr; LLTextBox* mMessageText = nullptr; F32 mPercentDone; @@ -110,8 +112,25 @@ protected: bool handleUpdate(const LLSD& event_data); static void onIdle(void* user_data); + void loadLogo(const std::string &path, const U8 image_codec, const LLRect &pos_rect, const LLRectf &clip_rect, const LLRectf &offset_rect); + // logos have unusual location and need to be preloaded to not appear grey, then deleted + void initLogos(); // Loads a bitmap to display during load void initStartTexture(S32 location_id, bool is_in_production); + +private: + // We need to draw textures on login, but only once. + // So this vector gets filled up for textures to render and gets cleaned later + // Some textures have unusual requirements, so we are rendering directly + class TextureData + { + public: + LLPointer mTexturep; + LLRect mDrawRect; + LLRectf mClipRect; + LLRectf mOffsetRect; + }; + std::vector mLogosList; }; #endif // LL_LLPROGRESSVIEW_H diff --git a/indra/newview/skins/default/textures/3p_icons/fmod_logo.png b/indra/newview/skins/default/textures/3p_icons/fmod_logo.png new file mode 100644 index 0000000000..5a50e0ad34 Binary files /dev/null and b/indra/newview/skins/default/textures/3p_icons/fmod_logo.png differ diff --git a/indra/newview/skins/default/textures/3p_icons/havok_logo.png b/indra/newview/skins/default/textures/3p_icons/havok_logo.png new file mode 100644 index 0000000000..ff1ea3a72e Binary files /dev/null and b/indra/newview/skins/default/textures/3p_icons/havok_logo.png differ diff --git a/indra/newview/skins/default/xui/de/panel_progress.xml b/indra/newview/skins/default/xui/de/panel_progress.xml index c9bed9fd9b..8d1abdcac1 100644 --- a/indra/newview/skins/default/xui/de/panel_progress.xml +++ b/indra/newview/skins/default/xui/de/panel_progress.xml @@ -1,8 +1,10 @@ + + Second Life verwendet diff --git a/indra/newview/skins/default/xui/en/panel_progress.xml b/indra/newview/skins/default/xui/en/panel_progress.xml index 6b19907372..8e0e6408ed 100644 --- a/indra/newview/skins/default/xui/en/panel_progress.xml +++ b/indra/newview/skins/default/xui/en/panel_progress.xml @@ -68,6 +68,14 @@ animate="false" top="0" width="670"> + + + + + + Megapahit uses + + + + Usos de Second Life diff --git a/indra/newview/skins/default/xui/fr/panel_progress.xml b/indra/newview/skins/default/xui/fr/panel_progress.xml index c9bed9fd9b..673ec63642 100644 --- a/indra/newview/skins/default/xui/fr/panel_progress.xml +++ b/indra/newview/skins/default/xui/fr/panel_progress.xml @@ -1,8 +1,10 @@ + + Second Life utilise diff --git a/indra/newview/skins/default/xui/it/panel_progress.xml b/indra/newview/skins/default/xui/it/panel_progress.xml index c9bed9fd9b..fd2892a88f 100644 --- a/indra/newview/skins/default/xui/it/panel_progress.xml +++ b/indra/newview/skins/default/xui/it/panel_progress.xml @@ -1,8 +1,10 @@ + + Utilizzi di Second Life diff --git a/indra/newview/skins/default/xui/ja/panel_progress.xml b/indra/newview/skins/default/xui/ja/panel_progress.xml index 1edada6098..7fd7d5ab5c 100644 --- a/indra/newview/skins/default/xui/ja/panel_progress.xml +++ b/indra/newview/skins/default/xui/ja/panel_progress.xml @@ -1,8 +1,12 @@ + + + セカンドライフ使用 + diff --git a/indra/newview/skins/default/xui/pl/panel_progress.xml b/indra/newview/skins/default/xui/pl/panel_progress.xml index 8da982cc3f..a701d98398 100644 --- a/indra/newview/skins/default/xui/pl/panel_progress.xml +++ b/indra/newview/skins/default/xui/pl/panel_progress.xml @@ -5,6 +5,11 @@ + + + Second Life używa + + diff --git a/indra/newview/skins/default/xui/pt/panel_progress.xml b/indra/newview/skins/default/xui/pt/panel_progress.xml index c9bed9fd9b..63bb663cfc 100644 --- a/indra/newview/skins/default/xui/pt/panel_progress.xml +++ b/indra/newview/skins/default/xui/pt/panel_progress.xml @@ -1,8 +1,10 @@ + + Usos do Second Life -- cgit v1.3 From 9e30b65081735bed52e4b37588b2707812ec0816 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 20 Jun 2025 09:50:33 +0800 Subject: Megapahit words on panel progress localisations --- indra/newview/skins/default/xui/de/panel_progress.xml | 2 +- indra/newview/skins/default/xui/es/panel_progress.xml | 2 +- indra/newview/skins/default/xui/fr/panel_progress.xml | 2 +- indra/newview/skins/default/xui/it/panel_progress.xml | 2 +- indra/newview/skins/default/xui/ja/panel_progress.xml | 2 +- indra/newview/skins/default/xui/pl/panel_progress.xml | 2 +- indra/newview/skins/default/xui/pt/panel_progress.xml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/indra/newview/skins/default/xui/de/panel_progress.xml b/indra/newview/skins/default/xui/de/panel_progress.xml index 8d1abdcac1..a3813c91d0 100644 --- a/indra/newview/skins/default/xui/de/panel_progress.xml +++ b/indra/newview/skins/default/xui/de/panel_progress.xml @@ -5,6 +5,6 @@ - Second Life verwendet + Megapahit verwendet diff --git a/indra/newview/skins/default/xui/es/panel_progress.xml b/indra/newview/skins/default/xui/es/panel_progress.xml index 64aaf246f8..377badc89e 100644 --- a/indra/newview/skins/default/xui/es/panel_progress.xml +++ b/indra/newview/skins/default/xui/es/panel_progress.xml @@ -5,6 +5,6 @@ - Usos de Second Life + Usos de Megapahit diff --git a/indra/newview/skins/default/xui/fr/panel_progress.xml b/indra/newview/skins/default/xui/fr/panel_progress.xml index 673ec63642..7d31bb7138 100644 --- a/indra/newview/skins/default/xui/fr/panel_progress.xml +++ b/indra/newview/skins/default/xui/fr/panel_progress.xml @@ -5,6 +5,6 @@ - Second Life utilise + Megapahit utilise diff --git a/indra/newview/skins/default/xui/it/panel_progress.xml b/indra/newview/skins/default/xui/it/panel_progress.xml index fd2892a88f..ab906cbedb 100644 --- a/indra/newview/skins/default/xui/it/panel_progress.xml +++ b/indra/newview/skins/default/xui/it/panel_progress.xml @@ -5,6 +5,6 @@ - Utilizzi di Second Life + Utilizzi di Megapahit diff --git a/indra/newview/skins/default/xui/ja/panel_progress.xml b/indra/newview/skins/default/xui/ja/panel_progress.xml index 7fd7d5ab5c..cafc7c2d1d 100644 --- a/indra/newview/skins/default/xui/ja/panel_progress.xml +++ b/indra/newview/skins/default/xui/ja/panel_progress.xml @@ -6,7 +6,7 @@ - セカンドライフ使用 + メガパイト使用 diff --git a/indra/newview/skins/default/xui/pl/panel_progress.xml b/indra/newview/skins/default/xui/pl/panel_progress.xml index a701d98398..3f68a32a7f 100644 --- a/indra/newview/skins/default/xui/pl/panel_progress.xml +++ b/indra/newview/skins/default/xui/pl/panel_progress.xml @@ -7,7 +7,7 @@ - Second Life używa + Megapahit używa diff --git a/indra/newview/skins/default/xui/pt/panel_progress.xml b/indra/newview/skins/default/xui/pt/panel_progress.xml index 63bb663cfc..be0364a70a 100644 --- a/indra/newview/skins/default/xui/pt/panel_progress.xml +++ b/indra/newview/skins/default/xui/pt/panel_progress.xml @@ -5,6 +5,6 @@ - Usos do Second Life + Usos do Megapahit -- cgit v1.3 From 3ed1035ff23688316d7a2ffa166c80dd6ea0c20f Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 20 Jun 2025 20:02:55 +0800 Subject: Fix chat history (with seconds) parsed wrong https://megapahit.com/show_bug.cgi?id=163 --- indra/newview/lllogchat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 5e230d95bd..e86599035e 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -78,7 +78,7 @@ const static std::string MULTI_LINE_PREFIX(" "); * * Note: "You" was used as an avatar names in viewers of previous versions */ -const static boost::regex TIMESTAMP_AND_STUFF("^(\\[\\d{4}/\\d{1,2}/\\d{1,2}\\s+\\d{1,2}:\\d{2}\\]\\s+|\\[\\d{1,2}:\\d{2}\\]\\s+)?(.*)$"); +const static boost::regex TIMESTAMP_AND_STUFF("^(\\[\\d{4}/\\d{1,2}/\\d{1,2}\\s+\\d{1,2}:\\d{2}:\\d{2}\\]\\s+|\\[\\d{1,2}:\\d{2}\\]\\s+)?(.*)$"); const static boost::regex TIMESTAMP("^(\\[\\d{4}/\\d{1,2}/\\d{1,2}\\s+\\d{1,2}:\\d{2}\\]|\\[\\d{1,2}:\\d{2}\\]).*"); /** -- cgit v1.3 From 917cf2c654fdbf5ad8ff32030b71cc21e5f25014 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 20 Jun 2025 20:53:23 +0800 Subject: Re-heighten progress panel to accomodate 3p logos 275 became 240 when they removed the logos, and then 240 became 220 when MotD became dynamic. So logos being back but with dynamic MotD should be 255. --- indra/newview/skins/default/xui/en/panel_progress.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_progress.xml b/indra/newview/skins/default/xui/en/panel_progress.xml index 8e0e6408ed..9f1f741b52 100644 --- a/indra/newview/skins/default/xui/en/panel_progress.xml +++ b/indra/newview/skins/default/xui/en/panel_progress.xml @@ -44,9 +44,9 @@ width="670" /> Date: Fri, 20 Jun 2025 21:45:15 +0800 Subject: Fix SL contributors credits on Windows Somehow when the stream editing to delete anything that begins with 4 spaces is run from CMake (as opposed to directly on shell), it deletes most of the contributors on Windows. I've tried many methods like using \w, \s, etc., but what works is just using the first letters of the bug codenames. There are still empty results (, , ,) among the final parsed contributors, but we'll ignore them for now. --- indra/newview/CMakeLists.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index c8fba68e7c..1515addad4 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1774,7 +1774,19 @@ if (CMAKE_COMMAND MATCHES /usr/bin/cmake OR WINDOWS) COMMAND sed ARGS -i '/\t.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt COMMAND sed - ARGS -i '/^ .*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + ARGS -i '/^ B.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '/^ C.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '/^ M.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '/^ O.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '/^ S.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '/^ s.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '/^ V.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt COMMAND sort ARGS -R contributions.txt -o ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt COMMAND paste -- cgit v1.3 From f7f5c21ab9a859f6abbec27f0d26c03483f55735 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 21 Jun 2025 14:24:14 +0800 Subject: Windows arm64 can use sse2neon from vcpkg Also add cpuinfo to build preparation instruction. --- README.md | 2 +- indra/llcommon/CMakeLists.txt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dbc225c327..6c657e4972 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ $ megapahit ### Windows arm64 ``` -$ vcpkg install pkgconf python3 freealut apr-util boost curl freetype glm hunspell libjpeg-turbo meshoptimizer minizip nghttp2 openjpeg libvorbis libxml2[tools] xxhash +$ vcpkg install pkgconf python3 freealut apr-util boost cpuinfo curl freetype glm hunspell libjpeg-turbo meshoptimizer minizip nghttp2 openjpeg sse2neon libvorbis libxml2[tools] xxhash $ vcpkg install --allow-unsupported boost-fiber $ export LL_BUILD="/MD /O2 /Ob2 /std:c++20 /Zc:wchar_t- /Zi /GR /DLL_RELEASE=1 /DLL_RELEASE_FOR_DOWNLOAD=1 /DNDEBUG /D_SECURE_STL=0 /D_HAS_ITERATOR_DEBUGGING=0 /DWIN32 /D_WINDOWS /DLL_WINDOWS=1 /DUNICODE /D_UNICODE /DWINVER=0x0602 /D_WIN32_WINNT=0x0602 /Zc:preprocessor" $ export PATH="$VCPKG_ROOT/downloads/tools/cmake-3.30.1-windows/cmake-3.30.1-windows-arm64/bin:$VCPKG_ROOT/downloads/tools/msys2/2db36fb050d01f45/usr/bin:$VCPKG_ROOT/installed/arm64-windows/tools/libxml2:/c/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin:$PATH" diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 670eb0fd0b..07d2c4afeb 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -292,7 +292,7 @@ endif () target_include_directories(llcommon INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(llcommon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -if (CMAKE_OSX_ARCHITECTURES MATCHES arm64 OR CMAKE_SYSTEM_PROCESSOR MATCHES aarch64 OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64)) +if (CMAKE_OSX_ARCHITECTURES MATCHES arm64 OR CMAKE_SYSTEM_PROCESSOR MATCHES aarch64) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/sse2neon_installed OR NOT ${sse2neon_installed} EQUAL 0) file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/sse2neon) if (NOT EXISTS ${LIBS_PREBUILT_DIR}/include/sse2neon/sse2neon.h) @@ -304,6 +304,8 @@ if (CMAKE_OSX_ARCHITECTURES MATCHES arm64 OR CMAKE_SYSTEM_PROCESSOR MATCHES aarc file(WRITE ${PREBUILD_TRACKING_DIR}/sse2neon_installed "0") endif () target_include_directories(llcommon PUBLIC ${LIBS_PREBUILT_DIR}/include/sse2neon) +elseif ($ENV{MSYSTEM_CARCH} MATCHES aarch64) + target_include_directories(llcommon PUBLIC ${prefix_result}/../include/sse2neon) endif () if (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu) OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed)) -- cgit v1.3 From 1f87660273bcf6f4cafe5db75a668354485b2a50 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 21 Jun 2025 14:55:34 +0800 Subject: Windows ARM64 support for StackWalker Basically just add what the author added to the file. https://github.com/JochenKalmbach/StackWalker/commit/2a96079ba54a905d29afb3834182cbf06eff9132#diff-0d2beffe54d2ad0b9c31814fc48e5ef5841ba542fe545bba8b8971c767c89911 --- indra/llcommon/StackWalker.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/llcommon/StackWalker.cpp b/indra/llcommon/StackWalker.cpp index e9ae1723fb..027df80df5 100644 --- a/indra/llcommon/StackWalker.cpp +++ b/indra/llcommon/StackWalker.cpp @@ -1100,6 +1100,14 @@ bool StackWalker::ShowCallstack(bool verbose, HANDLE hThread, const CONTEXT *con s.AddrBStore.Mode = AddrModeFlat; s.AddrStack.Offset = c.IntSp; s.AddrStack.Mode = AddrModeFlat; +#elif _M_ARM64 + imageType = IMAGE_FILE_MACHINE_ARM64; + s.AddrPC.Offset = c.Pc; + s.AddrPC.Mode = AddrModeFlat; + s.AddrFrame.Offset = c.Fp; + s.AddrFrame.Mode = AddrModeFlat; + s.AddrStack.Offset = c.Sp; + s.AddrStack.Mode = AddrModeFlat; #else #error "Platform not supported!" #endif -- cgit v1.3 From f5de250c3e74ecc8eb658d0b070c0884616f041d Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 23 Jun 2025 06:24:33 +0800 Subject: Revert "GLM_FORCE_NEON for Windows arm64 too" This reverts commit 75012c4f0c0b852c8bfa0b5632bf82c82f240754. I realised I was in the wrong direction after I avoided the offending lines by setting GLM_FORCE_XYZW_ONLY, and then by setting GLM_FORCE_CXX_UNKNOWN, to end up with the same 16 __m128-related "too many initializers" errors, which I believe were just obscured by the 160 syntax errors, which are to be fixed in the next commit. I had already mentioned SSE2NEON being responsible for translating __m128, but I had forgotten that it was a different package from GLM, obviously, that __m128 was never GLM_FORCE_NEON's responsibility. --- indra/cmake/00-Common.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index c8520b53ab..5cb0c23d6d 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -33,8 +33,10 @@ add_compile_definitions( ADDRESS_SIZE=${ADDRESS_SIZE}) # -- which we do. Without one or the other, we get a ton of Boost warnings. add_compile_definitions(BOOST_BIND_GLOBAL_PLACEHOLDERS) -if(CMAKE_OSX_ARCHITECTURES MATCHES arm64 OR CMAKE_SYSTEM_PROCESSOR MATCHES aarch64 OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64)) +if(CMAKE_OSX_ARCHITECTURES MATCHES arm64 OR CMAKE_SYSTEM_PROCESSOR MATCHES aarch64) add_compile_definitions(GLM_FORCE_DEFAULT_ALIGNED_GENTYPES=1 GLM_FORCE_NEON=1 GLM_ENABLE_EXPERIMENTAL=1) +elseif($ENV{MSYSTEM_CARCH} MATCHES aarch64) +add_compile_definitions(GLM_FORCE_DEFAULT_ALIGNED_GENTYPES=1 GLM_ENABLE_EXPERIMENTAL=1) else() # Force enable SSE2 instructions in GLM per the manual # https://github.com/g-truc/glm/blob/master/manual.md#section2_10 -- cgit v1.3 From c4bbf2134ce541854498561a939bb29dfb058e04 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 23 Jun 2025 06:40:16 +0800 Subject: Fix "too many initializers" LLQuad initialisations LLQuad is a typedef of __m128, which is already translated by sse2neon to float32x4_t (I thought sse2neon wasn't taking effect and I tried just replacing __m128 with float32x4_t to see that it didn't make a difference), but then I searched using the keyword float32x4_t this time and found that others have had a similar problem: https://developercommunity.visualstudio.com/t/static-initialization-arm64-neon-datatypes/1238406 https://stackoverflow.com/questions/54016821/error-c2078-when-initializing-uint32x4-t-on-arm https://github.com/kcat/openal-soft/issues/494 Looking at the type definition, on arm64 it can be initialised using a designator, the member with the float type and 4 array elements. I know it's an MSVC (arm64) problem, but since MSVC is also used on x64 and only Windows arm64 is suffering from this one in our case anyway (we only support Windows arm64 building using MSVC so far), it's just simpler to use the _M_ARM64 preprocessor instead of _MSC_VER. --- indra/llmath/llquaternion2.inl | 5 +++++ indra/llmath/llvector4a.cpp | 10 ++++++++++ indra/llmath/llvector4a.inl | 15 +++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/indra/llmath/llquaternion2.inl b/indra/llmath/llquaternion2.inl index ce5ed73926..b431d5766c 100644 --- a/indra/llmath/llquaternion2.inl +++ b/indra/llmath/llquaternion2.inl @@ -26,8 +26,13 @@ #include "llquaternion2.h" +#if _M_ARM64 +static const LLQuad LL_V4A_PLUS_ONE = {.n128_f32 = {1.f, 1.f, 1.f, 1.f}}; +static const LLQuad LL_V4A_MINUS_ONE = {.n128_f32 = {-1.f, -1.f, -1.f, -1.f}}; +#else static const LLQuad LL_V4A_PLUS_ONE = {1.f, 1.f, 1.f, 1.f}; static const LLQuad LL_V4A_MINUS_ONE = {-1.f, -1.f, -1.f, -1.f}; +#endif // Ctor from LLQuaternion inline LLQuaternion2::LLQuaternion2( const LLQuaternion& quat ) diff --git a/indra/llmath/llvector4a.cpp b/indra/llmath/llvector4a.cpp index b81d50f0f9..df20585d16 100644 --- a/indra/llmath/llvector4a.cpp +++ b/indra/llmath/llvector4a.cpp @@ -30,6 +30,15 @@ #include "llmath.h" #include "llquantize.h" +#if _M_ARM64 +extern const LLQuad F_ZERO_4A = {.n128_f32 = {0, 0, 0, 0}}; +extern const LLQuad F_APPROXIMATELY_ZERO_4A = {.n128_f32 = { + F_APPROXIMATELY_ZERO, + F_APPROXIMATELY_ZERO, + F_APPROXIMATELY_ZERO, + F_APPROXIMATELY_ZERO +}}; +#else extern const LLQuad F_ZERO_4A = { 0, 0, 0, 0 }; extern const LLQuad F_APPROXIMATELY_ZERO_4A = { F_APPROXIMATELY_ZERO, @@ -37,6 +46,7 @@ extern const LLQuad F_APPROXIMATELY_ZERO_4A = { F_APPROXIMATELY_ZERO, F_APPROXIMATELY_ZERO }; +#endif extern const LLVector4a LL_V4A_ZERO = reinterpret_cast ( F_ZERO_4A ); extern const LLVector4a LL_V4A_EPSILON = reinterpret_cast ( F_APPROXIMATELY_ZERO_4A ); diff --git a/indra/llmath/llvector4a.inl b/indra/llmath/llvector4a.inl index 36dbec078c..17e7de6eeb 100644 --- a/indra/llmath/llvector4a.inl +++ b/indra/llmath/llvector4a.inl @@ -335,8 +335,13 @@ inline void LLVector4a::normalize3() LLVector4a lenSqrd; lenSqrd.setAllDot3( *this, *this ); // rsqrt = approximate reciprocal square (i.e., { ~1/len(a)^2, ~1/len(a)^2, ~1/len(a)^2, ~1/len(a)^2 } const LLQuad rsqrt = _mm_rsqrt_ps(lenSqrd.mQ); +#if _M_ARM64 + static const LLQuad half = {.n128_f32 = {0.5f, 0.5f, 0.5f, 0.5f}}; + static const LLQuad three = {.n128_f32 = {3.f, 3.f, 3.f, 3.f }}; +#else static const LLQuad half = { 0.5f, 0.5f, 0.5f, 0.5f }; static const LLQuad three = {3.f, 3.f, 3.f, 3.f }; +#endif // Now we do one round of Newton-Raphson approximation to get full accuracy // According to the Newton-Raphson method, given a first 'w' for the root of f(x) = 1/x^2 - a (i.e., x = 1/sqrt(a)) // the next better approximation w[i+1] = w - f(w)/f'(w) = w - (1/w^2 - a)/(-2*w^(-3)) @@ -359,8 +364,13 @@ inline void LLVector4a::normalize4() LLVector4a lenSqrd; lenSqrd.setAllDot4( *this, *this ); // rsqrt = approximate reciprocal square (i.e., { ~1/len(a)^2, ~1/len(a)^2, ~1/len(a)^2, ~1/len(a)^2 } const LLQuad rsqrt = _mm_rsqrt_ps(lenSqrd.mQ); +#if _M_ARM64 + static const LLQuad half = {.n128_f32 = {0.5f, 0.5f, 0.5f, 0.5f}}; + static const LLQuad three = {.n128_f32 = {3.f, 3.f, 3.f, 3.f}}; +#else static const LLQuad half = { 0.5f, 0.5f, 0.5f, 0.5f }; static const LLQuad three = {3.f, 3.f, 3.f, 3.f }; +#endif // Now we do one round of Newton-Raphson approximation to get full accuracy // According to the Newton-Raphson method, given a first 'w' for the root of f(x) = 1/x^2 - a (i.e., x = 1/sqrt(a)) // the next better approximation w[i+1] = w - f(w)/f'(w) = w - (1/w^2 - a)/(-2*w^(-3)) @@ -383,8 +393,13 @@ inline LLSimdScalar LLVector4a::normalize3withLength() LLVector4a lenSqrd; lenSqrd.setAllDot3( *this, *this ); // rsqrt = approximate reciprocal square (i.e., { ~1/len(a)^2, ~1/len(a)^2, ~1/len(a)^2, ~1/len(a)^2 } const LLQuad rsqrt = _mm_rsqrt_ps(lenSqrd.mQ); +#if _M_ARM64 + static const LLQuad half = {.n128_f32 = {0.5f, 0.5f, 0.5f, 0.5f}}; + static const LLQuad three = {.n128_f32 = {3.f, 3.f, 3.f, 3.f}}; +#else static const LLQuad half = { 0.5f, 0.5f, 0.5f, 0.5f }; static const LLQuad three = {3.f, 3.f, 3.f, 3.f }; +#endif // Now we do one round of Newton-Raphson approximation to get full accuracy // According to the Newton-Raphson method, given a first 'w' for the root of f(x) = 1/x^2 - a (i.e., x = 1/sqrt(a)) // the next better approximation w[i+1] = w - f(w)/f'(w) = w - (1/w^2 - a)/(-2*w^(-3)) -- cgit v1.3 From 603589fde0ad81fc3687ecda0b046fb1f5260053 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 23 Jun 2025 06:58:01 +0800 Subject: Fix the vcpkg Boost libraries suffix on Win arm64 --- indra/cmake/Boost.cmake | 6 +++++- indra/cmake/LLPrimitive.cmake | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 5a9e10b38b..8459214f59 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -12,7 +12,11 @@ if (DARWIN) elseif (WINDOWS) target_include_directories( ll::boost SYSTEM INTERFACE ${prefix_result}/../include) target_link_directories( ll::boost INTERFACE ${prefix_result}) - set(sfx -vc143-mt-x64-1_88) + if ($ENV{MSYSTEM_CARCH} MATCHES aarch64) + set(sfx -vc143-mt-a64-1_88) + else () + set(sfx -vc143-mt-x64-1_88) + endif () else () find_package( Boost REQUIRED ) endif () diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index 00e3c73851..e6adea477f 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -59,7 +59,11 @@ else () elseif (WINDOWS) set(BOOST_CFLAGS -I${prefix_result}/../include) set(BOOST_LIBS -L${prefix_result}) - set(BOOST_LIBRARY_SUFFIX -vc143-mt-x64-1_88) + if ($ENV{MSYSTEM_CARCH} MATCHES aarch64) + set(BOOST_LIBRARY_SUFFIX -vc143-mt-a64-1_88) + else () + set(BOOST_LIBRARY_SUFFIX -vc143-mt-x64-1_88) + endif () endif () file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/collada/1.4) try_compile(COLLADADOM_RESULT -- 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(+) 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 61d49c273d0ad0a58ecd9dc54d8c48d43e17199a Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 23 Jun 2025 10:14:51 +0800 Subject: Exclude _M_ARM64 from including media plugin headers until we are ready to enable media plugins on Windows ARM64. --- indra/newview/llappviewer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 94e8fabcb2..d9596164eb 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -131,7 +131,7 @@ #include "stringize.h" #include "llcoros.h" #include "llexception.h" -#if 1 // !LL_LINUX +#if !_M_ARM64 // !LL_LINUX #include "cef/dullahan_version.h" #include "vlc/libvlc_version.h" #endif // LL_LINUX @@ -3427,7 +3427,7 @@ LLSD LLAppViewer::getViewerInfo() const info["VOICE_VERSION"] = LLTrans::getString("NotConnected"); } -#if 1 // !LL_LINUX +#if !_M_ARM64 // !LL_LINUX std::ostringstream cef_ver_codec; cef_ver_codec << "Dullahan: "; cef_ver_codec << DULLAHAN_VERSION_MAJOR; @@ -3457,7 +3457,7 @@ LLSD LLAppViewer::getViewerInfo() const info["LIBCEF_VERSION"] = "Undefined"; #endif -#if 1 // !LL_LINUX +#if !_M_ARM64 // !LL_LINUX std::ostringstream vlc_ver_codec; vlc_ver_codec << LIBVLC_VERSION_MAJOR; vlc_ver_codec << "."; -- cgit v1.3 From aac750c57fbd22814958a112d6c262254243130f Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 23 Jun 2025 10:20:10 +0800 Subject: Link clog too to Windows arm64 Megapahit.exe Referred from cpuinfo. --- indra/newview/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 1515addad4..c9a04a09cb 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2107,6 +2107,10 @@ if (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch target_link_libraries(${VIEWER_BINARY_NAME} llwebrtc ) endif () +if ($ENV{MSYSTEM_CARCH} MATCHES aarch64) + target_link_libraries(${VIEWER_BINARY_NAME} clog) +endif () + if (ENABLE_MEDIA_PLUGINS) target_link_libraries(${VIEWER_BINARY_NAME} ll::libvlc ) if (DARWIN OR LINUX) -- cgit v1.3 From ce7feccefb41764546a840d8e1abca12ea6e68c7 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 23 Jun 2025 10:23:36 +0800 Subject: No NVAPI on Windows ARM64 --- indra/cmake/NVAPI.cmake | 4 ++-- indra/newview/llappviewerwin32.cpp | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/indra/cmake/NVAPI.cmake b/indra/cmake/NVAPI.cmake index ff5a5428e0..1bec691a18 100644 --- a/indra/cmake/NVAPI.cmake +++ b/indra/cmake/NVAPI.cmake @@ -4,10 +4,10 @@ include(Prebuilt) set(NVAPI ON CACHE BOOL "Use NVAPI.") if (NVAPI) - if (WINDOWS) + if (WINDOWS AND NOT ($ENV{MSYSTEM_CARCH} MATCHES aarch64)) add_library( ll::nvapi INTERFACE IMPORTED ) target_link_libraries( ll::nvapi INTERFACE nvapi) use_prebuilt_binary(nvapi) - endif (WINDOWS) + endif () endif (NVAPI) diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 4f5fa53312..3e51a900ce 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -47,8 +47,10 @@ #include "llviewercontrol.h" #include "lldxhardware.h" +#if !_M_ARM64 #include "nvapi/nvapi.h" #include "nvapi/NvApiDriverSettings.h" +#endif #include @@ -206,6 +208,7 @@ LONG WINAPI catchallCrashHandler(EXCEPTION_POINTERS * /*ExceptionInfo*/) const std::string LLAppViewerWin32::sWindowClass = "Second Life"; +#if !_M_ARM64 /* This function is used to print to the command line a text message describing the nvapi error and quits @@ -219,6 +222,7 @@ void nvapi_error(NvAPI_Status status) //should always trigger when asserts are enabled //llassert(status == NVAPI_OK); } +#endif // Create app mutex creates a unique global windows object. // If the object can be created it returns true, otherwise @@ -241,6 +245,7 @@ bool create_app_mutex() return result; } +#if !_M_ARM64 void ll_nvapi_init(NvDRSSessionHandle hSession) { // (2) load all the system settings into the session @@ -395,6 +400,7 @@ void ll_nvapi_init(NvDRSSessionHandle hSession) return; } } +#endif //#define DEBUGGING_SEH_FILTER 1 #if DEBUGGING_SEH_FILTER @@ -464,6 +470,7 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, return -1; } +#if !_M_ARM64 NvDRSSessionHandle hSession = 0; static LLCachedControl use_nv_api(gSavedSettings, "NvAPICreateApplicationProfile", true); if (use_nv_api) @@ -488,6 +495,7 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, } } } +#endif // Have to wait until after logging is initialized to display LFH info if (num_heaps > 0) @@ -545,12 +553,14 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, delete viewer_app_ptr; viewer_app_ptr = NULL; +#if !_M_ARM64 // (NVAPI) (6) We clean up. This is analogous to doing a free() if (hSession) { NvAPI_DRS_DestroySession(hSession); hSession = 0; } +#endif return 0; } -- cgit v1.3 From ab2afc71751527c05cbcb00e04e06b69a1b05d21 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 23 Jun 2025 15:46:08 +0800 Subject: Fix the vcpkg Boost libraries suffix on Win arm64 This time for installation/packaging. --- indra/newview/ViewerInstall.cmake | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake index 27427c7145..61a8a4ee4e 100644 --- a/indra/newview/ViewerInstall.cmake +++ b/indra/newview/ViewerInstall.cmake @@ -119,18 +119,24 @@ elseif (WINDOWS) DESTINATION app_settings ) + if ($ENV{MSYSTEM_CARCH} MATCHES aarch64) + set(BOOST_PLATFORM a${ADDRESS_SIZE}) + else () + set(BOOST_PLATFORM x${ADDRESS_SIZE}) + endif () + install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${VIEWER_BINARY_NAME}.exe ${prefix_result}/../bin/OpenAL32.dll ${prefix_result}/../bin/alut.dll - ${prefix_result}/../bin/boost_context-vc143-mt-x${ADDRESS_SIZE}-1_88.dll - ${prefix_result}/../bin/boost_fiber-vc143-mt-x${ADDRESS_SIZE}-1_88.dll - ${prefix_result}/../bin/boost_filesystem-vc143-mt-x${ADDRESS_SIZE}-1_88.dll - ${prefix_result}/../bin/boost_json-vc143-mt-x${ADDRESS_SIZE}-1_88.dll - ${prefix_result}/../bin/boost_program_options-vc143-mt-x${ADDRESS_SIZE}-1_88.dll - ${prefix_result}/../bin/boost_thread-vc143-mt-x${ADDRESS_SIZE}-1_88.dll - ${prefix_result}/../bin/boost_url-vc143-mt-x${ADDRESS_SIZE}-1_88.dll + ${prefix_result}/../bin/boost_context-vc143-mt-${BOOST_PLATFORM}-1_88.dll + ${prefix_result}/../bin/boost_fiber-vc143-mt-${BOOST_PLATFORM}-1_88.dll + ${prefix_result}/../bin/boost_filesystem-vc143-mt-${BOOST_PLATFORM}-1_88.dll + ${prefix_result}/../bin/boost_json-vc143-mt-${BOOST_PLATFORM}-1_88.dll + ${prefix_result}/../bin/boost_program_options-vc143-mt-${BOOST_PLATFORM}-1_88.dll + ${prefix_result}/../bin/boost_thread-vc143-mt-${BOOST_PLATFORM}-1_88.dll + ${prefix_result}/../bin/boost_url-vc143-mt-${BOOST_PLATFORM}-1_88.dll ${prefix_result}/../bin/brotlicommon.dll ${prefix_result}/../bin/brotlidec.dll ${prefix_result}/../bin/bz2.dll @@ -158,8 +164,8 @@ elseif (WINDOWS) install( PROGRAMS - ${prefix_result}/../bin/boost_context-vc143-mt-x${ADDRESS_SIZE}-1_88.dll - ${prefix_result}/../bin/boost_fiber-vc143-mt-x${ADDRESS_SIZE}-1_88.dll + ${prefix_result}/../bin/boost_context-vc143-mt-${BOOST_PLATFORM}-1_88.dll + ${prefix_result}/../bin/boost_fiber-vc143-mt-${BOOST_PLATFORM}-1_88.dll ${prefix_result}/../bin/libapr-1.dll ${prefix_result}/../bin/libaprutil-1.dll ${prefix_result}/../bin/libexpat.dll -- cgit v1.3 From 3862a36ac846a9e8f892b079336d41299fee57a3 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 23 Jun 2025 16:07:34 +0800 Subject: Bundle OpenSSL & libcurl for Windows arm64 --- indra/newview/ViewerInstall.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake index 61a8a4ee4e..343c3fb9c7 100644 --- a/indra/newview/ViewerInstall.cmake +++ b/indra/newview/ViewerInstall.cmake @@ -120,6 +120,13 @@ elseif (WINDOWS) ) if ($ENV{MSYSTEM_CARCH} MATCHES aarch64) + install( + PROGRAMS + ${prefix_result}/../bin/libcrypto-3-arm64.dll + ${prefix_result}/../bin/libssl-3-arm64.dll + ${prefix_result}/../bin/libcurl.dll + DESTINATION . + ) set(BOOST_PLATFORM a${ADDRESS_SIZE}) else () set(BOOST_PLATFORM x${ADDRESS_SIZE}) -- cgit v1.3