diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/cmake/Variables.cmake | 24 | ||||
-rw-r--r-- | indra/newview/llpaneleditwearable.cpp | 85 | ||||
-rw-r--r-- | indra/newview/llpaneleditwearable.h | 12 | ||||
-rwxr-xr-x | indra/newview/llviewerregion.cpp | 1 |
4 files changed, 99 insertions, 23 deletions
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 54c77da64e..4cd878a2e3 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -70,6 +70,10 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(LINUX ON BOOl FORCE) + if (INSTALL_PROPRIETARY) + set(BUILD_HEADLESS ON CACHE BOOL "Build headless libraries.") + endif (INSTALL_PROPRIETARY) + # If someone has specified a word size, use that to determine the # architecture. Otherwise, let the architecture specify the word size. if (WORD_SIZE EQUAL 32) @@ -94,36 +98,18 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") if (WORD_SIZE EQUAL 32) set(DEB_ARCHITECTURE i386) set(FIND_LIBRARY_USE_LIB64_PATHS OFF) - set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib32 ${CMAKE_SYSTEM_LIBRARY_PATH}) else (WORD_SIZE EQUAL 32) set(DEB_ARCHITECTURE amd64) - set(FIND_LIBRARY_USE_LIB64_PATHS ON) endif (WORD_SIZE EQUAL 32) - execute_process(COMMAND dpkg-architecture -a${DEB_ARCHITECTURE} -qDEB_HOST_MULTIARCH - RESULT_VARIABLE DPKG_RESULT - OUTPUT_VARIABLE DPKG_ARCH - OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) + execute_process(COMMAND dpkg-architecture -a${DEB_ARCHITECTURE} -qDEB_HOST_MULTIARCH RESULT_VARIABLE DPKG_RESULT OUTPUT_VARIABLE DPKG_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) #message (STATUS "DPKG_RESULT ${DPKG_RESULT}, DPKG_ARCH ${DPKG_ARCH}") if (DPKG_RESULT EQUAL 0) set(CMAKE_LIBRARY_ARCHITECTURE ${DPKG_ARCH}) - set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/${DPKG_ARCH} /usr/local/lib/${DPKG_ARCH} ${CMAKE_SYSTEM_LIBRARY_PATH}) endif (DPKG_RESULT EQUAL 0) - include(ConfigurePkgConfig) - set(LL_ARCH ${ARCH}_linux) set(LL_ARCH_DIR ${ARCH}-linux) - - if (INSTALL_PROPRIETARY) - # Only turn on headless if we can find osmesa libraries. - include(FindPkgConfig) - pkg_check_modules(OSMESA osmesa) - if (OSMESA_FOUND) - set(BUILD_HEADLESS ON CACHE BOOL "Build headless libraries.") - endif (OSMESA_FOUND) - endif (INSTALL_PROPRIETARY) - endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 7832156a0e..ad55936cab 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -26,6 +26,8 @@ #include "llviewerprecompiledheaders.h" +#include <boost/intrusive_ptr.hpp> + #include "llpaneleditwearable.h" #include "llpanel.h" #include "llviewerwearable.h" @@ -47,6 +49,7 @@ #include "llscrollingpanelparam.h" #include "llradiogroup.h" #include "llnotificationsutil.h" +#include "llhttpclient.h" #include "llcolorswatch.h" #include "lltexturectrl.h" @@ -1028,6 +1031,83 @@ void LLPanelEditWearable::updatePanelPickerControls(LLWearableType::EType type) } } +class LLIncrementCofVersionResponder : public LLHTTPClient::Responder +{ +public: + LLIncrementCofVersionResponder(S32 retries); + virtual ~LLIncrementCofVersionResponder(); + + virtual void result(const LLSD &pContent); + virtual void error(U32 pStatus, const std::string& pReason); + +protected: + +private: + LLAgent *mAgent; + S32 mRetries; +}; + +LLIncrementCofVersionResponder::LLIncrementCofVersionResponder(S32 retries) + : LLHTTPClient::Responder(), + mRetries(retries) +{ +} + +LLIncrementCofVersionResponder::~LLIncrementCofVersionResponder() +{ +} + +void LLIncrementCofVersionResponder::result(const LLSD &pContent) +{ + lldebugs << "Successfully incremented agent's COF." << llendl; + +} + +void LLIncrementCofVersionResponder::error(U32 pStatus, const std::string& pReason) +{ + llwarns << "While attempting to increment the agent's cof we got an error because '" + << pReason << "' [status:" << pStatus << "]" << llendl; + LLPanelEditWearable::incrementCofVersion(mRetries++); +} + +//static +void LLPanelEditWearable::incrementCofVersion() +{ + incrementCofVersion(0); +} + +//static +void LLPanelEditWearable::incrementCofVersion(S32 retries) +{ + // Create a response handler + LLHTTPClient::ResponderPtr responderPtr = LLHTTPClient::ResponderPtr(new LLIncrementCofVersionResponder(retries)); + + // If we don't have a region, report it as an error + if (gAgent.getRegion() == NULL) + { + responderPtr->error(0U, "region is not defined"); + } + else + { + // Find the capability to send maturity preference + std::string url = gAgent.getRegion()->getCapability("IncrementCofVersion"); + + // If the capability is not defined, report it as an error + if (url.empty()) + { + responderPtr->error(0U, "capability 'UpdateAgentInformation' is not defined for region"); + } + else + { + llinfos << "Requesting cof_version be incremented via capability to: " + << url << llendl; + LLSD headers; + LLSD body = LLSD::emptyMap(); + LLHTTPClient::post(url, body, responderPtr, headers, 30.0f); + } + } +} + void LLPanelEditWearable::saveChanges(bool force_save_as) { if (!mWearablePtr || !isDirty()) @@ -1050,6 +1130,11 @@ void LLPanelEditWearable::saveChanges(bool force_save_as) { gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name); } + + if (gAgentAvatarp->isUsingServerBakes()) + { + LLPanelEditWearable::incrementCofVersion(0); + } } void LLPanelEditWearable::revertChanges() diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 309d512e23..67217f8751 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -31,6 +31,8 @@ #include "llscrollingpanellist.h" #include "llmodaldialog.h" #include "llavatarappearancedefines.h" +#include "llagent.h" +#include "llviewerregion.h" #include "llwearabletype.h" class LLAccordionCtrl; @@ -76,6 +78,8 @@ public: virtual void setVisible(BOOL visible); + static void incrementCofVersion(); + static void incrementCofVersion(S32 retries); private: typedef std::map<F32, LLViewerVisualParam*> value_map_t; @@ -94,7 +98,7 @@ private: void toggleTypeSpecificControls(LLWearableType::EType type); void updateTypeSpecificControls(LLWearableType::EType type); - //alpha mask checkboxes + // alpha mask checkboxes void configureAlphaCheckbox(LLAvatarAppearanceDefines::ETextureIndex te, const std::string& name); void onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LLAvatarAppearanceDefines::ETextureIndex te); void updateAlphaCheckboxes(); @@ -104,7 +108,7 @@ private: // callback for HeightUnits parameter. bool changeHeightUnits(const LLSD& new_value); - // updates current metric and replacemet metric label text + // updates current metric and replacement metric label text void updateMetricLayout(BOOL new_value); // updates avatar height label @@ -128,7 +132,7 @@ private: LLTextBox *mTxtAvatarHeight; - // localized and parametrized strings that used to build avatar_height_label + // localized and parameterized strings that used to build avatar_height_label std::string mMeters; std::string mFeet; std::string mHeigth; @@ -151,7 +155,7 @@ private: LLPanel *mPanelEyes; LLPanel *mPanelHair; - //clothes + // clothes LLPanel *mPanelShirt; LLPanel *mPanelPants; LLPanel *mPanelShoes; diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index f225a7640b..f5d2fc6888 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1541,6 +1541,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("FetchLibDescendents2"); capabilityNames.append("FetchInventory2"); capabilityNames.append("FetchInventoryDescendents2"); + capabilityNames.append("IncrementCOFVersion"); } capabilityNames.append("GetDisplayNames"); |