summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-08-03 19:48:02 +0800
committerErik Kundiman <erik@megapahit.org>2024-08-03 19:48:02 +0800
commitb89076f0567547b9c2749595af5ae9d5f9de9f3a (patch)
tree61bdffca799f17224fbbf304b626d8d347826297
parent1ebb604236b984c35c52d05f6d87f256b7f49e02 (diff)
parent4ba836ed2f4a67b976a87923c1deaaf2d3ae4880 (diff)
Merge branch 'main' into webrtc-voice
-rw-r--r--CONTRIBUTING.md6
-rw-r--r--README.md9
-rw-r--r--indra/cmake/LibVLCPlugin.cmake4
-rw-r--r--indra/llimage/llimagejpeg.cpp8
-rw-r--r--indra/media_plugins/libvlc/CMakeLists.txt4
-rw-r--r--indra/newview/ViewerInstall.cmake13
-rw-r--r--indra/newview/llviewermedia.cpp2
7 files changed, 34 insertions, 12 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 99876c8119..de04cf5683 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -29,7 +29,7 @@ developer-to-developer or support.
roadmap. Github issues are useful for collaboration between viewer forks
and the official upstream and when engineering-specific and technical
collaboration is beneficial.
-- The [In-world group][] and [Discord][] exist for many topics including content creation,
+- The [in-world group][] and [Discord][] exist for many topics including content creation,
scripting, social topics and more, and are useful for announcements and
discussion between viewer maintainers.
@@ -39,7 +39,7 @@ developer-to-developer or support.
Report bugs and provide ideas for features using the respective board on Megapahit's
feedback portal:
-- [Viewer bugs and features](https://megapahit.com/enter_bug.cgi)
+- [Viewer bugs and features](https://megapahit.com/enter_bug.cgi?product=Viewer)
Creating posts on Bugzilla is important as it allows the greatest
exposure and input from Second Life users. It also allows Megapahit staff to
@@ -65,5 +65,5 @@ reference for best git practices.
[IRC]: irc://megapahit.net/#viewer
[PR etiquette]: https://gist.github.com/mikepea/863f63d6e37281e329f8
[Github issues]: https://github.com/megapahit/viewer/issues
-[In-world group]: https://world.secondlife.com/group/1142646c-5fb2-162c-ecf8-c5e422ab5c6d
+[in-world group]: https://world.secondlife.com/group/1142646c-5fb2-162c-ecf8-c5e422ab5c6d
[Discord]: https://discord.gg/jpt33HPVEK
diff --git a/README.md b/README.md
index 5526cd0c9d..94d171845c 100644
--- a/README.md
+++ b/README.md
@@ -37,13 +37,14 @@ $ git switch -c megapahit
### macOS
```
-$ sudo port install cmake pkgconfig apr-util +universal boost +universal collada-dom +universal hunspell +universal jsoncpp +universal openjpeg +universal libsdl2 +universal uriparser +universal
+$ sudo port install cmake pkgconfig apr-util +universal boost +universal collada-dom +universal hunspell +universal jsoncpp +universal openjpeg +universal libsdl2 +universal uriparser +universal libvorbis +universal
$ mkdir -p build/universal-apple-darwin`uname -r`/packages
$ cd ~/Downloads
-$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -OL https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwinuniversal-233471337.tar.bz2 -OL https://github.com/secondlife/3p-emoji-shortcodes/releases/download/v6.1.0.5413f58/emoji_shortcodes-6.1.0.5413f58-darwin64-5413f58.tar.zst -OL https://github.com/secondlife/3p-glh_linear/releases/download/v1.0.1-dev4-984c397/glh_linear-1.0.1-dev4-common-984c397.tar.zst -OL https://github.com/secondlife/llca/releases/download/v202402012004.0-0f5d9c3/llca-202402012004.0-common-0f5d9c3.tar.zst -L https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.21.tar.gz -o meshoptimizer-0.21.tar.gz -OL https://github.com/secondlife/3p-mikktspace/releases/download/v2-e967e1b/mikktspace-1-darwin64-8756084692.tar.zst -OL https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115452/994130/nanosvg-2022.09.27-darwin64-580364.tar.bz2 -OL https://github.com/secondlife/3p-libndofdev/releases/download/v0.1.8e9edc7/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst -L https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz -o openjpeg-2.5.2.tar.gz -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst -OL https://github.com/secondlife/3p-tinyexr/releases/download/v1.0.8-ba4bc64/tinyexr-v1.0.8-common-9373975608.tar.zst -OL https://github.com/secondlife/3p-tinygltf/releases/download/v2.5.0-1ae57fd/tinygltf-v2.5.0-common-1ae57fd.tar.zst -OL https://github.com/secondlife/3p-viewer-fonts/releases/download/v1.0.0-r1/viewer_fonts-1.0.0.8512067490-common-8512067490.tar.zst -OL https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.61/webrtc-m114.5735.08.61.9571920264-darwin64-9571920264.tar.zst -OL https://github.com/crow-misia/libwebrtc-bin/releases/download/114.5735.6.1/libwebrtc-macos-arm64.tar.xz -OL https://sourceforge.net/projects/xmlrpc-epi/files/xmlrpc-epi-base/0.54.2/xmlrpc-epi-0.54.2.tar.bz2
+$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -OL https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwinuniversal-233471337.tar.bz2 -OL https://github.com/secondlife/3p-emoji-shortcodes/releases/download/v6.1.0.5413f58/emoji_shortcodes-6.1.0.5413f58-darwin64-5413f58.tar.zst -OL https://github.com/secondlife/3p-glh_linear/releases/download/v1.0.1-dev4-984c397/glh_linear-1.0.1-dev4-common-984c397.tar.zst -OL https://github.com/secondlife/llca/releases/download/v202402012004.0-0f5d9c3/llca-202402012004.0-common-0f5d9c3.tar.zst -L https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.21.tar.gz -o meshoptimizer-0.21.tar.gz -OL https://github.com/secondlife/3p-mikktspace/releases/download/v2-e967e1b/mikktspace-1-darwin64-8756084692.tar.zst -OL https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115452/994130/nanosvg-2022.09.27-darwin64-580364.tar.bz2 -OL https://github.com/secondlife/3p-libndofdev/releases/download/v0.1.8e9edc7/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst -L https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz -o openjpeg-2.5.2.tar.gz -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst -OL https://github.com/secondlife/3p-tinyexr/releases/download/v1.0.8-ba4bc64/tinyexr-v1.0.8-common-9373975608.tar.zst -OL https://github.com/secondlife/3p-tinygltf/releases/download/v2.5.0-1ae57fd/tinygltf-v2.5.0-common-1ae57fd.tar.zst -OL https://github.com/secondlife/3p-viewer-fonts/releases/download/v1.0.0-r1/viewer_fonts-1.0.0.8512067490-common-8512067490.tar.zst -OL https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-universal.dmg -OL https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.61/webrtc-m114.5735.08.61.9571920264-darwin64-9571920264.tar.zst -OL https://github.com/crow-misia/libwebrtc-bin/releases/download/114.5735.6.1/libwebrtc-macos-arm64.tar.xz -OL https://sourceforge.net/projects/xmlrpc-epi/files/xmlrpc-epi-base/0.54.2/xmlrpc-epi-0.54.2.tar.bz2
$ cd -
$ cd ..
$ open ~/Downloads/fmodstudioapi20222mac-installer.dmg
+$ open ~/Downloads/vlc-3.0.21-universal.dmg
$ mkdir -p viewer/build/universal-apple-darwin`uname -r`/packages/include/fmodstudio
$ cp /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod*.h* viewer/build/universal-apple-darwin`uname -r`/packages/include/fmodstudio/
$ cp /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/lib/libfmod.dylib viewer/build/universal-apple-darwin`uname -r`/packages/lib/release/
@@ -134,7 +135,7 @@ $ cd /opt/local/include
$ sudo curl -OL https://raw.githubusercontent.com/DLTcollab/sse2neon/master/sse2neon.h
$ cd -
$ export LL_BUILD="-O3 -gdwarf-2 -stdlib=libc++ -iwithsysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -std=c++17 -fPIC -DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -DNDEBUG -DPIC -DLL_DARWIN=1"
-$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=newview/$project.app/Contents/Resources -DCMAKE_OSX_ARCHITECTURES:STRING="arm64;x86_64" -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=OFF ../../indra
+$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=newview/Megapahit.app/Contents/Resources -DCMAKE_OSX_ARCHITECTURES:STRING="arm64;x86_64" -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=OFF ../../indra
$ cmake ../../indra
$ make -j`sysctl -n hw.ncpu`
$ make install
@@ -203,7 +204,7 @@ $ megapahit
#### Ubuntu 24.04
```
-$ sudo apt install pkg-config libaprutil1-dev libboost-fiber-dev libboost-program-options-dev libboost-regex-dev libcollada-dom-dev libexpat1-dev libfltk1.3-dev libglu1-mesa-dev libhunspell-dev libjsoncpp-dev libmeshoptimizer-dev libnanosvg-dev libnghttp2-dev libsdl2-dev liburiparser-dev libvlc-dev libvlccore-dev libvorbis-dev libxmlrpc-epi-dev libxxhash-dev
+$ sudo apt install pkg-config libaprutil1-dev libboost-fiber-dev libboost-program-options-dev libboost-regex-dev libcollada-dom-dev libexpat1-dev libfltk1.3-dev libglu1-mesa-dev libhunspell-dev libjsoncpp-dev libmeshoptimizer-dev libnanosvg-dev libnghttp2-dev libpipewire-0.3-dev libsdl2-dev liburiparser-dev libvlc-dev libvlccore-dev libvorbis-dev libxmlrpc-epi-dev libxxhash-dev
$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DCPACK_PACKAGE_NAME:STRING=megapahit -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE:STRING=amd64 -DCPACK_DEBIAN_PACKAGE_DESCRIPTION:STRING="A fork of the Second Life viewer" -DCPACK_DEBIAN_PACKAGE_MAINTAINER:STRING=$USER@$HOST -DCPACK_DEBIAN_PACKAGE_SECTION:STRING=net -DCPACK_DEBIAN_PACKAGE_DEPENDES:STRING="libaprutil1t64, libboost-fiber1.83.0, libboost-program-options1.83.0, libboost-regex1.83.0, libboost-thread1.83.0, libcollada-dom2.5-dp0, libexpat1, libfltk2.0-0t64, libglu1-mesa, libhunspell-1.7-0, libjsoncpp25, libmeshoptimizer2d, libnghttp2-14, libsdl2-2.0-0, liburiparser1, libvlc5, libvorbisenc2, libvorbisfile3, libxmlrpc-epi0t64, vlc-plugin-base" ../../indra
$ cmake ../../indra
$ make -j`nproc`
diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake
index 66dc13d126..9f0419c5e6 100644
--- a/indra/cmake/LibVLCPlugin.cmake
+++ b/indra/cmake/LibVLCPlugin.cmake
@@ -11,8 +11,8 @@ set(LIBVLCPLUGIN ON CACHE BOOL
"LIBVLCPLUGIN support for the llplugin/llmedia test apps.")
else ()
if (DARWIN)
- target_include_directories( ll::libvlc SYSTEM INTERFACE /Applications/VLC.app/Contents/MacOS/include)
- target_link_directories( ll::libvlc INTERFACE /Applications/VLC.app/Contents/MacOS/lib)
+ 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 )
else ()
include(FindPkgConfig)
diff --git a/indra/llimage/llimagejpeg.cpp b/indra/llimage/llimagejpeg.cpp
index 93f1d0cdc4..a6da2f66ab 100644
--- a/indra/llimage/llimagejpeg.cpp
+++ b/indra/llimage/llimagejpeg.cpp
@@ -77,11 +77,13 @@ bool LLImageJPEG::updateData()
//try/catch will crash on Mac and Linux if LLImageJPEG::errorExit throws an error
//so as instead, we use setjmp/longjmp to avoid this crash, which is the best we can get. --bao
//
+#if !(LL_DARWIN && defined(__arm64__))
if(setjmp(sSetjmpBuffer))
{
jpeg_destroy_decompress(&cinfo);
return false;
}
+#endif
try
{
// Now we can initialize the JPEG decompression object.
@@ -218,11 +220,13 @@ bool LLImageJPEG::decode(LLImageRaw* raw_image, F32 decode_time)
//try/catch will crash on Mac and Linux if LLImageJPEG::errorExit throws an error
//so as instead, we use setjmp/longjmp to avoid this crash, which is the best we can get. --bao
//
+#if !(LL_DARWIN && defined(__arm64__))
if(setjmp(sSetjmpBuffer))
{
jpeg_destroy_decompress(&cinfo);
return true; // done
}
+#endif
try
{
// Now we can initialize the JPEG decompression object.
@@ -426,7 +430,9 @@ void LLImageJPEG::errorExit( j_common_ptr cinfo )
jpeg_destroy(cinfo);
// Return control to the setjmp point
+#if !(LL_DARWIN && defined(__arm64__))
longjmp(sSetjmpBuffer, 1) ;
+#endif
}
// Decide whether to emit a trace or warning message.
@@ -535,6 +541,7 @@ bool LLImageJPEG::encode( const LLImageRaw* raw_image, F32 encode_time )
//try/catch will crash on Mac and Linux if LLImageJPEG::errorExit throws an error
//so as instead, we use setjmp/longjmp to avoid this crash, which is the best we can get. --bao
//
+#if !(LL_DARWIN && defined(__arm64__))
if( setjmp(sSetjmpBuffer) )
{
// If we get here, the JPEG code has signaled an error.
@@ -545,6 +552,7 @@ bool LLImageJPEG::encode( const LLImageRaw* raw_image, F32 encode_time )
mOutputBufferSize = 0;
return false;
}
+#endif
try
{
diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt
index 8600358b0c..3c499b0cbd 100644
--- a/indra/media_plugins/libvlc/CMakeLists.txt
+++ b/indra/media_plugins/libvlc/CMakeLists.txt
@@ -70,8 +70,8 @@ if (DARWIN)
-change "/opt/local/lib/liburiparser.1.dylib" "@loader_path/../../Frameworks/liburiparser.1.dylib"
-change "/opt/local/lib/libnghttp2.14.dylib" "@loader_path/../../Frameworks/libnghttp2.14.dylib"
-change "/usr/local/lib/libxmlrpc-epi.0.dylib" "@loader_path/../../Frameworks/libxmlrpc-epi.0.dylib"
- -change "@rpath/libvlc.dylib" "@loader_path/../../Frameworks/libvlc.dylib"
- -change "@rpath/libvlccore.dylib" "@loader_path/../../Frameworks/libvlccore.dylib"
+ -change "@rpath/libvlc.dylib" "@loader_path/plugins/libvlc.dylib"
+ -change "@rpath/libvlccore.dylib" "@loader_path/plugins/libvlccore.dylib"
"$<TARGET_FILE:media_plugin_libvlc>"
VERBATIM
COMMENT "Fixing paths to LibVLC media plugin dependencies"
diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake
index cf82044fb8..b468f1af99 100644
--- a/indra/newview/ViewerInstall.cmake
+++ b/indra/newview/ViewerInstall.cmake
@@ -114,6 +114,19 @@ if (DARWIN)
)
install(DIRECTORY
+ /Volumes/VLC\ media\ player/VLC.app/Contents/MacOS/plugins
+ DESTINATION llplugin
+ )
+
+ install(FILES
+ /Volumes/VLC\ media\ player/VLC.app/Contents/MacOS/lib/libvlc.5.dylib
+ /Volumes/VLC\ media\ player/VLC.app/Contents/MacOS/lib/libvlc.dylib
+ /Volumes/VLC\ media\ player/VLC.app/Contents/MacOS/lib/libvlccore.9.dylib
+ /Volumes/VLC\ media\ player/VLC.app/Contents/MacOS/lib/libvlccore.dylib
+ DESTINATION llplugin/plugins
+ )
+
+ install(DIRECTORY
"${AUTOBUILD_INSTALL_DIR}/lib/release/Chromium Embedded Framework.framework"
DESTINATION ../Frameworks
)
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index e86cb7ab39..7b5eb581fe 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -397,7 +397,7 @@ std::string LLViewerMedia::getCurrentUserAgent()
// This was also helpful:
// http://www.mozilla.org/build/revised-user-agent-strings.html
std::ostringstream codec;
- codec << "SecondLife/";
+ codec << "Megapahit/";
codec << LLVersionInfo::instance().getVersion();
codec << " (" << channel << "; " << skin_name << " skin)";
LL_INFOS() << codec.str() << LL_ENDL;