From d4330d33964bb5888b5f1eb3ec389b03dadd826d Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 23 Jun 2009 20:20:01 +0000 Subject: QAR-1619: fix Linux-only missing #include (Linux-only reference to LLTrans) --- indra/newview/lllogininstance.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 606f145d3b..22497ed291 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -52,6 +52,9 @@ #include "llurlsimstring.h" #include "llfloatertos.h" #include "llwindow.h" +#if LL_LINUX || LL_SOLARIS +#include "lltrans.h" +#endif std::string construct_start_string(); -- cgit v1.2.3 From 0ea53e0de402a2b5a00c14d7d0983502b0d7c7ca Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 23 Jun 2009 20:51:27 +0000 Subject: QAR-1619: make assemblies/3rd_party_libs/linux64/boost.txt reference .a libs that are actually present. Update linux and linux64 boost tarballs with previous Windows, Mac patch. --- install.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.xml b/install.xml index 7ea4efad8a..323994aac5 100644 --- a/install.xml +++ b/install.xml @@ -214,16 +214,16 @@ linux md5sum - 33e2d48a6c2207ade0f914fff99c18af + f89f2c7a26f738010114e7efdf9dffda url - http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/boost-1.34.1-linux-20090427.tar.bz2 + http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/boost-1.34.1-linux-20090623.tar.bz2 linux64 md5sum - cadb1934581b20f9b03aa18e2be7c55c + ab7638e09aacb23048c8441e4fd25ce3 url - http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/boost-1.34.1-linux64-20090427.tar.bz2 + http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/boost-1.34.1-linux64-20090623.tar.bz2 windows -- cgit v1.2.3 From 91667335ceca625a3bfeb1fdcf20cc2dc51c981d Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 23 Jun 2009 21:31:09 +0000 Subject: QAR-1619: For some reason the LLWindowMesaHeadless constructor omitted the LLWindowCallbacks* parameter passed by its consumer and required by the base-class LLWindow constructor. --- indra/llwindow/llwindowmesaheadless.cpp | 5 +++-- indra/llwindow/llwindowmesaheadless.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/indra/llwindow/llwindowmesaheadless.cpp b/indra/llwindow/llwindowmesaheadless.cpp index c1f9d2095e..48736d9207 100644 --- a/indra/llwindow/llwindowmesaheadless.cpp +++ b/indra/llwindow/llwindowmesaheadless.cpp @@ -44,10 +44,11 @@ U16 *gMesaBuffer = NULL; // // LLWindowMesaHeadless // -LLWindowMesaHeadless::LLWindowMesaHeadless(const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height, +LLWindowMesaHeadless::LLWindowMesaHeadless(LLWindowCallbacks* callbacks, + const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height, U32 flags, BOOL fullscreen, BOOL clearBg, BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth) - : LLWindow(fullscreen, flags) + : LLWindow(callbacks, fullscreen, flags) { if (use_gl) { diff --git a/indra/llwindow/llwindowmesaheadless.h b/indra/llwindow/llwindowmesaheadless.h index ab562d9ffe..46b62b914c 100644 --- a/indra/llwindow/llwindowmesaheadless.h +++ b/indra/llwindow/llwindowmesaheadless.h @@ -98,7 +98,8 @@ public: /*virtual*/ void *getPlatformWindow() { return 0; }; /*virtual*/ void bringToFront() {}; - LLWindowMesaHeadless(const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height, + LLWindowMesaHeadless(LLWindowCallbacks* callbacks, + const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height, U32 flags, BOOL fullscreen, BOOL clearBg, BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth); ~LLWindowMesaHeadless(); -- cgit v1.2.3 From ad1ecb126bfc19dc7c32fb87e82a1fe45782413f Mon Sep 17 00:00:00 2001 From: Mark Palange Date: Wed, 24 Jun 2009 00:54:30 +0000 Subject: QAR-1619 Fixing linux build error re: llui_libtest linkage --- indra/integration_tests/llui_libtest/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/integration_tests/llui_libtest/CMakeLists.txt b/indra/integration_tests/llui_libtest/CMakeLists.txt index 71a47f1475..7e90d37647 100644 --- a/indra/integration_tests/llui_libtest/CMakeLists.txt +++ b/indra/integration_tests/llui_libtest/CMakeLists.txt @@ -1,5 +1,7 @@ # -*- cmake -*- +if (VIEWER) + project (llui_libtest) include(00-Common) @@ -88,7 +90,6 @@ if (WINDOWS) ) endif (WINDOWS) -if (VIEWER) # Ensure people working on the viewer don't break this library # *NOTE: This could be removed, or only built by Parabuild, if the build # and link times become too long. JC -- cgit v1.2.3 From da46eb9e7e0f6e069e7fc06176849d213876bfe3 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 24 Jun 2009 01:54:57 +0000 Subject: DEV-31980: Extend LLEventDispatcher to handle const as well as non-const methods. Introduce LLAppViewerListener based on LLDispatchListener, instantiate a static one in llappviewer.cpp. Initial implementation only supports ["op"] == "requestQuit". --- indra/llcommon/lleventdispatcher.h | 131 +++++++++++++++++++++++++++++----- indra/newview/CMakeLists.txt | 2 + indra/newview/llappviewer.cpp | 3 + indra/newview/llappviewerlistener.cpp | 33 +++++++++ indra/newview/llappviewerlistener.h | 34 +++++++++ 5 files changed, 187 insertions(+), 16 deletions(-) create mode 100644 indra/newview/llappviewerlistener.cpp create mode 100644 indra/newview/llappviewerlistener.h diff --git a/indra/llcommon/lleventdispatcher.h b/indra/llcommon/lleventdispatcher.h index d75055fd6f..e43d967ed4 100644 --- a/indra/llcommon/lleventdispatcher.h +++ b/indra/llcommon/lleventdispatcher.h @@ -23,6 +23,40 @@ #include "llevents.h" class LLSD; +/*==========================================================================*| +class LLEventDispatcher; + +namespace LLEventDetail +{ + /// For a given call to add(), decide whether we're being passed an + /// unbound member function pointer or a plain callable. + /// Default case. + template + struct AddCallable + { + void operator()(LLEventDispatcher& disp, const std::string& name, + const CALLABLE& callable, const LLSD& required); + }; + + /// Unbound member function pointer + template + struct AddCallable + { + typedef void (CLASS::*Method)(const LLSD&); + void operator()(LLEventDispatcher& disp, const std::string& name, + Method method, const LLSD& required); + }; + + /// Unbound const member function pointer + template + struct AddCallable + { + typedef void (CLASS::*Method)(const LLSD&) const; + void operator()(LLEventDispatcher& disp, const std::string& name, + Method method, const LLSD& required); + }; +} +|*==========================================================================*/ /** * Given an LLSD map, examine a string-valued key and call a corresponding @@ -39,28 +73,36 @@ public: /// Accept any C++ callable, typically a boost::bind() expression typedef boost::function Callable; - /// Register a @a callable by @a name. The optional @a required parameter - /// is used to validate the structure of each incoming event (see - /// llsd_matches()). + /** + * Register a @a callable by @a name. The optional @a required parameter + * is used to validate the structure of each incoming event (see + * llsd_matches()). + */ void add(const std::string& name, const Callable& callable, const LLSD& required=LLSD()); +/*==========================================================================*| + { + LLEventDetail::AddCallable()(*this, name, callable, required); + } +|*==========================================================================*/ - /// Special case: a subclass of this class can register a @a method - /// without explicitly specifying the boost::bind() expression. - /// The optional @a required parameter is used to validate the structure - /// of each incoming event (see llsd_matches()). + /** + * Special case: a subclass of this class can pass an unbound member + * function pointer without explicitly specifying the + * boost::bind() expression. + */ template void add(const std::string& name, void (CLASS::*method)(const LLSD&), const LLSD& required=LLSD()) { - CLASS* downcast = dynamic_cast(this); - if (! downcast) - { - addFail(name, typeid(CLASS).name()); - } - else - { - add(name, boost::bind(method, downcast, _1), required); - } + addMethod(name, method, required); + } + + /// Overload for both const and non-const methods + template + void add(const std::string& name, void (CLASS::*method)(const LLSD&) const, + const LLSD& required=LLSD()) + { + addMethod(name, method, required); } /// Unregister a callable @@ -78,6 +120,19 @@ public: void operator()(const LLSD& event) const; private: + template + void addMethod(const std::string& name, const METHOD& method, const LLSD& required) + { + CLASS* downcast = dynamic_cast(this); + if (! downcast) + { + addFail(name, typeid(CLASS).name()); + } + else + { + add(name, boost::bind(method, downcast, _1), required); + } + } void addFail(const std::string& name, const std::string& classname) const; /// try to dispatch, return @c true if success bool attemptCall(const std::string& name, const LLSD& event) const; @@ -87,6 +142,50 @@ private: DispatchMap mDispatch; }; +/*==========================================================================*| +/// Have to implement these template specialization methods after +/// LLEventDispatcher so they can use its methods +template +void LLEventDetail::AddCallable::operator()( + LLEventDispatcher& disp, const std::string& name, const CALLABLE& callable, const LLSD& required) +{ + disp.addImpl(name, callable, required); +} + +template +void LLEventDetail::AddCallable::operator()( + LLEventDispatcher& disp, const std::string& name, const Method& method, const LLSD& required) +{ + CLASS* downcast = dynamic_cast(&disp); + if (! downcast) + { + disp.addFail(name, typeid(CLASS).name()); + } + else + { + disp.addImpl(name, boost::bind(method, downcast, _1), required); + } +} + +/// Have to overload for both const and non-const methods +template +void LLEventDetail::AddCallable::operator()( + LLEventDispatcher& disp, const std::string& name, const Method& method, const LLSD& required) +{ + // I am severely bummed that I have, as yet, found no way short of a + // macro to avoid replicating the (admittedly brief) body of this overload. + CLASS* downcast = dynamic_cast(&disp); + if (! downcast) + { + disp.addFail(name, typeid(CLASS).name()); + } + else + { + disp.addImpl(name, boost::bind(method, downcast, _1), required); + } +} +|*==========================================================================*/ + /** * Bundle an LLEventPump and a listener with an LLEventDispatcher. A class * that contains (or derives from) LLDispatchListener need only specify the diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 5d79dfbc3e..29031418b8 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -73,6 +73,7 @@ set(viewer_SOURCE_FILES llagentpilot.cpp llanimstatelabels.cpp llappviewer.cpp + llappviewerlistener.cpp llassetuploadresponders.cpp llassetuploadqueue.cpp llaudiosourcevo.cpp @@ -468,6 +469,7 @@ set(viewer_HEADER_FILES llanimstatelabels.h llappearance.h llappviewer.h + llappviewerlistener.h llassetuploadresponders.h llassetuploadqueue.h llaudiosourcevo.h diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 455e987da0..a3b41b4ace 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -177,7 +177,10 @@ //---------------------------------------------------------------------------- // llviewernetwork.h #include "llviewernetwork.h" +// define a self-registering event API object +#include "llappviewerlistener.h" +static LLAppViewerListener sAppViewerListener("LLAppViewer", LLAppViewer::instance()); ////// Windows-specific includes to the bottom - nasty defines in these pollute the preprocessor // diff --git a/indra/newview/llappviewerlistener.cpp b/indra/newview/llappviewerlistener.cpp new file mode 100644 index 0000000000..a8c98b17a7 --- /dev/null +++ b/indra/newview/llappviewerlistener.cpp @@ -0,0 +1,33 @@ +/** + * @file llappviewerlistener.cpp + * @author Nat Goodspeed + * @date 2009-06-23 + * @brief Implementation for llappviewerlistener. + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * Copyright (c) 2009, Linden Research, Inc. + * $/LicenseInfo$ + */ + +// Precompiled header +#include "llviewerprecompiledheaders.h" +// associated header +#include "llappviewerlistener.h" +// STL headers +// std headers +// external library headers +// other Linden headers +#include "llappviewer.h" + +LLAppViewerListener::LLAppViewerListener(const std::string& pumpname, LLAppViewer* llappviewer): + LLDispatchListener(pumpname, "op"), + mAppViewer(llappviewer) +{ + // add() every method we want to be able to invoke via this event API. + add("requestQuit", &LLAppViewerListener::requestQuit); +} + +void LLAppViewerListener::requestQuit(const LLSD& event) const +{ + mAppViewer->requestQuit(); +} diff --git a/indra/newview/llappviewerlistener.h b/indra/newview/llappviewerlistener.h new file mode 100644 index 0000000000..ab17dd1d90 --- /dev/null +++ b/indra/newview/llappviewerlistener.h @@ -0,0 +1,34 @@ +/** + * @file llappviewerlistener.h + * @author Nat Goodspeed + * @date 2009-06-18 + * @brief Wrap subset of LLAppViewer API in event API + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * Copyright (c) 2009, Linden Research, Inc. + * $/LicenseInfo$ + */ + +#if ! defined(LL_LLAPPVIEWERLISTENER_H) +#define LL_LLAPPVIEWERLISTENER_H + +#include "lleventdispatcher.h" + +class LLAppViewer; +class LLSD; + +/// Listen on an LLEventPump with specified name for LLAppViewer request events. +class LLAppViewerListener: public LLDispatchListener +{ +public: + /// Specify the pump name on which to listen, and bind the LLAppViewer + /// instance to use (e.g. LLAppViewer::instance()). + LLAppViewerListener(const std::string& pumpname, LLAppViewer* llappviewer); + +private: + void requestQuit(const LLSD& event) const; + + LLAppViewer* mAppViewer; +}; + +#endif /* ! defined(LL_LLAPPVIEWERLISTENER_H) */ -- cgit v1.2.3 From 7e84d9125e471c7289b448d060cb0276be2d3824 Mon Sep 17 00:00:00 2001 From: Christian Goetze Date: Wed, 24 Jun 2009 15:13:53 +0000 Subject: Fix Mac Build --- indra/develop.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/develop.py b/indra/develop.py index f4143eb65c..7d0aec4a4a 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -444,8 +444,7 @@ class DarwinSetup(UnixSetup): targets = ' '.join(['-target ' + repr(t) for t in targets]) else: targets = '' - cmd = ('xcodebuild -parallelizeTargets ' - '-configuration %s %s %s' % + cmd = ('xcodebuild -configuration %s %s %s' % (self.build_type, ' '.join(opts), targets)) for d in self.build_dirs(): try: -- cgit v1.2.3 From 70d99b2528acb3bc503d3ac799e42d52515b6260 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 24 Jun 2009 16:25:33 +0000 Subject: DEV-31980: remove cruft from lleventdispatcher.h --- indra/llcommon/lleventdispatcher.h | 83 -------------------------------------- 1 file changed, 83 deletions(-) diff --git a/indra/llcommon/lleventdispatcher.h b/indra/llcommon/lleventdispatcher.h index e43d967ed4..4da0a01c69 100644 --- a/indra/llcommon/lleventdispatcher.h +++ b/indra/llcommon/lleventdispatcher.h @@ -23,40 +23,6 @@ #include "llevents.h" class LLSD; -/*==========================================================================*| -class LLEventDispatcher; - -namespace LLEventDetail -{ - /// For a given call to add(), decide whether we're being passed an - /// unbound member function pointer or a plain callable. - /// Default case. - template - struct AddCallable - { - void operator()(LLEventDispatcher& disp, const std::string& name, - const CALLABLE& callable, const LLSD& required); - }; - - /// Unbound member function pointer - template - struct AddCallable - { - typedef void (CLASS::*Method)(const LLSD&); - void operator()(LLEventDispatcher& disp, const std::string& name, - Method method, const LLSD& required); - }; - - /// Unbound const member function pointer - template - struct AddCallable - { - typedef void (CLASS::*Method)(const LLSD&) const; - void operator()(LLEventDispatcher& disp, const std::string& name, - Method method, const LLSD& required); - }; -} -|*==========================================================================*/ /** * Given an LLSD map, examine a string-valued key and call a corresponding @@ -79,11 +45,6 @@ public: * llsd_matches()). */ void add(const std::string& name, const Callable& callable, const LLSD& required=LLSD()); -/*==========================================================================*| - { - LLEventDetail::AddCallable()(*this, name, callable, required); - } -|*==========================================================================*/ /** * Special case: a subclass of this class can pass an unbound member @@ -142,50 +103,6 @@ private: DispatchMap mDispatch; }; -/*==========================================================================*| -/// Have to implement these template specialization methods after -/// LLEventDispatcher so they can use its methods -template -void LLEventDetail::AddCallable::operator()( - LLEventDispatcher& disp, const std::string& name, const CALLABLE& callable, const LLSD& required) -{ - disp.addImpl(name, callable, required); -} - -template -void LLEventDetail::AddCallable::operator()( - LLEventDispatcher& disp, const std::string& name, const Method& method, const LLSD& required) -{ - CLASS* downcast = dynamic_cast(&disp); - if (! downcast) - { - disp.addFail(name, typeid(CLASS).name()); - } - else - { - disp.addImpl(name, boost::bind(method, downcast, _1), required); - } -} - -/// Have to overload for both const and non-const methods -template -void LLEventDetail::AddCallable::operator()( - LLEventDispatcher& disp, const std::string& name, const Method& method, const LLSD& required) -{ - // I am severely bummed that I have, as yet, found no way short of a - // macro to avoid replicating the (admittedly brief) body of this overload. - CLASS* downcast = dynamic_cast(&disp); - if (! downcast) - { - disp.addFail(name, typeid(CLASS).name()); - } - else - { - disp.addImpl(name, boost::bind(method, downcast, _1), required); - } -} -|*==========================================================================*/ - /** * Bundle an LLEventPump and a listener with an LLEventDispatcher. A class * that contains (or derives from) LLDispatchListener need only specify the -- cgit v1.2.3