summaryrefslogtreecommitdiff
path: root/indra/media_plugins
diff options
context:
space:
mode:
authorbrad kittenbrink <brad@lindenlab.com>2009-10-07 17:51:28 -0700
committerbrad kittenbrink <brad@lindenlab.com>2009-10-07 17:51:28 -0700
commit50247533f99f374be71728cc5ca00f0444189a9f (patch)
treec1505ec3ec9c054447fb98968c9299e502857000 /indra/media_plugins
parent146e084af3344ada737340115c5fa063c0aab6b3 (diff)
parentd885db79f94ee3d6a2b4ed7febe7beb69d0c7d51 (diff)
Merged latest viewer/login-api with latest viewer/viewer-20
Diffstat (limited to 'indra/media_plugins')
-rw-r--r--indra/media_plugins/quicktime/CMakeLists.txt8
-rw-r--r--indra/media_plugins/webkit/CMakeLists.txt8
-rw-r--r--indra/media_plugins/webkit/media_plugin_webkit.cpp36
3 files changed, 52 insertions, 0 deletions
diff --git a/indra/media_plugins/quicktime/CMakeLists.txt b/indra/media_plugins/quicktime/CMakeLists.txt
index db11c9ae21..f0b8f0d167 100644
--- a/indra/media_plugins/quicktime/CMakeLists.txt
+++ b/indra/media_plugins/quicktime/CMakeLists.txt
@@ -56,6 +56,14 @@ add_dependencies(media_plugin_quicktime
${LLCOMMON_LIBRARIES}
)
+if (WINDOWS)
+ set_target_properties(
+ media_plugin_quicktime
+ PROPERTIES
+ LINK_FLAGS "/MANIFEST:NO"
+ )
+endif (WINDOWS)
+
if (QUICKTIME)
add_definitions(-DLL_QUICKTIME_ENABLED=1)
diff --git a/indra/media_plugins/webkit/CMakeLists.txt b/indra/media_plugins/webkit/CMakeLists.txt
index d96477279d..5bccd589d8 100644
--- a/indra/media_plugins/webkit/CMakeLists.txt
+++ b/indra/media_plugins/webkit/CMakeLists.txt
@@ -52,6 +52,14 @@ add_dependencies(media_plugin_webkit
${LLCOMMON_LIBRARIES}
)
+if (WINDOWS)
+ set_target_properties(
+ media_plugin_webkit
+ PROPERTIES
+ LINK_FLAGS "/MANIFEST:NO"
+ )
+endif (WINDOWS)
+
if (DARWIN)
# Don't prepend 'lib' to the executable name, and don't embed a full path in the library's install name
set_target_properties(
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index eb2457744a..1b71ba1769 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -48,6 +48,18 @@
#include <stdlib.h>
#endif
+#if LL_WINDOWS
+ // *NOTE:Mani - This captures the module handle fo rthe dll. This is used below
+ // to get the path to this dll for webkit initialization.
+ // I don't know how/if this can be done with apr...
+ namespace { HMODULE gModuleHandle;};
+ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+ {
+ gModuleHandle = (HMODULE) hinstDLL;
+ return TRUE;
+ }
+#endif
+
////////////////////////////////////////////////////////////////////////////////
//
class MediaPluginWebKit :
@@ -126,7 +138,31 @@ private:
return false;
}
std::string application_dir = std::string( cwd );
+
+#if LL_WINDOWS
+ //*NOTE:Mani - On windows, at least, the component path is the
+ // location of this dll's image file.
+ std::string component_dir;
+ char dll_path[_MAX_PATH];
+ DWORD len = GetModuleFileNameA(gModuleHandle, (LPCH)&dll_path, _MAX_PATH);
+ while(len && dll_path[ len ] != ('\\') )
+ {
+ len--;
+ }
+ if(len >= 0)
+ {
+ dll_path[len] = 0;
+ component_dir = dll_path;
+ }
+ else
+ {
+ // *NOTE:Mani - This case should be an rare exception.
+ // GetModuleFileNameA should always give you a full path, no?
+ component_dir = application_dir;
+ }
+#else
std::string component_dir = application_dir;
+#endif
std::string profileDir = application_dir + "/" + "browser_profile"; // cross platform?
// window handle - needed on Windows and must be app window.