diff options
-rwxr-xr-x | indra/develop.py | 4 | ||||
-rw-r--r-- | indra/integration_tests/llui_libtest/CMakeLists.txt | 3 | ||||
-rw-r--r-- | indra/llcommon/lleventdispatcher.h | 48 | ||||
-rw-r--r-- | indra/llwindow/llwindowmesaheadless.cpp | 2 | ||||
-rw-r--r-- | indra/llwindow/llwindowmesaheadless.h | 2 | ||||
-rw-r--r-- | indra/newview/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llappviewerlistener.cpp | 33 | ||||
-rw-r--r-- | indra/newview/llappviewerlistener.h | 34 | ||||
-rw-r--r-- | indra/newview/lllogininstance.cpp | 3 | ||||
-rw-r--r-- | install.xml | 8 |
11 files changed, 116 insertions, 26 deletions
diff --git a/indra/develop.py b/indra/develop.py index 1d7ac42c9c..b40e81bb07 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -451,9 +451,7 @@ class DarwinSetup(UnixSetup): targets = ' '.join(['-target ' + repr(t) for t in targets]) else: targets = '' - # cmd = ('xcodebuild -parallelizeTargets ' # parallelizeTargets is suspected of non-deterministic build failures. + poppy 2009-06-05 - cmd = ('xcodebuild ' - '-configuration %s %s %s' % + cmd = ('xcodebuild -configuration %s %s %s' % (self.build_type, ' '.join(opts), targets)) for d in self.build_dirs(): try: diff --git a/indra/integration_tests/llui_libtest/CMakeLists.txt b/indra/integration_tests/llui_libtest/CMakeLists.txt index 68556ac4ab..d39055e118 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) @@ -89,7 +91,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 diff --git a/indra/llcommon/lleventdispatcher.h b/indra/llcommon/lleventdispatcher.h index d75055fd6f..4da0a01c69 100644 --- a/indra/llcommon/lleventdispatcher.h +++ b/indra/llcommon/lleventdispatcher.h @@ -39,28 +39,31 @@ public: /// Accept any C++ callable, typically a boost::bind() expression typedef boost::function<void(const LLSD&)> 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()); - /// Special case: a subclass of this class can register a @a method - /// without explicitly specifying the <tt>boost::bind()</tt> 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 + * <tt>boost::bind()</tt> expression. + */ template <class CLASS> void add(const std::string& name, void (CLASS::*method)(const LLSD&), const LLSD& required=LLSD()) { - CLASS* downcast = dynamic_cast<CLASS*>(this); - if (! downcast) - { - addFail(name, typeid(CLASS).name()); - } - else - { - add(name, boost::bind(method, downcast, _1), required); - } + addMethod<CLASS>(name, method, required); + } + + /// Overload for both const and non-const methods + template <class CLASS> + void add(const std::string& name, void (CLASS::*method)(const LLSD&) const, + const LLSD& required=LLSD()) + { + addMethod<CLASS>(name, method, required); } /// Unregister a callable @@ -78,6 +81,19 @@ public: void operator()(const LLSD& event) const; private: + template <class CLASS, typename METHOD> + void addMethod(const std::string& name, const METHOD& method, const LLSD& required) + { + CLASS* downcast = dynamic_cast<CLASS*>(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; diff --git a/indra/llwindow/llwindowmesaheadless.cpp b/indra/llwindow/llwindowmesaheadless.cpp index 7ee09f4a24..48736d9207 100644 --- a/indra/llwindow/llwindowmesaheadless.cpp +++ b/indra/llwindow/llwindowmesaheadless.cpp @@ -45,7 +45,7 @@ U16 *gMesaBuffer = NULL; // LLWindowMesaHeadless // LLWindowMesaHeadless::LLWindowMesaHeadless(LLWindowCallbacks* callbacks, - const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height, + 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(callbacks, fullscreen, flags) diff --git a/indra/llwindow/llwindowmesaheadless.h b/indra/llwindow/llwindowmesaheadless.h index 22e0ec126d..46b62b914c 100644 --- a/indra/llwindow/llwindowmesaheadless.h +++ b/indra/llwindow/llwindowmesaheadless.h @@ -99,7 +99,7 @@ public: /*virtual*/ void bringToFront() {}; LLWindowMesaHeadless(LLWindowCallbacks* callbacks, - const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height, + 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(); diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index c177de6e88..20c59faae0 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -74,6 +74,7 @@ set(viewer_SOURCE_FILES llagentwearables.cpp llanimstatelabels.cpp llappviewer.cpp + llappviewerlistener.cpp llassetuploadresponders.cpp llassetuploadqueue.cpp llaudiosourcevo.cpp @@ -488,6 +489,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 3fc3c8e382..ff5ddbfcfb 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -181,7 +181,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) */ 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(); diff --git a/install.xml b/install.xml index 6d12064a95..220b2ae9c4 100644 --- a/install.xml +++ b/install.xml @@ -214,16 +214,16 @@ <key>linux</key> <map> <key>md5sum</key> - <string>33e2d48a6c2207ade0f914fff99c18af</string> + <string>f89f2c7a26f738010114e7efdf9dffda</string> <key>url</key> - <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/boost-1.34.1-linux-20090427.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/boost-1.34.1-linux-20090623.tar.bz2</uri> </map> <key>linux64</key> <map> <key>md5sum</key> - <string>cadb1934581b20f9b03aa18e2be7c55c</string> + <string>ab7638e09aacb23048c8441e4fd25ce3</string> <key>url</key> - <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/boost-1.34.1-linux64-20090427.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/boost-1.34.1-linux64-20090623.tar.bz2</uri> </map> <key>windows</key> <map> |