summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-01-18 13:03:49 +0800
committerErik Kundiman <erik@megapahit.org>2024-01-18 14:23:53 +0800
commit62920151b1365dde59937e8381512fc35712bb31 (patch)
tree1014eab598507f6a173df065dbaeaf55c503a74e /indra/newview
parent729f8fa037219cdf0fd42b78866e869dc5ee8227 (diff)
GNU/Linux internal web browser
The lllibs need to be built as static libs now, otherwise SLPlugin would lose reference to gSavedSettings. The media plugins still need to be built as dynamic libs however, so they can't rely on the condition in LibraryInstall.cmake any more. Since the Megapahit viewer, when built using GCC, is using the default value for _GLIBCXX_USE_CXX11_ABI (which is 1 for the newer C++11 ABI as opposed to 0 for the older C++03 ABI), the Dullahan dependency needs to be built with the very same _GLIBCXX_USE_CXX11_ABI setting too, otherwise apr_dso would fail at loading libmedia_plugin_cef.so because of the failure to refer to the setOnConsoleMessageCallback function with strictly the same (not differing between std::__cxx11::basic_string vs. std::basic_string) parameter types. The CEF build is Spotify's, so no live streaming support, while the Dullahan package used by the viewer was built using Kokua's dullahan fork. After rebuilding it with _GLIBCXX_USE_CXX11_ABI kept at default by not overriding it in variables (from the build-variables repo), the order of the target link libraries in CEFPlugin.cmake doesn't seem to matter any more (it did before!). Now EXTERNAL_TOS can be safely omitted from GNU/Linux added compile definitions (but still used on FreeBSD).
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/CMakeLists.txt10
-rw-r--r--indra/newview/ViewerInstall.cmake35
-rw-r--r--indra/newview/llappviewer.cpp4
-rw-r--r--indra/newview/llviewermedia.cpp4
-rw-r--r--indra/newview/skins/default/xui/en/mime_types_linux.xml40
5 files changed, 62 insertions, 31 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index eb5936132b..3c0fd97bcc 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -61,9 +61,9 @@ include(URIPARSER)
include(LLPrimitive)
if (ENABLE_MEDIA_PLUGINS)
include(LibVLCPlugin)
- if (DARWIN)
+ if (DARWIN OR LINUX)
include(CEFPlugin)
- endif (DARWIN)
+ endif (DARWIN OR LINUX)
endif (ENABLE_MEDIA_PLUGINS)
include(UnixInstall)
@@ -1961,9 +1961,9 @@ target_link_libraries(${VIEWER_BINARY_NAME}
if (ENABLE_MEDIA_PLUGINS)
target_link_libraries(${VIEWER_BINARY_NAME} ll::libvlc )
- if (DARWIN)
+ if (DARWIN OR LINUX)
target_link_libraries(${VIEWER_BINARY_NAME} ll::cef )
- endif (DARWIN)
+ endif (DARWIN OR LINUX)
endif (ENABLE_MEDIA_PLUGINS)
if( TARGET ll::intel_memops )
@@ -2149,7 +2149,7 @@ if (DARWIN)
)
if (ENABLE_MEDIA_PLUGINS)
- if (DARWIN)
+ if (DARWIN OR LINUX)
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc media_plugin_cef)
else (DARWIN)
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc)
diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake
index 18f34cc8ff..93601865f9 100644
--- a/indra/newview/ViewerInstall.cmake
+++ b/indra/newview/ViewerInstall.cmake
@@ -6,6 +6,41 @@ install(PROGRAMS linux_tools/launch_url.sh
DESTINATION libexec/${VIEWER_BINARY_NAME}
)
+if (LINUX)
+ if (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu)
+ set(_LIB lib/${ARCH}-linux-gnu)
+ elseif (EXISTS /lib64)
+ set(_LIB lib64)
+ else ()
+ set(_LIB lib)
+ endif ()
+ install(FILES
+ ${AUTOBUILD_INSTALL_DIR}/lib/release/libcef.so
+ ${AUTOBUILD_INSTALL_DIR}/lib/release/libminigbm.so
+ DESTINATION ${_LIB})
+ install(PROGRAMS
+ ${AUTOBUILD_INSTALL_DIR}/bin/release/chrome-sandbox
+ DESTINATION libexec/${VIEWER_BINARY_NAME}
+ PERMISSIONS SETUID OWNER_READ OWNER_WRITE OWNER_EXECUTE
+ GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+ install(PROGRAMS
+ ${AUTOBUILD_INSTALL_DIR}/bin/release/dullahan_host
+ DESTINATION libexec/${VIEWER_BINARY_NAME})
+ install(FILES
+ ${AUTOBUILD_INSTALL_DIR}/bin/release/snapshot_blob.bin
+ ${AUTOBUILD_INSTALL_DIR}/bin/release/v8_context_snapshot.bin
+ DESTINATION ${_LIB})
+ 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
+ DESTINATION ${_LIB})
+ install(DIRECTORY
+ ${AUTOBUILD_INSTALL_DIR}/resources/locales
+ DESTINATION ${_LIB})
+endif (LINUX)
+
install(DIRECTORY skins app_settings fonts
DESTINATION share/${VIEWER_BINARY_NAME}
PATTERN ".svn" EXCLUDE
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index c2da6eaede..3128ff0e51 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -132,7 +132,7 @@
#include "stringize.h"
#include "llcoros.h"
#include "llexception.h"
-#if LL_DARWIN
+#if LL_DARWIN || LL_LINUX
#include "cef/dullahan_version.h"
#endif
#include "vlc/libvlc_version.h"
@@ -3367,7 +3367,7 @@ LLSD LLAppViewer::getViewerInfo() const
info["VOICE_VERSION"] = LLTrans::getString("NotConnected");
}
-#if LL_DARWIN
+#if LL_DARWIN || LL_LINUX
std::ostringstream cef_ver_codec;
cef_ver_codec << "Dullahan: ";
cef_ver_codec << DULLAHAN_VERSION_MAJOR;
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 02108e861a..26c473df76 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1733,9 +1733,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
}
else if(LLFile::stat(plugin_name, &s))
{
-#if !LL_LINUX
LL_WARNS_ONCE("Media") << "Couldn't find plugin at " << plugin_name << LL_ENDL;
-#endif
}
else
{
@@ -1789,9 +1787,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
}
}
}
-#if !LL_LINUX
LL_WARNS_ONCE("Plugin") << "plugin initialization failed for mime type: " << media_type << LL_ENDL;
-#endif
if(gAgent.isInitialized())
{
diff --git a/indra/newview/skins/default/xui/en/mime_types_linux.xml b/indra/newview/skins/default/xui/en/mime_types_linux.xml
index 7188b1e699..a130d2b0e9 100644
--- a/indra/newview/skins/default/xui/en/mime_types_linux.xml
+++ b/indra/newview/skins/default/xui/en/mime_types_linux.xml
@@ -7,7 +7,7 @@
none
</defaultwidget>
<defaultimpl>
- media_plugin_webkit
+ media_plugin_cef
</defaultimpl>
<widgetset name="web">
<label name="web_label">
@@ -141,7 +141,7 @@
none
</widgettype>
<impl>
- media_plugin_webkit
+ media_plugin_cef
</impl>
</mimetype>
<mimetype name="none/none">
@@ -152,7 +152,7 @@
none
</widgettype>
<impl>
- media_plugin_webkit
+ media_plugin_cef
</impl>
</mimetype>
<mimetype name="audio/*">
@@ -185,7 +185,7 @@
image
</widgettype>
<impl>
- media_plugin_webkit
+ media_plugin_cef
</impl>
</mimetype>
<mimetype menu="1" name="video/vnd.secondlife.qt.legacy">
@@ -207,7 +207,7 @@
web
</widgettype>
<impl>
- media_plugin_webkit
+ media_plugin_cef
</impl>
</mimetype>
<mimetype name="application/ogg">
@@ -229,7 +229,7 @@
image
</widgettype>
<impl>
- media_plugin_webkit
+ media_plugin_cef
</impl>
</mimetype>
<mimetype name="application/postscript">
@@ -240,7 +240,7 @@
image
</widgettype>
<impl>
- media_plugin_webkit
+ media_plugin_cef
</impl>
</mimetype>
<mimetype name="application/rtf">
@@ -251,7 +251,7 @@
image
</widgettype>
<impl>
- media_plugin_webkit
+ media_plugin_cef
</impl>
</mimetype>
<mimetype name="application/smil">
@@ -262,7 +262,7 @@
movie
</widgettype>
<impl>
- media_plugin_webkit
+ media_plugin_cef
</impl>
</mimetype>
<mimetype name="application/xhtml+xml">
@@ -273,7 +273,7 @@
web
</widgettype>
<impl>
- media_plugin_webkit
+ media_plugin_cef
</impl>
</mimetype>
<mimetype name="application/x-director">
@@ -284,7 +284,7 @@
image
</widgettype>
<impl>
- media_plugin_webkit
+ media_plugin_cef
</impl>
</mimetype>
<mimetype name="audio/mid">
@@ -339,7 +339,7 @@
image
</widgettype>
<impl>
- media_plugin_webkit
+ media_plugin_cef
</impl>
</mimetype>
<mimetype menu="1" name="image/gif">
@@ -350,7 +350,7 @@
image
</widgettype>
<impl>
- media_plugin_webkit
+ media_plugin_cef
</impl>
</mimetype>
<mimetype menu="1" name="image/jpeg">
@@ -361,7 +361,7 @@
image
</widgettype>
<impl>
- media_plugin_webkit
+ media_plugin_cef
</impl>
</mimetype>
<mimetype menu="1" name="image/png">
@@ -372,7 +372,7 @@
image
</widgettype>
<impl>
- media_plugin_webkit
+ media_plugin_cef
</impl>
</mimetype>
<mimetype name="image/svg+xml">
@@ -383,7 +383,7 @@
image
</widgettype>
<impl>
- media_plugin_webkit
+ media_plugin_cef
</impl>
</mimetype>
<mimetype menu="1" name="image/tiff">
@@ -394,7 +394,7 @@
image
</widgettype>
<impl>
- media_plugin_webkit
+ media_plugin_cef
</impl>
</mimetype>
<mimetype menu="1" name="text/html">
@@ -405,7 +405,7 @@
web
</widgettype>
<impl>
- media_plugin_webkit
+ media_plugin_cef
</impl>
</mimetype>
<mimetype menu="1" name="text/plain">
@@ -416,7 +416,7 @@
text
</widgettype>
<impl>
- media_plugin_webkit
+ media_plugin_cef
</impl>
</mimetype>
<mimetype name="text/xml">
@@ -427,7 +427,7 @@
text
</widgettype>
<impl>
- media_plugin_webkit
+ media_plugin_cef
</impl>
</mimetype>
<mimetype menu="1" name="video/mpeg">