merging latest changes
commit
44737a3992
18
.hgtags
18
.hgtags
|
|
@ -376,3 +376,21 @@ daca610d840625b5bebb966a57cb49581852c417 DRTVWR-265
|
|||
9afbdc4e24cc04feacfb2b7a10b78a64f780901a DRTVWR-266
|
||||
73280db02501f5ad041fc18b1eba68e73a81996c DRTVWR-267
|
||||
870e2d79e0063fda87187f17bbc2747766733194 3.4.3-beta3
|
||||
0a2ca6546b499239afeb66d17b2fadbcdbe36ab1 3.4.3-release
|
||||
4c3460cb1fb7c6da9965e09c734d282a8e9c81f0 DRTVWR-229
|
||||
f4481df42f9a4a92bf475a80f0c51d1a4bbdfd59 DRTVWR-246
|
||||
39c5204b6e800983a41ccac8ad6dc993120197c6 DRTVWR-247
|
||||
7c7d57d393e8ae7b61623279de06eb4a62ccae6a DRTVWR-249
|
||||
f72b50ef168c159d6e79e97aa2bcafaf8577ab99 DRTVWR-230
|
||||
b418be80903520c492e1173f3afbc4021cad5d07 DRTVWR-255
|
||||
9aa1aa9f1fe13c194695a0b8f0af298296241dc2 DRTVWR-260
|
||||
84fbaf2d4141bd161731430e760949dc787ca206 DRTVWR-244
|
||||
083d2d36b5bb1c54fc3dd7caac0e7ac381a9cef0 3.4.4-beta1
|
||||
b634dec987c16e8c9c938e11e52591d9ead8fa9b DRTVWR-270
|
||||
cd39255bd23330fd30c04105f2811e941d8524fe 3.4.4-beta2
|
||||
2c4011bbc2b15b82198fd8b51f3a9fe765a08c4d DRTVWR-271
|
||||
2f8a3ef687bc55828abcb17ac1ad7cde70536d7e 3.4.4-beta3
|
||||
35cfd4cf5b895fa776592f2e630e330be7f0604e DRTVWR-273
|
||||
c374035d459af3c03dea2dd90880dfc25de64706 DRTVWR-275
|
||||
05d9f1dd7a954069af2a33abedb7713fa36a04cb 3.4.4-beta4
|
||||
e1bb1ae7d8b12faeb37933a737c199cc9b9f89cc 3.4.4-release
|
||||
|
|
|
|||
18
BuildParams
18
BuildParams
|
|
@ -21,13 +21,8 @@ email_status_this_is_os = true
|
|||
# Limit extent of codeticket updates to revisions after...
|
||||
codeticket_since = 3.3.0-release
|
||||
|
||||
clean_on_success = false
|
||||
run_tests = false
|
||||
build_Darwin_Debug = false
|
||||
build_Darwin_RelWithDebInfo = false
|
||||
|
||||
# ========================================
|
||||
# Viewer Development --
|
||||
# Viewer Development
|
||||
# ========================================
|
||||
|
||||
# Report changes since...
|
||||
|
|
@ -121,17 +116,6 @@ viewer-mesh.login_channel = "Project Viewer - Mesh"
|
|||
viewer-mesh.viewer_grid = aditi
|
||||
viewer-mesh.email = shining@lists.lindenlab.com
|
||||
|
||||
# ========================================
|
||||
# viewer-adult-check
|
||||
# ========================================
|
||||
|
||||
viewer-adult-check.viewer_channel = "Project Viewer - AdultCheck"
|
||||
viewer-adult-check.login_channel = "Project Viewer - AdultCheck"
|
||||
viewer-adult-check.viewer_grid = agni
|
||||
viewer-adult-check.build_debug_release_separately = true
|
||||
viewer-adult-check.build_CYGWIN_Debug = false
|
||||
viewer-adult-check.build_viewer_update_version_manager = false
|
||||
|
||||
# ========================================
|
||||
# viewer-pathfinding
|
||||
# ========================================
|
||||
|
|
|
|||
|
|
@ -186,9 +186,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>36aa500e13cdde61607b6e93065206ec</string>
|
||||
<string>ac37d0038c91b0672fa31a02731f0eac</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/261457/arch/Darwin/installer/boost-1.48.0-darwin-20120710.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/268347/arch/Darwin/installer/boost-1.52.0-darwin-20121218.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin</string>
|
||||
|
|
@ -198,9 +198,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>18602d44bd435eb0d7189f436ff2cb0f</string>
|
||||
<string>146ed8a8c2ef8ab3f0a6c4f214fc5c22</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/261457/arch/Linux/installer/boost-1.48.0-linux-20120710.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/268347/arch/Linux/installer/boost-1.52.0-linux-20121218.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>linux</string>
|
||||
|
|
@ -210,9 +210,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>dc8f5dc6be04c64bf3460b4932b18457</string>
|
||||
<string>3ea60f17d986b7e8a3351298734bdca4</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/261457/arch/CYGWIN/installer/boost-1.48.0-windows-20120710.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/268347/arch/CYGWIN/installer/boost-1.52.0-windows-20121218.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
|
|
@ -918,9 +918,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>efaf5cb3e861d44518eb03f4c406f03c</string>
|
||||
<string>e6feee3b452c2f70ce8558e30d6bc10a</string>
|
||||
<key>url</key>
|
||||
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/falcon_3p-havok-source/rev/261536/arch/Darwin/installer/havok_source-2012.1-darwin-20120710.tar.bz2</string>
|
||||
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/lindenlab_3p-havok-source/rev/268409/arch/Darwin/installer/havok_source-2012.1-darwin-20121219.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin</string>
|
||||
|
|
@ -930,9 +930,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>50037fff3fd3356a073cdae88348c9ab</string>
|
||||
<string>0c0d2058ba48446e274d6595d1d8063e</string>
|
||||
<key>url</key>
|
||||
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/falcon_3p-havok-source/rev/261536/arch/Linux/installer/havok_source-2012.1-linux-20120711.tar.bz2</string>
|
||||
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/lindenlab_3p-havok-source/rev/268409/arch/Linux/installer/havok_source-2012.1-linux-20121219.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>linux</string>
|
||||
|
|
@ -942,9 +942,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>cd6638f5a03469654615730c16889a60</string>
|
||||
<string>88391b6e08d473506d406ca6f3e88cfb</string>
|
||||
<key>url</key>
|
||||
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/falcon_3p-havok-source/rev/261536/arch/CYGWIN/installer/havok_source-2012.1-windows-20120710.tar.bz2</string>
|
||||
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/lindenlab_3p-havok-source/rev/268409/arch/CYGWIN/installer/havok_source-2012.1-windows-20121219.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ if (STANDALONE)
|
|||
else (STANDALONE)
|
||||
use_prebuilt_binary(boost)
|
||||
set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||
set(BOOST_VERSION "1.52")
|
||||
|
||||
if (WINDOWS)
|
||||
set(BOOST_VERSION 1_48)
|
||||
if(MSVC80)
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY
|
||||
optimized libboost_program_options-vc80-mt-${BOOST_VERSION}
|
||||
|
|
|
|||
|
|
@ -254,12 +254,12 @@ elseif(LINUX)
|
|||
libapr-1.so.0
|
||||
libaprutil-1.so.0
|
||||
libatk-1.0.so
|
||||
libboost_program_options-mt.so.1.48.0
|
||||
libboost_regex-mt.so.1.48.0
|
||||
libboost_thread-mt.so.1.48.0
|
||||
libboost_filesystem-mt.so.1.48.0
|
||||
libboost_signals-mt.so.1.48.0
|
||||
libboost_system-mt.so.1.48.0
|
||||
libboost_program_options-mt.so.${BOOST_VERSION}.0
|
||||
libboost_regex-mt.so.${BOOST_VERSION}.0
|
||||
libboost_thread-mt.so.${BOOST_VERSION}.0
|
||||
libboost_filesystem-mt.so.${BOOST_VERSION}.0
|
||||
libboost_signals-mt.so.${BOOST_VERSION}.0
|
||||
libboost_system-mt.so.${BOOST_VERSION}.0
|
||||
libbreakpad_client.so.0
|
||||
libcollada14dom.so
|
||||
libcrypto.so.1.0.0
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ include(Prebuilt)
|
|||
|
||||
# If you want to enable or disable TCMALLOC in viewer builds, this is the place.
|
||||
# set ON or OFF as desired.
|
||||
set (USE_TCMALLOC ON)
|
||||
set (USE_TCMALLOC OFF)
|
||||
|
||||
if (STANDALONE)
|
||||
include(FindGooglePerfTools)
|
||||
|
|
|
|||
|
|
@ -201,19 +201,13 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
|
|||
endif(TEST_DEBUG)
|
||||
ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})
|
||||
SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}")
|
||||
if (WINDOWS)
|
||||
set_target_properties(INTEGRATION_TEST_${testname}
|
||||
PROPERTIES
|
||||
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /INCLUDE:__tcmalloc"
|
||||
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
|
||||
LINK_FLAGS_RELEASE ""
|
||||
)
|
||||
endif(WINDOWS)
|
||||
|
||||
if(STANDALONE)
|
||||
SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}")
|
||||
endif(STANDALONE)
|
||||
|
||||
# The following was copied to llcorehttp/CMakeLists.txt's texture_load target.
|
||||
# Any changes made here should be replicated there.
|
||||
if (WINDOWS)
|
||||
SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname}
|
||||
PROPERTIES
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Wed Nov 7 00:25:19 UTC 2012
|
||||
|
|
@ -116,6 +116,7 @@ set(llcommon_HEADER_FILES
|
|||
bitpack.h
|
||||
ctype_workaround.h
|
||||
doublelinkedlist.h
|
||||
fix_macros.h
|
||||
imageids.h
|
||||
indra_constants.h
|
||||
linden_common.h
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
/**
|
||||
* @file fix_macros.h
|
||||
* @author Nat Goodspeed
|
||||
* @date 2012-11-16
|
||||
* @brief The Mac system headers seem to #define macros with obnoxiously
|
||||
* generic names, preventing any library from using those names. We've
|
||||
* had to fix these in so many places that it's worth making a header
|
||||
* file to handle it.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
|
||||
* Copyright (c) 2012, Linden Research, Inc.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
// DON'T use an #include guard: every time we encounter this header, #undef
|
||||
// these macros all over again.
|
||||
|
||||
// who injects MACROS with such generic names?! Grr.
|
||||
#ifdef equivalent
|
||||
#undef equivalent
|
||||
#endif
|
||||
|
||||
#ifdef check
|
||||
#undef check
|
||||
#endif
|
||||
|
|
@ -59,8 +59,4 @@
|
|||
#include "llerror.h"
|
||||
#include "llfile.h"
|
||||
|
||||
// Boost 1.45 had version 2 as the default for the filesystem library,
|
||||
// 1.48 has version 3 as the default. Keep compatibility for now.
|
||||
#define BOOST_FILESYSTEM_VERSION 2
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -944,13 +944,15 @@ LLSD LLMemoryInfo::loadStatsMap()
|
|||
state.dwLength = sizeof(state);
|
||||
GlobalMemoryStatusEx(&state);
|
||||
|
||||
stats.add("Percent Memory use", state.dwMemoryLoad);
|
||||
stats.add("Total Physical KB", state.ullTotalPhys/1024);
|
||||
stats.add("Avail Physical KB", state.ullAvailPhys/1024);
|
||||
stats.add("Total page KB", state.ullTotalPageFile/1024);
|
||||
stats.add("Avail page KB", state.ullAvailPageFile/1024);
|
||||
stats.add("Total Virtual KB", state.ullTotalVirtual/1024);
|
||||
stats.add("Avail Virtual KB", state.ullAvailVirtual/1024);
|
||||
DWORDLONG div = 1024;
|
||||
|
||||
stats.add("Percent Memory use", state.dwMemoryLoad/div);
|
||||
stats.add("Total Physical KB", state.ullTotalPhys/div);
|
||||
stats.add("Avail Physical KB", state.ullAvailPhys/div);
|
||||
stats.add("Total page KB", state.ullTotalPageFile/div);
|
||||
stats.add("Avail page KB", state.ullAvailPageFile/div);
|
||||
stats.add("Total Virtual KB", state.ullTotalVirtual/div);
|
||||
stats.add("Avail Virtual KB", state.ullAvailVirtual/div);
|
||||
|
||||
PERFORMANCE_INFORMATION perf;
|
||||
perf.cb = sizeof(perf);
|
||||
|
|
@ -982,15 +984,15 @@ LLSD LLMemoryInfo::loadStatsMap()
|
|||
GetProcessMemoryInfo(GetCurrentProcess(), PPROCESS_MEMORY_COUNTERS(&pmem), sizeof(pmem));
|
||||
|
||||
stats.add("Page Fault Count", pmem.PageFaultCount);
|
||||
stats.add("PeakWorkingSetSize KB", pmem.PeakWorkingSetSize/1024);
|
||||
stats.add("WorkingSetSize KB", pmem.WorkingSetSize/1024);
|
||||
stats.add("QutaPeakPagedPoolUsage KB", pmem.QuotaPeakPagedPoolUsage/1024);
|
||||
stats.add("QuotaPagedPoolUsage KB", pmem.QuotaPagedPoolUsage/1024);
|
||||
stats.add("QuotaPeakNonPagedPoolUsage KB", pmem.QuotaPeakNonPagedPoolUsage/1024);
|
||||
stats.add("QuotaNonPagedPoolUsage KB", pmem.QuotaNonPagedPoolUsage/1024);
|
||||
stats.add("PagefileUsage KB", pmem.PagefileUsage/1024);
|
||||
stats.add("PeakPagefileUsage KB", pmem.PeakPagefileUsage/1024);
|
||||
stats.add("PrivateUsage KB", pmem.PrivateUsage/1024);
|
||||
stats.add("PeakWorkingSetSize KB", pmem.PeakWorkingSetSize/div);
|
||||
stats.add("WorkingSetSize KB", pmem.WorkingSetSize/div);
|
||||
stats.add("QutaPeakPagedPoolUsage KB", pmem.QuotaPeakPagedPoolUsage/div);
|
||||
stats.add("QuotaPagedPoolUsage KB", pmem.QuotaPagedPoolUsage/div);
|
||||
stats.add("QuotaPeakNonPagedPoolUsage KB", pmem.QuotaPeakNonPagedPoolUsage/div);
|
||||
stats.add("QuotaNonPagedPoolUsage KB", pmem.QuotaNonPagedPoolUsage/div);
|
||||
stats.add("PagefileUsage KB", pmem.PagefileUsage/div);
|
||||
stats.add("PeakPagefileUsage KB", pmem.PeakPagefileUsage/div);
|
||||
stats.add("PrivateUsage KB", pmem.PrivateUsage/div);
|
||||
|
||||
#elif LL_DARWIN
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
const S32 LL_VERSION_MAJOR = 3;
|
||||
const S32 LL_VERSION_MINOR = 4;
|
||||
const S32 LL_VERSION_PATCH = 3;
|
||||
const S32 LL_VERSION_PATCH = 4;
|
||||
const S32 LL_VERSION_BUILD = 0;
|
||||
|
||||
const char * const LL_CHANNEL = "Second Life Developer";
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ if (LL_TESTS)
|
|||
${CARES_LIBRARIES}
|
||||
${OPENSSL_LIBRARIES}
|
||||
${CRYPTO_LIBRARIES}
|
||||
${BOOST_SYSTEM_LIBRARY}
|
||||
${BOOST_THREAD_LIBRARY}
|
||||
)
|
||||
|
||||
|
|
@ -157,6 +158,7 @@ if (LL_TESTS)
|
|||
${CARES_LIBRARIES}
|
||||
${OPENSSL_LIBRARIES}
|
||||
${CRYPTO_LIBRARIES}
|
||||
${BOOST_SYSTEM_LIBRARY}
|
||||
${BOOST_THREAD_LIBRARY}
|
||||
)
|
||||
|
||||
|
|
@ -172,7 +174,7 @@ if (LL_TESTS)
|
|||
# The following come from LLAddBuildTest.cmake's INTEGRATION_TEST_xxxx target.
|
||||
set_target_properties(http_texture_load
|
||||
PROPERTIES
|
||||
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /INCLUDE:__tcmalloc"
|
||||
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS}"
|
||||
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
|
||||
LINK_FLAGS_RELEASE ""
|
||||
)
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "fix_macros.h"
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
#include "llapr.h"
|
||||
|
|
|
|||
|
|
@ -366,7 +366,7 @@ bool LLCrashLogger::sendCrashLogs()
|
|||
{
|
||||
sent = runCrashLogPost(mAltCrashHost, post_data, std::string("Sending to alternate server"), 3, 5);
|
||||
}
|
||||
|
||||
|
||||
mSentCrashLogs = sent;
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ void LLAvatarNameCache::requestNamesViaCapability()
|
|||
while(!sAskQueue.empty())
|
||||
{
|
||||
it = sAskQueue.begin();
|
||||
const LLUUID& agent_id = *it;
|
||||
LLUUID agent_id = *it;
|
||||
sAskQueue.erase(it);
|
||||
|
||||
if (url.empty())
|
||||
|
|
@ -407,7 +407,7 @@ void LLAvatarNameCache::requestNamesViaLegacy()
|
|||
for (S32 requests = 0; !sAskQueue.empty() && requests < MAX_REQUESTS; ++requests)
|
||||
{
|
||||
it = sAskQueue.begin();
|
||||
const LLUUID& agent_id = *it;
|
||||
LLUUID agent_id = *it;
|
||||
sAskQueue.erase(it);
|
||||
|
||||
// Mark as pending first, just in case the callback is immediately
|
||||
|
|
@ -559,8 +559,7 @@ void LLAvatarNameCache::eraseUnrefreshed()
|
|||
const LLAvatarName& av_name = it->second;
|
||||
if (av_name.mExpires < max_unrefreshed)
|
||||
{
|
||||
const LLUUID& agent_id = it->first;
|
||||
LL_DEBUGS("AvNameCache") << agent_id
|
||||
LL_DEBUGS("AvNameCache") << it->first
|
||||
<< " user '" << av_name.getAccountName() << "' "
|
||||
<< "expired " << now - av_name.mExpires << " secs ago"
|
||||
<< LL_ENDL;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ include_directories(
|
|||
|
||||
if (DARWIN)
|
||||
include(CMakeFindFrameworks)
|
||||
find_library(CARBON_LIBRARY Carbon)
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
endif (DARWIN)
|
||||
|
||||
|
|
@ -68,7 +67,7 @@ add_dependencies(SLPlugin
|
|||
|
||||
if (DARWIN)
|
||||
# Mac version needs to link against Carbon
|
||||
target_link_libraries(SLPlugin ${CARBON_LIBRARY} ${COCOA_LIBRARY})
|
||||
target_link_libraries(SLPlugin ${COCOA_LIBRARY})
|
||||
# Make sure the app bundle has a Resources directory (it will get populated by viewer-manifest.py later)
|
||||
add_custom_command(
|
||||
TARGET SLPlugin POST_BUILD
|
||||
|
|
|
|||
|
|
@ -28,8 +28,26 @@
|
|||
* @endcond
|
||||
*/
|
||||
|
||||
//Protos for ObjectiveC classes (cannot import cocoa here due to BOOL conflict)
|
||||
class NSWindow;
|
||||
|
||||
/* Defined in slplugin-objc.mm: */
|
||||
void setupCocoa();
|
||||
void createAutoReleasePool();
|
||||
void deleteAutoReleasePool();
|
||||
|
||||
class LLCocoaPlugin
|
||||
{
|
||||
public:
|
||||
LLCocoaPlugin();
|
||||
void setupCocoa();
|
||||
void createAutoReleasePool();
|
||||
void deleteAutoReleasePool();
|
||||
void setupGroup();
|
||||
void updateWindows();
|
||||
void processEvents();
|
||||
public:
|
||||
//EventTargetRef mEventTarget;
|
||||
NSWindow* mFrontWindow;
|
||||
NSWindow* mPluginWindow;
|
||||
int mHackState;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -30,11 +30,13 @@
|
|||
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#include "slplugin-objc.h"
|
||||
|
||||
//Note: NSApp is a global defined by cocoa which is an id to the application.
|
||||
|
||||
void setupCocoa()
|
||||
void LLCocoaPlugin::setupCocoa()
|
||||
{
|
||||
static bool inited = false;
|
||||
|
||||
|
|
@ -56,6 +58,8 @@ void setupCocoa()
|
|||
// Must first call [[[NSWindow alloc] init] release] to get the NSWindow machinery set up so that NSCursor can use a window to cache the cursor image
|
||||
[[[NSWindow alloc] init] release];
|
||||
|
||||
mPluginWindow = [NSApp mainWindow];
|
||||
|
||||
deleteAutoReleasePool();
|
||||
|
||||
inited = true;
|
||||
|
|
@ -64,7 +68,7 @@ void setupCocoa()
|
|||
|
||||
static NSAutoreleasePool *sPool = NULL;
|
||||
|
||||
void createAutoReleasePool()
|
||||
void LLCocoaPlugin::createAutoReleasePool()
|
||||
{
|
||||
if(!sPool)
|
||||
{
|
||||
|
|
@ -72,7 +76,7 @@ void createAutoReleasePool()
|
|||
}
|
||||
}
|
||||
|
||||
void deleteAutoReleasePool()
|
||||
void LLCocoaPlugin::deleteAutoReleasePool()
|
||||
{
|
||||
if(sPool)
|
||||
{
|
||||
|
|
@ -80,3 +84,94 @@ void deleteAutoReleasePool()
|
|||
sPool = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
LLCocoaPlugin::LLCocoaPlugin():mHackState(0)
|
||||
{
|
||||
NSArray* window_list = [NSApp orderedWindows];
|
||||
mFrontWindow = [window_list objectAtIndex:0];
|
||||
}
|
||||
|
||||
void LLCocoaPlugin::processEvents()
|
||||
{
|
||||
// Some plugins (webkit at least) will want an event loop. This qualifies.
|
||||
NSEvent * event;
|
||||
event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES];
|
||||
[NSApp sendEvent: event];
|
||||
}
|
||||
|
||||
|
||||
//Turns out the window ordering stuff never gets hit with any of the current plugins.
|
||||
//Leaving the following code here 'just in case' for the time being.
|
||||
|
||||
void LLCocoaPlugin::setupGroup()
|
||||
{
|
||||
// CreateWindowGroup(kWindowGroupAttrFixedLevel, &layer_group);
|
||||
// if(layer_group)
|
||||
// {
|
||||
// // Start out with a window layer that's way out in front (fixes the problem with the menubar not getting hidden on first switch to fullscreen youtube)
|
||||
// SetWindowGroupName(layer_group, CFSTR("SLPlugin Layer"));
|
||||
// SetWindowGroupLevel(layer_group, kCGOverlayWindowLevel);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
void LLCocoaPlugin::updateWindows() //SPATTERS give this a better name.
|
||||
{
|
||||
// NSArray* window_list = [NSApp orderedWindows];
|
||||
// NSWindow* current_window = [window_list objectAtIndex:0];
|
||||
// NSWindow* parent_window = [ current_window parentWindow ];
|
||||
// bool this_is_front_process = false;
|
||||
// bool parent_is_front_process = false;
|
||||
//
|
||||
//
|
||||
// // Check for a change in this process's frontmost window.
|
||||
// if ( current_window != mFrontWindow )
|
||||
// {
|
||||
// // and figure out whether this process or its parent are currently frontmost
|
||||
// if ( current_window == parent_window ) parent_is_front_process = true;
|
||||
// if ( current_window == mPluginWindow ) this_is_front_process = true;
|
||||
//
|
||||
// if (current_window != NULL && mFrontWindow == NULL)
|
||||
// {
|
||||
// // Opening the first window
|
||||
//
|
||||
// if(mHackState == 0)
|
||||
// {
|
||||
// // Next time through the event loop, lower the window group layer
|
||||
// mHackState = 1;
|
||||
// }
|
||||
//
|
||||
// if(parent_is_front_process)
|
||||
// {
|
||||
// // Bring this process's windows to the front.
|
||||
// [mPluginWindow makeKeyAndOrderFront:NSApp];
|
||||
// [mPluginWindow setOrderedIndex:0];
|
||||
// }
|
||||
//
|
||||
// [NSApp activateIgnoringOtherApps:YES];
|
||||
// }
|
||||
//
|
||||
// else if (( current_window == NULL) && (mFrontWindow != NULL))
|
||||
// {
|
||||
// // Closing the last window
|
||||
//
|
||||
// if(this_is_front_process)
|
||||
// {
|
||||
// // Try to bring this process's parent to the front
|
||||
// [parent_window makeKeyAndOrderFront:NSApp];
|
||||
// [parent_window setOrderedIndex:0];
|
||||
// }
|
||||
// }
|
||||
// else if(mHackState == 1)
|
||||
// {
|
||||
//// if(layer_group)
|
||||
//// {
|
||||
//// // Set the window group level back to something less extreme
|
||||
//// SetWindowGroupLevel(layer_group, kCGNormalWindowLevel);
|
||||
//// }
|
||||
// mHackState = 2;
|
||||
// }
|
||||
//
|
||||
// mFrontWindow = [window_list objectAtIndex:0];
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,12 @@
|
|||
#include "llapr.h"
|
||||
#include "llstring.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
using namespace std;
|
||||
|
||||
|
||||
#if LL_DARWIN
|
||||
#include <Carbon/Carbon.h>
|
||||
#include "slplugin-objc.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -176,6 +180,7 @@ int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdL
|
|||
int main(int argc, char **argv)
|
||||
#endif
|
||||
{
|
||||
|
||||
ll_init_apr();
|
||||
|
||||
// Set up llerror logging
|
||||
|
|
@ -216,26 +221,25 @@ int main(int argc, char **argv)
|
|||
|
||||
// Catch signals that most kinds of crashes will generate, and exit cleanly so the system crash dialog isn't shown.
|
||||
signal(SIGILL, &crash_handler); // illegal instruction
|
||||
# if LL_DARWIN
|
||||
signal(SIGEMT, &crash_handler); // emulate instruction executed
|
||||
# endif // LL_DARWIN
|
||||
signal(SIGFPE, &crash_handler); // floating-point exception
|
||||
signal(SIGBUS, &crash_handler); // bus error
|
||||
signal(SIGSEGV, &crash_handler); // segmentation violation
|
||||
signal(SIGSYS, &crash_handler); // non-existent system call invoked
|
||||
#endif
|
||||
# if LL_DARWIN
|
||||
signal(SIGEMT, &crash_handler); // emulate instruction executed
|
||||
|
||||
#if LL_DARWIN
|
||||
setupCocoa();
|
||||
createAutoReleasePool();
|
||||
#endif
|
||||
LLCocoaPlugin cocoa_interface;
|
||||
cocoa_interface.setupCocoa();
|
||||
cocoa_interface.createAutoReleasePool();
|
||||
#endif //LL_DARWIN
|
||||
|
||||
LLPluginProcessChild *plugin = new LLPluginProcessChild();
|
||||
|
||||
plugin->init(port);
|
||||
|
||||
#if LL_DARWIN
|
||||
deleteAutoReleasePool();
|
||||
cocoa_interface.deleteAutoReleasePool();
|
||||
#endif
|
||||
|
||||
LLTimer timer;
|
||||
|
|
@ -246,114 +250,22 @@ int main(int argc, char **argv)
|
|||
#endif
|
||||
|
||||
#if LL_DARWIN
|
||||
|
||||
// If the plugin opens a new window (such as the Flash plugin's fullscreen player), we may need to bring this plugin process to the foreground.
|
||||
// Use this to track the current frontmost window and bring this process to the front if it changes.
|
||||
WindowRef front_window = NULL;
|
||||
WindowGroupRef layer_group = NULL;
|
||||
int window_hack_state = 0;
|
||||
CreateWindowGroup(kWindowGroupAttrFixedLevel, &layer_group);
|
||||
if(layer_group)
|
||||
{
|
||||
// Start out with a window layer that's way out in front (fixes the problem with the menubar not getting hidden on first switch to fullscreen youtube)
|
||||
SetWindowGroupName(layer_group, CFSTR("SLPlugin Layer"));
|
||||
SetWindowGroupLevel(layer_group, kCGOverlayWindowLevel);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if LL_DARWIN
|
||||
EventTargetRef event_target = GetEventDispatcherTarget();
|
||||
// cocoa_interface.mEventTarget = GetEventDispatcherTarget();
|
||||
#endif
|
||||
while(!plugin->isDone())
|
||||
{
|
||||
#if LL_DARWIN
|
||||
createAutoReleasePool();
|
||||
cocoa_interface.createAutoReleasePool();
|
||||
#endif
|
||||
timer.reset();
|
||||
plugin->idle();
|
||||
#if LL_DARWIN
|
||||
{
|
||||
// Some plugins (webkit at least) will want an event loop. This qualifies.
|
||||
EventRef event;
|
||||
if(ReceiveNextEvent(0, 0, kEventDurationNoWait, true, &event) == noErr)
|
||||
{
|
||||
SendEventToEventTarget (event, event_target);
|
||||
ReleaseEvent(event);
|
||||
}
|
||||
|
||||
// Check for a change in this process's frontmost window.
|
||||
if(GetFrontWindowOfClass(kAllWindowClasses, true) != front_window)
|
||||
{
|
||||
ProcessSerialNumber self = { 0, kCurrentProcess };
|
||||
ProcessSerialNumber parent = { 0, kNoProcess };
|
||||
ProcessSerialNumber front = { 0, kNoProcess };
|
||||
Boolean this_is_front_process = false;
|
||||
Boolean parent_is_front_process = false;
|
||||
{
|
||||
// Get this process's parent
|
||||
ProcessInfoRec info;
|
||||
info.processInfoLength = sizeof(ProcessInfoRec);
|
||||
info.processName = NULL;
|
||||
info.processAppSpec = NULL;
|
||||
if(GetProcessInformation( &self, &info ) == noErr)
|
||||
{
|
||||
parent = info.processLauncher;
|
||||
}
|
||||
|
||||
// and figure out whether this process or its parent are currently frontmost
|
||||
if(GetFrontProcess(&front) == noErr)
|
||||
{
|
||||
(void) SameProcess(&self, &front, &this_is_front_process);
|
||||
(void) SameProcess(&parent, &front, &parent_is_front_process);
|
||||
}
|
||||
}
|
||||
|
||||
if((GetFrontWindowOfClass(kAllWindowClasses, true) != NULL) && (front_window == NULL))
|
||||
{
|
||||
// Opening the first window
|
||||
|
||||
if(window_hack_state == 0)
|
||||
{
|
||||
// Next time through the event loop, lower the window group layer
|
||||
window_hack_state = 1;
|
||||
}
|
||||
|
||||
if(layer_group)
|
||||
{
|
||||
SetWindowGroup(GetFrontWindowOfClass(kAllWindowClasses, true), layer_group);
|
||||
}
|
||||
|
||||
if(parent_is_front_process)
|
||||
{
|
||||
// Bring this process's windows to the front.
|
||||
(void) SetFrontProcess( &self );
|
||||
}
|
||||
|
||||
ActivateWindow(GetFrontWindowOfClass(kAllWindowClasses, true), true);
|
||||
}
|
||||
else if((GetFrontWindowOfClass(kAllWindowClasses, true) == NULL) && (front_window != NULL))
|
||||
{
|
||||
// Closing the last window
|
||||
|
||||
if(this_is_front_process)
|
||||
{
|
||||
// Try to bring this process's parent to the front
|
||||
(void) SetFrontProcess(&parent);
|
||||
}
|
||||
}
|
||||
else if(window_hack_state == 1)
|
||||
{
|
||||
if(layer_group)
|
||||
{
|
||||
// Set the window group level back to something less extreme
|
||||
SetWindowGroupLevel(layer_group, kCGNormalWindowLevel);
|
||||
}
|
||||
window_hack_state = 2;
|
||||
}
|
||||
|
||||
front_window = GetFrontWindowOfClass(kAllWindowClasses, true);
|
||||
|
||||
}
|
||||
}
|
||||
cocoa_interface.processEvents();
|
||||
}
|
||||
#endif
|
||||
F64 elapsed = timer.getElapsedTimeF64();
|
||||
F64 remaining = plugin->getSleepTime() - elapsed;
|
||||
|
|
@ -377,7 +289,8 @@ int main(int argc, char **argv)
|
|||
|
||||
// LL_INFOS("slplugin") << "slept for "<< timer.getElapsedTimeF64() * 1000.0f << " ms" << LL_ENDL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if LL_WINDOWS
|
||||
// More agressive checking of interfering exception handlers.
|
||||
// Doesn't appear to be required so far - even for plugins
|
||||
|
|
@ -387,14 +300,14 @@ int main(int argc, char **argv)
|
|||
#endif
|
||||
|
||||
#if LL_DARWIN
|
||||
deleteAutoReleasePool();
|
||||
cocoa_interface.deleteAutoReleasePool();
|
||||
#endif
|
||||
}
|
||||
|
||||
delete plugin;
|
||||
|
||||
ll_cleanup_apr();
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2394,7 +2394,6 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus)
|
|||
{
|
||||
if (mFrontChild == child)
|
||||
{
|
||||
child->setFocus(true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ set(llvfs_HEADER_FILES
|
|||
if (DARWIN)
|
||||
LIST(APPEND llvfs_SOURCE_FILES lldir_mac.cpp)
|
||||
LIST(APPEND llvfs_HEADER_FILES lldir_mac.h)
|
||||
LIST(APPEND llvfs_SOURCE_FILES llvfs_objc.mm)
|
||||
LIST(APPEND llvfs_HEADER_FILES llvfs_objc.h)
|
||||
endif (DARWIN)
|
||||
|
||||
if (LINUX)
|
||||
|
|
@ -73,8 +75,8 @@ target_link_libraries(llvfs
|
|||
|
||||
if (DARWIN)
|
||||
include(CMakeFindFrameworks)
|
||||
find_library(CARBON_LIBRARY Carbon)
|
||||
target_link_libraries(llvfs ${CARBON_LIBRARY})
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
target_link_libraries(llvfs ${COCOA_LIBRARY})
|
||||
endif (DARWIN)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -73,10 +73,8 @@ class LLDir
|
|||
virtual S32 deleteFilesInDir(const std::string &dirname, const std::string &mask);
|
||||
|
||||
// pure virtual functions
|
||||
virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask) = 0;
|
||||
|
||||
virtual std::string getCurPath() = 0;
|
||||
virtual BOOL fileExists(const std::string &filename) const = 0;
|
||||
virtual bool fileExists(const std::string &filename) const = 0;
|
||||
|
||||
const std::string findFile(const std::string& filename, const std::vector<std::string> filenames) const;
|
||||
const std::string findFile(const std::string& filename, const std::string& searchPath1 = "", const std::string& searchPath2 = "", const std::string& searchPath3 = "") const;
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ std::string LLDir_Linux::getCurPath()
|
|||
}
|
||||
|
||||
|
||||
BOOL LLDir_Linux::fileExists(const std::string &filename) const
|
||||
bool LLDir_Linux::fileExists(const std::string &filename) const
|
||||
{
|
||||
struct stat stat_data;
|
||||
// Check the age of the file
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public:
|
|||
|
||||
virtual std::string getCurPath();
|
||||
virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask);
|
||||
/*virtual*/ BOOL fileExists(const std::string &filename) const;
|
||||
/*virtual*/ bool fileExists(const std::string &filename) const;
|
||||
|
||||
/*virtual*/ std::string getLLPluginLauncher();
|
||||
/*virtual*/ std::string getLLPluginFilename(std::string base_name);
|
||||
|
|
|
|||
|
|
@ -35,73 +35,27 @@
|
|||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <glob.h>
|
||||
|
||||
#include <Carbon/Carbon.h>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include "llvfs_objc.h"
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
|
||||
static OSStatus CFCreateDirectory(FSRef *parentRef, CFStringRef name, FSRef *newRef)
|
||||
static bool CreateDirectory(const std::string &parent,
|
||||
const std::string &child,
|
||||
std::string *fullname)
|
||||
{
|
||||
OSStatus result = noErr;
|
||||
HFSUniStr255 uniStr;
|
||||
|
||||
uniStr.length = CFStringGetLength(name);
|
||||
CFStringGetCharacters(name, CFRangeMake(0, uniStr.length), uniStr.unicode);
|
||||
result = FSMakeFSRefUnicode(parentRef, uniStr.length, uniStr.unicode, kTextEncodingMacRoman, newRef);
|
||||
if (result != noErr)
|
||||
{
|
||||
result = FSCreateDirectoryUnicode(parentRef, uniStr.length, uniStr.unicode, 0, NULL, newRef, NULL, NULL);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
|
||||
static void CFStringRefToLLString(CFStringRef stringRef, std::string &llString, bool releaseWhenDone)
|
||||
{
|
||||
if (stringRef)
|
||||
{
|
||||
long stringSize = CFStringGetLength(stringRef) + 1;
|
||||
long bufferSize = CFStringGetMaximumSizeForEncoding(stringSize,kCFStringEncodingUTF8);
|
||||
char* buffer = new char[bufferSize];
|
||||
memset(buffer, 0, bufferSize);
|
||||
if (CFStringGetCString(stringRef, buffer, bufferSize, kCFStringEncodingUTF8))
|
||||
llString = buffer;
|
||||
delete[] buffer;
|
||||
if (releaseWhenDone)
|
||||
CFRelease(stringRef);
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
|
||||
static void CFURLRefToLLString(CFURLRef urlRef, std::string &llString, bool releaseWhenDone)
|
||||
{
|
||||
if (urlRef)
|
||||
{
|
||||
CFURLRef absoluteURLRef = CFURLCopyAbsoluteURL(urlRef);
|
||||
if (absoluteURLRef)
|
||||
{
|
||||
CFStringRef stringRef = CFURLCopyFileSystemPath(absoluteURLRef, kCFURLPOSIXPathStyle);
|
||||
CFStringRefToLLString(stringRef, llString, true);
|
||||
CFRelease(absoluteURLRef);
|
||||
}
|
||||
if (releaseWhenDone)
|
||||
CFRelease(urlRef);
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
|
||||
static void FSRefToLLString(FSRef *fsRef, std::string &llString)
|
||||
{
|
||||
OSStatus error = noErr;
|
||||
char path[MAX_PATH];
|
||||
|
||||
error = FSRefMakePath(fsRef, (UInt8*) path, sizeof(path));
|
||||
if (error == noErr)
|
||||
llString = path;
|
||||
|
||||
boost::filesystem::path p(parent);
|
||||
p /= child;
|
||||
|
||||
if (fullname)
|
||||
*fullname = std::string(p.string());
|
||||
|
||||
if (! boost::filesystem::create_directory(p))
|
||||
{
|
||||
return (boost::filesystem::is_directory(p));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
|
|
@ -109,35 +63,28 @@ static void FSRefToLLString(FSRef *fsRef, std::string &llString)
|
|||
LLDir_Mac::LLDir_Mac()
|
||||
{
|
||||
mDirDelimiter = "/";
|
||||
mCurrentDirIndex = -1;
|
||||
mCurrentDirCount = -1;
|
||||
|
||||
CFBundleRef mainBundleRef = NULL;
|
||||
CFURLRef executableURLRef = NULL;
|
||||
CFStringRef stringRef = NULL;
|
||||
OSStatus error = noErr;
|
||||
FSRef fileRef;
|
||||
CFStringRef secondLifeString = CFSTR("SecondLife");
|
||||
|
||||
mainBundleRef = CFBundleGetMainBundle();
|
||||
|
||||
executableURLRef = CFBundleCopyExecutableURL(mainBundleRef);
|
||||
|
||||
if (executableURLRef != NULL)
|
||||
|
||||
const std::string secondLifeString = "SecondLife";
|
||||
|
||||
std::string *executablepathstr = getSystemExecutableFolder();
|
||||
|
||||
//NOTE: LLINFOS/LLERRS will not output to log here. The streams are not initialized.
|
||||
|
||||
if (executablepathstr)
|
||||
{
|
||||
// mExecutablePathAndName
|
||||
CFURLRefToLLString(executableURLRef, mExecutablePathAndName, false);
|
||||
|
||||
// mExecutableFilename
|
||||
stringRef = CFURLCopyLastPathComponent(executableURLRef);
|
||||
CFStringRefToLLString(stringRef, mExecutableFilename, true);
|
||||
|
||||
// mExecutableDir
|
||||
CFURLRef executableParentURLRef = CFURLCreateCopyDeletingLastPathComponent(NULL, executableURLRef);
|
||||
CFURLRefToLLString(executableParentURLRef, mExecutableDir, true);
|
||||
mExecutablePathAndName = *executablepathstr;
|
||||
|
||||
boost::filesystem::path executablepath(*executablepathstr);
|
||||
|
||||
# ifndef BOOST_SYSTEM_NO_DEPRECATED
|
||||
#endif
|
||||
mExecutableFilename = executablepath.filename().string();
|
||||
mExecutableDir = executablepath.parent_path().string();
|
||||
|
||||
// mAppRODataDir
|
||||
|
||||
std::string *resourcepath = getSystemResourceFolder();
|
||||
mAppRODataDir = *resourcepath;
|
||||
|
||||
// *NOTE: When running in a dev tree, use the copy of
|
||||
// skins in indra/newview/ rather than in the application bundle. This
|
||||
|
|
@ -146,10 +93,7 @@ LLDir_Mac::LLDir_Mac()
|
|||
|
||||
// MBW -- This keeps the mac application from finding other things.
|
||||
// If this is really for skins, it should JUST apply to skins.
|
||||
|
||||
CFURLRef resourcesURLRef = CFBundleCopyResourcesDirectoryURL(mainBundleRef);
|
||||
CFURLRefToLLString(resourcesURLRef, mAppRODataDir, true);
|
||||
|
||||
|
||||
U32 build_dir_pos = mExecutableDir.rfind("/build-darwin-");
|
||||
if (build_dir_pos != std::string::npos)
|
||||
{
|
||||
|
|
@ -166,55 +110,50 @@ LLDir_Mac::LLDir_Mac()
|
|||
}
|
||||
|
||||
// mOSUserDir
|
||||
error = FSFindFolder(kUserDomain, kApplicationSupportFolderType, true, &fileRef);
|
||||
if (error == noErr)
|
||||
{
|
||||
FSRef newFileRef;
|
||||
|
||||
// Create the directory
|
||||
error = CFCreateDirectory(&fileRef, secondLifeString, &newFileRef);
|
||||
if (error == noErr)
|
||||
{
|
||||
// Save the full path to the folder
|
||||
FSRefToLLString(&newFileRef, mOSUserDir);
|
||||
|
||||
// Create our sub-dirs
|
||||
(void) CFCreateDirectory(&newFileRef, CFSTR("data"), NULL);
|
||||
//(void) CFCreateDirectory(&newFileRef, CFSTR("cache"), NULL);
|
||||
(void) CFCreateDirectory(&newFileRef, CFSTR("logs"), NULL);
|
||||
(void) CFCreateDirectory(&newFileRef, CFSTR("user_settings"), NULL);
|
||||
(void) CFCreateDirectory(&newFileRef, CFSTR("browser_profile"), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
std::string *appdir = getSystemApplicationSupportFolder();
|
||||
std::string rootdir;
|
||||
|
||||
//Create root directory
|
||||
if (CreateDirectory(*appdir, secondLifeString, &rootdir))
|
||||
{
|
||||
|
||||
// Save the full path to the folder
|
||||
mOSUserDir = rootdir;
|
||||
|
||||
// Create our sub-dirs
|
||||
CreateDirectory(rootdir, std::string("data"), NULL);
|
||||
CreateDirectory(rootdir, std::string("logs"), NULL);
|
||||
CreateDirectory(rootdir, std::string("user_settings"), NULL);
|
||||
CreateDirectory(rootdir, std::string("browser_profile"), NULL);
|
||||
}
|
||||
|
||||
//mOSCacheDir
|
||||
FSRef cacheDirRef;
|
||||
error = FSFindFolder(kUserDomain, kCachedDataFolderType, true, &cacheDirRef);
|
||||
if (error == noErr)
|
||||
std::string *cachedir = getSystemCacheFolder();
|
||||
|
||||
if (cachedir)
|
||||
|
||||
{
|
||||
FSRefToLLString(&cacheDirRef, mOSCacheDir);
|
||||
(void)CFCreateDirectory(&cacheDirRef, CFSTR("SecondLife"),NULL);
|
||||
mOSCacheDir = *cachedir;
|
||||
//SPATTERS TODO: This changes from ~/Library/Cache/Secondlife to ~/Library/Cache/com.app.secondlife/Secondlife. Last dir level could go away.
|
||||
CreateDirectory(mOSCacheDir, secondLifeString, NULL);
|
||||
}
|
||||
|
||||
// mOSUserAppDir
|
||||
mOSUserAppDir = mOSUserDir;
|
||||
|
||||
// mTempDir
|
||||
error = FSFindFolder(kOnAppropriateDisk, kTemporaryFolderType, true, &fileRef);
|
||||
if (error == noErr)
|
||||
{
|
||||
FSRef tempRef;
|
||||
error = CFCreateDirectory(&fileRef, secondLifeString, &tempRef);
|
||||
if (error == noErr)
|
||||
FSRefToLLString(&tempRef, mTempDir);
|
||||
}
|
||||
//Aura 120920 boost::filesystem::temp_directory_path() not yet implemented on mac. :(
|
||||
std::string *tmpdir = getSystemTempFolder();
|
||||
if (tmpdir)
|
||||
{
|
||||
|
||||
CreateDirectory(*tmpdir, secondLifeString, &mTempDir);
|
||||
if (tmpdir) delete tmpdir;
|
||||
}
|
||||
|
||||
mWorkingDir = getCurPath();
|
||||
|
||||
mLLPluginDir = mAppRODataDir + mDirDelimiter + "llplugin";
|
||||
|
||||
CFRelease(executableURLRef);
|
||||
executableURLRef = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -235,52 +174,18 @@ void LLDir_Mac::initAppDirs(const std::string &app_name,
|
|||
mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins";
|
||||
}
|
||||
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem");
|
||||
|
||||
//dumpCurrentDirectories();
|
||||
}
|
||||
|
||||
U32 LLDir_Mac::countFilesInDir(const std::string &dirname, const std::string &mask)
|
||||
{
|
||||
U32 file_count = 0;
|
||||
glob_t g;
|
||||
|
||||
std::string tmp_str;
|
||||
tmp_str = dirname;
|
||||
tmp_str += mask;
|
||||
|
||||
if(glob(tmp_str.c_str(), GLOB_NOSORT, NULL, &g) == 0)
|
||||
{
|
||||
file_count = g.gl_pathc;
|
||||
|
||||
globfree(&g);
|
||||
}
|
||||
|
||||
return (file_count);
|
||||
}
|
||||
|
||||
std::string LLDir_Mac::getCurPath()
|
||||
{
|
||||
char tmp_str[LL_MAX_PATH]; /* Flawfinder: ignore */
|
||||
getcwd(tmp_str, LL_MAX_PATH);
|
||||
return tmp_str;
|
||||
return boost::filesystem::path( boost::filesystem::current_path() ).string();
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOL LLDir_Mac::fileExists(const std::string &filename) const
|
||||
bool LLDir_Mac::fileExists(const std::string &filename) const
|
||||
{
|
||||
struct stat stat_data;
|
||||
// Check the age of the file
|
||||
// Now, we see if the files we've gathered are recent...
|
||||
int res = stat(filename.c_str(), &stat_data);
|
||||
if (!res)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
return boost::filesystem::exists(filename);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -45,16 +45,10 @@ public:
|
|||
const std::string& app_read_only_data_dir);
|
||||
|
||||
virtual std::string getCurPath();
|
||||
virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask);
|
||||
virtual BOOL fileExists(const std::string &filename) const;
|
||||
virtual bool fileExists(const std::string &filename) const;
|
||||
|
||||
/*virtual*/ std::string getLLPluginLauncher();
|
||||
/*virtual*/ std::string getLLPluginFilename(std::string base_name);
|
||||
|
||||
private:
|
||||
int mCurrentDirIndex;
|
||||
int mCurrentDirCount;
|
||||
std::string mCurrentDir;
|
||||
};
|
||||
|
||||
#endif // LL_LLDIR_MAC_H
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ std::string LLDir_Solaris::getCurPath()
|
|||
}
|
||||
|
||||
|
||||
BOOL LLDir_Solaris::fileExists(const std::string &filename) const
|
||||
bool LLDir_Solaris::fileExists(const std::string &filename) const
|
||||
{
|
||||
struct stat stat_data;
|
||||
// Check the age of the file
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public:
|
|||
|
||||
virtual std::string getCurPath();
|
||||
virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask);
|
||||
/*virtual*/ BOOL fileExists(const std::string &filename) const;
|
||||
/*virtual*/ bool fileExists(const std::string &filename) const;
|
||||
|
||||
private:
|
||||
DIR *mDirp;
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ std::string LLDir_Win32::getCurPath()
|
|||
}
|
||||
|
||||
|
||||
BOOL LLDir_Win32::fileExists(const std::string &filename) const
|
||||
bool LLDir_Win32::fileExists(const std::string &filename) const
|
||||
{
|
||||
llstat stat_data;
|
||||
// Check the age of the file
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public:
|
|||
|
||||
/*virtual*/ std::string getCurPath();
|
||||
/*virtual*/ U32 countFilesInDir(const std::string &dirname, const std::string &mask);
|
||||
/*virtual*/ BOOL fileExists(const std::string &filename) const;
|
||||
/*virtual*/ bool fileExists(const std::string &filename) const;
|
||||
|
||||
/*virtual*/ std::string getLLPluginLauncher();
|
||||
/*virtual*/ std::string getLLPluginFilename(std::string base_name);
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include "lldiriterator.h"
|
||||
|
||||
#include "fix_macros.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
|
|
@ -59,7 +60,7 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask)
|
|||
{
|
||||
is_dir = fs::is_directory(dir_path);
|
||||
}
|
||||
catch (fs::basic_filesystem_error<fs::path>& e)
|
||||
catch (const fs::filesystem_error& e)
|
||||
{
|
||||
llwarns << e.what() << llendl;
|
||||
return;
|
||||
|
|
@ -76,7 +77,7 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask)
|
|||
{
|
||||
mIter = fs::directory_iterator(dir_path);
|
||||
}
|
||||
catch (fs::basic_filesystem_error<fs::path>& e)
|
||||
catch (const fs::filesystem_error& e)
|
||||
{
|
||||
llwarns << e.what() << llendl;
|
||||
return;
|
||||
|
|
@ -121,7 +122,7 @@ bool LLDirIterator::Impl::next(std::string &fname)
|
|||
while (mIter != end_itr && !found)
|
||||
{
|
||||
boost::smatch match;
|
||||
std::string name = mIter->path().filename();
|
||||
std::string name = mIter->path().filename().string();
|
||||
if (found = boost::regex_match(name, match, mFilterExp))
|
||||
{
|
||||
fname = name;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
/**
|
||||
* @file llvfs_objc.h
|
||||
* @brief Definition of directory utilities class for Mac OS X
|
||||
*
|
||||
* $LicenseInfo:firstyear=2000&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#if !LL_DARWIN
|
||||
#error This header must not be included when compiling for any target other than Mac OS. Consider including lldir.h instead.
|
||||
#endif // !LL_DARWIN
|
||||
|
||||
#ifndef LL_LLVFS_OBJC_H
|
||||
#define LL_LLVFS_OBJC_H
|
||||
|
||||
#include <iostream>
|
||||
|
||||
std::string* getSystemTempFolder();
|
||||
std::string* getSystemCacheFolder();
|
||||
std::string* getSystemApplicationSupportFolder();
|
||||
std::string* getSystemResourceFolder();
|
||||
std::string* getSystemExecutableFolder();
|
||||
|
||||
|
||||
#endif LL_LLVFS_OBJC_H
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
/**
|
||||
* @file llvfs_objc.cpp
|
||||
* @brief Cocoa implementation of directory utilities for Mac OS X
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
#if LL_DARWIN
|
||||
|
||||
//WARNING: This file CANNOT use standard linden includes due to conflicts between definitions of BOOL
|
||||
|
||||
#include "llvfs_objc.h"
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
std::string* getSystemTempFolder()
|
||||
{
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
NSString * tempDir = NSTemporaryDirectory();
|
||||
if (tempDir == nil)
|
||||
tempDir = @"/tmp";
|
||||
std::string *result = ( new std::string([tempDir UTF8String]) );
|
||||
[pool release];
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//findSystemDirectory scoped exclusively to this file.
|
||||
std::string* findSystemDirectory(NSSearchPathDirectory searchPathDirectory,
|
||||
NSSearchPathDomainMask domainMask)
|
||||
{
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
std::string *result;
|
||||
NSString *path = nil;
|
||||
|
||||
// Search for the path
|
||||
NSArray* paths = NSSearchPathForDirectoriesInDomains(searchPathDirectory,
|
||||
domainMask,
|
||||
YES);
|
||||
if ([paths count])
|
||||
{
|
||||
path = [paths objectAtIndex:0];
|
||||
//SPATTERS HACK: Always attempt to create directory, ignore errors.
|
||||
NSError *error = nil;
|
||||
|
||||
[[NSFileManager defaultManager] createDirectoryAtPath:path withIntermediateDirectories:YES attributes:nil error:&error];
|
||||
|
||||
|
||||
result = new std::string([path UTF8String]);
|
||||
}
|
||||
[pool release];
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string* getSystemExecutableFolder()
|
||||
{
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
NSString *bundlePath = [[NSBundle mainBundle] executablePath];
|
||||
std::string *result = (new std::string([bundlePath UTF8String]));
|
||||
[pool release];
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string* getSystemResourceFolder()
|
||||
{
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
NSString *bundlePath = [[NSBundle mainBundle] resourcePath];
|
||||
std::string *result = (new std::string([bundlePath UTF8String]));
|
||||
[pool release];
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string* getSystemCacheFolder()
|
||||
{
|
||||
return findSystemDirectory (NSCachesDirectory,
|
||||
NSUserDomainMask);
|
||||
}
|
||||
|
||||
std::string* getSystemApplicationSupportFolder()
|
||||
{
|
||||
return findSystemDirectory (NSApplicationSupportDirectory,
|
||||
NSUserDomainMask);
|
||||
|
||||
}
|
||||
|
||||
#endif // LL_DARWIN
|
||||
|
|
@ -134,7 +134,7 @@ struct LLDir_Dummy: public LLDir
|
|||
return 0;
|
||||
}
|
||||
|
||||
virtual BOOL fileExists(const std::string& pathname) const
|
||||
virtual bool fileExists(const std::string& pathname) const
|
||||
{
|
||||
// Record fileExists() calls so we can check whether caching is
|
||||
// working right. Certain LLDir calls should be able to make decisions
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@
|
|||
#include <AGL/agl.h>
|
||||
|
||||
// AssertMacros.h does bad things.
|
||||
#include "fix_macros.h"
|
||||
#undef verify
|
||||
#undef check
|
||||
#undef require
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2646,8 +2646,9 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
|
|||
if (sortpat)
|
||||
{
|
||||
// Sort the list of system fonts from most-to-least-desirable.
|
||||
FcResult result;
|
||||
fs = FcFontSort(NULL, sortpat, elide_unicode_coverage,
|
||||
NULL, NULL);
|
||||
NULL, &result);
|
||||
FcPatternDestroy(sortpat);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@
|
|||
#endif
|
||||
|
||||
// AssertMacros.h does bad things.
|
||||
#include "fix_macros.h"
|
||||
#undef verify
|
||||
#undef check
|
||||
#undef require
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -23,12 +23,14 @@ include_directories(
|
|||
set(mac_crash_logger_SOURCE_FILES
|
||||
mac_crash_logger.cpp
|
||||
llcrashloggermac.cpp
|
||||
llcrashloggermacdelegate.mm
|
||||
)
|
||||
|
||||
set(mac_crash_logger_HEADER_FILES
|
||||
CMakeLists.txt
|
||||
|
||||
llcrashloggermac.h
|
||||
llcrashloggermacdelegate.h
|
||||
)
|
||||
|
||||
set_source_files_properties(${mac_crash_logger_HEADER_FILES}
|
||||
|
|
@ -55,9 +57,12 @@ set_target_properties(mac-crash-logger
|
|||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
|
||||
)
|
||||
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
|
||||
target_link_libraries(mac-crash-logger
|
||||
${LLCRASHLOGGER_LIBRARIES}
|
||||
${LLVFS_LIBRARIES}
|
||||
${COCOA_LIBRARIES}
|
||||
${LLXML_LIBRARIES}
|
||||
${LLMESSAGE_LIBRARIES}
|
||||
${LLVFS_LIBRARIES}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>629</string>
|
||||
<key>IBLastKnownRelativeProjectPath</key>
|
||||
<string>../../build-darwin-i386/SecondLife.xcodeproj</string>
|
||||
<key>IBOldestOS</key>
|
||||
<integer>5</integer>
|
||||
<key>IBOpenObjects</key>
|
||||
<array/>
|
||||
<key>IBSystem Version</key>
|
||||
<string>9E17</string>
|
||||
<key>targetFramework</key>
|
||||
<string>IBCarbonFramework</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
<?xml version="1.0" standalone="yes"?>
|
||||
<object class="NSIBObjectData">
|
||||
<object name="rootObject" class="NSCustomObject" id="1">
|
||||
</object>
|
||||
<array count="7" name="allObjects">
|
||||
<object class="IBCarbonButton" id="182">
|
||||
<ostype name="command">ok </ostype>
|
||||
<string name="title">Send Report</string>
|
||||
<string name="bounds">414 273 434 378 </string>
|
||||
</object>
|
||||
<object class="IBCarbonButton" id="183">
|
||||
<ostype name="command">not!</ostype>
|
||||
<int name="buttonType">2</int>
|
||||
<string name="title">Don't Send</string>
|
||||
<string name="bounds">414 390 434 487 </string>
|
||||
</object>
|
||||
<object class="IBCarbonStaticText" id="181">
|
||||
<string name="title">Second Life appears to have crashed or frozen the last time it ran. This crash reporter collects information about your computer's hardware configuration, operating system, and some Second Life logs, all of which are used for debugging purposes only. In the space below, please briefly describe what you were doing or trying to do just prior to the crash. Thank you for your help! This report is NOT read by Customer Support. If you have billing or other questions, please go to: http://www.secondlife.com/support/ If you don't wish to send Linden Lab a crash report, press Don't Send. </string>
|
||||
<string name="bounds">20 20 231 487 </string>
|
||||
</object>
|
||||
<object class="IBCarbonWindow" id="166">
|
||||
<int name="carbonWindowClass">2</int>
|
||||
<int name="themeBrush">3</int>
|
||||
<int name="windowPosition">7</int>
|
||||
<string name="title">Second Life Crash Logger</string>
|
||||
<object name="rootControl" class="IBCarbonRootControl" id="167">
|
||||
<array count="5" name="subviews">
|
||||
<reference idRef="181"/>
|
||||
<reference idRef="182"/>
|
||||
<reference idRef="183"/>
|
||||
<object class="IBCarbonEditText" id="185">
|
||||
<ostype name="controlSignature">text</ostype>
|
||||
<boolean name="isUnicode">TRUE</boolean>
|
||||
<string name="bounds">242 23 391 484 </string>
|
||||
</object>
|
||||
<object class="IBCarbonCheckBox" id="193">
|
||||
<ostype name="controlSignature">remb</ostype>
|
||||
<string name="title">Remember This Choice</string>
|
||||
<string name="bounds">415 20 433 186 </string>
|
||||
</object>
|
||||
</array>
|
||||
<string name="bounds">0 0 454 507 </string>
|
||||
</object>
|
||||
<string name="windowRect">257 653 711 1160 </string>
|
||||
<string name="ScreenRectAtEncodeTime">0 0 768 1024 </string>
|
||||
</object>
|
||||
<reference idRef="185"/>
|
||||
<reference idRef="167"/>
|
||||
<reference idRef="193"/>
|
||||
</array>
|
||||
<array count="7" name="allParents">
|
||||
<reference idRef="167"/>
|
||||
<reference idRef="167"/>
|
||||
<reference idRef="167"/>
|
||||
<reference idRef="1"/>
|
||||
<reference idRef="167"/>
|
||||
<reference idRef="166"/>
|
||||
<reference idRef="167"/>
|
||||
</array>
|
||||
<dictionary count="2" name="nameTable">
|
||||
<string>CrashReporter</string>
|
||||
<reference idRef="166"/>
|
||||
<string>File's Owner</string>
|
||||
<reference idRef="1"/>
|
||||
</dictionary>
|
||||
<string name="targetFramework">IBCarbonFramework</string>
|
||||
<unsigned_int name="nextObjectID">194</unsigned_int>
|
||||
</object>
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
|
|
@ -10,8 +10,6 @@
|
|||
<string></string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.secondlife.indra.crashreporter</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
|
|
@ -22,5 +20,9 @@
|
|||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0.0</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>CrashReporter</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
#include "llcrashloggermac.h"
|
||||
|
||||
#include <Carbon/Carbon.h>
|
||||
#include <iostream>
|
||||
|
||||
#include "indra_constants.h" // CRASH_BEHAVIOR_ASK, CRASH_SETTING_NAME
|
||||
|
|
@ -38,102 +37,14 @@
|
|||
#include "lldir.h"
|
||||
#include "llsdserialize.h"
|
||||
|
||||
#define MAX_LOADSTRING 100
|
||||
const char* const SETTINGS_FILE_HEADER = "version";
|
||||
const S32 SETTINGS_FILE_VERSION = 101;
|
||||
|
||||
// Windows Message Handlers
|
||||
|
||||
BOOL gFirstDialog = TRUE; // Are we currently handling the Send/Don't Send dialog?
|
||||
BOOL gFirstDialog = TRUE;
|
||||
LLFILE *gDebugFile = NULL;
|
||||
|
||||
WindowRef gWindow = NULL;
|
||||
EventHandlerRef gEventHandler = NULL;
|
||||
std::string gUserNotes = "";
|
||||
bool gSendReport = false;
|
||||
bool gRememberChoice = false;
|
||||
IBNibRef nib = NULL;
|
||||
|
||||
OSStatus dialogHandler(EventHandlerCallRef handler, EventRef event, void *userdata)
|
||||
{
|
||||
OSStatus result = eventNotHandledErr;
|
||||
OSStatus err;
|
||||
UInt32 evtClass = GetEventClass(event);
|
||||
UInt32 evtKind = GetEventKind(event);
|
||||
if((evtClass == kEventClassCommand) && (evtKind == kEventCommandProcess))
|
||||
{
|
||||
HICommand cmd;
|
||||
err = GetEventParameter(event, kEventParamDirectObject, typeHICommand, NULL, sizeof(cmd), NULL, &cmd);
|
||||
|
||||
|
||||
|
||||
if(err == noErr)
|
||||
{
|
||||
//Get the value of the checkbox
|
||||
ControlID id;
|
||||
ControlRef checkBox = NULL;
|
||||
id.signature = 'remb';
|
||||
id.id = 0;
|
||||
err = GetControlByID(gWindow, &id, &checkBox);
|
||||
|
||||
if(err == noErr)
|
||||
{
|
||||
if(GetControl32BitValue(checkBox) == kControlCheckBoxCheckedValue)
|
||||
{
|
||||
gRememberChoice = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
gRememberChoice = false;
|
||||
}
|
||||
}
|
||||
switch(cmd.commandID)
|
||||
{
|
||||
case kHICommandOK:
|
||||
{
|
||||
char buffer[65535]; /* Flawfinder: ignore */
|
||||
Size size = sizeof(buffer) - 1;
|
||||
ControlRef textField = NULL;
|
||||
|
||||
id.signature = 'text';
|
||||
id.id = 0;
|
||||
|
||||
err = GetControlByID(gWindow, &id, &textField);
|
||||
if(err == noErr)
|
||||
{
|
||||
// Get the user response text
|
||||
err = GetControlData(textField, kControlNoPart, kControlEditTextTextTag, size, (Ptr)buffer, &size);
|
||||
}
|
||||
if(err == noErr)
|
||||
{
|
||||
// Make sure the string is terminated.
|
||||
buffer[size] = 0;
|
||||
gUserNotes = buffer;
|
||||
|
||||
llinfos << buffer << llendl;
|
||||
}
|
||||
|
||||
// Send the report.
|
||||
|
||||
QuitAppModalLoopForWindow(gWindow);
|
||||
gSendReport = true;
|
||||
result = noErr;
|
||||
}
|
||||
break;
|
||||
|
||||
case kHICommandCancel:
|
||||
QuitAppModalLoopForWindow(gWindow);
|
||||
result = noErr;
|
||||
break;
|
||||
default:
|
||||
result = eventNotHandledErr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
||||
LLCrashLoggerMac::LLCrashLoggerMac(void)
|
||||
{
|
||||
|
|
@ -146,73 +57,16 @@ LLCrashLoggerMac::~LLCrashLoggerMac(void)
|
|||
bool LLCrashLoggerMac::init(void)
|
||||
{
|
||||
bool ok = LLCrashLogger::init();
|
||||
if(!ok) return false;
|
||||
if(mCrashBehavior != CRASH_BEHAVIOR_ASK) return true;
|
||||
|
||||
// Real UI...
|
||||
OSStatus err;
|
||||
|
||||
err = CreateNibReference(CFSTR("CrashReporter"), &nib);
|
||||
|
||||
if(err == noErr)
|
||||
{
|
||||
err = CreateWindowFromNib(nib, CFSTR("CrashReporter"), &gWindow);
|
||||
}
|
||||
|
||||
if(err == noErr)
|
||||
{
|
||||
// Set focus to the edit text area
|
||||
ControlRef textField = NULL;
|
||||
ControlID id;
|
||||
|
||||
id.signature = 'text';
|
||||
id.id = 0;
|
||||
|
||||
// Don't set err if any of this fails, since it's non-critical.
|
||||
if(GetControlByID(gWindow, &id, &textField) == noErr)
|
||||
{
|
||||
SetKeyboardFocus(gWindow, textField, kControlFocusNextPart);
|
||||
}
|
||||
}
|
||||
|
||||
if(err == noErr)
|
||||
{
|
||||
ShowWindow(gWindow);
|
||||
}
|
||||
|
||||
if(err == noErr)
|
||||
{
|
||||
// Set up an event handler for the window.
|
||||
EventTypeSpec handlerEvents[] =
|
||||
{
|
||||
{ kEventClassCommand, kEventCommandProcess }
|
||||
};
|
||||
|
||||
InstallWindowEventHandler(
|
||||
gWindow,
|
||||
NewEventHandlerUPP(dialogHandler),
|
||||
GetEventTypeCount (handlerEvents),
|
||||
handlerEvents,
|
||||
0,
|
||||
&gEventHandler);
|
||||
}
|
||||
return true;
|
||||
return ok;
|
||||
}
|
||||
|
||||
void LLCrashLoggerMac::gatherPlatformSpecificFiles()
|
||||
{
|
||||
updateApplication("Gathering hardware information...");
|
||||
}
|
||||
|
||||
bool LLCrashLoggerMac::mainLoop()
|
||||
{
|
||||
OSStatus err = noErr;
|
||||
|
||||
if(err == noErr && mCrashBehavior == CRASH_BEHAVIOR_ASK)
|
||||
{
|
||||
RunAppModalLoopForWindow(gWindow);
|
||||
}
|
||||
else if (mCrashBehavior == CRASH_BEHAVIOR_ALWAYS_SEND)
|
||||
if (mCrashBehavior == CRASH_BEHAVIOR_ALWAYS_SEND)
|
||||
{
|
||||
gSendReport = true;
|
||||
}
|
||||
|
|
@ -227,26 +81,11 @@ bool LLCrashLoggerMac::mainLoop()
|
|||
{
|
||||
setUserText(gUserNotes);
|
||||
sendCrashLogs();
|
||||
}
|
||||
|
||||
if(gWindow != NULL)
|
||||
{
|
||||
DisposeWindow(gWindow);
|
||||
}
|
||||
|
||||
if(nib != NULL)
|
||||
{
|
||||
DisposeNibReference(nib);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLCrashLoggerMac::updateApplication(const std::string& message)
|
||||
{
|
||||
LLCrashLogger::updateApplication(message);
|
||||
}
|
||||
|
||||
bool LLCrashLoggerMac::cleanup()
|
||||
{
|
||||
commonCleanup();
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ public:
|
|||
~LLCrashLoggerMac(void);
|
||||
virtual bool init();
|
||||
virtual bool mainLoop();
|
||||
virtual void updateApplication(const std::string& message = LLStringUtil::null);
|
||||
virtual bool cleanup();
|
||||
virtual void gatherPlatformSpecificFiles();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
/**
|
||||
* @file llcrashloggermacdelegate.h
|
||||
* @brief Mac OSX crash logger implementation
|
||||
*
|
||||
* $LicenseInfo:firstyear=2003&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
/*
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface LLCrashLoggerMacDelegate : NSObject <NSApplicationDelegate>
|
||||
{
|
||||
IBOutlet NSTextField *crashText;
|
||||
IBOutlet NSButton *rememberCheck;
|
||||
|
||||
NSWindow *_window;
|
||||
bool mRemember;
|
||||
|
||||
}
|
||||
|
||||
- (void)setWindow:(NSWindow *)newWindow;
|
||||
- (NSWindow *)window;
|
||||
|
||||
- (IBAction)remember:(id)sender;
|
||||
- (IBAction)send:(id)sender;
|
||||
- (IBAction)cancel:(id)sender;
|
||||
|
||||
@property (assign) IBOutlet NSWindow *window;
|
||||
|
||||
@end
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
/**
|
||||
* @file llcrashloggermacdelegate.mm
|
||||
* @brief Mac OSX crash logger implementation
|
||||
*
|
||||
* $LicenseInfo:firstyear=2003&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
#import "llcrashloggermacdelegate.h"
|
||||
#include <iostream>
|
||||
|
||||
extern std::string gUserNotes;
|
||||
extern bool gSendReport;
|
||||
extern bool gRememberChoice;
|
||||
|
||||
@implementation LLCrashLoggerMacDelegate
|
||||
|
||||
- (void)setWindow:(NSWindow *)window
|
||||
{
|
||||
_window = window;
|
||||
}
|
||||
|
||||
- (NSWindow *)window
|
||||
{
|
||||
return _window;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
std::string* NSToString( NSString *ns_str )
|
||||
{
|
||||
return ( new std::string([ns_str UTF8String]) );
|
||||
}
|
||||
|
||||
- (IBAction)remember:(id)sender
|
||||
{
|
||||
gRememberChoice = [rememberCheck state];
|
||||
}
|
||||
|
||||
- (IBAction)send:(id)sender
|
||||
{
|
||||
std::string* user_input = NSToString([crashText stringValue]);
|
||||
gUserNotes = *user_input;
|
||||
gSendReport = true;
|
||||
}
|
||||
|
||||
- (IBAction)cancel:(id)sender
|
||||
{
|
||||
[ _window close];
|
||||
}
|
||||
@end
|
||||
*/
|
||||
|
|
@ -26,11 +26,12 @@
|
|||
|
||||
#include "linden_common.h"
|
||||
#include "llcrashloggermac.h"
|
||||
#include "indra_constants.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
llinfos << "Starting crash reporter." << llendl;
|
||||
|
||||
LLCrashLoggerMac app;
|
||||
app.parseCommandOptions(argc, argv);
|
||||
|
||||
|
|
@ -39,9 +40,16 @@ int main(int argc, char **argv)
|
|||
llwarns << "Unable to initialize application." << llendl;
|
||||
return 1;
|
||||
}
|
||||
if (app.getCrashBehavior() != CRASH_BEHAVIOR_ALWAYS_SEND)
|
||||
{
|
||||
// return NSApplicationMain(argc, (const char **)argv);
|
||||
}
|
||||
|
||||
app.mainLoop();
|
||||
|
||||
app.cleanup();
|
||||
|
||||
llinfos << "Crash reporter finished normally." << llendl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,91 @@
|
|||
/**
|
||||
* @file mac_updater.h
|
||||
* @brief
|
||||
*
|
||||
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <pthread.h>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#ifndef LL_MAC_UPDATER_H
|
||||
#define LL_MAC_UPDATER_H
|
||||
extern bool gCancelled;
|
||||
extern bool gFailure;
|
||||
|
||||
void *updatethreadproc(void*);
|
||||
std::string* walkParents( signed int depth, std::string* childpath );
|
||||
std::string* getUserTrashFolder();
|
||||
|
||||
void setProgress(int cur, int max);
|
||||
void setProgressText(const std::string& str);
|
||||
void sendProgress(int cur, int max, std::string str);
|
||||
void sendDone();
|
||||
void sendStopAlert();
|
||||
|
||||
bool isFSRefViewerBundle(const std::string& targetURL);
|
||||
bool isDirWritable(const std::string& dir_name);
|
||||
bool mkTempDir(boost::filesystem::path& temp_dir);
|
||||
bool copyDir(const std::string& src_dir, const std::string& dest_dir);
|
||||
|
||||
int oldmain();
|
||||
|
||||
class LLMacUpdater
|
||||
{
|
||||
public:
|
||||
LLMacUpdater();
|
||||
void doUpdate();
|
||||
const std::string walkParents( signed int depth, const std::string& childpath );
|
||||
bool isApplication(const std::string& app_str);
|
||||
void filterFile(const char* filename);
|
||||
|
||||
bool findAppBundleOnDiskImage(const boost::filesystem::path& dir_path,
|
||||
boost::filesystem::path& path_found);
|
||||
|
||||
bool verifyDirectory(const boost::filesystem::path* directory, bool isParent=false);
|
||||
bool getViewerDir(boost::filesystem::path &app_dir);
|
||||
bool downloadDMG(const std::string& dmgName, boost::filesystem::path* temp_dir);
|
||||
bool doMount(const std::string& dmgName, char* deviceNode, const boost::filesystem::path& temp_dir);
|
||||
bool moveApplication (const boost::filesystem::path& app_dir,
|
||||
const boost::filesystem::path& temp_dir,
|
||||
boost::filesystem::path& aside_dir);
|
||||
bool doInstall(const boost::filesystem::path& app_dir,
|
||||
const boost::filesystem::path& temp_dir,
|
||||
boost::filesystem::path& mount_dir,
|
||||
bool replacingTarget);
|
||||
void* updatethreadproc(void*);
|
||||
static void* sUpdatethreadproc(void*);
|
||||
|
||||
public:
|
||||
std::string *mUpdateURL;
|
||||
std::string *mProductName;
|
||||
std::string *mBundleID;
|
||||
std::string *mDmgFile;
|
||||
std::string *mMarkerPath;
|
||||
std::string *mApplicationPath;
|
||||
static LLMacUpdater *sInstance;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -349,6 +349,7 @@ set(viewer_SOURCE_FILES
|
|||
llmediactrl.cpp
|
||||
llmediadataclient.cpp
|
||||
llmemoryview.cpp
|
||||
llmenuoptionpathfindingrebakenavmesh.cpp
|
||||
llmeshrepository.cpp
|
||||
llmimetypes.cpp
|
||||
llmorphview.cpp
|
||||
|
|
@ -410,7 +411,6 @@ set(viewer_SOURCE_FILES
|
|||
llpanelonlinestatus.cpp
|
||||
llpaneloutfitedit.cpp
|
||||
llpaneloutfitsinventory.cpp
|
||||
llpanelpathfindingrebakenavmesh.cpp
|
||||
llpanelpeople.cpp
|
||||
llpanelpeoplemenus.cpp
|
||||
llpanelpermissions.cpp
|
||||
|
|
@ -936,6 +936,7 @@ set(viewer_HEADER_FILES
|
|||
llmediactrl.h
|
||||
llmediadataclient.h
|
||||
llmemoryview.h
|
||||
llmenuoptionpathfindingrebakenavmesh.h
|
||||
llmeshrepository.h
|
||||
llmimetypes.h
|
||||
llmorphview.h
|
||||
|
|
@ -991,7 +992,6 @@ set(viewer_HEADER_FILES
|
|||
llpanelonlinestatus.h
|
||||
llpaneloutfitedit.h
|
||||
llpaneloutfitsinventory.h
|
||||
llpanelpathfindingrebakenavmesh.h
|
||||
llpanelpeople.h
|
||||
llpanelpeoplemenus.h
|
||||
llpanelpermissions.h
|
||||
|
|
@ -1590,9 +1590,9 @@ if (WINDOWS)
|
|||
set_target_properties(${VIEWER_BINARY_NAME}
|
||||
PROPERTIES
|
||||
# *TODO -reenable this once we get server usage sorted out
|
||||
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS}"
|
||||
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
|
||||
LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF"
|
||||
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS} /LARGEADDRESSAWARE"
|
||||
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO /LARGEADDRESSAWARE"
|
||||
LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF /LARGEADDRESSAWARE"
|
||||
)
|
||||
if(USE_PRECOMPILED_HEADERS)
|
||||
set_target_properties(
|
||||
|
|
@ -2100,6 +2100,12 @@ if (LL_TESTS)
|
|||
LL_TEST_ADDITIONAL_LIBRARIES "${JSONCPP_LIBRARIES}"
|
||||
)
|
||||
|
||||
set_source_files_properties(
|
||||
lllogininstance.cpp
|
||||
PROPERTIES
|
||||
LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}"
|
||||
)
|
||||
|
||||
##################################################
|
||||
# DISABLING PRECOMPILED HEADERS USAGE FOR TESTS
|
||||
##################################################
|
||||
|
|
|
|||
|
|
@ -5843,7 +5843,7 @@
|
|||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>MemoryPrivatePoolSize</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@
|
|||
#include "llnavigationbar.h" // to show/hide navigation bar when changing mouse look state
|
||||
#include "llfloaterimnearbychat.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llpanelpathfindingrebakenavmesh.h"
|
||||
#include "llpaneltopinfobar.h"
|
||||
#include "llparcel.h"
|
||||
#include "llrendersphere.h"
|
||||
|
|
@ -1982,7 +1981,6 @@ void LLAgent::endAnimationUpdateUI()
|
|||
LLChicletBar::getInstance()->setVisible(TRUE);
|
||||
|
||||
LLPanelStandStopFlying::getInstance()->setVisible(TRUE);
|
||||
LLPanelPathfindingRebakeNavmesh::getInstance()->setVisible(TRUE);
|
||||
|
||||
LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset);
|
||||
|
||||
|
|
@ -2092,7 +2090,6 @@ void LLAgent::endAnimationUpdateUI()
|
|||
LLChicletBar::getInstance()->setVisible(FALSE);
|
||||
|
||||
LLPanelStandStopFlying::getInstance()->setVisible(FALSE);
|
||||
LLPanelPathfindingRebakeNavmesh::getInstance()->setVisible(FALSE);
|
||||
|
||||
// clear out camera lag effect
|
||||
gAgentCamera.clearCameraLag();
|
||||
|
|
|
|||
|
|
@ -711,7 +711,7 @@ bool LLAppViewer::init()
|
|||
//set the max heap size.
|
||||
initMaxHeapSize() ;
|
||||
|
||||
LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")) ;
|
||||
LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")*1024*1024) ;
|
||||
|
||||
// write Google Breakpad minidump files to our log directory
|
||||
std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "");
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
|
|||
|
||||
#if WINDOWS_CRT_MEM_CHECKS && !INCLUDE_VLD
|
||||
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); // dump memory leaks on exit
|
||||
#elif 1
|
||||
#elif 0
|
||||
// Experimental - enable the low fragmentation heap
|
||||
// This results in a 2-3x improvement in opening a new Inventory window (which uses a large numebr of allocations)
|
||||
// Note: This won't work when running from the debugger unless the _NO_DEBUG_HEAP environment variable is set to 1
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@
|
|||
#include <Carbon/Carbon.h>
|
||||
|
||||
// AssertMacros.h does bad things.
|
||||
#include "fix_macros.h"
|
||||
#undef verify
|
||||
#undef check
|
||||
#undef require
|
||||
|
||||
#include <vector>
|
||||
|
|
|
|||
|
|
@ -41,8 +41,6 @@
|
|||
#include "llsingleton.h"
|
||||
#include "lluuid.h"
|
||||
|
||||
extern void useMostItrusiveIMNotification();
|
||||
|
||||
LLDoNotDisturbNotificationStorage::LLDoNotDisturbNotificationStorage()
|
||||
: LLSingleton<LLDoNotDisturbNotificationStorage>()
|
||||
, LLNotificationStorage(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "dnd_notifications.xml"))
|
||||
|
|
@ -105,21 +103,14 @@ void LLDoNotDisturbNotificationStorage::loadNotifications()
|
|||
}
|
||||
|
||||
LLNotifications& instance = LLNotifications::instance();
|
||||
bool imToastExists = false;
|
||||
|
||||
for (LLSD::array_const_iterator notification_it = data.beginArray();
|
||||
notification_it != data.endArray();
|
||||
++notification_it)
|
||||
{
|
||||
LLSD notification_params = *notification_it;
|
||||
const std::string notificationName = notification_params["name"].asString();
|
||||
const LLUUID& notificationID = notification_params["id"];
|
||||
LLNotificationPtr notification = instance.find(notificationID);
|
||||
|
||||
if(notificationName == "IMToast")
|
||||
{
|
||||
imToastExists = true;
|
||||
}
|
||||
|
||||
//Notification already exists in notification pipeline (same instance of app running)
|
||||
if (notification)
|
||||
|
|
@ -147,11 +138,6 @@ void LLDoNotDisturbNotificationStorage::loadNotifications()
|
|||
}
|
||||
}
|
||||
|
||||
if(imToastExists)
|
||||
{
|
||||
useMostItrusiveIMNotification();
|
||||
}
|
||||
|
||||
// Clear the communication channel history and rewrite the save file to empty it as well
|
||||
LLNotificationChannelPtr channelPtr = getCommunicationChannel();
|
||||
LLCommunicationChannel *commChannel = dynamic_cast<LLCommunicationChannel*>(channelPtr.get());
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@
|
|||
#include <Carbon/Carbon.h>
|
||||
|
||||
// AssertMacros.h does bad things.
|
||||
#include "fix_macros.h"
|
||||
#undef verify
|
||||
#undef check
|
||||
#undef require
|
||||
|
||||
#include <vector>
|
||||
|
|
|
|||
|
|
@ -96,18 +96,6 @@ LLVolumeImplFlexible::~LLVolumeImplFlexible()
|
|||
//static
|
||||
void LLVolumeImplFlexible::updateClass()
|
||||
{
|
||||
// XXX stinson 11/13/2012 : This hack removes the optimization for limiting the number of flexi-prims
|
||||
// updated. With the optimization, flexi-prims attached to the users avatar were not being
|
||||
// animated correctly immediately following teleport. With the optimization removed, the bug went away.
|
||||
#define XXX_STINSON_MAINT_1890_HACK_FIX 1
|
||||
#if XXX_STINSON_MAINT_1890_HACK_FIX
|
||||
for (std::vector<LLVolumeImplFlexible*>::iterator iter = sInstanceList.begin();
|
||||
iter != sInstanceList.end();
|
||||
++iter)
|
||||
{
|
||||
(*iter)->doIdleUpdate();
|
||||
}
|
||||
#else // XXX_STINSON_MAINT_1890_HACK_FIX
|
||||
std::vector<S32>::iterator delay_iter = sUpdateDelay.begin();
|
||||
|
||||
for (std::vector<LLVolumeImplFlexible*>::iterator iter = sInstanceList.begin();
|
||||
|
|
@ -121,7 +109,6 @@ void LLVolumeImplFlexible::updateClass()
|
|||
}
|
||||
++delay_iter;
|
||||
}
|
||||
#endif // XXX_STINSON_MAINT_1890_HACK_FIX
|
||||
}
|
||||
|
||||
LLVector3 LLVolumeImplFlexible::getFramePosition() const
|
||||
|
|
@ -373,6 +360,8 @@ void LLVolumeImplFlexible::doIdleUpdate()
|
|||
F32 pixel_area = mVO->getPixelArea();
|
||||
|
||||
U32 update_period = (U32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f)))+1;
|
||||
// MAINT-1890 Clamp the update period to ensure that the update_period is no greater than 32 frames
|
||||
update_period = llclamp(update_period, 0U, 32U);
|
||||
|
||||
if (visible)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1624,35 +1624,6 @@ void LLFloaterPreference::selectChatPanel()
|
|||
selectPanel("chat");
|
||||
}
|
||||
|
||||
S32 LLFloaterPreference::getHighestNotificationIndex() //change this name
|
||||
{
|
||||
static const S32 comboBoxNamesLength = 4;
|
||||
static std::string comboBoxNames[comboBoxNamesLength] = {"FriendIMOptions",
|
||||
"NonFriendIMOptions",
|
||||
"ConferenceIMOptions",
|
||||
"GroupChatOptions"};
|
||||
S32 selectedIndex;
|
||||
S32 priorityindex = 3;
|
||||
LLComboBox * comboBox;
|
||||
|
||||
for(S32 i = 0; i < comboBoxNamesLength; ++i)
|
||||
{
|
||||
comboBox = getChild<LLComboBox>(comboBoxNames[i]);
|
||||
|
||||
if(comboBox)
|
||||
{
|
||||
selectedIndex = comboBox->getCurrentIndex();
|
||||
|
||||
if(selectedIndex < priorityindex)
|
||||
{
|
||||
priorityindex = selectedIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return priorityindex;
|
||||
}
|
||||
|
||||
//------------------------------Updater---------------------------------------
|
||||
|
||||
static bool handleBandwidthChanged(const LLSD& newvalue)
|
||||
|
|
|
|||
|
|
@ -86,7 +86,6 @@ public:
|
|||
void saveAvatarProperties( void );
|
||||
void selectPrivacyPanel();
|
||||
void selectChatPanel();
|
||||
S32 getHighestNotificationIndex();
|
||||
|
||||
protected:
|
||||
void onBtnOK();
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@
|
|||
#include "llchat.h"
|
||||
#include "llfloaterimsession.h"
|
||||
#include "llfloaterimcontainer.h"
|
||||
#include "llfloaterpreference.h"
|
||||
#include "llgroupiconctrl.h"
|
||||
#include "llmd5.h"
|
||||
#include "llmutelist.h"
|
||||
|
|
@ -129,43 +128,18 @@ void process_dnd_im(const LLSD& notification)
|
|||
false,
|
||||
false); //will need slight refactor to retrieve whether offline message or not (assume online for now)
|
||||
}
|
||||
}
|
||||
|
||||
void useMostItrusiveIMNotification()
|
||||
{
|
||||
LLFloaterPreference * instance = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");
|
||||
LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
|
||||
|
||||
//conv. floater is closed
|
||||
bool conversation_floater_is_closed =
|
||||
!( im_box
|
||||
&& im_box->isInVisibleChain()
|
||||
&& !im_box->isMinimized());
|
||||
|
||||
//conversation floater not focused (visible or not)
|
||||
bool conversation_floater_not_focused =
|
||||
conversation_floater_is_closed || !im_box->hasFocus();
|
||||
|
||||
//Only notify user of stored DND IM messages when conversation floater isn't focused
|
||||
if (instance && conversation_floater_not_focused)
|
||||
// open conversation floater
|
||||
LLFloaterIMContainer* container_floater =
|
||||
LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
|
||||
if (container_floater && !(container_floater->isFrontmost()))
|
||||
{
|
||||
switch(instance->getHighestNotificationIndex())
|
||||
{
|
||||
//open conversation floater
|
||||
case 0:
|
||||
LLFloaterReg::showInstance("im_container");
|
||||
break;
|
||||
//pop up message
|
||||
case 1:
|
||||
//flash toolbar button
|
||||
case 2:
|
||||
gToolBarView->flashCommand(LLCommandId("chat"), true);
|
||||
break;
|
||||
}
|
||||
container_floater->openFloater();
|
||||
container_floater->setFrontmost(TRUE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void on_avatar_name_cache_toast(const LLUUID& agent_id,
|
||||
const LLAvatarName& av_name,
|
||||
LLSD msg)
|
||||
|
|
@ -309,9 +283,9 @@ void on_new_message(const LLSD& msg)
|
|||
|
||||
if(!gAgent.isDoNotDisturb())
|
||||
{
|
||||
//Surface conversations floater
|
||||
LLFloaterReg::showInstance("im_container");
|
||||
}
|
||||
//Surface conversations floater
|
||||
LLFloaterReg::showInstance("im_container");
|
||||
}
|
||||
|
||||
//If in DND mode, allow notification to be stored so upon DND exit
|
||||
//useMostItrusiveIMNotification will be called to notify user a message exists
|
||||
|
|
@ -320,8 +294,8 @@ void on_new_message(const LLSD& msg)
|
|||
&& gAgent.isDoNotDisturb())
|
||||
{
|
||||
LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2582,25 +2556,6 @@ void LLIMMgr::addMessage(
|
|||
new_session_id = computeSessionID(dialog, other_participant_id);
|
||||
}
|
||||
|
||||
// Open conversation log if offline messages are present and user allows a Call Log
|
||||
if (is_offline_msg)
|
||||
{
|
||||
if (gSavedSettings.getBOOL("KeepConversationLogTranscripts"))
|
||||
{
|
||||
LLFloaterConversationLog* floater_log =
|
||||
LLFloaterReg::getTypedInstance<LLFloaterConversationLog>("conversation");
|
||||
if (floater_log && !(floater_log->isFrontmost()))
|
||||
{
|
||||
floater_log->openFloater();
|
||||
floater_log->setFrontmost(TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gToolBarView->flashCommand(LLCommandId("chat"), true);
|
||||
}
|
||||
}
|
||||
|
||||
//*NOTE session_name is empty in case of incoming P2P sessions
|
||||
std::string fixed_session_name = from;
|
||||
bool name_is_setted = false;
|
||||
|
|
@ -2667,6 +2622,19 @@ void LLIMMgr::addMessage(
|
|||
{
|
||||
LLIMModel::instance().addMessage(new_session_id, from, other_participant_id, msg);
|
||||
}
|
||||
|
||||
// Open conversation floater if offline messages are present
|
||||
if (is_offline_msg)
|
||||
{
|
||||
LLFloaterIMContainer* container_floater =
|
||||
LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
|
||||
if (container_floater && !(container_floater->isFrontmost()))
|
||||
{
|
||||
container_floater->openFloater();
|
||||
container_floater->setFrontmost(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& message_name, const LLSD& args)
|
||||
|
|
|
|||
|
|
@ -32,9 +32,7 @@
|
|||
#include "lllocalbitmaps.h"
|
||||
|
||||
/* boost: will not compile unless equivalent is undef'd, beware. */
|
||||
#ifdef equivalent
|
||||
#undef equivalent
|
||||
#endif
|
||||
#include "fix_macros.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
/* image compression headers. */
|
||||
|
|
|
|||
|
|
@ -0,0 +1,238 @@
|
|||
/**
|
||||
* @file llmenuoptionpathfindingrebakenavmesh.cpp
|
||||
* @brief Implementation of llmenuoptionpathfindingrebakenavmesh
|
||||
* @author Prep@lindenlab.com
|
||||
*
|
||||
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2012, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llmenuoptionpathfindingrebakenavmesh.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llenvmanager.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llpathfindingmanager.h"
|
||||
#include "llpathfindingnavmesh.h"
|
||||
#include "llpathfindingnavmeshstatus.h"
|
||||
#include "llviewerregion.h"
|
||||
|
||||
LLMenuOptionPathfindingRebakeNavmesh::LLMenuOptionPathfindingRebakeNavmesh()
|
||||
: LLSingleton<LLMenuOptionPathfindingRebakeNavmesh>(),
|
||||
mIsInitialized(false),
|
||||
mCanRebakeRegion(false),
|
||||
mRebakeNavMeshMode(kRebakeNavMesh_Default),
|
||||
mNavMeshSlot(),
|
||||
mRegionCrossingSlot(),
|
||||
mAgentStateSlot()
|
||||
{
|
||||
}
|
||||
|
||||
LLMenuOptionPathfindingRebakeNavmesh::~LLMenuOptionPathfindingRebakeNavmesh()
|
||||
{
|
||||
if (mRebakeNavMeshMode == kRebakeNavMesh_RequestSent)
|
||||
{
|
||||
LL_WARNS("navmeshRebaking") << "During destruction of the LLMenuOptionPathfindingRebakeNavmesh "
|
||||
<< "singleton, the mode indicates that a request has been sent for which a response has yet "
|
||||
<< "to be received. This could contribute to a crash on exit." << LL_ENDL;
|
||||
}
|
||||
|
||||
llassert(!mIsInitialized);
|
||||
if (mIsInitialized)
|
||||
{
|
||||
quit();
|
||||
}
|
||||
}
|
||||
|
||||
void LLMenuOptionPathfindingRebakeNavmesh::initialize()
|
||||
{
|
||||
llassert(!mIsInitialized);
|
||||
if (!mIsInitialized)
|
||||
{
|
||||
mIsInitialized = true;
|
||||
|
||||
setMode(kRebakeNavMesh_Default);
|
||||
|
||||
createNavMeshStatusListenerForCurrentRegion();
|
||||
|
||||
if ( !mRegionCrossingSlot.connected() )
|
||||
{
|
||||
mRegionCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLMenuOptionPathfindingRebakeNavmesh::handleRegionBoundaryCrossed, this));
|
||||
}
|
||||
|
||||
if (!mAgentStateSlot.connected())
|
||||
{
|
||||
mAgentStateSlot = LLPathfindingManager::getInstance()->registerAgentStateListener(boost::bind(&LLMenuOptionPathfindingRebakeNavmesh::handleAgentState, this, _1));
|
||||
}
|
||||
LLPathfindingManager::getInstance()->requestGetAgentState();
|
||||
}
|
||||
}
|
||||
|
||||
void LLMenuOptionPathfindingRebakeNavmesh::quit()
|
||||
{
|
||||
llassert(mIsInitialized);
|
||||
if (mIsInitialized)
|
||||
{
|
||||
if (mNavMeshSlot.connected())
|
||||
{
|
||||
mNavMeshSlot.disconnect();
|
||||
}
|
||||
|
||||
if (mRegionCrossingSlot.connected())
|
||||
{
|
||||
mRegionCrossingSlot.disconnect();
|
||||
}
|
||||
|
||||
if (mAgentStateSlot.connected())
|
||||
{
|
||||
mAgentStateSlot.disconnect();
|
||||
}
|
||||
|
||||
mIsInitialized = false;
|
||||
}
|
||||
}
|
||||
|
||||
bool LLMenuOptionPathfindingRebakeNavmesh::canRebakeRegion() const
|
||||
{
|
||||
if (!mIsInitialized)
|
||||
{
|
||||
LL_ERRS("navmeshRebaking") << "LLMenuOptionPathfindingRebakeNavmesh class has not been initialized "
|
||||
<< "when the ability to rebake navmesh is being requested." << LL_ENDL;
|
||||
}
|
||||
return mCanRebakeRegion;
|
||||
}
|
||||
|
||||
LLMenuOptionPathfindingRebakeNavmesh::ERebakeNavMeshMode LLMenuOptionPathfindingRebakeNavmesh::getMode() const
|
||||
{
|
||||
if (!mIsInitialized)
|
||||
{
|
||||
LL_ERRS("navmeshRebaking") << "LLMenuOptionPathfindingRebakeNavmesh class has not been initialized "
|
||||
<< "when the mode is being requested." << LL_ENDL;
|
||||
}
|
||||
return mRebakeNavMeshMode;
|
||||
}
|
||||
|
||||
void LLMenuOptionPathfindingRebakeNavmesh::sendRequestRebakeNavmesh()
|
||||
{
|
||||
if (!mIsInitialized)
|
||||
{
|
||||
LL_ERRS("navmeshRebaking") << "LLMenuOptionPathfindingRebakeNavmesh class has not been initialized "
|
||||
<< "when the request is being made to rebake the navmesh." << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!canRebakeRegion())
|
||||
{
|
||||
LL_WARNS("navmeshRebaking") << "attempting to rebake navmesh when user does not have permissions "
|
||||
<< "on this region" << LL_ENDL;
|
||||
}
|
||||
if (getMode() != kRebakeNavMesh_Available)
|
||||
{
|
||||
LL_WARNS("navmeshRebaking") << "attempting to rebake navmesh when mode is not available"
|
||||
<< LL_ENDL;
|
||||
}
|
||||
|
||||
setMode(kRebakeNavMesh_RequestSent);
|
||||
LLPathfindingManager::getInstance()->requestRebakeNavMesh(boost::bind(&LLMenuOptionPathfindingRebakeNavmesh::handleRebakeNavMeshResponse, this, _1));
|
||||
}
|
||||
}
|
||||
|
||||
void LLMenuOptionPathfindingRebakeNavmesh::setMode(ERebakeNavMeshMode pRebakeNavMeshMode)
|
||||
{
|
||||
mRebakeNavMeshMode = pRebakeNavMeshMode;
|
||||
}
|
||||
|
||||
void LLMenuOptionPathfindingRebakeNavmesh::handleAgentState(BOOL pCanRebakeRegion)
|
||||
{
|
||||
llassert(mIsInitialized);
|
||||
mCanRebakeRegion = pCanRebakeRegion;
|
||||
}
|
||||
|
||||
void LLMenuOptionPathfindingRebakeNavmesh::handleRebakeNavMeshResponse(bool pResponseStatus)
|
||||
{
|
||||
llassert(mIsInitialized);
|
||||
if (getMode() == kRebakeNavMesh_RequestSent)
|
||||
{
|
||||
setMode(pResponseStatus ? kRebakeNavMesh_InProgress : kRebakeNavMesh_Default);
|
||||
}
|
||||
|
||||
if (!pResponseStatus)
|
||||
{
|
||||
LLNotificationsUtil::add("PathfindingCannotRebakeNavmesh");
|
||||
}
|
||||
}
|
||||
|
||||
void LLMenuOptionPathfindingRebakeNavmesh::handleNavMeshStatus(const LLPathfindingNavMeshStatus &pNavMeshStatus)
|
||||
{
|
||||
llassert(mIsInitialized);
|
||||
ERebakeNavMeshMode rebakeNavMeshMode = kRebakeNavMesh_Default;
|
||||
if (pNavMeshStatus.isValid())
|
||||
{
|
||||
switch (pNavMeshStatus.getStatus())
|
||||
{
|
||||
case LLPathfindingNavMeshStatus::kPending :
|
||||
case LLPathfindingNavMeshStatus::kRepending :
|
||||
rebakeNavMeshMode = kRebakeNavMesh_Available;
|
||||
break;
|
||||
case LLPathfindingNavMeshStatus::kBuilding :
|
||||
rebakeNavMeshMode = kRebakeNavMesh_InProgress;
|
||||
break;
|
||||
case LLPathfindingNavMeshStatus::kComplete :
|
||||
rebakeNavMeshMode = kRebakeNavMesh_NotAvailable;
|
||||
break;
|
||||
default :
|
||||
rebakeNavMeshMode = kRebakeNavMesh_Default;
|
||||
llassert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
setMode(rebakeNavMeshMode);
|
||||
}
|
||||
|
||||
void LLMenuOptionPathfindingRebakeNavmesh::handleRegionBoundaryCrossed()
|
||||
{
|
||||
llassert(mIsInitialized);
|
||||
createNavMeshStatusListenerForCurrentRegion();
|
||||
mCanRebakeRegion = FALSE;
|
||||
LLPathfindingManager::getInstance()->requestGetAgentState();
|
||||
}
|
||||
|
||||
void LLMenuOptionPathfindingRebakeNavmesh::createNavMeshStatusListenerForCurrentRegion()
|
||||
{
|
||||
if (mNavMeshSlot.connected())
|
||||
{
|
||||
mNavMeshSlot.disconnect();
|
||||
}
|
||||
|
||||
LLViewerRegion *currentRegion = gAgent.getRegion();
|
||||
if (currentRegion != NULL)
|
||||
{
|
||||
mNavMeshSlot = LLPathfindingManager::getInstance()->registerNavMeshListenerForRegion(currentRegion, boost::bind(&LLMenuOptionPathfindingRebakeNavmesh::handleNavMeshStatus, this, _2));
|
||||
LLPathfindingManager::getInstance()->requestGetNavMeshForRegion(currentRegion, true);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* @file llpanelpathfindingrebakenavmesh.h
|
||||
* @brief Header file for llpanelpathfindingrebakenavmesh
|
||||
* @file llmenuoptionpathfindingrebakenavmesh.h
|
||||
* @brief Header file for llmenuoptionpathfindingrebakenavmesh
|
||||
* @author Prep@lindenlab.com
|
||||
*
|
||||
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
|
||||
|
|
@ -24,34 +24,22 @@
|
|||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
#ifndef LL_LLPANELPATHFINDINGREBAKENAVMESH_H
|
||||
#define LL_LLPANELPATHFINDINGREBAKENAVMESH_H
|
||||
#ifndef LL_LLMENUOPTIONPATHFINDINGREBAKENAVMESH_H
|
||||
#define LL_LLMENUOPTIONPATHFINDINGREBAKENAVMESH_H
|
||||
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
#include "llpanel.h"
|
||||
#include "llpathfindingmanager.h"
|
||||
#include "llpathfindingnavmesh.h"
|
||||
#include "llsingleton.h"
|
||||
|
||||
class LLButton;
|
||||
class LLPathfindingNavMeshStatus;
|
||||
|
||||
class LLPanelPathfindingRebakeNavmesh : public LLPanel
|
||||
class LLMenuOptionPathfindingRebakeNavmesh : public LLSingleton<LLMenuOptionPathfindingRebakeNavmesh>
|
||||
{
|
||||
|
||||
LOG_CLASS(LLPanelPathfindingRebakeNavmesh);
|
||||
LOG_CLASS(LLMenuOptionPathfindingRebakeNavmesh);
|
||||
|
||||
public:
|
||||
static LLPanelPathfindingRebakeNavmesh* getInstance();
|
||||
|
||||
virtual BOOL postBuild();
|
||||
|
||||
virtual void draw();
|
||||
virtual BOOL handleToolTip( S32 x, S32 y, MASK mask );
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
typedef enum
|
||||
{
|
||||
kRebakeNavMesh_Available,
|
||||
|
|
@ -61,15 +49,21 @@ private:
|
|||
kRebakeNavMesh_Default = kRebakeNavMesh_NotAvailable
|
||||
} ERebakeNavMeshMode;
|
||||
|
||||
LLPanelPathfindingRebakeNavmesh();
|
||||
virtual ~LLPanelPathfindingRebakeNavmesh();
|
||||
LLMenuOptionPathfindingRebakeNavmesh();
|
||||
virtual ~LLMenuOptionPathfindingRebakeNavmesh();
|
||||
|
||||
static LLPanelPathfindingRebakeNavmesh* getPanel();
|
||||
void initialize();
|
||||
void quit();
|
||||
|
||||
void setMode(ERebakeNavMeshMode pRebakeNavMeshMode);
|
||||
bool canRebakeRegion() const;
|
||||
ERebakeNavMeshMode getMode() const;
|
||||
|
||||
void onNavMeshRebakeClick();
|
||||
void sendRequestRebakeNavmesh();
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
void setMode(ERebakeNavMeshMode pRebakeNavMeshMode);
|
||||
|
||||
void handleAgentState(BOOL pCanRebakeRegion);
|
||||
void handleRebakeNavMeshResponse(bool pResponseStatus);
|
||||
|
|
@ -78,19 +72,14 @@ private:
|
|||
|
||||
void createNavMeshStatusListenerForCurrentRegion();
|
||||
|
||||
bool doDraw() const;
|
||||
void updatePosition();
|
||||
bool mIsInitialized;
|
||||
|
||||
BOOL mCanRebakeRegion;
|
||||
bool mCanRebakeRegion;
|
||||
ERebakeNavMeshMode mRebakeNavMeshMode;
|
||||
|
||||
LLButton* mNavMeshRebakeButton;
|
||||
LLButton* mNavMeshSendingButton;
|
||||
LLButton* mNavMeshBakingButton;
|
||||
|
||||
LLPathfindingNavMesh::navmesh_slot_t mNavMeshSlot;
|
||||
boost::signals2::connection mRegionCrossingSlot;
|
||||
LLPathfindingManager::agent_state_slot_t mAgentStateSlot;
|
||||
};
|
||||
|
||||
#endif // LL_LLPANELPATHFINDINGREBAKENAVMESH_H
|
||||
#endif // LL_LLMENUOPTIONPATHFINDINGREBAKENAVMESH_H
|
||||
|
|
@ -1,269 +0,0 @@
|
|||
/**
|
||||
* @file llpanelpathfindingrebakenavmesh.cpp
|
||||
* @brief Implementation of llpanelpathfindingrebakenavmesh
|
||||
* @author Prep@lindenlab.com
|
||||
*
|
||||
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2012, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llpanelpathfindingrebakenavmesh.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llbutton.h"
|
||||
#include "llenvmanager.h"
|
||||
#include "llhints.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llpanel.h"
|
||||
#include "llpathfindingmanager.h"
|
||||
#include "llpathfindingnavmesh.h"
|
||||
#include "llpathfindingnavmeshstatus.h"
|
||||
#include "lltoolbar.h"
|
||||
#include "lltoolbarview.h"
|
||||
#include "lltooltip.h"
|
||||
#include "llviewerregion.h"
|
||||
|
||||
LLPanelPathfindingRebakeNavmesh* LLPanelPathfindingRebakeNavmesh::getInstance()
|
||||
{
|
||||
static LLPanelPathfindingRebakeNavmesh* panel = getPanel();
|
||||
return panel;
|
||||
}
|
||||
|
||||
BOOL LLPanelPathfindingRebakeNavmesh::postBuild()
|
||||
{
|
||||
//Rebake button
|
||||
mNavMeshRebakeButton = findChild<LLButton>("navmesh_btn");
|
||||
llassert(mNavMeshRebakeButton != NULL);
|
||||
mNavMeshRebakeButton->setCommitCallback(boost::bind(&LLPanelPathfindingRebakeNavmesh::onNavMeshRebakeClick, this));
|
||||
LLHints::registerHintTarget("navmesh_btn", mNavMeshRebakeButton->getHandle());
|
||||
|
||||
//Sending rebake request
|
||||
mNavMeshSendingButton = findChild<LLButton>("navmesh_btn_sending");
|
||||
llassert(mNavMeshSendingButton != NULL);
|
||||
LLHints::registerHintTarget("navmesh_btn_sending", mNavMeshSendingButton->getHandle());
|
||||
|
||||
//rebaking...
|
||||
mNavMeshBakingButton = findChild<LLButton>("navmesh_btn_baking");
|
||||
llassert(mNavMeshBakingButton != NULL);
|
||||
LLHints::registerHintTarget("navmesh_btn_baking", mNavMeshBakingButton->getHandle());
|
||||
|
||||
setMode(kRebakeNavMesh_Default);
|
||||
|
||||
createNavMeshStatusListenerForCurrentRegion();
|
||||
|
||||
if ( !mRegionCrossingSlot.connected() )
|
||||
{
|
||||
mRegionCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLPanelPathfindingRebakeNavmesh::handleRegionBoundaryCrossed, this));
|
||||
}
|
||||
|
||||
if (!mAgentStateSlot.connected())
|
||||
{
|
||||
mAgentStateSlot = LLPathfindingManager::getInstance()->registerAgentStateListener(boost::bind(&LLPanelPathfindingRebakeNavmesh::handleAgentState, this, _1));
|
||||
}
|
||||
LLPathfindingManager::getInstance()->requestGetAgentState();
|
||||
|
||||
return LLPanel::postBuild();
|
||||
}
|
||||
|
||||
void LLPanelPathfindingRebakeNavmesh::draw()
|
||||
{
|
||||
if (doDraw())
|
||||
{
|
||||
updatePosition();
|
||||
LLPanel::draw();
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLPanelPathfindingRebakeNavmesh::handleToolTip( S32 x, S32 y, MASK mask )
|
||||
{
|
||||
LLToolTipMgr::instance().unblockToolTips();
|
||||
|
||||
if (mNavMeshRebakeButton->getVisible())
|
||||
{
|
||||
LLToolTipMgr::instance().show(mNavMeshRebakeButton->getToolTip());
|
||||
}
|
||||
else if (mNavMeshSendingButton->getVisible())
|
||||
{
|
||||
LLToolTipMgr::instance().show(mNavMeshSendingButton->getToolTip());
|
||||
}
|
||||
else if (mNavMeshBakingButton->getVisible())
|
||||
{
|
||||
LLToolTipMgr::instance().show(mNavMeshBakingButton->getToolTip());
|
||||
}
|
||||
|
||||
return LLPanel::handleToolTip(x, y, mask);
|
||||
}
|
||||
|
||||
LLPanelPathfindingRebakeNavmesh::LLPanelPathfindingRebakeNavmesh()
|
||||
: LLPanel(),
|
||||
mCanRebakeRegion(FALSE),
|
||||
mRebakeNavMeshMode(kRebakeNavMesh_Default),
|
||||
mNavMeshRebakeButton(NULL),
|
||||
mNavMeshSendingButton(NULL),
|
||||
mNavMeshBakingButton(NULL),
|
||||
mNavMeshSlot(),
|
||||
mRegionCrossingSlot(),
|
||||
mAgentStateSlot()
|
||||
{
|
||||
// make sure we have the only instance of this class
|
||||
static bool b = true;
|
||||
llassert_always(b);
|
||||
b=false;
|
||||
}
|
||||
|
||||
LLPanelPathfindingRebakeNavmesh::~LLPanelPathfindingRebakeNavmesh()
|
||||
{
|
||||
}
|
||||
|
||||
LLPanelPathfindingRebakeNavmesh* LLPanelPathfindingRebakeNavmesh::getPanel()
|
||||
{
|
||||
LLPanelPathfindingRebakeNavmesh* panel = new LLPanelPathfindingRebakeNavmesh();
|
||||
panel->buildFromFile("panel_navmesh_rebake.xml");
|
||||
return panel;
|
||||
}
|
||||
|
||||
void LLPanelPathfindingRebakeNavmesh::setMode(ERebakeNavMeshMode pRebakeNavMeshMode)
|
||||
{
|
||||
if (pRebakeNavMeshMode == kRebakeNavMesh_Available)
|
||||
{
|
||||
LLNotificationsUtil::add("PathfindingRebakeNavmesh");
|
||||
}
|
||||
mNavMeshRebakeButton->setVisible(pRebakeNavMeshMode == kRebakeNavMesh_Available);
|
||||
mNavMeshSendingButton->setVisible(pRebakeNavMeshMode == kRebakeNavMesh_RequestSent);
|
||||
mNavMeshBakingButton->setVisible(pRebakeNavMeshMode == kRebakeNavMesh_InProgress);
|
||||
mRebakeNavMeshMode = pRebakeNavMeshMode;
|
||||
}
|
||||
|
||||
LLPanelPathfindingRebakeNavmesh::ERebakeNavMeshMode LLPanelPathfindingRebakeNavmesh::getMode() const
|
||||
{
|
||||
return mRebakeNavMeshMode;
|
||||
}
|
||||
|
||||
void LLPanelPathfindingRebakeNavmesh::onNavMeshRebakeClick()
|
||||
{
|
||||
setMode(kRebakeNavMesh_RequestSent);
|
||||
LLPathfindingManager::getInstance()->requestRebakeNavMesh(boost::bind(&LLPanelPathfindingRebakeNavmesh::handleRebakeNavMeshResponse, this, _1));
|
||||
}
|
||||
|
||||
void LLPanelPathfindingRebakeNavmesh::handleAgentState(BOOL pCanRebakeRegion)
|
||||
{
|
||||
mCanRebakeRegion = pCanRebakeRegion;
|
||||
}
|
||||
|
||||
void LLPanelPathfindingRebakeNavmesh::handleRebakeNavMeshResponse(bool pResponseStatus)
|
||||
{
|
||||
if (getMode() == kRebakeNavMesh_RequestSent)
|
||||
{
|
||||
setMode(pResponseStatus ? kRebakeNavMesh_InProgress : kRebakeNavMesh_Default);
|
||||
}
|
||||
|
||||
if (!pResponseStatus)
|
||||
{
|
||||
LLNotificationsUtil::add("PathfindingCannotRebakeNavmesh");
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelPathfindingRebakeNavmesh::handleNavMeshStatus(const LLPathfindingNavMeshStatus &pNavMeshStatus)
|
||||
{
|
||||
ERebakeNavMeshMode rebakeNavMeshMode = kRebakeNavMesh_Default;
|
||||
if (pNavMeshStatus.isValid())
|
||||
{
|
||||
switch (pNavMeshStatus.getStatus())
|
||||
{
|
||||
case LLPathfindingNavMeshStatus::kPending :
|
||||
case LLPathfindingNavMeshStatus::kRepending :
|
||||
rebakeNavMeshMode = kRebakeNavMesh_Available;
|
||||
break;
|
||||
case LLPathfindingNavMeshStatus::kBuilding :
|
||||
rebakeNavMeshMode = kRebakeNavMesh_InProgress;
|
||||
break;
|
||||
case LLPathfindingNavMeshStatus::kComplete :
|
||||
rebakeNavMeshMode = kRebakeNavMesh_NotAvailable;
|
||||
break;
|
||||
default :
|
||||
rebakeNavMeshMode = kRebakeNavMesh_Default;
|
||||
llassert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
setMode(rebakeNavMeshMode);
|
||||
}
|
||||
|
||||
void LLPanelPathfindingRebakeNavmesh::handleRegionBoundaryCrossed()
|
||||
{
|
||||
createNavMeshStatusListenerForCurrentRegion();
|
||||
mCanRebakeRegion = FALSE;
|
||||
LLPathfindingManager::getInstance()->requestGetAgentState();
|
||||
}
|
||||
|
||||
void LLPanelPathfindingRebakeNavmesh::createNavMeshStatusListenerForCurrentRegion()
|
||||
{
|
||||
if (mNavMeshSlot.connected())
|
||||
{
|
||||
mNavMeshSlot.disconnect();
|
||||
}
|
||||
|
||||
LLViewerRegion *currentRegion = gAgent.getRegion();
|
||||
if (currentRegion != NULL)
|
||||
{
|
||||
mNavMeshSlot = LLPathfindingManager::getInstance()->registerNavMeshListenerForRegion(currentRegion, boost::bind(&LLPanelPathfindingRebakeNavmesh::handleNavMeshStatus, this, _2));
|
||||
LLPathfindingManager::getInstance()->requestGetNavMeshForRegion(currentRegion, true);
|
||||
}
|
||||
}
|
||||
|
||||
bool LLPanelPathfindingRebakeNavmesh::doDraw() const
|
||||
{
|
||||
return (mCanRebakeRegion && (mRebakeNavMeshMode != kRebakeNavMesh_NotAvailable));
|
||||
}
|
||||
|
||||
void LLPanelPathfindingRebakeNavmesh::updatePosition()
|
||||
{
|
||||
S32 y_pos = 0;
|
||||
S32 bottom_tb_center = 0;
|
||||
|
||||
if (LLToolBar* toolbar_bottom = gToolBarView->getChild<LLToolBar>("toolbar_bottom"))
|
||||
{
|
||||
y_pos = toolbar_bottom->getRect().getHeight();
|
||||
bottom_tb_center = toolbar_bottom->getRect().getCenterX();
|
||||
}
|
||||
|
||||
S32 left_tb_width = 0;
|
||||
if (LLToolBar* toolbar_left = gToolBarView->getChild<LLToolBar>("toolbar_left"))
|
||||
{
|
||||
left_tb_width = toolbar_left->getRect().getWidth();
|
||||
}
|
||||
|
||||
if(LLPanel* panel_ssf_container = getRootView()->getChild<LLPanel>("state_management_buttons_container"))
|
||||
{
|
||||
panel_ssf_container->setOrigin(0, y_pos);
|
||||
}
|
||||
|
||||
S32 x_pos = bottom_tb_center-getRect().getWidth()/2 - left_tb_width + 113 /* width of stand/fly button */ + 10 /* margin */;
|
||||
|
||||
setOrigin( x_pos, 0);
|
||||
}
|
||||
|
|
@ -84,6 +84,7 @@
|
|||
#include "llinventoryfunctions.h"
|
||||
#include "llpanellogin.h"
|
||||
#include "llpanelblockedlist.h"
|
||||
#include "llmenuoptionpathfindingrebakenavmesh.h"
|
||||
#include "llmoveview.h"
|
||||
#include "llparcel.h"
|
||||
#include "llrootview.h"
|
||||
|
|
@ -4864,6 +4865,37 @@ class LLToolsEnablePathfindingView : public view_listener_t
|
|||
}
|
||||
};
|
||||
|
||||
class LLToolsDoPathfindingRebakeRegion : public view_listener_t
|
||||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
bool hasPathfinding = (LLPathfindingManager::getInstance() != NULL);
|
||||
|
||||
if (hasPathfinding)
|
||||
{
|
||||
LLMenuOptionPathfindingRebakeNavmesh::getInstance()->sendRequestRebakeNavmesh();
|
||||
}
|
||||
|
||||
return hasPathfinding;
|
||||
}
|
||||
};
|
||||
|
||||
class LLToolsEnablePathfindingRebakeRegion : public view_listener_t
|
||||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
bool returnValue = false;
|
||||
|
||||
if (LLPathfindingManager::getInstance() != NULL)
|
||||
{
|
||||
LLMenuOptionPathfindingRebakeNavmesh *rebakeInstance = LLMenuOptionPathfindingRebakeNavmesh::getInstance();
|
||||
returnValue = (rebakeInstance->canRebakeRegion() &&
|
||||
(rebakeInstance->getMode() == LLMenuOptionPathfindingRebakeNavmesh::kRebakeNavMesh_Available));
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
};
|
||||
|
||||
// Round the position of all root objects to the grid
|
||||
class LLToolsSnapObjectXY : public view_listener_t
|
||||
{
|
||||
|
|
@ -8363,6 +8395,8 @@ void initialize_menus()
|
|||
|
||||
view_listener_t::addMenu(new LLToolsEnablePathfinding(), "Tools.EnablePathfinding");
|
||||
view_listener_t::addMenu(new LLToolsEnablePathfindingView(), "Tools.EnablePathfindingView");
|
||||
view_listener_t::addMenu(new LLToolsDoPathfindingRebakeRegion(), "Tools.DoPathfindingRebakeRegion");
|
||||
view_listener_t::addMenu(new LLToolsEnablePathfindingRebakeRegion(), "Tools.EnablePathfindingRebakeRegion");
|
||||
|
||||
// Help menu
|
||||
// most items use the ShowFloater method
|
||||
|
|
|
|||
|
|
@ -1232,12 +1232,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
|
|||
coloru.mV[3] = 255 - coloru.mV[3];
|
||||
mText->setColor(LLColor4(coloru));
|
||||
mText->setString(temp_string);
|
||||
|
||||
if (mDrawable.notNull())
|
||||
{
|
||||
setChanged(MOVED | SILHOUETTE);
|
||||
gPipeline.markMoved(mDrawable, FALSE); // undamped
|
||||
}
|
||||
|
||||
setChanged(MOVED | SILHOUETTE);
|
||||
}
|
||||
else if (mText.notNull())
|
||||
{
|
||||
|
|
@ -2046,12 +2042,12 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
|
|||
|| (new_angv != old_angv))
|
||||
{
|
||||
if (new_rot != mPreviousRotation)
|
||||
{
|
||||
{
|
||||
resetRot();
|
||||
}
|
||||
else if (new_angv != old_angv)
|
||||
{
|
||||
if (flagUsePhysics() || new_angv.isExactlyZero())
|
||||
if (flagUsePhysics())
|
||||
{
|
||||
resetRot();
|
||||
}
|
||||
|
|
@ -2069,7 +2065,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
|
|||
setChanged(ROTATED | SILHOUETTE);
|
||||
}
|
||||
|
||||
|
||||
if ( gShowObjectUpdates )
|
||||
{
|
||||
LLColor4 color;
|
||||
|
|
|
|||
|
|
@ -624,6 +624,7 @@ LLViewerTexture::~LLViewerTexture()
|
|||
void LLViewerTexture::init(bool firstinit)
|
||||
{
|
||||
mBoostLevel = LLViewerTexture::BOOST_NONE;
|
||||
mSelectedTime = 0.f;
|
||||
|
||||
mFullWidth = 0;
|
||||
mFullHeight = 0;
|
||||
|
|
@ -679,11 +680,18 @@ void LLViewerTexture::setBoostLevel(S32 level)
|
|||
if(mBoostLevel != level)
|
||||
{
|
||||
mBoostLevel = level ;
|
||||
if(mBoostLevel != LLViewerTexture::BOOST_NONE)
|
||||
if(mBoostLevel != LLViewerTexture::BOOST_NONE &&
|
||||
mBoostLevel != LLViewerTexture::BOOST_SELECTED)
|
||||
{
|
||||
setNoDelete() ;
|
||||
}
|
||||
}
|
||||
|
||||
if (mBoostLevel == LLViewerTexture::BOOST_SELECTED)
|
||||
{
|
||||
mSelectedTime = gFrameTimeSeconds;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1904,13 +1912,34 @@ void LLViewerFetchedTexture::updateVirtualSize()
|
|||
for(U32 i = 0 ; i < mNumFaces ; i++)
|
||||
{
|
||||
LLFace* facep = mFaceList[i] ;
|
||||
if( facep && facep->getDrawable() && facep->getDrawable()->isRecentlyVisible())
|
||||
if( facep )
|
||||
{
|
||||
addTextureStats(facep->getVirtualSize()) ;
|
||||
setAdditionalDecodePriority(facep->getImportanceToCamera()) ;
|
||||
LLDrawable* drawable = facep->getDrawable();
|
||||
if (drawable)
|
||||
{
|
||||
if(drawable->isRecentlyVisible())
|
||||
{
|
||||
if (getBoostLevel() == LLViewerTexture::BOOST_NONE &&
|
||||
drawable->getVObj() && drawable->getVObj()->isSelected())
|
||||
{
|
||||
setBoostLevel(LLViewerTexture::BOOST_SELECTED);
|
||||
}
|
||||
addTextureStats(facep->getVirtualSize()) ;
|
||||
setAdditionalDecodePriority(facep->getImportanceToCamera()) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//reset whether or not a face was selected after 10 seconds
|
||||
const F32 SELECTION_RESET_TIME = 10.f;
|
||||
|
||||
if (getBoostLevel() == LLViewerTexture::BOOST_SELECTED &&
|
||||
gFrameTimeSeconds - mSelectedTime > SELECTION_RESET_TIME)
|
||||
{
|
||||
setBoostLevel(LLViewerTexture::BOOST_NONE);
|
||||
}
|
||||
|
||||
if(mMaxVirtualSizeResetCounter > 0)
|
||||
{
|
||||
mMaxVirtualSizeResetCounter--;
|
||||
|
|
|
|||
|
|
@ -275,6 +275,7 @@ private:
|
|||
protected:
|
||||
LLUUID mID;
|
||||
S32 mBoostLevel; // enum describing priority level
|
||||
F32 mSelectedTime; // time texture was last selected
|
||||
S32 mFullWidth;
|
||||
S32 mFullHeight;
|
||||
BOOL mUseMipMaps ;
|
||||
|
|
|
|||
|
|
@ -125,12 +125,12 @@
|
|||
#include "llkeyboard.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llmenugl.h"
|
||||
#include "llmenuoptionpathfindingrebakenavmesh.h"
|
||||
#include "llmodaldialog.h"
|
||||
#include "llmorphview.h"
|
||||
#include "llmoveview.h"
|
||||
#include "llnavigationbar.h"
|
||||
#include "llnotificationhandler.h"
|
||||
#include "llpanelpathfindingrebakenavmesh.h"
|
||||
#include "llpaneltopinfobar.h"
|
||||
#include "llpopupview.h"
|
||||
#include "llpreviewtexture.h"
|
||||
|
|
@ -1937,11 +1937,10 @@ void LLViewerWindow::initWorldUI()
|
|||
LLPanelStandStopFlying* panel_stand_stop_flying = LLPanelStandStopFlying::getInstance();
|
||||
panel_ssf_container->addChild(panel_stand_stop_flying);
|
||||
|
||||
LLPanelPathfindingRebakeNavmesh *panel_rebake_navmesh = LLPanelPathfindingRebakeNavmesh::getInstance();
|
||||
panel_ssf_container->addChild(panel_rebake_navmesh);
|
||||
|
||||
panel_ssf_container->setVisible(TRUE);
|
||||
|
||||
LLMenuOptionPathfindingRebakeNavmesh::getInstance()->initialize();
|
||||
|
||||
// Load and make the toolbars visible
|
||||
// Note: we need to load the toolbars only *after* the user is logged in and IW
|
||||
if (gToolBarView)
|
||||
|
|
@ -2011,6 +2010,8 @@ void LLViewerWindow::shutdownViews()
|
|||
mRootView = NULL;
|
||||
llinfos << "RootView deleted." << llendl ;
|
||||
|
||||
LLMenuOptionPathfindingRebakeNavmesh::getInstance()->quit();
|
||||
|
||||
// Automatically deleted as children of mRootView. Fix the globals.
|
||||
gStatusBar = NULL;
|
||||
gIMMgr = NULL;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#include <Carbon/Carbon.h>
|
||||
#include "fix_macros.h"
|
||||
|
||||
#undef check
|
||||
#undef verify
|
||||
#undef require
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<panel name="panel_navmesh_rebake">
|
||||
<button label="Region neu formen" name="navmesh_btn" tool_tip="Klicken, um das Navmesh der Region neu zu formen."/>
|
||||
<button label="Neuformen wird angefordert" name="navmesh_btn_sending" tool_tip="Anforderung zum Neuformen wird an den Server gesendet."/>
|
||||
<button label="Region wird neu geformt" name="navmesh_btn_baking" tool_tip="Region wird neu geformt. Nach Abschluss des Vorgangs verschwindet diese Schaltfläche."/>
|
||||
</panel>
|
||||
|
|
@ -29,26 +29,6 @@
|
|||
<menu_item_call.on_enable
|
||||
function="EnableEdit"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Show in linksets"
|
||||
name="show_in_linksets">
|
||||
<menu_item_call.on_click
|
||||
function="Pathfinding.Linksets.Select" />
|
||||
<menu_item_call.on_enable
|
||||
function="EnableSelectInPathfindingLinksets"/>
|
||||
<menu_item_call.on_visible
|
||||
function="EnableSelectInPathfindingLinksets"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Show in characters"
|
||||
name="show_in_characters">
|
||||
<menu_item_call.on_click
|
||||
function="Pathfinding.Characters.Select" />
|
||||
<menu_item_call.on_enable
|
||||
function="EnableSelectInPathfindingCharacters"/>
|
||||
<menu_item_call.on_visible
|
||||
function="EnableSelectInPathfindingCharacters"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
enabled="false"
|
||||
label="Open"
|
||||
|
|
@ -90,6 +70,26 @@
|
|||
<menu_item_call.on_click
|
||||
function="Object.ZoomIn" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Show in linksets"
|
||||
name="show_in_linksets">
|
||||
<menu_item_call.on_click
|
||||
function="Pathfinding.Linksets.Select" />
|
||||
<menu_item_call.on_enable
|
||||
function="EnableSelectInPathfindingLinksets"/>
|
||||
<menu_item_call.on_visible
|
||||
function="EnableSelectInPathfindingLinksets"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Show in characters"
|
||||
name="show_in_characters">
|
||||
<menu_item_call.on_click
|
||||
function="Pathfinding.Characters.Select" />
|
||||
<menu_item_call.on_enable
|
||||
function="EnableSelectInPathfindingCharacters"/>
|
||||
<menu_item_call.on_visible
|
||||
function="EnableSelectInPathfindingCharacters"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator layout="topleft" />
|
||||
<context_menu
|
||||
label="Put On"
|
||||
|
|
|
|||
|
|
@ -981,7 +981,7 @@
|
|||
create_jump_keys="true"
|
||||
label="Pathfinding"
|
||||
name="Pathfinding"
|
||||
tear_off="false">
|
||||
tear_off="true">
|
||||
<menu_item_call
|
||||
label="Linksets..."
|
||||
name="pathfinding_linksets_menu_item">
|
||||
|
|
@ -1009,6 +1009,14 @@
|
|||
<menu_item_call.on_enable
|
||||
function="Tools.EnablePathfindingView" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Rebake region"
|
||||
name="pathfinding_rebake_navmesh_item">
|
||||
<menu_item_call.on_click
|
||||
function="Tools.DoPathfindingRebakeRegion"/>
|
||||
<menu_item_call.on_enable
|
||||
function="Tools.EnablePathfindingRebakeRegion" />
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6114,26 +6114,6 @@ This area has building disabled. You can't build or rez objects here.
|
|||
Dynamic pathfinding is not enabled on this region. Scripted objects using pathfinding LSL calls may not operate as expected on this region.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="PathfindingRebakeNavmesh"
|
||||
type="alertmodal">
|
||||
<unique/>
|
||||
Changing certain objects in this region could cause other moving objects to behave incorrectly. To make moving objects behave correctly, click the “Rebake region” button. Choose “Help” for more information.
|
||||
<url
|
||||
option="1"
|
||||
name="url"
|
||||
target = "_external">
|
||||
http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer
|
||||
</url>
|
||||
<usetemplate
|
||||
name="okhelpignore"
|
||||
ignoretext="Changing certain objects in this region could cause other moving objects to behave incorrectly."
|
||||
yestext="OK"
|
||||
helptext="Help"
|
||||
/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="PathfindingCannotRebakeNavmesh"
|
||||
|
|
|
|||
|
|
@ -1,45 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<panel
|
||||
height="25"
|
||||
layout="topleft"
|
||||
name="panel_navmesh_rebake"
|
||||
mouse_opaque="false"
|
||||
visible="true"
|
||||
width="133">
|
||||
<button
|
||||
follows="left|bottom"
|
||||
height="19"
|
||||
label="Rebake region"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="navmesh_btn"
|
||||
tool_tip="Click to rebake the region's navmesh."
|
||||
top="2"
|
||||
visible="false"
|
||||
enabled="true"
|
||||
width="120" />
|
||||
<button
|
||||
follows="left|bottom"
|
||||
height="19"
|
||||
label="Requesting rebake"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="navmesh_btn_sending"
|
||||
tool_tip="Sending rebake request to the server."
|
||||
top="2"
|
||||
visible="false"
|
||||
enabled="false"
|
||||
width="120" />
|
||||
<button
|
||||
follows="left|bottom"
|
||||
height="19"
|
||||
label="Region is rebaking"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="navmesh_btn_baking"
|
||||
tool_tip="Region is being rebaked. When completed, this button will disappear."
|
||||
top="2"
|
||||
visible="false"
|
||||
enabled="false"
|
||||
width="120" />
|
||||
</panel>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<panel name="panel_navmesh_rebake">
|
||||
<button label="Recargar la región" name="navmesh_btn" tool_tip="Pulsa para recargar el navmesh de la región."/>
|
||||
<button label="Solicitando recarga" name="navmesh_btn_sending" tool_tip="Enviando la solicitud de recarga al servidor."/>
|
||||
<button label="La región se está recargando" name="navmesh_btn_baking" tool_tip="La región se está recargando. Este botón desaparecerá cuando finalice la recarga."/>
|
||||
</panel>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<panel name="panel_navmesh_rebake">
|
||||
<button label="Refiger la région" name="navmesh_btn" tool_tip="Cliquer pour refiger le maillage de navigation de la région."/>
|
||||
<button label="Demande consistant à refiger la région en cours..." name="navmesh_btn_sending" tool_tip="Envoi de la demande consistant à refiger la région au serveur..."/>
|
||||
<button label="La région se refige..." name="navmesh_btn_baking" tool_tip="La région se refige. Ce bouton disparaîtra lorsque le processus sera terminé."/>
|
||||
</panel>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<panel name="panel_navmesh_rebake">
|
||||
<button label="Rebake regione" name="navmesh_btn" tool_tip="Fai clic per eseguire rebake sul navmesh della regione"/>
|
||||
<button label="Richiesta rebake" name="navmesh_btn_sending" tool_tip="Invio richiesta rebake al server."/>
|
||||
<button label="Rebake regione in corso" name="navmesh_btn_baking" tool_tip="Rebake della regione in corso. Al termine, questo pulsante non sarà più visibile."/>
|
||||
</panel>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<panel name="panel_navmesh_rebake">
|
||||
<button label="地域の再構築" name="navmesh_btn" tool_tip="クリックしてこの地域のナビメッシュを再構築します。"/>
|
||||
<button label="再構築をリクエスト中" name="navmesh_btn_sending" tool_tip="再構築リクエストをサーバーに送信しています。"/>
|
||||
<button label="地域(リージョン)を再構築中" name="navmesh_btn_baking" tool_tip="地域を再構築しています。完了すると、このボタンは消えます。"/>
|
||||
</panel>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<panel name="panel_navmesh_rebake">
|
||||
<button label="Recarregar região" name="navmesh_btn" tool_tip="Clique para recarregar o navmesh da região."/>
|
||||
<button label="Solicitando recarregamento" name="navmesh_btn_sending" tool_tip="Enviando solicitação de recarregamento para o servidor."/>
|
||||
<button label="A região está recarregando" name="navmesh_btn_baking" tool_tip="A região está sendo recarregada. Este botão desaparecerá após a conclusão."/>
|
||||
</panel>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<panel name="panel_navmesh_rebake">
|
||||
<button label="Восстановить регион" name="navmesh_btn" tool_tip="Восстановить навигационную сетку региона."/>
|
||||
<button label="Запрос на восстановление" name="navmesh_btn_sending" tool_tip="Отправка запроса на восстановление на сервер."/>
|
||||
<button label="Идет восстановление региона" name="navmesh_btn_baking" tool_tip="Идет восстановление региона. Когда оно завершится, эта кнопка исчезнет."/>
|
||||
</panel>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<panel name="panel_navmesh_rebake">
|
||||
<button label="Bölgeyi yeniden kaydet" name="navmesh_btn" tool_tip="Bölgenin navigasyon örgüsünü tekrar kaydetmek için tıkla."/>
|
||||
<button label="Yeniden kaydetme talep ediliyor" name="navmesh_btn_sending" tool_tip="Yeniden kaydetme talebi sunucuya gönderiliyor."/>
|
||||
<button label="Bölge yeniden kaydediliyor" name="navmesh_btn_baking" tool_tip="Bölge yeniden kaydediliyor. Tamamlandığında bu düğme kaybolacak."/>
|
||||
</panel>
|
||||
|
|
@ -48,7 +48,7 @@ public:
|
|||
/*virtual*/ U32 countFilesInDir(const std::string &dirname, const std::string &mask) { return 42; }
|
||||
/*virtual*/ BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap) { fname = fname + "_NEXT"; return false; }
|
||||
/*virtual*/ void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname) { fname = "RANDOM_FILE"; }
|
||||
/*virtual*/ BOOL fileExists(const std::string &filename) const { return false; }
|
||||
/*virtual*/ bool fileExists(const std::string &filename) const { return false; }
|
||||
};
|
||||
|
||||
LLDir_stub gDirUtil;
|
||||
|
|
|
|||
|
|
@ -1065,12 +1065,12 @@ class Linux_i686Manifest(LinuxManifest):
|
|||
self.path("libaprutil-1.so")
|
||||
self.path("libaprutil-1.so.0")
|
||||
self.path("libaprutil-1.so.0.4.1")
|
||||
self.path("libboost_program_options-mt.so.1.48.0")
|
||||
self.path("libboost_regex-mt.so.1.48.0")
|
||||
self.path("libboost_thread-mt.so.1.48.0")
|
||||
self.path("libboost_filesystem-mt.so.1.48.0")
|
||||
self.path("libboost_signals-mt.so.1.48.0")
|
||||
self.path("libboost_system-mt.so.1.48.0")
|
||||
self.path("libboost_program_options-mt.so.*")
|
||||
self.path("libboost_regex-mt.so.*")
|
||||
self.path("libboost_thread-mt.so.*")
|
||||
self.path("libboost_filesystem-mt.so.*")
|
||||
self.path("libboost_signals-mt.so.*")
|
||||
self.path("libboost_system-mt.so.*")
|
||||
self.path("libbreakpad_client.so.0.0.0")
|
||||
self.path("libbreakpad_client.so.0")
|
||||
self.path("libbreakpad_client.so")
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class LLDir_Mock : public LLDir
|
|||
const std::string &mask,
|
||||
std::string &fname) {}
|
||||
std::string getCurPath() { return ""; }
|
||||
BOOL fileExists(const std::string &filename) const { return false; }
|
||||
bool fileExists(const std::string &filename) const { return false; }
|
||||
std::string getLLPluginLauncher() { return ""; }
|
||||
std::string getLLPluginFilename(std::string base_name) { return ""; }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue