Merge remote-tracking branch 'Liru/master'

This commit is contained in:
Damian Zhaoying
2013-10-07 14:22:25 -03:00
40 changed files with 304 additions and 312 deletions

View File

@@ -8,34 +8,77 @@ if (STANDALONE)
include(FindBoost)
set(Boost_USE_MULTITHREADED ON)
find_package(Boost 1.40.0 COMPONENTS date_time filesystem program_options regex system thread wave)
find_package(Boost 1.51.0 COMPONENTS date_time filesystem program_options regex system thread wave context)
else (STANDALONE)
use_prebuilt_binary(boost)
set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
set(Boost_VERSION "1.52")
if (WINDOWS)
set(BOOST_VERSION 1_45)
set(BOOST_OPTIM_SUFFIX mt)
set(BOOST_DEBUG_SUFFIX mt-gd)
set(Boost_CONTEXT_LIBRARY
optimized libboost_context-mt
debug libboost_context-mt-gd)
set(Boost_FILESYSTEM_LIBRARY
optimized libboost_filesystem-mt
debug libboost_filesystem-mt-gd)
set(Boost_PROGRAM_OPTIONS_LIBRARY
optimized libboost_program_options-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION}
debug libboost_program_options-vc${MSVC_SUFFIX}-${BOOST_DEBUG_SUFFIX}-${BOOST_VERSION})
optimized libboost_program_options-mt
debug libboost_program_options-mt-gd)
set(Boost_REGEX_LIBRARY
optimized libboost_regex-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION}
debug libboost_regex-vc${MSVC_SUFFIX}-${BOOST_DEBUG_SUFFIX}-${BOOST_VERSION})
elseif (DARWIN)
set(Boost_FILESYSTEM_LIBRARY boost_filesystem)
set(Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options)
set(Boost_REGEX_LIBRARY boost_regex)
set(Boost_SYSTEM_LIBRARY boost_system)
set(Boost_DATE_TIME_LIBRARY boost_date_time)
optimized libboost_regex-mt
debug libboost_regex-mt-gd)
set(Boost_SIGNALS_LIBRARY
optimized libboost_signals-mt
debug libboost_signals-mt-gd)
set(Boost_SYSTEM_LIBRARY
optimized libboost_system-mt
debug libboost_system-mt-gd)
set(Boost_THREAD_LIBRARY
optimized libboost_thread-mt
debug libboost_thread-mt-gd)
elseif (LINUX)
set(Boost_FILESYSTEM_LIBRARY boost_filesystem-mt)
set(Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
set(Boost_REGEX_LIBRARY boost_regex-mt)
set(Boost_SYSTEM_LIBRARY boost_system-mt)
set(Boost_DATE_TIME_LIBRARY boost_date_time-mt)
set(Boost_CONTEXT_LIBRARY
optimized boost_context-mt.a
debug boost_context-mt-d.a)
set(Boost_FILESYSTEM_LIBRARY
optimized boost_filesystem-mt.a
debug boost_filesystem-mt-d.a)
set(Boost_PROGRAM_OPTIONS_LIBRARY
optimized boost_program_options-mt.a
debug boost_program_options-mt-d.a)
set(Boost_REGEX_LIBRARY
optimized boost_regex-mt.a
debug boost_regex-mt-d.a)
set(Boost_SIGNALS_LIBRARY
optimized boost_signals-mt.a
debug boost_signals-mt-d.a)
set(Boost_SYSTEM_LIBRARY
optimized boost_system-mt.a
debug boost_system-mt-d.a)
set(Boost_THREAD_LIBRARY
optimized boost_thread-mt.a
debug boost_thread-mt-d.a)
elseif (DARWIN)
set(Boost_CONTEXT_LIBRARY
optimized boost_context-mt
debug boost_context-mt-d)
set(Boost_FILESYSTEM_LIBRARY
optimized boost_filesystem-mt
debug boost_filesystem-mt-d)
set(Boost_PROGRAM_OPTIONS_LIBRARY
optimized boost_program_options-mt
debug boost_program_options-mt-d)
set(Boost_REGEX_LIBRARY
optimized boost_regex-mt
debug boost_regex-mt-d)
set(Boost_SIGNALS_LIBRARY
optimized boost_signals-mt
debug boost_signals-mt-d)
set(Boost_SYSTEM_LIBRARY
optimized boost_system-mt
debug boost_system-mt-d)
set(Boost_THREAD_LIBRARY
optimized boost_thread-mt
debug boost_thread-mt-d)
endif (WINDOWS)
endif (STANDALONE)

View File

@@ -10,9 +10,9 @@ if (STANDALONE)
else (STANDALONE)
use_prebuilt_binary(colladadom)
if (NOT WINDOWS)
if (NOT WINDOWS AND NOT LINUX)
use_prebuilt_binary(pcre)
endif (NOT WINDOWS)
endif (NOT WINDOWS AND NOT LINUX)
if (NOT DARWIN AND NOT WINDOWS)
use_prebuilt_binary(libxml)
@@ -28,10 +28,6 @@ else (STANDALONE)
set(COLLADADOM_LIBRARIES
debug libcollada14dom22-d
optimized libcollada14dom22
debug libboost_filesystem-vc100-mt-gd-1_45.lib
optimized libboost_filesystem-vc100-mt-1_45.lib
debug libboost_system-vc100-mt-gd-1_45.lib
optimized libboost_system-vc100-mt-1_45.lib
)
else (WINDOWS)
set(COLLADADOM_LIBRARIES

View File

@@ -3,25 +3,25 @@
# - Find Google BreakPad
# Find the Google BreakPad includes and library
# This module defines
# BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR, where to find exception_handler.h, etc.
# BREAKPAD_INCLUDE_DIRECTORIES, where to find the Goole BreakPad includes.
# BREAKPAD_EXCEPTION_HANDLER_LIBRARIES, the libraries needed to use Google BreakPad.
# BREAKPAD_EXCEPTION_HANDLER_FOUND, If false, do not try to use Google BreakPad.
# also defined, but not for general use are
# BREAKPAD_EXCEPTION_HANDLER_LIBRARY, where to find the Google BreakPad library.
FIND_PATH(BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR google_breakpad/exception_handler.h)
FIND_PATH(BREAKPAD_INCLUDE_DIRECTORIES common/using_std_string.h PATH_SUFFIXES google_breakpad)
SET(BREAKPAD_EXCEPTION_HANDLER_NAMES ${BREAKPAD_EXCEPTION_HANDLER_NAMES} breakpad_client)
FIND_LIBRARY(BREAKPAD_EXCEPTION_HANDLER_LIBRARY
NAMES ${BREAKPAD_EXCEPTION_HANDLER_NAMES}
)
IF (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR)
IF (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_INCLUDE_DIRECTORIES)
SET(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES ${BREAKPAD_EXCEPTION_HANDLER_LIBRARY})
SET(BREAKPAD_EXCEPTION_HANDLER_FOUND "YES")
ELSE (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR)
ELSE (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_INCLUDE_DIRECTORIES)
SET(BREAKPAD_EXCEPTION_HANDLER_FOUND "NO")
ENDIF (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR)
ENDIF (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_INCLUDE_DIRECTORIES)
IF (BREAKPAD_EXCEPTION_HANDLER_FOUND)
@@ -36,5 +36,5 @@ ENDIF (BREAKPAD_EXCEPTION_HANDLER_FOUND)
MARK_AS_ADVANCED(
BREAKPAD_EXCEPTION_HANDLER_LIBRARY
BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR
BREAKPAD_INCLUDE_DIRECTORIES
)

View File

@@ -16,6 +16,6 @@ else (STANDALONE)
set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES exception_handler crash_generation_client crash_generation_server common)
endif (WINDOWS)
# yes, this does look dumb, no, it's not incorrect
#
# I think it's incorrect: the second one should go --Aleric
set(BREAKPAD_INCLUDE_DIRECTORIES "${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/google_breakpad" "${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/google_breakpad/google_breakpad")
endif (STANDALONE)

View File

@@ -273,6 +273,7 @@ target_link_libraries(
${EXPAT_LIBRARIES}
${ZLIB_LIBRARIES}
${WINDOWS_LIBRARIES}
${Boost_CONTEXT_LIBRARY}
${Boost_REGEX_LIBRARY}
${CORESERVICES_LIBRARY}
)

View File

@@ -45,7 +45,7 @@
#include "llstl.h" // for DeletePointer()
#include "llstring.h"
#include "lleventtimer.h"
#include "google_breakpad/exception_handler.h"
#include "exception_handler.h"
//
// Signal handling
@@ -70,7 +70,7 @@ void setup_signals();
void default_unix_signal_handler(int signum, siginfo_t *info, void *);
#if LL_LINUX
#include "google_breakpad/minidump_descriptor.h"
#include "client/linux/handler/minidump_descriptor.h"
static bool unix_minidump_callback(const google_breakpad::MinidumpDescriptor& minidump_desc,
void* context,
bool succeeded);

View File

@@ -39,7 +39,12 @@
#include "llerror.h"
#include "stringize.h"
LLCoros::LLCoros()
LLCoros::LLCoros():
// MAINT-2724: default coroutine stack size too small on Windows.
// Previously we used
// boost::context::guarded_stack_allocator::default_stacksize();
// empirically this is 64KB on Windows and Linux. Try quadrupling.
mStackSize(256*1024)
{
// Register our cleanup() method for "mainloop" ticks
LLEventPumps::instance().obtain("mainloop").listen(
@@ -55,7 +60,7 @@ bool LLCoros::cleanup(const LLSD&)
// since last tick?
if (mi->second->exited())
{
LL_INFOS("LLCoros") << "LLCoros: cleaning up coroutine " << mi->first << LL_ENDL;
LL_INFOS("LLCoros") << "LLCoros: cleaning up coroutine " << mi->first << LL_ENDL;
// The erase() call will invalidate its passed iterator value --
// so increment mi FIRST -- but pass its original value to
// erase(). This is what postincrement is all about.
@@ -89,7 +94,7 @@ std::string LLCoros::generateDistinctName(const std::string& prefix) const
{
if (mCoros.find(name) == mCoros.end())
{
LL_INFOS("LLCoros") << "LLCoros: launching coroutine " << name << LL_ENDL;
LL_INFOS("LLCoros") << "LLCoros: launching coroutine " << name << LL_ENDL;
return name;
}
}
@@ -115,7 +120,7 @@ std::string LLCoros::getNameByID(const void* self_id) const
// passed to us comes.
for (CoroMap::const_iterator mi(mCoros.begin()), mend(mCoros.end()); mi != mend; ++mi)
{
namespace coro_private = boost::coroutines::detail;
namespace coro_private = boost::dcoroutines::detail;
if (static_cast<void*>(coro_private::coroutine_accessor::get_impl(const_cast<coro&>(*mi->second)).get())
== self_id)
{
@@ -125,6 +130,12 @@ std::string LLCoros::getNameByID(const void* self_id) const
return "";
}
void LLCoros::setStackSize(S32 stacksize)
{
LL_INFOS("LLCoros") << "Setting coroutine stack size to " << stacksize << LL_ENDL;
mStackSize = stacksize;
}
/*****************************************************************************
* MUST BE LAST
*****************************************************************************/

View File

@@ -29,7 +29,7 @@
#if ! defined(LL_LLCOROS_H)
#define LL_LLCOROS_H
#include <boost/coroutine/coroutine.hpp>
#include <boost/dcoroutine/coroutine.hpp>
#include "llsingleton.h"
#include <boost/ptr_container/ptr_map.hpp>
#include <string>
@@ -78,8 +78,8 @@
class LL_COMMON_API LLCoros: public LLSingleton<LLCoros>
{
public:
/// Canonical boost::coroutines::coroutine signature we use
typedef boost::coroutines::coroutine<void()> coro;
/// Canonical boost::dcoroutines::coroutine signature we use
typedef boost::dcoroutines::coroutine<void()> coro;
/// Canonical 'self' type
typedef coro::self self;
@@ -125,7 +125,7 @@ public:
template <typename CALLABLE>
std::string launch(const std::string& prefix, const CALLABLE& callable)
{
return launchImpl(prefix, new coro(callable));
return launchImpl(prefix, new coro(callable, mStackSize));
}
/**
@@ -152,6 +152,9 @@ public:
/// getName() by self.get_id()
std::string getNameByID(const void* self_id) const;
/// for delayed initialization
void setStackSize(S32 stacksize);
private:
friend class LLSingleton<LLCoros>;
LLCoros();
@@ -159,6 +162,7 @@ private:
std::string generateDistinctName(const std::string& prefix) const;
bool cleanup(const LLSD&);
S32 mStackSize;
typedef boost::ptr_map<std::string, coro> CoroMap;
CoroMap mCoros;
};

View File

@@ -29,8 +29,8 @@
#if ! defined(LL_LLEVENTCORO_H)
#define LL_LLEVENTCORO_H
#include <boost/coroutine/coroutine.hpp>
#include <boost/coroutine/future.hpp>
#include <boost/dcoroutine/coroutine.hpp>
#include <boost/dcoroutine/future.hpp>
#include <boost/optional.hpp>
#include <string>
#include <stdexcept>
@@ -206,13 +206,13 @@ LLSD postAndWait(SELF& self, const LLSD& event, const LLEventPumpOrPumpName& req
const LLEventPumpOrPumpName& replyPump, const LLSD& replyPumpNamePath=LLSD())
{
// declare the future
boost::coroutines::future<LLSD> future(self);
boost::dcoroutines::future<LLSD> future(self);
// make a callback that will assign a value to the future, and listen on
// the specified LLEventPump with that callback
std::string listenerName(LLEventDetail::listenerNameForCoro(self));
LLTempBoundListener connection(
replyPump.getPump().listen(listenerName,
voidlistener(boost::coroutines::make_callback(future))));
voidlistener(boost::dcoroutines::make_callback(future))));
// skip the "post" part if requestPump is default-constructed
if (requestPump)
{
@@ -257,7 +257,7 @@ namespace LLEventDetail
* This helper is specifically for the two-pump version of waitForEventOn().
* We use a single future object, but we want to listen on two pumps with it.
* Since we must still adapt from (the callable constructed by)
* boost::coroutines::make_callback() (void return) to provide an event
* boost::dcoroutines::make_callback() (void return) to provide an event
* listener (bool return), we've adapted LLVoidListener for the purpose. The
* basic idea is that we construct a distinct instance of WaitForEventOnHelper
* -- binding different instance data -- for each of the pumps. Then, when a
@@ -331,16 +331,16 @@ LLEventWithID postAndWait2(SELF& self, const LLSD& event,
const LLSD& replyPump1NamePath=LLSD())
{
// declare the future
boost::coroutines::future<LLEventWithID> future(self);
boost::dcoroutines::future<LLEventWithID> future(self);
// either callback will assign a value to this future; listen on
// each specified LLEventPump with a callback
std::string name(LLEventDetail::listenerNameForCoro(self));
LLTempBoundListener connection0(
replyPump0.getPump().listen(name + "a",
LLEventDetail::wfeoh(boost::coroutines::make_callback(future), 0)));
LLEventDetail::wfeoh(boost::dcoroutines::make_callback(future), 0)));
LLTempBoundListener connection1(
replyPump1.getPump().listen(name + "b",
LLEventDetail::wfeoh(boost::coroutines::make_callback(future), 1)));
LLEventDetail::wfeoh(boost::dcoroutines::make_callback(future), 1)));
// skip the "post" part if requestPump is default-constructed
if (requestPump)
{

View File

@@ -145,7 +145,8 @@ class AIPerService {
queued_request_type mQueuedRequests; // Waiting (throttled) requests.
U16 mApprovedRequests; // The number of approved requests for this CT by approveHTTPRequestFor that were not added to the command queue yet.
U16 mQueuedCommands; // Number of add commands (minus remove commands), for this service, in the command queue.
S16 mQueuedCommands; // Number of add commands (minus remove commands), for this service, in the command queue.
// This value can temporarily become negative when remove commands are added to the queue for add requests that were already processed.
U16 mAdded; // Number of active easy handles with this service.
U16 mFlags; // ctf_empty: Set to true when the queue becomes precisely empty.
// ctf_full : Set to true when the queue is popped and then still isn't empty;
@@ -268,7 +269,7 @@ class AIPerService {
public:
void added_to_command_queue(AICapabilityType capability_type) { ++mCapabilityType[capability_type].mQueuedCommands; mark_inuse(capability_type); }
void removed_from_command_queue(AICapabilityType capability_type) { llassert(mCapabilityType[capability_type].mQueuedCommands > 0); --mCapabilityType[capability_type].mQueuedCommands; }
void removed_from_command_queue(AICapabilityType capability_type) { --mCapabilityType[capability_type].mQueuedCommands; }
void added_to_multi_handle(AICapabilityType capability_type, bool event_poll); // Called when an easy handle for this service has been added to the multi handle.
void removed_from_multi_handle(AICapabilityType capability_type, bool event_poll,
bool downloaded_something, bool success); // Called when an easy handle for this service is removed again from the multi handle.

View File

@@ -1312,7 +1312,7 @@ void AICurlThread::process_commands(AICurlMultiHandle_wat const& multi_handle_w)
*command_being_processed_w = command_queue_w->commands.front();
command = command_being_processed_w->command();
}
// Update the size: the number netto number of pending requests in the command queue.
// Update the size: the netto number of pending requests in the command queue.
command_queue_w->commands.pop_front();
if (command == cmd_add)
{

View File

@@ -201,17 +201,9 @@ inline BOOL LLDataPackerBinaryBuffer::verifyLength(const S32 data_size, const ch
{
if (mWriteEnabled && (mCurBufferp - mBufferp) > mBufferSize - data_size)
{
// <FS:ND> Handle invalid packets by throwing an exception and a graceful continue
// llwarns << "Buffer overflow in BinaryBuffer length verify, field name " << name << "!" << llendl;
// llwarns << "Current pos: " << (int)(mCurBufferp - mBufferp) << " Buffer size: " << mBufferSize << " Data size: " << data_size << llendl;
// return FALSE;
std::stringstream strm;
strm << "Buffer overflow in BinaryBuffer length verify, field name " << name << "!" << std::endl;
strm << "Current pos: " << (int)(mCurBufferp - mBufferp) << " Buffer size: " << mBufferSize << " Data size: " << data_size << std::endl;
throw std::string( strm.str() );
// </FS:ND>
llwarns << "Buffer overflow in BinaryBuffer length verify, field name " << name << "!" << llendl;
llwarns << "Current pos: " << (int)(mCurBufferp - mBufferp) << " Buffer size: " << mBufferSize << " Data size: " << data_size << llendl;
return FALSE;
}
return TRUE;

View File

@@ -364,22 +364,7 @@ public:
{
if (mHandlerFunc)
{
// <FS:ND> Handle invalid packets by throwing an exception and a graceful continue
// mHandlerFunc(msgsystem, mUserData);
try
{
mHandlerFunc(msgsystem, mUserData);
}
catch( std::string &why )
{
llwarns << why << llendl;
}
// </FS:ND>
return TRUE;
}
return FALSE;

View File

@@ -511,29 +511,21 @@ BOOL LLTemplateMessageReader::decodeTemplate(
void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host, const S32 where, const S32 wanted )
{
// <FS:ND> Handle invalid packets by throwing an exception and a graceful continue
// we've run off the end of the packet!
std::stringstream strm;
// llwarns << "Ran off end of packet " << mCurrentRMessageTemplate->mName
strm << "Ran off end of packet " << mCurrentRMessageTemplate->mName
llwarns << "Ran off end of packet " << mCurrentRMessageTemplate->mName
// << " with id " << mCurrentRecvPacketID
<< " from " << host
<< " trying to read " << wanted
<< " bytes at position " << where
<< " going past packet end at " << mReceiveSize
// << llendl;
<< std::endl;
<< llendl;
if(gMessageSystem->mVerboseLog)
{
// llinfos << "MSG: -> " << host << "\tREAD PAST END:\t"
strm << "MSG: -> " << host << "\tREAD PAST END:\t"
llinfos << "MSG: -> " << host << "\tREAD PAST END:\t"
// << mCurrentRecvPacketID << " "
// << getMessageName() << llendl;
<< getMessageName() << std::endl;
<< getMessageName() << llendl;
}
gMessageSystem->callExceptionFunc(MX_RAN_OFF_END_OF_PACKET);
throw std::string( strm.str() );
}
static LLFastTimer::DeclareTimer FTM_PROCESS_MESSAGES("Process Messages");

View File

@@ -56,14 +56,7 @@ LLShaderMgr::LLShaderMgr()
{
{
const std::string dumpdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"shader_dump")+gDirUtilp->getDirDelimiter();
try
{
boost::filesystem::remove_all(dumpdir);
}
catch(const boost::filesystem::filesystem_error& e)
{
llinfos << "boost::filesystem::remove_all(\""+dumpdir+"\") failed: '" + e.code().message() + "'" << llendl;
}
gDirUtilp->deleteDirAndContents(dumpdir);
}
}

View File

@@ -111,7 +111,7 @@ std::vector<std::string> LLDir::getFilesInDir(const std::string &dirname)
{
if (boost::filesystem::is_regular_file(dir_itr->status()))
{
v.push_back(dir_itr->path().filename().c_str());
v.push_back(dir_itr->path().filename().string());
}
}
}
@@ -133,61 +133,74 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask)
llassert(!"Invalid file mask");
}
LLDirIterator iter(dirname, mask);
while (iter.next(filename))
try
{
fullpath = add(dirname, filename);
if(LLFile::isdir(fullpath))
LLDirIterator iter(dirname, mask);
while (iter.next(filename))
{
// skipping directory traversal filenames
count++;
continue;
}
fullpath = add(dirname, filename);
S32 retry_count = 0;
while (retry_count < 5)
{
if (0 != LLFile::remove(fullpath))
if(LLFile::isdir(fullpath))
{
retry_count++;
result = errno;
llwarns << "Problem removing " << fullpath << " - errorcode: "
// skipping directory traversal filenames
count++;
continue;
}
S32 retry_count = 0;
while (retry_count < 5)
{
if (0 != LLFile::remove(fullpath))
{
retry_count++;
result = errno;
llwarns << "Problem removing " << fullpath << " - errorcode: "
<< result << " attempt " << retry_count << llendl;
if(retry_count >= 5)
{
llwarns << "Failed to remove " << fullpath << llendl ;
return count ;
}
if(retry_count >= 5)
{
llwarns << "Failed to remove " << fullpath << llendl ;
return count ;
}
ms_sleep(100);
}
else
{
if (retry_count)
{
llwarns << "Successfully removed " << fullpath << llendl;
ms_sleep(100);
}
break;
}
else
{
if (retry_count)
{
llwarns << "Successfully removed " << fullpath << llendl;
}
break;
}
}
count++;
}
count++;
}
catch(...)
{
llwarns << "Unable to remove some files from " + dirname << llendl;
}
return count;
}
U32 LLDir::deleteDirAndContents(const std::string& dir_name)
{
//Removes the directory and its contents. Returns number of files removed.
#if defined(LL_LINUX)
// Singu TODO: Workaround for boost crashing on linux
deleteFilesInDir(dir_name, "*");
boost::filesystem::remove(dir_name);
return 1;
#else
return boost::filesystem::remove_all(dir_name);
#endif
// Singu Note: boost::filesystem throws exceptions
S32 res = 0;
try
{
res = boost::filesystem::remove_all(dir_name);
}
catch(const boost::filesystem::filesystem_error& e)
{
llwarns << "boost::filesystem::remove_all(\"" + dir_name + "\") failed: '" + e.code().message() + "'" << llendl;
}
return res;
}
const std::string LLDir::findFile(const std::string &filename,

View File

@@ -1589,6 +1589,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
${LLCOMMON_LIBRARIES}
${NDOF_LIBRARY}
${viewer_LIBRARIES}
${Boost_CONTEXT_LIBRARY}
${Boost_FILESYSTEM_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY}
${Boost_REGEX_LIBRARY}

View File

@@ -109,14 +109,14 @@ void AIServiceBar::draw()
{
if (col < 2)
{
text = llformat(" | %hu-%hu-%lu,{%hu/%hu,%u}/%u",
text = llformat(" | %hu-%hd-%lu,{%hu/%hu,%u}/%u",
ct.mApprovedRequests, ct.mQueuedCommands, ct.mQueuedRequests.size(),
ct.mAdded, ct.mConcurrentConnections, ct.mDownloading,
ct.mMaxPipelinedRequests);
}
else
{
text = llformat(" | --%hu-%lu,{%hu/%hu,%u}",
text = llformat(" | --%hd-%lu,{%hu/%hu,%u}",
ct.mQueuedCommands, ct.mQueuedRequests.size(),
ct.mAdded, ct.mConcurrentConnections, ct.mDownloading);
}
@@ -291,7 +291,7 @@ AIHTTPView::~AIHTTPView()
mGLHTTPHeaderBar = NULL;
}
U32 AIHTTPView::updateColumn(int col, U32 start)
U32 AIHTTPView::updateColumn(U32 col, U32 start)
{
if (col > mStartColumn.size())
{

View File

@@ -52,7 +52,7 @@ class AIHTTPView : public LLContainerView
/*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
U32 updateColumn(int col, U32 start);
U32 updateColumn(U32 col, U32 start);
void setWidth(S32 width) { mWidth = width; }
private:

View File

@@ -731,6 +731,17 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>LiruLegacyLogLaunch</key>
<map>
<key>Comment</key>
<string>When opening a chat log, open in an external text editor instead of a browser floater(Windows Only).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<boolean>0</boolean>
</map>
<key>LiruLegacyOutfitStoreObjChanges</key>
<map>
<key>Comment</key>

View File

@@ -26,38 +26,9 @@
#include "daeexport.h"
//colladadom includes
#if LL_MSVC
#pragma warning (disable : 4018)
#pragma warning (push)
#pragma warning (disable : 4068)
#pragma warning (disable : 4263)
#pragma warning (disable : 4264)
#endif
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#include "dae.h"
//#include "dom.h"
#include "dom/domAsset.h"
#include "dom/domBind_material.h"
#include "dom/domCOLLADA.h"
#include "dom/domConstants.h"
#include "dom/domController.h"
#include "dom/domEffect.h"
#include "dom/domGeometry.h"
#include "dom/domInstance_geometry.h"
#include "dom/domInstance_material.h"
#include "dom/domInstance_node.h"
#include "dom/domInstance_effect.h"
#include "dom/domMaterial.h"
#include "dom/domMatrix.h"
#include "dom/domNode.h"
#include "dom/domProfile_COMMON.h"
#include "dom/domRotate.h"
#include "dom/domScale.h"
#include "dom/domTranslate.h"
#include "dom/domVisual_scene.h"
#if LL_MSVC
#pragma warning (pop)
#endif
// library includes
#include "aifilepicker.h"
@@ -358,7 +329,7 @@ public:
scroll_container->addChild(panel);
panel->setEnabled(FALSE);
S32 img_nr = 0;
for (S32 i=0; i < mSaver.mTextures.size(); i++)
for (U32 i=0; i < mSaver.mTextures.size(); i++)
{
if (mSaver.mTextureNames[i].empty()) continue;
@@ -375,7 +346,7 @@ public:
void saveTextures()
{
mTexturesToSave.clear();
for (S32 i=0; i < mSaver.mTextures.size(); i++)
for (U32 i=0; i < mSaver.mTextures.size(); i++)
{
if (mSaver.mTextureNames[i].empty()) continue;
mTexturesToSave[mSaver.mTextures[i]] = mSaver.mTextureNames[i];
@@ -613,7 +584,7 @@ void DAESaver::addSource(daeElement* mesh, const char* src_id, std::string param
src_array->setAttribute("id", llformat("%s-%s", src_id, "array").c_str());
src_array->setAttribute("count", llformat("%d", vals.size()).c_str());
for (S32 i = 0; i < vals.size(); i++)
for (U32 i = 0; i < vals.size(); i++)
{
((domFloat_array*)src_array)->getValue().append(vals[i]);
}
@@ -870,7 +841,7 @@ bool DAESaver::saveDAE(std::string filename)
// Add triangles
if (gSavedSettings.getBOOL("DAEExportConsolidateMaterials"))
{
for (S32 objMaterial = 0; objMaterial < objMaterials.size(); objMaterial++)
for (U32 objMaterial = 0; objMaterial < objMaterials.size(); objMaterial++)
{
int_list_t faces;
getFacesWithMaterial(obj, objMaterials[objMaterial], &faces);
@@ -913,7 +884,7 @@ bool DAESaver::saveDAE(std::string filename)
// Bind materials
daeElement* tq = nodeGeometry->add("bind_material technique_common");
for (S32 objMaterial = 0; objMaterial < objMaterials.size(); objMaterial++)
for (U32 objMaterial = 0; objMaterial < objMaterials.size(); objMaterial++)
{
std::string matName = objMaterials[objMaterial].name;
daeElement* instanceMaterial = tq->add("instance_material");
@@ -929,7 +900,7 @@ bool DAESaver::saveDAE(std::string filename)
generateEffects(effects);
// Materials
for (S32 objMaterial = 0; objMaterial < mAllMaterials.size(); objMaterial++)
for (U32 objMaterial = 0; objMaterial < mAllMaterials.size(); objMaterial++)
{
daeElement* mat = materials->add("material");
mat->setAttribute("id", (mAllMaterials[objMaterial].name + "-material").c_str());
@@ -955,7 +926,7 @@ DAESaver::MaterialInfo DAESaver::getMaterial(LLTextureEntry* te)
{
if (gSavedSettings.getBOOL("DAEExportConsolidateMaterials"))
{
for (S32 i=0; i < mAllMaterials.size(); i++)
for (U32 i=0; i < mAllMaterials.size(); i++)
{
if (mAllMaterials[i].matches(te))
{
@@ -1010,7 +981,7 @@ void DAESaver::generateEffects(daeElement *effects)
// Effects (face color, alpha)
bool export_textures = gSavedSettings.getBOOL("DAEExportTextures");
for (S32 mat = 0; mat < mAllMaterials.size(); mat++)
for (U32 mat = 0; mat < mAllMaterials.size(); mat++)
{
LLColor4 color = mAllMaterials[mat].color;
domEffect* effect = (domEffect*)effects->add("effect");
@@ -1021,7 +992,7 @@ void DAESaver::generateEffects(daeElement *effects)
if (export_textures)
{
LLUUID textID;
S32 i = 0;
U32 i = 0;
for (; i < mTextures.size(); i++)
{
if (mAllMaterials[mat].textureID == mTextures[i])
@@ -1068,7 +1039,7 @@ void DAESaver::generateEffects(daeElement *effects)
void DAESaver::generateImagesSection(daeElement* images)
{
for (S32 i=0; i < mTextureNames.size(); i++)
for (U32 i=0; i < mTextureNames.size(); i++)
{
std::string name = mTextureNames[i];
if (name.empty()) continue;

View File

@@ -76,9 +76,6 @@ ATI FirePro M5800 .*ATI.*FirePro.*M58.* 3 1
ATI FirePro M7740 .*ATI.*FirePro.*M77.* 3 1
ATI FirePro M7820 .*ATI.*FirePro.*M78.* 3 1
ATI FireMV .*ATI.*FireMV.* 0 1
ATI Geforce 9500 GT .*ATI.*Geforce 9500 *GT.* 2 1
ATI Geforce 9600 GT .*ATI.*Geforce 9600 *GT.* 2 1
ATI Geforce 9800 GT .*ATI.*Geforce 9800 *GT.* 2 1
ATI Generic .*ATI.*Generic.* 0 0
ATI Hercules 9800 .*ATI.*Hercules.*9800.* 1 1
ATI IGP 340M .*ATI.*IGP.*340M.* 0 0

View File

@@ -26,6 +26,9 @@
LFSimFeatureHandler::LFSimFeatureHandler()
: mSupportsExport(false)
, mSayRange(20)
, mShoutRange(100)
, mWhisperRange(10)
{
if (!gHippoGridManager->getCurrentGrid()->isSecondLife()) // Remove this line if we ever handle SecondLife sim features
LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LFSimFeatureHandler::handleRegionChange, this));
@@ -61,15 +64,22 @@ void LFSimFeatureHandler::setSupportedFeatures()
{
// For definition of OpenSimExtras please see
// http://opensimulator.org/wiki/SimulatorFeatures_Extras
mSupportsExport = info["OpenSimExtras"].has("ExportSupported") ? info["OpenSimExtras"]["ExportSupported"].asBoolean() : false;
mMapServerURL = info["OpenSimExtras"].has("map-server-url") ? info["OpenSimExtras"]["map-server-url"].asString() : "";
mSearchURL = info["OpenSimExtras"].has("search-server-url") ? info["OpenSimExtras"]["search-server-url"].asString() : "";
const LLSD& extras(info["OpenSimExtras"]);
mSupportsExport = extras.has("ExportSupported") ? extras["ExportSupported"].asBoolean() : false;
mMapServerURL = extras.has("map-server-url") ? extras["map-server-url"].asString() : "";
mSearchURL = extras.has("search-server-url") ? extras["search-server-url"].asString() : "";
mSayRange = extras.has("say-range") ? extras["say-range"].asInteger() : 20;
mShoutRange = extras.has("shout-range") ? extras["shout-range"].asInteger() : 100;
mWhisperRange = extras.has("whisper-range") ? extras["whisper-range"].asInteger() : 10;
}
else // OpenSim specifics are unsupported reset all to default
{
mSupportsExport = false;
mMapServerURL = "";
mSearchURL = "";
mSayRange = 20;
mShoutRange = 100;
mWhisperRange = 10;
}
}
}
@@ -84,3 +94,17 @@ boost::signals2::connection LFSimFeatureHandler::setSearchURLCallback(const boos
return mSearchURL.connect(slot);
}
boost::signals2::connection LFSimFeatureHandler::setSayRangeCallback(const boost::signals2::signal<void()>::slot_type& slot)
{
return mSayRange.connect(slot);
}
boost::signals2::connection LFSimFeatureHandler::setShoutRangeCallback(const boost::signals2::signal<void()>::slot_type& slot)
{
return mShoutRange.connect(slot);
}
boost::signals2::connection LFSimFeatureHandler::setWhisperRangeCallback(const boost::signals2::signal<void()>::slot_type& slot)
{
return mWhisperRange.connect(slot);
}

View File

@@ -59,11 +59,17 @@ public:
// Connection setters
boost::signals2::connection setSupportsExportCallback(const boost::signals2::signal<void()>::slot_type& slot);
boost::signals2::connection setSearchURLCallback(const boost::signals2::signal<void()>::slot_type& slot);
boost::signals2::connection setSayRangeCallback(const boost::signals2::signal<void()>::slot_type& slot);
boost::signals2::connection setShoutRangeCallback(const boost::signals2::signal<void()>::slot_type& slot);
boost::signals2::connection setWhisperRangeCallback(const boost::signals2::signal<void()>::slot_type& slot);
// Accessors
bool simSupportsExport() const { return mSupportsExport; }
std::string mapServerURL() const { return mMapServerURL; }
std::string searchURL() const { return mSearchURL; }
U32 sayRange() const { return mSayRange; }
U32 shoutRange() const { return mShoutRange; }
U32 whisperRange() const { return mWhisperRange; }
ExportPolicy exportPolicy() const;
private:
@@ -71,6 +77,9 @@ private:
SignaledType<bool> mSupportsExport;
std::string mMapServerURL;
SignaledType<std::string> mSearchURL;
SignaledType<U32> mSayRange;
SignaledType<U32> mShoutRange;
SignaledType<U32> mWhisperRange;
};
#endif //LFSIMFEATUREHANDLER_H

View File

@@ -57,8 +57,6 @@ namespace
int gArgC;
char** gArgV;
bool sCrashReporterIsRunning = false;
OSErr AEQuitHandler(const AppleEvent *messagein, AppleEvent *reply, long refIn)
{
OSErr result = noErr;
@@ -262,33 +260,6 @@ bool LLAppViewerMacOSX::restoreErrorTrap()
return reset_count == 0;
}
static OSStatus CarbonEventHandler(EventHandlerCallRef inHandlerCallRef,
EventRef inEvent,
void* inUserData)
{
ProcessSerialNumber psn;
GetEventParameter(inEvent,
kEventParamProcessID,
typeProcessSerialNumber,
NULL,
sizeof(psn),
NULL,
&psn);
if( GetEventKind(inEvent) == kEventAppTerminated )
{
Boolean matching_psn = FALSE;
OSErr os_result = SameProcess(&psn, (ProcessSerialNumber*)inUserData, &matching_psn);
if(os_result >= 0 && matching_psn)
{
sCrashReporterIsRunning = false;
QuitApplicationEventLoop();
}
}
return noErr;
}
void LLAppViewerMacOSX::initCrashReporting(bool reportFreeze)
{
// Singu Note: this is where original code forks crash logger process.

View File

@@ -244,7 +244,9 @@ void LLCrashLogger::gatherFiles()
mCrashInfo["DebugLog"] = mDebugLog;
mFileMap["StatsLog"] = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,"stats.log");
// Singu Note: we have just started again, log has been renamed
mFileMap["SecondLifeLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "Singularity.old");
llinfos << "Encoding files..." << llendl;
for(std::map<std::string, std::string>::iterator itr = mFileMap.begin(); itr != mFileMap.end(); ++itr)

View File

@@ -335,7 +335,7 @@ void LLDrawPoolAlpha::render(S32 pass)
gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
}
gGL.diffuseColor4f(1,0,0,1);
gGL.diffuseColor4f(0.9,0,0,0.4);
LLViewerFetchedTexture::sSmokeImagep->addTextureStats(1024.f*1024.f);
gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sSmokeImagep, TRUE) ;

View File

@@ -61,6 +61,7 @@
#include "llviewermenu.h"
#include "hippogridmanager.h"
#include "lfsimfeaturehandler.h"
// [RLVa:KB]
#include "rlvhandler.h"
@@ -617,7 +618,7 @@ void LLFloaterAvatarList::updateAvatarList()
// Announce position
F32 dist = (F32)(position - mypos).magVec();
entry->setPosition(position, gAgent.getRegion()->pointInRegionGlobal(position), avatarp, dist < 20.0, dist < 96.0);
entry->setPosition(position, gAgent.getRegion()->pointInRegionGlobal(position), avatarp, dist < LFSimFeatureHandler::getInstance()->sayRange(), dist < LFSimFeatureHandler::getInstance()->shoutRange());
// Mark as typing if they are typing
if (avatarp && avatarp->isTyping()) entry->setActivity(LLAvatarListEntry::ACTIVITY_TYPING);
@@ -876,10 +877,10 @@ void LLFloaterAvatarList::refreshAvatarList()
}
else
{
if (distance <= 96.0)
if (distance <= LFSimFeatureHandler::getInstance()->shoutRange())
{
snprintf(temp, sizeof(temp), "%.1f", distance);
if (distance > 20.0f)
if (distance > LFSimFeatureHandler::getInstance()->sayRange())
{
color = sRadarTextShoutRange;
}

View File

@@ -650,13 +650,12 @@ void LLFloaterChat::onClickToggleActiveSpeakers(void* userdata)
//self->childSetVisible("active_speakers_panel", !self->childIsVisible("active_speakers_panel"));
}
void show_log_browser(const std::string& name = "chat", const std::string& id = "chat");
// static
void LLFloaterChat::onClickChatHistoryOpen(void* userdata)
{
std::string command("\"" + LLLogChat::makeLogFileName("chat") + "\"");
gViewerWindow->getWindow()->ShellEx(command);
llinfos << command << llendl;
show_log_browser();
}
//static

View File

@@ -32,38 +32,10 @@
#include "llviewerprecompiledheaders.h"
#if LL_MSVC
#pragma warning (disable : 4018)
#pragma warning (push)
#pragma warning (disable : 4068)
#pragma warning (disable : 4263)
#pragma warning (disable : 4264)
#endif
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#include "dae.h"
//#include "dom.h"
#include "dom/domAsset.h"
#include "dom/domBind_material.h"
#include "dom/domCOLLADA.h"
#include "dom/domConstants.h"
#include "dom/domController.h"
#include "dom/domEffect.h"
#include "dom/domGeometry.h"
#include "dom/domInstance_geometry.h"
#include "dom/domInstance_material.h"
#include "dom/domInstance_node.h"
#include "dom/domInstance_effect.h"
#include "dom/domMaterial.h"
#include "dom/domMatrix.h"
#include "dom/domNode.h"
#include "dom/domProfile_COMMON.h"
#include "dom/domRotate.h"
#include "dom/domScale.h"
#include "dom/domTranslate.h"
#include "dom/domVisual_scene.h"
#if LL_MSVC
#pragma warning (pop)
#endif
#include "llfloatermodelpreview.h"
@@ -268,7 +240,7 @@ bool ll_is_degenerate(const LLVector4a& a, const LLVector4a& b, const LLVector4a
bool validate_face(const LLVolumeFace& face)
{
for (U32 i = 0; i < face.mNumIndices; ++i)
for (S32 i = 0; i < face.mNumIndices; ++i)
{
if (face.mIndices[i] >= face.mNumVertices)
{
@@ -951,7 +923,7 @@ void LLFloaterModelPreview::onPhysicsStageExecute(LLUICtrl* ctrl, void* data)
if (sInstance->mModelPreview)
{
for (S32 i = 0; i < sInstance->mModelPreview->mModel[LLModel::LOD_PHYSICS].size(); ++i)
for (U32 i = 0; i < sInstance->mModelPreview->mModel[LLModel::LOD_PHYSICS].size(); ++i)
{
LLModel* mdl = sInstance->mModelPreview->mModel[LLModel::LOD_PHYSICS][i];
DecompRequest* request = new DecompRequest(stage, mdl);
@@ -1501,7 +1473,7 @@ bool LLModelLoader::doLoadModel()
//1. Basic validity check on controller
U32 controllerCount = (int) db->getElementCount(NULL, "controller");
bool result = false;
for (int i = 0; i < controllerCount; ++i)
for (U32 i = 0; i < controllerCount; ++i)
{
domController* pController = NULL;
db->getElement((daeElement**) &pController, i , NULL, "controller");
@@ -2108,7 +2080,7 @@ bool LLModelLoader::loadFromSLM(const std::string& filename)
for (S32 lod = 0; lod < LLModel::NUM_LODS; ++lod)
{
for (U32 i = 0; i < mesh.size(); ++i)
for (int i = 0; i < mesh.size(); ++i)
{
std::stringstream str(mesh[i].asString());
LLPointer<LLModel> loaded_model = new LLModel(volume_params, (F32) lod);
@@ -2143,7 +2115,7 @@ bool LLModelLoader::loadFromSLM(const std::string& filename)
LLSD& instance = data["instance"];
for (U32 i = 0; i < instance.size(); ++i)
for (int i = 0; i < instance.size(); ++i)
{
//deserialize instance list
instance_list.push_back(LLModelInstance(instance[i]));
@@ -2873,7 +2845,7 @@ void LLModelLoader::processElement(daeElement* element, bool& badElement)
std::map<std::string, LLImportMaterial> LLModelLoader::getMaterials(LLModel* model, domInstance_geometry* instance_geo)
{
std::map<std::string, LLImportMaterial> materials;
for (int i = 0; i < model->mMaterialList.size(); i++)
for (U32 i = 0; i < model->mMaterialList.size(); i++)
{
LLImportMaterial import_material;
@@ -2885,7 +2857,7 @@ std::map<std::string, LLImportMaterial> LLModelLoader::getMaterials(LLModel* mod
if (technique)
{
daeTArray< daeSmartRef<domInstance_material> > inst_materials = technique->getChildrenByType<domInstance_material>();
for (int j = 0; j < inst_materials.getCount(); j++)
for (U32 j = 0; j < inst_materials.getCount(); j++)
{
std::string symbol(inst_materials[j]->getSymbol());
@@ -2939,7 +2911,7 @@ LLImportMaterial LLModelLoader::profileToMaterial(domProfile_COMMON* material)
if (texture)
{
domCommon_newparam_type_Array newparams = material->getNewparam_array();
for (S32 i = 0; i < newparams.getCount(); i++)
for (U32 i = 0; i < newparams.getCount(); i++)
{
domFx_surface_common* surface = newparams[i]->getSurface();
if (surface)
@@ -3331,7 +3303,7 @@ void LLModelPreview::rebuildUploadData()
base_model->mMetric = metric;
}
S32 idx = 0;
U32 idx = 0;
for (idx = 0; idx < mBaseModel.size(); ++idx)
{ //find reference instance for this model
if (mBaseModel[idx] == base_model)
@@ -3651,7 +3623,7 @@ void LLModelPreview::loadModelCallback(S32 lod)
list_iter->mModel = list_iter->mLOD[lod];
//add current model to current LoD's model list (LLModel::mLocalID makes a good vector index)
S32 idx = list_iter->mModel->mLocalID;
U32 idx = list_iter->mModel->mLocalID;
if (mModel[lod].size() <= idx)
{ //stretch model list to fit model at given index
@@ -5123,7 +5095,7 @@ BOOL LLModelPreview::render()
if (textures)
{
int materialCnt = instance.mModel->mMaterialList.size();
U32 materialCnt = instance.mModel->mMaterialList.size();
if (i < materialCnt)
{
const std::string& binding = instance.mModel->mMaterialList[i];
@@ -5333,7 +5305,7 @@ BOOL LLModelPreview::render()
LLStrider<U16> idx;
buffer->getIndexStrider(idx, 0);
for (U32 i = 0; i < buffer->getNumIndices(); i += 3)
for (S32 i = 0; i < buffer->getNumIndices(); i += 3)
{
LLVector4a v1; v1.setMul(pos[*idx++], scale);
LLVector4a v2; v2.setMul(pos[*idx++], scale);
@@ -5417,7 +5389,7 @@ BOOL LLModelPreview::render()
}
}
for (U32 j = 0; j < buffer->getNumVerts(); ++j)
for (S32 j = 0; j < buffer->getNumVerts(); ++j)
{
LLMatrix4 final_mat;
final_mat.mMatrix[0][0] = final_mat.mMatrix[1][1] = final_mat.mMatrix[2][2] = final_mat.mMatrix[3][3] = 0.f;

View File

@@ -41,6 +41,7 @@
#include "llcombobox.h"
#include "llfloaterchat.h"
#include "llfloaterinventory.h"
#include "llfloaterwebcontent.h" // For web browser display of logs
#include "llgroupactions.h"
#include "llhttpclient.h"
#include "llimview.h"
@@ -1086,17 +1087,29 @@ void LLFloaterIMPanel::onFlyoutCommit(LLComboBox* flyout, const LLSD& value)
}
}
void show_log_browser(const std::string& name, const std::string& id)
{
if (gSavedSettings.getBOOL("LiruLegacyLogLaunch"))
{
gViewerWindow->getWindow()->ShellEx("\"" + LLLogChat::makeLogFileName(name) + "\"");
return;
}
LLFloaterWebContent::Params p;
p.url("file:///" + LLLogChat::makeLogFileName(name));
p.id(id);
p.show_chrome(false);
p.trusted_content(true);
LLFloaterWebContent::showInstance("log", p); // If we passed id instead of "log", there would be no control over how many log browsers opened at once.
}
void LLFloaterIMPanel::onClickHistory()
{
if (mOtherParticipantUUID.notNull())
{
// [Ansariel: Display name support]
//std::string command("\"" + LLLogChat::makeLogFileName(getTitle()) + "\"");
std::string command("\"" + LLLogChat::makeLogFileName(mSessionLabel) + "\"");
//show_log_browser(getTitle(), mOtherParticipantUUID.asString());
show_log_browser(mSessionLabel, mOtherParticipantUUID.asString());
// [/Ansariel: Display name support]
gViewerWindow->getWindow()->ShellEx(command);
llinfos << command << llendl;
}
}

View File

@@ -153,7 +153,7 @@ void LLLogChat::loadHistory(std::string const& filename , void (*callback)(ELogL
char buffer[LOG_RECALL_BUFSIZ];
bool error = false;
int nlines = 0;
U32 nlines = 0;
while (pos > 0 && nlines < lines)
{
// Read the LOG_RECALL_BUFSIZ characters before pos.

View File

@@ -40,6 +40,7 @@
#include "lllocalcliprect.h"
#include "llrender.h"
#include "lfsimfeaturehandler.h"
#include "llfloateravatarlist.h"
#include "llagent.h"
@@ -503,11 +504,11 @@ void LLNetMap::draw()
static LLUICachedControl<bool> chat_ring("MiniMapChatRing");
static LLUICachedControl<bool> shout_ring("MiniMapShoutRing");
if(whisper_ring)
drawRing(LLWorld::getInstance()->getWhisperDistance(), pos_map, map_whisper_ring_color);
drawRing(LFSimFeatureHandler::getInstance()->whisperRange(), pos_map, map_whisper_ring_color);
if(chat_ring)
drawRing(LLWorld::getInstance()->getSayDistance(), pos_map, map_chat_ring_color);
drawRing(LFSimFeatureHandler::getInstance()->sayRange(), pos_map, map_chat_ring_color);
if(shout_ring)
drawRing(LLWorld::getInstance()->getShoutDistance(), pos_map, map_shout_ring_color);
drawRing(LFSimFeatureHandler::getInstance()->shoutRange(), pos_map, map_shout_ring_color);
// Draw frustum
// <FS:CR> Aurora Sim

View File

@@ -1476,6 +1476,9 @@ void init_debug_rendering_menu(LLMenuGL* menu)
menu->addChild(new LLMenuItemCallGL("Rebuild Vertex Buffers", reset_vertex_buffers, NULL, NULL, 'V', MASK_CONTROL | MASK_SHIFT));
item = new LLMenuItemCheckGL("Animate Trees", menu_toggle_control, NULL, menu_check_control, (void*)"RenderAnimateTrees");
menu->addChild(item);
item = new LLMenuItemCheckGL("Animate Textures", menu_toggle_control, NULL, menu_check_control, (void*)"AnimateTextures");
menu->addChild(item);

View File

@@ -94,12 +94,6 @@ const F32 LLWorld::mScale = 1.f;
F32 LLWorld::mWidthInMeters = mWidth * mScale;
// </FS:CR> Aurora Sim
//TODO: This will use chat ranges
// according to opensim settings
const F32 LLWorld::mWhisperDistance = 10;
const F32 LLWorld::mSayDistance = 20;
const F32 LLWorld::mShoutDistance = 100;
//
// Functions
//

View File

@@ -125,10 +125,6 @@ public:
F32 getRegionMinHeight() const { return -mWidthInMeters; }
F32 getRegionMaxHeight() const { return MAX_OBJECT_Z; }
F32 getWhisperDistance() const { return mWhisperDistance; }
F32 getSayDistance() const { return mSayDistance; }
F32 getShoutDistance() const { return mShoutDistance; }
void updateRegions(F32 max_update_time);
void updateVisibilities();
void updateParticles();
@@ -202,10 +198,6 @@ private:
static F32 mWidthInMeters;
// </FS:CR> Aurora Sim
static const F32 mWhisperDistance;
static const F32 mSayDistance;
static const F32 mShoutDistance;
F32 mLandFarClip; // Far clip distance for land.
LLPatchVertexArray mLandPatch;
S32 mLastPacketsIn;

View File

@@ -54,7 +54,7 @@
Grid:
</text>
<combo_box allow_text_entry="true" max_chars="128" bottom_delta="-24" follows="left|bottom" height="20"
left="0" mouse_opaque="true" name="grids_combo" width="120" />
left="0" mouse_opaque="true" width="120" name="grids_combo" tool_tip="Input the name/nick for a known grid or any login uri, or pick one from the list"/>
<button name="grids_btn" label="Grid Manager"
bottom_delta="-20" left_delta="10" height="16" width="100"
follows="left|bottom" font="SansSerifSmall" halign="center"

View File

@@ -552,7 +552,8 @@ class DarwinManifest(ViewerManifest):
for libfile in ("libllcommon.dylib",
"libapr-1.0.dylib",
"libaprutil-1.0.dylib",
"libexpat.1.5.2.dylib"):
"libexpat.1.5.2.dylib",
"libexception_handler.dylib"):
target_lib = os.path.join('../../..', libfile)
self.run_command("ln -sf %(target)r %(link)r" %
{'target': target_lib,
@@ -857,7 +858,6 @@ class Linux_x86_64Manifest(LinuxManifest):
self.path("libexpat.so*")
self.path("libglod.so")
self.path("libhunspell-1.3.so*")
self.path("libpcre.so.3");
self.path("libminizip.so.1.2.3", "libminizip.so");
self.path("libssl.so*")
self.path("libuuid.so*")

View File

@@ -759,7 +759,7 @@ Boolean LLFilePickerBase::navOpenFilterProc(AEDesc *theItem, void *info, void *c
if (fileInfo.filetype != 'JPEG' && fileInfo.filetype != 'JPG ' &&
fileInfo.filetype != 'BMP ' && fileInfo.filetype != 'TGA ' &&
fileInfo.filetype != 'BMPf' && fileInfo.filetype != 'TPIC' &&
fileInfo.filetype != 'PNG ' && fileInfo.filetype != 'JP2' &&
fileInfo.filetype != 'PNG ' && fileInfo.filetype != 'JP2 ' &&
(fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("jpeg"), kCFCompareCaseInsensitive) != kCFCompareEqualTo &&
CFStringCompare(fileInfo.extension, CFSTR("jpg"), kCFCompareCaseInsensitive) != kCFCompareEqualTo &&
CFStringCompare(fileInfo.extension, CFSTR("bmp"), kCFCompareCaseInsensitive) != kCFCompareEqualTo &&

View File

@@ -181,30 +181,30 @@
<key>darwin</key>
<map>
<key>md5sum</key>
<string>e859007376f28d699bfea420e44d02e3</string>
<string>b31c495d5e77daa09394b370fc228312</string>
<key>url</key>
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/boost-1.45.0-darwin-20110304.tar.bz2</uri>
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/boost-1.52.0-darwin-20130221.tar.bz2</uri>
</map>
<key>linux</key>
<map>
<key>md5sum</key>
<string>6e71c78873593aea2ec5c68dcfde0167</string>
<string>c11e7bd8c35401f240338ebea5390499</string>
<key>url</key>
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/boost-1.45.0-linux-20110604.tar.bz2</uri>
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/boost-1.52.0-linux-20130222.tar.bz2</uri>
</map>
<key>linux64</key>
<map>
<key>md5sum</key>
<string>ac6e5b52d5cf13443607c09d8c62b6c5</string>
<string>fab1924c7c83c2fb945957b0a9a211e5</string>
<key>url</key>
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/boost-1.48.0-linux-x86_64-20120719.tar.bz2</uri>
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/boost-1.52.0-linux64-20130531.tar.bz2</uri>
</map>
<key>windows</key>
<map>
<key>md5sum</key>
<string>ba3165f8e51c7a59f55c7464932fbfc1</string>
<string>eb13ff93db50d4b08648a5c78ba05310</string>
<key>url</key>
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/boost-1.45.0-windows-20120704.tar.bz2</uri>
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/boost-1.52.0-windows-20130221.tar.bz2</uri>
</map>
</map>
</map>
@@ -221,30 +221,30 @@
<key>darwin</key>
<map>
<key>md5sum</key>
<string>d1af5f9ae7740566a184b9af40af36da</string>
<string>4e0030cf15d4697e971eb6643286de3b</string>
<key>url</key>
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/colladadom-2.2-darwin-20110420.tar.bz2</uri>
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/colladadom-2.2-darwin-20131006.tar.bz2</uri>
</map>
<key>linux</key>
<map>
<key>md5sum</key>
<string>c8c56c032bc39d174876ab25c72a05d8</string>
<string>8817faad001cea8f92546f30b5fcbbfa</string>
<key>url</key>
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/colladadom-2.2-linux-20110621.tar.bz2</uri>
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/colladadom-2.2-linux-20131007.tar.bz2</uri>
</map>
<key>linux64</key>
<map>
<key>md5sum</key>
<string>bab6e7fea2411dd375d76bb4ce9118a5</string>
<string>1d23d74f2f475945ec4d24f70a27561d</string>
<key>url</key>
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/colladadom-2.2-linux-x86_64-20120719.tar.bz2</uri>
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/colladadom-2.2-linux64-20131007.tar.bz2</uri>
</map>
<key>windows</key>
<map>
<key>md5sum</key>
<string>5c5d071338dcf9d504c2cc2eed8b025a</string>
<string>514742a082f922f1ad8d9bf08ea22bbc</string>
<key>url</key>
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/colladadom-2.2-windows-20110413.tar.bz2</uri>
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/colladadom-2.2-windows-20131006.tar.bz2</uri>
</map>
</map>
</map>