diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/media_plugins/webkit/media_plugin_webkit.cpp | 36 | ||||
-rw-r--r-- | indra/newview/CMakeLists.txt | 27 | ||||
-rwxr-xr-x | indra/newview/viewer_manifest.py | 3 | ||||
-rw-r--r-- | indra/test_apps/llplugintest/CMakeLists.txt | 12 |
4 files changed, 51 insertions, 27 deletions
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 <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. diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 7815d19b8b..e17cee2219 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1351,41 +1351,22 @@ if (WINDOWS) ) if(WINDOWS) - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${VIEWER_BINARY_NAME}.exe.config - COMMAND ${PYTHON_EXECUTABLE} - ARGS - ${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py - ${CMAKE_CFG_INTDIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} - ${VIEWER_BINARY_NAME}.exe.config - COMMENT "Creating app.config file" - ) - - add_custom_target(create_app_config_file ALL - DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${VIEWER_BINARY_NAME}.exe.config - stage_third_party_libs - llcommon - llkdu - ) - # Copy Win Libs... # This happens at build time, not config time. We can't glob files in this cmake. # *FIX:Mani Write a sub script to glob the files... + # *FIX:Mani Use actually dependencies rather than bulk copy. add_custom_command( - TARGET create_app_config_file PRE_BUILD + TARGET ${VIEWER_BINARY_NAME} PRE_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR} - ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} + ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} COMMENT "Copying staged dlls." ) - add_dependencies(${VIEWER_BINARY_NAME} create_app_config_file) + add_dependencies(${VIEWER_BINARY_NAME} stage_third_party_libs llcommon llkdu) endif(WINDOWS) if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 8a3905633f..579bfaa4d9 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -314,9 +314,6 @@ class WindowsManifest(ViewerManifest): self.path("Microsoft.VC80.CRT.manifest") self.end_prefix() - # The config file name needs to match the exe's name. - self.path(src="%s/secondlife-bin.exe.config" % self.args['configuration'], dst=self.final_exe() + ".config") - # Vivox runtimes if self.prefix(src=self.args['configuration'], dst=""): self.path("SLVoice.exe") diff --git a/indra/test_apps/llplugintest/CMakeLists.txt b/indra/test_apps/llplugintest/CMakeLists.txt index 82f74417c6..295882c49a 100644 --- a/indra/test_apps/llplugintest/CMakeLists.txt +++ b/indra/test_apps/llplugintest/CMakeLists.txt @@ -341,7 +341,7 @@ endif (DARWIN) if(WINDOWS) #******************** - # Plugin test support + # Plugin test library deploy # # Debug config runtime files required for the plugin test mule set(plugintest_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug") @@ -441,11 +441,21 @@ if(WINDOWS) ) set(plugin_test_targets ${plugin_test_targets} ${out_targets}) + copy_if_different( + "${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}" + "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}" + out_targets + llcommon.dll libapr-1.dll libaprutil-1.dll libapriconv-1.dll + ) + set(plugin_test_targets ${plugin_test_targets} ${out_targets}) + add_custom_target(copy_plugintest_libs ALL DEPENDS ${plugin_test_targets} + llcommon ) add_dependencies(llmediaplugintest copy_plugintest_libs) + endif(WINDOWS) |