WIP First buildable code after adding support for SH-3339.
parent
79dbaed158
commit
ee810bf2ab
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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,44 +1031,75 @@ void LLPanelEditWearable::updatePanelPickerControls(LLWearableType::EType type)
|
|||
}
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPanelEditWearable::incrementCofVersion()
|
||||
class LLIncrementCofVersionResponder : public LLHTTPClient::Responder
|
||||
{
|
||||
// Create a response handler
|
||||
LLHTTPClient::ResponderPtr responderPtr = LLHTTPClient::ResponderPtr(new LLMaturityPreferencesResponder(this));
|
||||
public:
|
||||
LLIncrementCofVersionResponder(S32 retries);
|
||||
virtual ~LLIncrementCofVersionResponder();
|
||||
|
||||
// Look up the capability to POST to.
|
||||
std::string url = gAgent.getRegion()->getCapability("IncrementCofVersion");
|
||||
virtual void result(const LLSD &pContent);
|
||||
virtual void error(U32 pStatus, const std::string& pReason);
|
||||
|
||||
// If we don't have a region, report it as an error
|
||||
if (getRegion() == NULL)
|
||||
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(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, "region is not defined");
|
||||
responderPtr->error(0U, "capability 'UpdateAgentInformation' is not defined for region");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Find the capability to send maturity preference
|
||||
std::string url = getRegion()->getCapability("UpdateAgentInformation");
|
||||
|
||||
// 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
|
||||
{
|
||||
// Set new access preference
|
||||
LLSD access_prefs = LLSD::emptyMap();
|
||||
access_prefs["max"] = LLViewerRegion::accessToShortString(pPreferredMaturity);
|
||||
|
||||
LLSD body = LLSD::emptyMap();
|
||||
body["access_prefs"] = access_prefs;
|
||||
llinfos << "Sending viewer preferred maturity to '" << LLViewerRegion::accessToString(pPreferredMaturity)
|
||||
<< "' via capability to: " << url << llendl;
|
||||
LLSD headers;
|
||||
LLHTTPClient::post(url, body, responderPtr, headers, 30.0f);
|
||||
}
|
||||
}
|
||||
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)
|
||||
|
|
@ -1091,7 +1125,7 @@ void LLPanelEditWearable::saveChanges(bool force_save_as)
|
|||
gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name);
|
||||
}
|
||||
|
||||
LLPanelEditWearable::incrementCofVersion();
|
||||
LLPanelEditWearable::incrementCofVersion(0);
|
||||
}
|
||||
|
||||
void LLPanelEditWearable::revertChanges()
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ public:
|
|||
|
||||
virtual void setVisible(BOOL visible);
|
||||
|
||||
static void incrementCofVersion(S32 retries);
|
||||
|
||||
private:
|
||||
typedef std::map<F32, LLViewerVisualParam*> value_map_t;
|
||||
|
|
@ -116,8 +117,6 @@ private:
|
|||
|
||||
void setWearablePanelVisibilityChangeCallback(LLPanel* bodypart_panel);
|
||||
|
||||
static void incrementCofVersion();
|
||||
|
||||
// the pointer to the wearable we're editing. NULL means we're not editing a wearable.
|
||||
LLViewerWearable *mWearablePtr;
|
||||
LLViewerInventoryItem* mWearableItem;
|
||||
|
|
|
|||
Loading…
Reference in New Issue