From 67f55bad571044535f1d8c3b3c3afb5078249fd3 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Fri, 15 Oct 2010 17:49:06 +0200 Subject: RED-595: Manual merge with weekly-webkit. Plus some white space fixes (TABs --> spaces) in install.xml. --- linden/doc/contributions.txt | 2 + linden/indra/cmake/FindLLQtWebkit.cmake | 62 ++++++++++++++++++++ linden/indra/cmake/WebKitLibPlugin.cmake | 38 ++++++------ linden/indra/llwindow/llwindow.h | 2 +- linden/indra/llwindow/llwindowsdl.cpp | 3 +- linden/indra/newview/linux_tools/wrapper.sh | 13 ++--- linden/indra/newview/llfloaterhtmlhelp.cpp | 2 +- linden/indra/newview/llmediactrl.cpp | 3 +- linden/indra/newview/llstartup.cpp | 4 -- linden/indra/newview/secondlife-i686.supp | 44 -------------- .../newview/skins/default/xui/zh/mime_types.xml | 9 --- linden/indra/newview/viewer_manifest.py | 6 +- linden/install.xml | 68 +++++++++++----------- 13 files changed, 132 insertions(+), 124 deletions(-) create mode 100644 linden/indra/cmake/FindLLQtWebkit.cmake diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt index 931794c..4d3f017 100644 --- a/linden/doc/contributions.txt +++ b/linden/doc/contributions.txt @@ -80,6 +80,7 @@ Aleric Inglewood RED-578 RED-579 RED-581 + RED-595 Alissa Sabre VWR-81 VWR-83 @@ -512,6 +513,7 @@ Robin Cornelius VWR-2488 VWR-9557 VWR-12838 + RED-595 Ryozu Kojima VWR-53 VWR-287 diff --git a/linden/indra/cmake/FindLLQtWebkit.cmake b/linden/indra/cmake/FindLLQtWebkit.cmake new file mode 100644 index 0000000..c747ec3 --- /dev/null +++ b/linden/indra/cmake/FindLLQtWebkit.cmake @@ -0,0 +1,62 @@ +# -*- cmake -*- + +# - Find llqtwebkit +# Find the llqtwebkit includes and library +# This module defines +# LLQTWEBKIT_INCLUDE_DIR, where to find llqtwebkit.h, etc. +# LLQTWEBKIT_LIBRARY, the llqtwebkit library with full path. +# LLQTWEBKIT_FOUND, If false, do not try to use llqtwebkit. +# also defined, but not for general use are +# LLQTWEBKIT_LIBRARIES, the libraries needed to use llqtwebkit. +# LLQTWEBKIT_LIBRARY_DIRS, where to find the llqtwebkit library. +# LLQTWEBKIT_DEFINITIONS - You should add_definitions(${LLQTWEBKIT_DEFINITIONS}) +# before compiling code that includes llqtwebkit library files. + +# Try to use pkg-config first. +# This allows to have two different libllqtwebkit packages installed: +# one for viewer 2.x and one for viewer 1.x. +include(FindPkgConfig) +if (PKG_CONFIG_FOUND) + if (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION) + set(_PACKAGE_ARGS libllqtwebkit>=${LLQtWebkit_FIND_VERSION} REQUIRED) + else (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION) + set(_PACKAGE_ARGS libllqtwebkit) + endif (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION) + if (NOT "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_LESS "2.8") + # As virtually nobody will have a pkg-config file for this, do this check always quiet. + # Unfortunately cmake 2.8 or higher is required for pkg_check_modules to have a 'QUIET'. + set(_PACKAGE_ARGS ${_PACKAGE_ARGS} QUIET) + endif () + pkg_check_modules(LLQTWEBKIT ${_PACKAGE_ARGS}) +endif (PKG_CONFIG_FOUND) +set(LLQTWEBKIT_DEFINITIONS ${LLQTWEBKIT_CFLAGS_OTHER}) + +find_path(LLQTWEBKIT_INCLUDE_DIR llqtwebkit.h NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_INCLUDE_DIRS}) + +find_library(LLQTWEBKIT_LIBRARY NAMES llqtwebkit NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_LIBRARY_DIRS}) + +if (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND) # If pkg-config couldn't find it, pretend we don't have pkg-config. + set(LLQTWEBKIT_LIBRARIES llqtwebkit) + get_filename_component(LLQTWEBKIT_LIBRARY_DIRS ${LLQTWEBKIT_LIBRARY} PATH) +endif (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND) + +# Handle the QUIETLY and REQUIRED arguments and set LLQTWEBKIT_FOUND +# to TRUE if all listed variables are TRUE. +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + LLQTWEBKIT + DEFAULT_MSG + LLQTWEBKIT_LIBRARY + LLQTWEBKIT_INCLUDE_DIR + LLQTWEBKIT_LIBRARIES + LLQTWEBKIT_LIBRARY_DIRS + ) + +mark_as_advanced( + LLQTWEBKIT_LIBRARY + LLQTWEBKIT_INCLUDE_DIR + LLQTWEBKIT_LIBRARIES + LLQTWEBKIT_LIBRARY_DIRS + LLQTWEBKIT_DEFINITIONS + ) + diff --git a/linden/indra/cmake/WebKitLibPlugin.cmake b/linden/indra/cmake/WebKitLibPlugin.cmake index 23958fe..3eafe77 100644 --- a/linden/indra/cmake/WebKitLibPlugin.cmake +++ b/linden/indra/cmake/WebKitLibPlugin.cmake @@ -3,6 +3,7 @@ include(Linking) include(Prebuilt) if (STANDALONE) + find_package(LLQtWebkit REQUIRED QUIET) set(WEBKITLIBPLUGIN OFF CACHE BOOL "WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.") else (STANDALONE) @@ -31,25 +32,26 @@ if (WINDOWS) elseif (DARWIN) set(WEBKIT_PLUGIN_LIBRARIES optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib - debug ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib + debug ${ARCH_PREBUILT_DIRS_DEBUG}/libllqtwebkit.dylib ) elseif (LINUX) - if (STANDALONE) - set(WEBKIT_PLUGIN_LIBRARIES llqtwebkit) - else (STANDALONE) + if (STANDALONE) + set(WEBKIT_PLUGIN_LIBRARIES ${LLQTWEBKIT_LIBRARY}) + else (STANDALONE) set(WEBKIT_PLUGIN_LIBRARIES - llqtwebkit - qgif - qjpeg - QtWebKit - QtOpenGL - QtNetwork - QtGui - QtCore - fontconfig - X11 - Xrender - GL - ) - endif (STANDALONE) + llqtwebkit + qgif + qjpeg + QtWebKit + QtOpenGL + QtNetwork + QtGui + QtCore + jpeg + fontconfig + X11 + Xrender + GL + ) + endif (STANDALONE) endif (WINDOWS) diff --git a/linden/indra/llwindow/llwindow.h b/linden/indra/llwindow/llwindow.h index 2e96294..5e93ab3 100644 --- a/linden/indra/llwindow/llwindow.h +++ b/linden/indra/llwindow/llwindow.h @@ -196,7 +196,7 @@ public: // return a platform-specific window reference (HWND on Windows, WindowRef on the Mac, Gtk window on Linux) virtual void *getPlatformWindow() = 0; -// return the platform-specific window reference we use to initialize llmozlib (HWND on Windows, WindowRef on the Mac, Gtk window on Linux) +// return the platform-specific window reference we use to initialize llqtwebkitlib (HWND on Windows, WindowRef on the Mac, Gtk window on Linux) virtual void *getMediaWindow(); // control platform's Language Text Input mechanisms. diff --git a/linden/indra/llwindow/llwindowsdl.cpp b/linden/indra/llwindow/llwindowsdl.cpp index fa53c84..16106af 100644 --- a/linden/indra/llwindow/llwindowsdl.cpp +++ b/linden/indra/llwindow/llwindowsdl.cpp @@ -1606,6 +1606,7 @@ void LLWindowSDL::processMiscNativeEvents() // the locale to protect it, as exotic/non-C locales // causes our code lots of general critical weirdness // and crashness. (SL-35450) + // Note: It is unknown if this is still needed now that we use webkit. static std::string saved_locale; saved_locale = ll_safe_string(setlocale(LC_ALL, NULL)); @@ -2433,7 +2434,7 @@ void *LLWindowSDL::getPlatformWindow() return rtnw; } #endif // LL_GTK && LL_LLMOZLIB_ENABLED - // Unixoid mozilla really needs GTK. + llassert(false); // Do we even GET here at all? Note that LL_LLMOZLIB_ENABLED is never defined! return NULL; } diff --git a/linden/indra/newview/linux_tools/wrapper.sh b/linden/indra/newview/linux_tools/wrapper.sh index 8c47434..a43ebd5 100755 --- a/linden/indra/newview/linux_tools/wrapper.sh +++ b/linden/indra/newview/linux_tools/wrapper.sh @@ -106,17 +106,16 @@ if [ -n "$LL_TCMALLOC" ]; then fi fi fi -BINARY_SYSTEM=$(expr match "$(file -b /bin/uname)" '\(.*executable\)') -BINARY_VIEWER=$(expr match "$(file -b ${RUN_PATH}/bin/do-not-directly-run-imprudence-bin)" '\(.*executable\)') -echo "viewer: $BINARY_VIEWER system: $BINARY_SYSTEM" -if ( [ "$BINARY_SYSTEM" == "ELF 64-bit LSB executable" ] && [ "$BINARY_VIEWER" == "ELF 64-bit LSB executable" ] ); then - export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib64:"`pwd`"/lib32:"`pwd`"/app_settings/mozilla-runtime-linux-x86_64:"${LD_LIBRARY_PATH}"' +export VIEWER_BINARY='do-not-directly-run-imprudence-bin' +BINARY_TYPE=$(expr match "$(file -b bin/$VIEWER_BINARY)" '\(.*executable\)') +if [ "${BINARY_TYPE}" == "ELF 64-bit LSB executable" ]; then + export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib64:"`pwd`"/lib32:"${LD_LIBRARY_PATH}"' else - export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib:"`pwd`"/app_settings/mozilla-runtime-linux-i686:"${LD_LIBRARY_PATH}"' + export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib:"${LD_LIBRARY_PATH}"' fi -export SL_CMD='$LL_WRAPPER bin/do-not-directly-run-imprudence-bin' +export SL_CMD='$LL_WRAPPER bin/$VIEWER_BINARY' export SL_OPT="`cat gridargs.dat` $@" # Run the program diff --git a/linden/indra/newview/llfloaterhtmlhelp.cpp b/linden/indra/newview/llfloaterhtmlhelp.cpp index 1777403..1ec964b 100644 --- a/linden/indra/newview/llfloaterhtmlhelp.cpp +++ b/linden/indra/newview/llfloaterhtmlhelp.cpp @@ -534,7 +534,7 @@ void LLFloaterHtmlHelp::onStatusTextChange( const EventType& eventIn ) // void LLFloaterHtmlHelp::onLocationChange( const EventType& eventIn ) { - llinfos << "MOZ> Location changed to " << eventIn.getStringValue() << llendl; + llinfos << "WEB> Location changed to " << eventIn.getStringValue() << llendl; mCurrentUrl = std::string( eventIn.getStringValue() ); } diff --git a/linden/indra/newview/llmediactrl.cpp b/linden/indra/newview/llmediactrl.cpp index 1530598..c3bcf85 100644 --- a/linden/indra/newview/llmediactrl.cpp +++ b/linden/indra/newview/llmediactrl.cpp @@ -199,8 +199,9 @@ BOOL LLMediaCtrl::handleMouseUp( S32 x, S32 y, MASK mask ) { mMediaSource->mouseUp(x, y); - // *HACK: LLMediaImplLLMozLib automatically takes focus on mouseup, + // *HACK: media_plugin_webkit automatically takes focus on mouseup, // in addition to the onFocusReceived() call below. Undo this. JC + // RED-595: Is this really still the case for webkit? if (!mTakeFocusOnClick) { mMediaSource->focus(false); diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index bd22772..7bd5fff 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -199,10 +199,6 @@ #include #endif -#if LL_LIBXUL_ENABLED -#include "llmozlib.h" -#endif // LL_LIBXUL_ENABLED - #if LL_WINDOWS #include "llwindebug.h" #include "lldxhardware.h" diff --git a/linden/indra/newview/secondlife-i686.supp b/linden/indra/newview/secondlife-i686.supp index 43d4483..d70cda3 100644 --- a/linden/indra/newview/secondlife-i686.supp +++ b/linden/indra/newview/secondlife-i686.supp @@ -41,50 +41,6 @@ # - After you build the viewer, replace the stripped # do-not-directly-run-secondlife-bin binary with an unstripped copy. -# Mozilla noise. - -{ - Cond:mozilla-runtime/*.so - Memcheck:Cond - obj:*/mozilla-runtime-*/*.so -} - -{ - Value4:mozilla-runtime/*.so - Memcheck:Value4 - obj:*/mozilla-runtime-*/*.so -} - -{ - Cond:mozilla-runtime/*/*.so - Memcheck:Cond - obj:*/mozilla-runtime-*/*/*.so -} - -{ - Value4:mozilla-runtime/*/*.so - Memcheck:Value4 - obj:*/mozilla-runtime-*/*/*.so -} - -{ - Cond:mozilla-runtime/libmozjs.so - Memcheck:Cond - obj:*/libmozjs.so -} - -{ - Cond:mozilla-runtime/libxul - Memcheck:Cond - obj:*/libxul.so -} - -{ - Value4:mozilla-runtime/libxul - Memcheck:Value4 - obj:*/libxul.so -} - # libcurl badness. { diff --git a/linden/indra/newview/skins/default/xui/zh/mime_types.xml b/linden/indra/newview/skins/default/xui/zh/mime_types.xml index fc5fae4..0cc6f2f 100644 --- a/linden/indra/newview/skins/default/xui/zh/mime_types.xml +++ b/linden/indra/newview/skins/default/xui/zh/mime_types.xml @@ -1,14 +1,5 @@  - - (未知) - - - 无 - - - LLMediaImplLLMozLib -