From 6da0725c3b75c24855537df877672595de8e56e6 Mon Sep 17 00:00:00 2001 From: brad Date: Fri, 26 Jun 2009 15:10:53 -0400 Subject: Moved LLAPRSockStream out of llcommon into eventhost module so I can reenable its tests in the new world order. --- indra/llcommon/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index ecb6c283db..4ba74ab837 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -24,7 +24,6 @@ set(llcommon_SOURCE_FILES llallocator_heap_profile.cpp llapp.cpp llapr.cpp - llaprsockstream.cpp llassettype.cpp llbase32.cpp llbase64.cpp @@ -102,7 +101,6 @@ set(llcommon_HEADER_FILES llagentconstants.h llapp.h llapr.h - llaprsockstream.h llassettype.h llassoclist.h llavatarconstants.h -- cgit v1.2.3 From db7b4bb3f8905518b303e371d61fdc3aabd7b9be Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Mon, 29 Jun 2009 16:02:36 -0400 Subject: Fix for mismatched cmake if/endif pairs in llwindow/CMakeLists.txt --- indra/llwindow/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index b80080e458..beaf5c3488 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -64,7 +64,7 @@ if (NOT LINUX OR VIEWER) ${UI_LIBRARIES} # for GTK ${SDL_LIBRARY} ) -endif (VIEWER) +endif (NOT LINUX OR VIEWER) if (DARWIN) list(APPEND llwindow_SOURCE_FILES @@ -96,7 +96,7 @@ if (LINUX AND VIEWER) llkeyboardsdl.h llwindowsdl.h ) -endif (LINUX) +endif (LINUX AND VIEWER) if (WINDOWS) list(APPEND llwindow_SOURCE_FILES -- cgit v1.2.3 From 726ac3ed0f70900edbeeacece866a21ff90534d4 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Tue, 30 Jun 2009 11:52:00 -0400 Subject: Fixes to let llcommon build as a .dylib. It depends on PTH library. --- indra/llcommon/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra') diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 4ba74ab837..06a295b410 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -7,11 +7,13 @@ include(LLAddBuildTest) include(LLCommon) include(Linking) include(Boost) +include (Pth) include_directories( ${EXPAT_INCLUDE_DIRS} ${LLCOMMON_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} + ${PTH_INCLUDE_DIRS} ) # add_executable(lltreeiterators lltreeiterators.cpp) @@ -245,6 +247,7 @@ target_link_libraries( ${WINDOWS_LIBRARIES} ${BOOST_PROGRAM_OPTIONS_LIBRARY} ${BOOST_REGEX_LIBRARY} + ${PTH_LIBRARIES} ) include(LLAddBuildTest) -- cgit v1.2.3 From a14a19e33ac2a28b640ebbad514e9829f999a5f3 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Tue, 30 Jun 2009 12:08:24 -0400 Subject: Added a new setSetting listener. --- indra/newview/llappviewerlistener.cpp | 13 +++++++++++++ indra/newview/llappviewerlistener.h | 1 + 2 files changed, 14 insertions(+) (limited to 'indra') diff --git a/indra/newview/llappviewerlistener.cpp b/indra/newview/llappviewerlistener.cpp index a8c98b17a7..befebae88e 100644 --- a/indra/newview/llappviewerlistener.cpp +++ b/indra/newview/llappviewerlistener.cpp @@ -18,6 +18,7 @@ // external library headers // other Linden headers #include "llappviewer.h" +#include "llviewercontrol.h" LLAppViewerListener::LLAppViewerListener(const std::string& pumpname, LLAppViewer* llappviewer): LLDispatchListener(pumpname, "op"), @@ -25,9 +26,21 @@ LLAppViewerListener::LLAppViewerListener(const std::string& pumpname, LLAppViewe { // add() every method we want to be able to invoke via this event API. add("requestQuit", &LLAppViewerListener::requestQuit); + add("setSetting", &LLAppViewerListener::setSetting); } void LLAppViewerListener::requestQuit(const LLSD& event) const { mAppViewer->requestQuit(); } + +void LLAppViewerListener::setSetting(const LLSD & event) const +{ + std::string control_name = event["name"].asString(); + if (gSavedSettings.controlExists(control_name)) + { + LLControlVariable* control = gSavedSettings.getControl(control_name); + + control->set(event["value"]); + } +} diff --git a/indra/newview/llappviewerlistener.h b/indra/newview/llappviewerlistener.h index ab17dd1d90..ff63b69c13 100644 --- a/indra/newview/llappviewerlistener.h +++ b/indra/newview/llappviewerlistener.h @@ -27,6 +27,7 @@ public: private: void requestQuit(const LLSD& event) const; + void setSetting(const LLSD & event) const; LLAppViewer* mAppViewer; }; -- cgit v1.2.3 From df9a52cd2e7e43214343afe55c6af7e696afc92c Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Tue, 30 Jun 2009 12:08:43 -0400 Subject: Added loading of evenhost module to viewer. --- indra/newview/app_settings/settings.xml | 11 +++++++ indra/newview/llappviewer.cpp | 51 +++++++++++++++++++++++++++++++++ indra/newview/llappviewer.h | 2 ++ 3 files changed, 64 insertions(+) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index afa7f707f1..71878d02db 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5123,6 +5123,17 @@ Value 0 + QAModeEventHostPort + + Comment + Enable Testing Features. + Persist + 0 + Type + S32 + Value + -1 + QuietSnapshotsToDisk Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f9e6db52c3..b61e75f60d 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -93,6 +93,10 @@ # include // For initMarkerFile support #endif +#include "llapr.h" +#include "apr_dso.h" +#include + #include "llnotify.h" #include "llviewerkeyboard.h" #include "lllfsthread.h" @@ -860,6 +864,11 @@ bool LLAppViewer::init() LLViewerJoystick::getInstance()->init(false); + if (gSavedSettings.getBOOL("QAMode") && gSavedSettings.getS32("QAModeEventHostPort") > 0) + { + loadEventHostModule(gSavedSettings.getS32("QAModeEventHostPort")); + } + return true; } @@ -4085,3 +4094,45 @@ void LLAppViewer::handleLoginComplete() } writeDebugInfo(); } + +// *TODO - generalize this and move DSO wrangling to a helper class -brad +void LLAppViewer::loadEventHostModule(S32 listen_port) const +{ + std::string dso_name("liblleventhost"); + +#if LL_WINDOWS + dso_name += ".dll"; +#elif LL_DARWIN + dso_name += ".dylib"; +#else + dso_name += ".so"; +#endif + + std::string dso_path = gDirUtilp->findFile(dso_name, + gDirUtilp->getAppRODataDir(), + gDirUtilp->getExecutableDir()); + + apr_dso_handle_t * eventhost_dso_handle = NULL; + apr_pool_t * eventhost_dso_memory_pool = NULL; + + //attempt to load the shared library + apr_pool_create(&eventhost_dso_memory_pool, NULL); + apr_status_t rv = apr_dso_load(&eventhost_dso_handle, + dso_path.c_str(), + eventhost_dso_memory_pool); + ll_apr_assert_status(rv); + llassert_always(eventhost_dso_handle != NULL); + + int (*ll_plugin_start_func)(char const * const *, char const * const *) = NULL; + rv = apr_dso_sym((apr_dso_handle_sym_t*)&ll_plugin_start_func, eventhost_dso_handle, "ll_plugin_start"); + + ll_apr_assert_status(rv); + llassert_always(ll_plugin_start_func != NULL); + + std::string port_text = boost::lexical_cast(listen_port); + std::vector args; + args.push_back("-L"); + args.push_back(port_text.c_str()); + + ll_plugin_start_func(&args[0], &args[0] + args.size()); +} diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 540c878543..1227ab470f 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -204,6 +204,8 @@ private: void sendLogoutRequest(); void disconnectViewer(); + void loadEventHostModule(S32 listen_port) const; + // *FIX: the app viewer class should be some sort of singleton, no? // Perhaps its child class is the singleton and this should be an abstract base. static LLAppViewer* sInstance; -- cgit v1.2.3 From 7c1742ec7d626ff34084624729b338f9abc58686 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Tue, 30 Jun 2009 19:12:39 -0400 Subject: Added hack for fetching eventlet in place of svn:externals. --- indra/cmake/Externals.cmake | 34 ++++++++++++++++++++++++++++++++++ indra/cmake/FindSVN.cmake | 34 ++++++++++++++++++++++++++++++++++ indra/viewer_components/CMakeLists.txt | 7 +++++++ 3 files changed, 75 insertions(+) create mode 100644 indra/cmake/Externals.cmake create mode 100644 indra/cmake/FindSVN.cmake (limited to 'indra') diff --git a/indra/cmake/Externals.cmake b/indra/cmake/Externals.cmake new file mode 100644 index 0000000000..26f3b56049 --- /dev/null +++ b/indra/cmake/Externals.cmake @@ -0,0 +1,34 @@ +# -*- cmake -*- + +include(Python) +include(FindSVN) + +macro (use_svn_external _binary _path _url _rev) + if (NOT STANDALONE) + if(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) + if(SVN_FOUND) + if(DEBUG_EXTERNALS) + message("cd ${_path} && ${SVN_EXECUTABLE} checkout -r ${_rev} ${_url} ${_binary}") + endif(DEBUG_EXTERNALS) + execute_process(COMMAND ${SVN_EXECUTABLE} + checkout + -r ${_rev} + ${_url} + ${_binary} + WORKING_DIRECTORY ${_path} + RESULT_VARIABLE ${_binary}_installed + ) + else(SVN_FOUND) + message(FATAL_ERROR "Failed to find SVN_EXECUTABLE") + endif(SVN_FOUND) + file(WRITE ${CMAKE_BINARY_DIR}/temp/${_binary}_installed "${${_binary}_installed}") + else(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) + set(${_binary}_installed 0) + endif(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) + if(NOT ${_binary}_installed EQUAL 0) + message(FATAL_ERROR + "Failed to download or unpack prebuilt '${_binary}'." + " Process returned ${${_binary}_installed}.") + endif (NOT ${_binary}_installed EQUAL 0) + endif (NOT STANDALONE) +endmacro (use_svn_external _binary _path _url _rev) diff --git a/indra/cmake/FindSVN.cmake b/indra/cmake/FindSVN.cmake new file mode 100644 index 0000000000..3322be4ca9 --- /dev/null +++ b/indra/cmake/FindSVN.cmake @@ -0,0 +1,34 @@ +# -*- cmake -*- +# +# Find the svn executable for exporting old svn:externals. +# +# Input variables: +# SVN_FIND_REQUIRED - set this if configuration should fail without scp +# +# Output variables: +# +# SVN_FOUND - set if svn was found +# SVN_EXECUTABLE - path to svn executable +# SVN_BATCH_FLAG - how to put svn into batch mode + + +SET(SVN_EXECUTABLE) +FIND_PROGRAM(SVN_EXECUTABLE NAMES svn svn.exe) + +IF (SVN_EXECUTABLE) + SET(SVN_FOUND ON) +ELSE (SVN_EXECUTABLE) + SET(SVN_FOUND OFF) +ENDIF (SVN_EXECUTABLE) + +IF (SVN_FOUND) + GET_FILENAME_COMPONENT(_svn_name ${SVN_EXECUTABLE} NAME_WE) + SET(SVN_BATCH_FLAG --non-interactive) +ELSE (SVN_FOUND) + IF (SVN_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find svn executable") + ENDIF (SVN_FIND_REQUIRED) +ENDIF (SVN_FOUND) + +MARK_AS_ADVANCED(SVN_EXECUTABLE SVN_FOUND SVN_BATCH_FLAG) + diff --git a/indra/viewer_components/CMakeLists.txt b/indra/viewer_components/CMakeLists.txt index 60b459b78a..b3e07c527c 100644 --- a/indra/viewer_components/CMakeLists.txt +++ b/indra/viewer_components/CMakeLists.txt @@ -1,2 +1,9 @@ +# -*- cmake -*- + +include(Externals) + add_subdirectory(login) add_subdirectory(eventhost) + +use_svn_external(eventlet ${CMAKE_CURRENT_SOURCE_DIR}/../lib/python/ http://svn.secondlife.com/svn/eventlet/trunk/eventlet 164) + -- cgit v1.2.3