From 17f9fd5f9653077b6059b34147a447310a30daec Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Fri, 25 Sep 2009 19:23:24 -0700 Subject: Changes force no crt manifest linking in windows plugin files. --- indra/media_plugins/quicktime/CMakeLists.txt | 8 ++++++++ indra/media_plugins/webkit/CMakeLists.txt | 8 ++++++++ 2 files changed, 16 insertions(+) (limited to 'indra/media_plugins') 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( -- cgit v1.2.3 From 65d8a5a11b3b6aa2a7d0e972dfaa90a3aaf02e07 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Mon, 28 Sep 2009 17:57:51 -0700 Subject: Changed win32 generation of initial 'component_path' for webkit plugin. DllMain() captures module handle. Call to GetModuleFilePathA() gets the dll filepath, Filename is trimmed off. --- indra/media_plugins/webkit/media_plugin_webkit.cpp | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'indra/media_plugins') diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 2928b7e6b3..b1bb5f23b9 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -48,6 +48,18 @@ #include #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. -- cgit v1.2.3