svn merge -r 62602:62831 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance --> release

master
Josh Bell 2007-06-04 18:46:59 +00:00
parent 3e9872a297
commit e61a10ec5b
70 changed files with 783 additions and 460 deletions

View File

@ -20,7 +20,7 @@ Jacek Antonelli - VWR-165, VWR-188
Joghert LeSabre - VWR-64
Kage Pixel - VWR-11
Kunnis Basiat - VWR-82
Nicholaz Beresford - VWR-793, VWR-794, VWR-802, VWR-803, VWR-804, VWR-805, VWR-808, VWR-809, VWR-810, VWR-823, VWR-870
Nicholaz Beresford - VWR-793, VWR-794, VWR-802, VWR-803, VWR-804, VWR-805, VWR-808, VWR-809, VWR-810, VWR-823, VWR-869, VWR-870, VWR-871, VWR-908, VWR-966
Paul Churchill - VWR-20
Paula Innis - VWR-30
Peekay Semyorka - VWR-7, VWR-19, VWR-49

View File

@ -53,7 +53,6 @@ public:
};
LLVorbisDecodeState(const LLUUID &uuid, const LLString &out_filename);
virtual ~LLVorbisDecodeState();
BOOL initDecode();
BOOL decodeSection(); // Return TRUE if done.
@ -65,7 +64,10 @@ public:
BOOL isValid() const { return mValid; }
BOOL isDone() const { return mDone; }
const LLUUID &getUUID() const { return mUUID; }
protected:
virtual ~LLVorbisDecodeState();
BOOL mValid;
BOOL mDone;
LLAtomicS32 mBytesRead;

View File

@ -20,6 +20,7 @@ extern apr_thread_mutex_t *gLogMutexp;
#include "lllivefile.h"
#include "llsd.h"
#include "llsdserialize.h"
#include "llstl.h"
#include <algorithm>
#include <cctype>
@ -390,6 +391,12 @@ namespace LLError
shouldLogCallCounter(0)
{ }
~Settings()
{
for_each(recorders.begin(), recorders.end(),
DeletePointer());
}
static Settings*& getPtr();
};

View File

@ -68,12 +68,12 @@ public:
class LLSimpleListener : public LLEventListener
{
public:
virtual ~LLSimpleListener();
void clearDispatchers();
virtual bool handleAttach(LLEventDispatcher *dispatcher);
virtual bool handleDetach(LLEventDispatcher *dispatcher);
protected:
~LLSimpleListener();
std::vector<LLEventDispatcher *> mDispatchers;
};

View File

@ -219,8 +219,9 @@ private:
// Pure virtual class
class LLResponder : public LLThreadSafeRefCount
{
public:
protected:
virtual ~LLResponder();
public:
virtual void completed(bool success) = 0;
};

View File

@ -30,7 +30,9 @@ void LLImageWorker::cleanupClass()
//----------------------------------------------------------------------------
LLImageWorker::LLImageWorker(LLImageFormatted* image, U32 priority, S32 discard, LLResponder* responder)
LLImageWorker::LLImageWorker(LLImageFormatted* image, U32 priority,
S32 discard,
LLPointer<LLResponder> responder)
: LLWorkerClass(sWorkerThread, "Image"),
mFormattedImage(image),
mDecodedType(-1),

View File

@ -21,7 +21,8 @@ public:
// LLWorkerThread
public:
LLImageWorker(LLImageFormatted* image, U32 priority, S32 discard, LLResponder* responder = NULL);
LLImageWorker(LLImageFormatted* image, U32 priority, S32 discard,
LLPointer<LLResponder> responder);
~LLImageWorker();
// called from WORKER THREAD, returns TRUE if done

View File

@ -37,7 +37,6 @@ public:
typedef LLTreeListener<T> BaseType;
typedef LLOctreeNode<T> oct_node;
virtual ~LLOctreeListener() { };
virtual void handleChildAddition(const oct_node* parent, oct_node* child) = 0;
virtual void handleChildRemoval(const oct_node* parent, const oct_node* child) = 0;
};

View File

@ -37,7 +37,6 @@ template <class T>
class LLTreeListener: public LLRefCount
{
public:
virtual ~LLTreeListener() { };
virtual void handleInsertion(const LLTreeNode<T>* node, T* data) = 0;
virtual void handleRemoval(const LLTreeNode<T>* node, T* data) = 0;
virtual void handleDestruction(const LLTreeNode<T>* node) = 0;

View File

@ -615,12 +615,14 @@ protected:
class LLProfile
{
public:
LLProfile(const LLProfileParams &params) : mParams(params)
LLProfile(const LLProfileParams &params)
: mParams(params),
mOpen(FALSE),
mConcave(FALSE),
mDirty(TRUE),
mTotalOut(0),
mTotal(2)
{
mTotal = 2;
mTotalOut = 0;
mDirty = TRUE;
mConcave = FALSE;
}
~LLProfile();
@ -690,11 +692,13 @@ public:
};
public:
LLPath(const LLPathParams &params) : mParams(params)
LLPath(const LLPathParams &params)
: mParams(params),
mOpen(FALSE),
mTotal(0),
mDirty(TRUE),
mStep(1)
{
mOpen = FALSE;
mDirty = TRUE;
mStep = 1;
}
virtual ~LLPath();

View File

@ -68,9 +68,10 @@ public:
class Response : public LLRefCount
{
public:
protected:
virtual ~Response();
public:
virtual void result(const LLSD&) = 0;
virtual void status(S32 code, const std::string& message) = 0;
@ -205,7 +206,6 @@ class LLSimpleResponse : public LLHTTPNode::Response
{
public:
static LLPointer<LLSimpleResponse> create();
~LLSimpleResponse();
void result(const LLSD& result);
void status(S32 code, const std::string& message);
@ -215,6 +215,9 @@ public:
S32 mCode;
std::string mMessage;
protected:
~LLSimpleResponse();
private:
LLSimpleResponse() {;} // Must be accessed through LLPointer.
};

View File

@ -569,7 +569,7 @@ LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parentp, LLUICtrlFactory *fa
return panelp;
}
void LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
{
LLString name("panel");
node->getAttributeString("name", name);
@ -585,12 +585,23 @@ void LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *f
LLString xml_filename;
node->getAttributeString("filename", xml_filename);
BOOL didPost;
if (!xml_filename.empty())
{
factory->buildPanel(this, xml_filename, NULL);
didPost = factory->buildPanel(this, xml_filename, NULL);
} else {
didPost = FALSE;
}
postBuild();
if (!didPost)
{
postBuild();
didPost = TRUE;
}
return didPost;
}
void LLPanel::setPanelParameters(LLXMLNodePtr node, LLView* parentp)

View File

@ -115,7 +115,7 @@ public:
virtual LLXMLNodePtr getXML(bool save_children = true) const;
static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
void initPanelXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
BOOL initPanelXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
void setPanelParameters(LLXMLNodePtr node, LLView *parentp);
// ** Wrappers for setting child properties by name ** -TomY

View File

@ -350,21 +350,22 @@ S32 LLUICtrlFactory::saveToXML(LLView* viewp, const LLString& filename)
//-----------------------------------------------------------------------------
// buildPanel()
//-----------------------------------------------------------------------------
void LLUICtrlFactory::buildPanel(LLPanel* panelp, const LLString &filename,
BOOL LLUICtrlFactory::buildPanel(LLPanel* panelp, const LLString &filename,
const LLCallbackMap::map_t* factory_map)
{
BOOL didPost = FALSE;
LLXMLNodePtr root;
if (!LLUICtrlFactory::getLayeredXMLNode(filename, root))
{
return;
return didPost;
}
// root must be called panel
if( !root->hasName("panel" ) )
{
llwarns << "Root node should be named panel in : " << filename << llendl;
return;
return didPost;
}
if (factory_map)
@ -372,7 +373,7 @@ void LLUICtrlFactory::buildPanel(LLPanel* panelp, const LLString &filename,
mFactoryStack.push_front(factory_map);
}
panelp->initPanelXML(root, NULL, this);
didPost = panelp->initPanelXML(root, NULL, this);
if (LLUI::sShowXUINames)
{
@ -386,6 +387,8 @@ void LLUICtrlFactory::buildPanel(LLPanel* panelp, const LLString &filename,
{
mFactoryStack.pop_front();
}
return didPost;
}
//-----------------------------------------------------------------------------

View File

@ -60,8 +60,8 @@ public:
void buildFloater(LLFloater* floaterp, const LLString &filename,
const LLCallbackMap::map_t* factory_map = NULL, BOOL open = TRUE);
void buildPanel(LLPanel* panelp, const LLString &filename,
const LLCallbackMap::map_t* factory_map = NULL);
BOOL buildPanel(LLPanel* panelp, const LLString &filename,
const LLCallbackMap::map_t* factory_map = NULL);
LLMenuGL *buildMenu(const LLString &filename, LLView* parentp);

View File

@ -174,7 +174,6 @@ LLView::~LLView()
for (itor = mDispatchList.begin(); itor != mDispatchList.end(); ++itor)
{
(*itor).second->clearDispatchers();
delete (*itor).second;
}
std::for_each(mFloaterControls.begin(), mFloaterControls.end(),
@ -350,22 +349,25 @@ void LLView::addChildAtEnd(LLView* child, S32 tab_group)
}
// remove the specified child from the view, and set it's parent to NULL.
void LLView::removeChild( LLView* child )
void LLView::removeChild(LLView* child, BOOL deleteIt)
{
if (child->mParentView == this)
{
mChildList.remove( child );
child->mParentView = NULL;
if (child->isCtrl())
{
removeCtrl((LLUICtrl*)child);
}
if (deleteIt)
{
delete child;
}
}
else
{
llerrs << "LLView::removeChild called with non-child" << llendl;
}
if (child->isCtrl())
{
removeCtrl((LLUICtrl*)child);
}
}
void LLView::addCtrlAtEnd(LLUICtrl* ctrl, S32 tab_group)
@ -2490,7 +2492,6 @@ void LLView::deregisterEventListener(LLString name)
dispatch_list_t::iterator itor = mDispatchList.find(name);
if (itor != mDispatchList.end())
{
delete itor->second;
mDispatchList.erase(itor);
}
}

View File

@ -221,7 +221,7 @@ public:
void addChild(LLView* view, S32 tab_group = 0);
void addChildAtEnd(LLView* view, S32 tab_group = 0);
// remove the specified child from the view, and set it's parent to NULL.
void removeChild( LLView* view );
void removeChild(LLView* view, BOOL deleteIt = FALSE);
virtual void addCtrl( LLUICtrl* ctrl, S32 tab_group);
virtual void addCtrlAtEnd( LLUICtrl* ctrl, S32 tab_group);
@ -464,7 +464,7 @@ protected:
LLView* childrenHandleRightMouseDown(S32 x, S32 y, MASK mask);
LLView* childrenHandleRightMouseUp(S32 x, S32 y, MASK mask);
typedef std::map<LLString, LLSimpleListener*> dispatch_list_t;
typedef std::map<LLString, LLPointer<LLSimpleListener> > dispatch_list_t;
dispatch_list_t mDispatchList;
protected:

View File

@ -38,8 +38,9 @@ public:
class Responder : public LLThreadSafeRefCount
{
protected:
~Responder();
public:
virtual ~Responder();
virtual void completed(S32 bytes) = 0;
};

View File

@ -74,7 +74,7 @@ public:
};
protected:
virtual ~LLXMLNode();
~LLXMLNode();
public:
LLXMLNode();

View File

@ -758,15 +758,8 @@ void comment()
{
char c;
#if LL_DARWIN
while ((c = yyinput()) != '\n' && c != 0 && c != EOF)
;
#else
while ((c = yyinput()) != '\n' && c != 0)
;
#endif
}
void count()

View File

@ -1,63 +1,70 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; @file viewer_manifest.py
;;; @author James Cook, Don Kjer
;;; @brief NSIS script for creating a Windows installer.
;;; This file has variables expanded by viewer_manifest.py
;;; to produce the complete nsi script file.
;;; For info, see http://www.nullsoft.com/free/nsis/
;;; NSIS 2.02 or higher required
;;;
;;; Copyright (c) 2006-$CurrentYear$, Linden Research, Inc.
;;; $License$
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Compiler flags
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; secondlife setup.nsi
;; Copyright 2004-2007, Linden Research, Inc.
;; For info, see http://www.nullsoft.com/free/nsis/
;;
;; NSIS 2.22 or higher required
;; Author: James Cook, Don Kjer, Callum Prentice
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Detect NSIS compiler version
!define "NSIS${NSIS_VERSION}"
!ifdef "NSISv2.02" | "NSISv2.03" | "NSISv2.04" | "NSISv2.05" | "NSISv2.06"
;;; before 2.07 defaulted lzma to solid (whole file)
;; before 2.07 defaulted lzma to solid (whole file)
SetCompressor lzma
!else
;;; after 2.07 required /solid for whole file compression
;; after 2.07 required /solid for whole file compression
SetCompressor /solid lzma
!endif
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Compiler flags
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SetOverwrite on ; overwrite files
SetCompress auto ; compress iff saves space
SetDatablockOptimize off ; only saves us 0.1%, not worth it
XPStyle on ; add an XP manifest to the installer
SetDatablockOptimize off ; only saves us 0.1%, not worth it
XPStyle on ; add an XP manifest to the installer
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Project flags
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
%%VERSION%%
;;; Tweak for different servers/builds (this placeholder is replaced by viewer_manifest.py)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; - language files - one for each language (or flavor thereof)
;; (these files are in the same place as the nsi template but the python script generates a new nsi file in the
;; application directory so we have to add a path to these include files)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#!include "installers\windows\lang_de.nsi"
!include "installers\windows\lang_en-us.nsi"
#!include "installers\windows\lang_ja.nsi"
!include "installers\windows\lang_ko.nsi"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Tweak for different servers/builds (this placeholder is replaced by viewer_manifest.py)
%%GRID_VARS%%
Name ${INSTNAME}
SubCaption 0 " Setup" ; override "license agreement" text
SubCaption 0 $(LicenseSubTitleSetup) ; override "license agreement" text
BrandingText " " ; bottom of window text
Icon res\install_icon.ico ; our custom icon
BrandingText " " ; bottom of window text
Icon res\install_icon.ico ; our custom icon
UninstallIcon res\uninstall_icon.ico ; our custom icon
WindowIcon on ; show our icon in left corner
BGGradient off ; no big background window
CRCCheck on ; make sure CRC is OK
WindowIcon on ; show our icon in left corner
BGGradient off ; no big background window
CRCCheck on ; make sure CRC is OK
InstProgressFlags smooth colored ; new colored smooth look
ShowInstDetails nevershow ; no details, no "show" button
SetOverwrite on ; stomp files by default
AutoCloseWindow true ; after all files install, close window
ShowInstDetails nevershow ; no details, no "show" button
SetOverwrite on ; stomp files by default
AutoCloseWindow true ; after all files install, close window
!ifdef UPDATE
LicenseText "This package will update Second Life to version ${VERSION_LONG}." "Next >"
LicenseText $(LicenseDescUpdate) $(LicenseDescNext)
!else
LicenseText "This package will install Second Life on your computer." "Next >"
LicenseText $(LicenseDescSetup) $(LicenseDescNext)
!endif
LicenseData "releasenotes.txt"
@ -65,30 +72,30 @@ LicenseData "releasenotes.txt"
InstallDir "$PROGRAMFILES\${INSTNAME}"
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" ""
!ifdef UPDATE
DirText "Installation Directory" "Select the Second Life directory to update:"
DirText $(DirectoryChooseTitle) $(DirectoryChooseUpdate)
!else
DirText "Installation Directory" "Select the directory to install Second Life in:"
DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup)
!endif
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Variables
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Var INSTPROG
Var INSTEXE
Var INSTFLAGS
Var LANGFLAGS
Var INSTSHORTCUT
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Sections
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Section "" ; (default section)
SetShellVarContext all ; install for all users (if you change this, change it in the uninstall as well)
; Start with some default values.
StrCpy $INSTFLAGS "${INSTFLAGS}"
StrCpy $INSTFLAGS "$INSTFLAGS $LANGFLAGS"
StrCpy $INSTPROG "${INSTNAME}"
StrCpy $INSTEXE "${INSTEXE}"
StrCpy $INSTSHORTCUT "${SHORTCUT}"
@ -103,21 +110,22 @@ Call CheckIfAlreadyCurrent ; Make sure that we haven't already installed this v
Call CloseSecondLife ; Make sure we're not running
Call RemoveNSIS ; Check for old NSIS install to remove
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Don't remove cache files during a regular install, removing the inventory cache on upgrades results in lots of damage to the servers.
;Call RemoveCacheFiles ; Installing over removes potentially corrupted
; VFS and cache files.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Files
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py
%%INSTALL_FILES%%
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; If this is a silent update, we don't need to re-create these shortcuts or registry entries.
IfSilent POST_INSTALL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Shortcuts in start menu
CreateDirectory "$SMPROGRAMS\$INSTSHORTCUT"
SetOutPath "$INSTDIR"
@ -146,6 +154,7 @@ CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\SL Scripting Language Help.lnk" \
CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \
'"$INSTDIR\uninst.exe"' '/P="$INSTPROG"'
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Other shortcuts
SetOutPath "$INSTDIR"
CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS"
@ -164,6 +173,7 @@ CreateShortCut "$INSTDIR\$INSTSHORTCUT Museum Spanish.lnk" "$INSTDIR\$INSTEXE" "
!endif
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Write registry
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$INSTDIR"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}"
@ -173,6 +183,7 @@ WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG (remove only)"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe" /P="$INSTPROG"'
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Write URL registry info
WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life"
WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "URL Protocol" ""
@ -192,10 +203,10 @@ WriteUninstaller "$INSTDIR\uninst.exe"
; end of default section
SectionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; PostInstallExe
; This just runs any post installation scripts.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function PostInstallExe
push $0
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "PostInstallExe"
@ -204,11 +215,10 @@ push $0
pop $0
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; CheckStartupParameters
; Sets INSTFLAGS, INSTPROG, and INSTEXE.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function CheckStartupParams
push $0
push $R0
@ -237,7 +247,7 @@ push $R0
Goto FINISHED
ABORT:
MessageBox MB_OK "Could not find the program '$INSTPROG'. Silent update failed."
MessageBox MB_OK $(CheckStartupParamsMB)
Quit
FINISHED:
@ -246,6 +256,9 @@ pop $R0
pop $0
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function un.CheckStartupParams
push $0
push $R0
@ -274,7 +287,7 @@ push $R0
Goto FINISHED
ABORT:
MessageBox MB_OK "Could not find the program '$INSTPROG'. Silent update failed."
MessageBox MB_OK $(CheckStartupParamsMB)
Quit
FINISHED:
@ -283,26 +296,26 @@ pop $R0
pop $0
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; After install completes, offer readme file
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function .onInstSuccess
MessageBox MB_YESNO \
"Start Second Life now?" /SD IDYES IDNO NoReadme
$(InstSuccesssQuestion) /SD IDYES IDNO NoReadme
; Assumes SetOutPath $INSTDIR
Exec '"$INSTDIR\$INSTEXE" $INSTFLAGS'
NoReadme:
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Remove old NSIS version. Modifies no variables.
; Does NOT delete the LindenWorld directory, or any
; user files in that directory.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function RemoveNSIS
Push $0
; Grab the installation directory of the old version
DetailPrint "Checking for old version..."
DetailPrint $(RemoveOldNSISVersion)
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" ""
; If key doesn't exist, skip uninstall
@ -323,9 +336,9 @@ Function RemoveNSIS
Pop $0
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Make sure we're not on Windows 98 / ME
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function CheckWindowsVersion
DetailPrint "Checking Windows version..."
Call GetWindowsVersion
@ -339,46 +352,49 @@ Function CheckWindowsVersion
StrCmp $R0 "NT" win_ver_bad
Return
win_ver_bad:
MessageBox MB_YESNO 'Second Life only supports Windows XP, Windows 2000, and Mac OS X.$\n$\nAttempting to install on Windows $R0 can result in crashes and data loss.$\n$\nInstall anyway?' IDNO win_ver_abort
MessageBox MB_YESNO $(CheckWindowsVersionMB) IDNO win_ver_abort
Return
win_ver_abort:
Quit
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Make sure the user can install/uninstall
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function CheckIfAdministrator
DetailPrint "Checking for permission to install..."
DetailPrint $(CheckAdministratorInstDP)
UserInfo::GetAccountType
Pop $R0
StrCmp $R0 "Admin" is_admin
MessageBox MB_OK 'You appear to be using a "limited" account.$\nYou must be an "administrator" to install Second Life.'
MessageBox MB_OK $(CheckAdministratorInstMB)
Quit
is_admin:
Return
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function un.CheckIfAdministrator
DetailPrint "Checking for permission to uninstall..."
DetailPrint $(CheckAdministratorUnInstDP)
UserInfo::GetAccountType
Pop $R0
StrCmp $R0 "Admin" is_admin
MessageBox MB_OK 'You appear to be using a "limited" account.$\nYou must be an "administrator" to uninstall Second Life.'
MessageBox MB_OK $(CheckAdministratorUnInstMB)
Quit
is_admin:
Return
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Checks to see if the current version has already been installed (according to the registry).
; If it has, allow user to bail out of install process.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function CheckIfAlreadyCurrent
Push $0
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version"
StrCmp $0 ${VERSION_LONG} 0 DONE
MessageBox MB_OKCANCEL "It appears that Second Life ${VERSION_LONG} is already installed.$\n$\nWould you like to install it again?" /SD IDOK IDOK DONE
MessageBox MB_OKCANCEL $(CheckIfCurrentMB) /SD IDOK IDOK DONE
Quit
DONE:
@ -386,22 +402,21 @@ Function CheckIfAlreadyCurrent
Return
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Close the program, if running. Modifies no variables.
; Allows user to bail out of install process.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function CloseSecondLife
Push $0
FindWindow $0 "Second Life" ""
IntCmp $0 0 DONE
MessageBox MB_OKCANCEL "Second Life can't be installed while it is already running.$\n$\nFinish what you're doing then select OK to close Second Life and continue.$\nSelect CANCEL to cancel installation." IDOK CLOSE IDCANCEL CANCEL_INSTALL
MessageBox MB_OKCANCEL $(CloseSecondLifeInstMB) IDOK CLOSE IDCANCEL CANCEL_INSTALL
CANCEL_INSTALL:
Quit
CLOSE:
DetailPrint "Waiting for Second Life to shut down..."
DetailPrint $(CloseSecondLifeInstDP)
SendMessage $0 16 0 0
LOOP:
@ -416,59 +431,59 @@ Function CloseSecondLife
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Delete files in Documents and Settings\<user>\SecondLife\cache
; Delete files in Documents and Settings\All Users\SecondLife\cache
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function RemoveCacheFiles
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Function RemoveCacheFiles
;
;; Delete files in Documents and Settings\<user>\SecondLife
;Push $0
;Push $1
;Push $2
; DetailPrint $(RemoveCacheFilesDP)
;
; StrCpy $0 0 ; Index number used to iterate via EnumRegKey
;
; LOOP:
; EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
; StrCmp $1 "" DONE ; no more users
;
; ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
; StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
;
; ; Required since ProfileImagePath is of type REG_EXPAND_SZ
; ExpandEnvStrings $2 $2
;
; ; When explicitly uninstalling, everything goes away
; RMDir /r "$2\Application Data\SecondLife\cache"
;
; CONTINUE:
; IntOp $0 $0 + 1
; Goto LOOP
; DONE:
;Pop $2
;Pop $1
;Pop $0
;
;; Delete files in Documents and Settings\All Users\SecondLife
;Push $0
; ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
; StrCmp $0 "" +2
; RMDir /r "$0\SecondLife\cache"
;Pop $0
;
;; Delete filse in C:\Windows\Application Data\SecondLife
;; If the user is running on a pre-NT system, Application Data lives here instead of
;; in Documents and Settings.
;RMDir /r "$WINDIR\Application Data\SecondLife\cache"
;
;FunctionEnd
; Delete files in Documents and Settings\<user>\SecondLife
Push $0
Push $1
Push $2
DetailPrint "Deleting cache files in Documents and Settings folder"
StrCpy $0 0 ; Index number used to iterate via EnumRegKey
LOOP:
EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
StrCmp $1 "" DONE ; no more users
ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
; Required since ProfileImagePath is of type REG_EXPAND_SZ
ExpandEnvStrings $2 $2
; When explicitly uninstalling, everything goes away
RMDir /r "$2\Application Data\SecondLife\cache"
CONTINUE:
IntOp $0 $0 + 1
Goto LOOP
DONE:
Pop $2
Pop $1
Pop $0
; Delete files in Documents and Settings\All Users\SecondLife
Push $0
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
StrCmp $0 "" +2
RMDir /r "$0\SecondLife\cache"
Pop $0
; Delete filse in C:\Windows\Application Data\SecondLife
; If the user is running on a pre-NT system, Application Data lives here instead of
; in Documents and Settings.
RMDir /r "$WINDIR\Application Data\SecondLife\cache"
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Delete files in Documents and Settings\<user>\SecondLife
; Delete files in Documents and Settings\All Users\SecondLife
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function un.DocumentsAndSettingsFolder
; Delete files in Documents and Settings\<user>\SecondLife
@ -522,21 +537,21 @@ RMDir /r "$WINDIR\Application Data\SecondLife"
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Close the program, if running. Modifies no variables.
; Allows user to bail out of uninstall process.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function un.CloseSecondLife
Push $0
FindWindow $0 "Second Life" ""
IntCmp $0 0 DONE
MessageBox MB_OKCANCEL "Second Life can't be uninstalled while it is already running.$\n$\nFinish what you're doing then select OK to close Second Life and continue.$\nSelect CANCEL to cancel installation." IDOK CLOSE IDCANCEL CANCEL_UNINSTALL
MessageBox MB_OKCANCEL $(CloseSecondLifeUnInstMB) IDOK CLOSE IDCANCEL CANCEL_UNINSTALL
CANCEL_UNINSTALL:
Quit
CLOSE:
DetailPrint "Waiting for Second Life to shut down..."
DetailPrint $(CloseSecondLifeUnInstDP)
SendMessage $0 16 0 0
LOOP:
@ -550,7 +565,7 @@ Function un.CloseSecondLife
Return
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Delete the installed files
;;; This deletes the uninstall executable, but it works
;;; because it is copied to temp directory before running
@ -558,7 +573,7 @@ FunctionEnd
;;; Note: You must list all files here, because we only
;;; want to delete our files, not things users left in the
;;; application directories.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function un.ProgramFiles
;; Remove mozilla file first so recursive directory deletion doesn't get hung up
@ -597,26 +612,26 @@ RMDir "$INSTDIR"
IfFileExists "$INSTDIR" FOLDERFOUND NOFOLDER
FOLDERFOUND:
MessageBox MB_YESNO "There are still files in your SecondLife program directory.$\n$\nThese are possibly files you created or moved to:$\n$INSTDIR$\n$\nDo you want to remove them?" IDNO NOFOLDER
MessageBox MB_YESNO $(DeleteProgramFilesMB) IDNO NOFOLDER
RMDir /r "$INSTDIR"
NOFOLDER:
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Uninstall settings
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
UninstallText "This will uninstall Second Life ${VERSION_LONG} from your system."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
UninstallText $(UninstallTextMsg)
ShowUninstDetails show
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Uninstall section
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Section Uninstall
; Start with some default values.
StrCpy $INSTFLAGS "${INSTFLAGS}"
StrCpy $INSTFLAGS ""
StrCpy $INSTPROG "${INSTNAME}"
StrCpy $INSTEXE "${INSTEXE}"
StrCpy $INSTSHORTCUT "${SHORTCUT}"
@ -629,9 +644,10 @@ SetShellVarContext all
; Make sure we're not running
Call un.CloseSecondLife
; Clean up registry keys
; Clean up registry keys (these should all be !defines somewhere)
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG"
DeleteRegKey HKEY_LOCAL_MACHINE "Software\Linden Research, Inc.\Installer Language"
; Clean up shortcuts
Delete "$SMPROGRAMS\$INSTSHORTCUT\*.*"
@ -652,7 +668,7 @@ Call un.ProgramFiles
SectionEnd ; end of uninstall section
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; (From the NSIS wiki, DK)
; GetParameterValue
;
@ -667,7 +683,7 @@ SectionEnd ; end of uninstall section
; or:
; foo.exe /S "/L=1033" /D="C:\Program Files\Foo"
; gpv "/L=" "1033"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
!macro GetParameterValue SWITCH DEFAULT
Push $0
@ -770,7 +786,7 @@ Function un.GetProgramName
!insertmacro GetParameterValue "/P=" "SecondLife"
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; (From the NSIS documentation, JC)
; GetWindowsVersion
;
@ -787,8 +803,7 @@ FunctionEnd
; Call GetWindowsVersion
; Pop $R0
; ; at this point $R0 is "NT 4.0" or whatnot
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function GetWindowsVersion
Push $R0
@ -860,3 +875,61 @@ Function GetWindowsVersion
Exch $R0
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Note: to add new languages, add a language file include to the list
;; at the top of this file, add an entry to the menu and then add an
;; entry to the language ID selector below
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function .onInit
; read the language from registry (ok if not there) and set langauge menu
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage"
StrCpy $LANGUAGE $0
Push ""
Push ${LANG_ENGLISH}
Push English
# Push ${LANG_GERMAN}
# Push German
# Push ${LANG_JAPANESE}
# Push Japanese
Push ${LANG_KOREAN}
Push Korean
Push A ; A means auto count languages for the auto count to work the first empty push (Push "") must remain
LangDLL::LangDialog "Installer Language" "Please select the language of the installer"
Pop $LANGUAGE
StrCmp $LANGUAGE "cancel" 0 +2
Abort
; save language in registry
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" $LANGUAGE
; generate language ID that will be used as a command line arg
StrCmp $LANGUAGE "1042" 0 +3
StrCpy $LANGFLAGS " -set SystemLanguage ko"
Goto EndOfFunc
# StrCmp $LANGUAGE "1041" 0 +3
# StrCpy $LANGFLAGS " -set SystemLanguage ja"
# Goto EndOfFunc
# StrCmp $LANGUAGE "1031" 0 +3
# StrCpy $LANGFLAGS " -set SystemLanguage de"
# Goto EndOfFunc
StrCmp $LANGUAGE "1033" 0 +3
StrCpy $LANGFLAGS " -set SystemLanguage en-us"
Goto EndOfFunc
EndOfFunc:
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function un.onInit
; read language from registry and set for ininstaller
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage"
StrCpy $LANGUAGE $0
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EOF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View File

@ -33,6 +33,13 @@ export LL_GL_BASICEXT=x
## LL_GL_BLACKLIST which solves your problems.
#export LL_GL_BLACKLIST=abcdefghijklmno
## - For advanced debugging cases, you can run the viewer under the
## control of another program, such as strace, gdb, or valgrind. If
## you're building your own viewer, bear in mind that the executable
## in the bin directory will be stripped: you should replace it with
## an unstripped binary before you run.
#export LL_WRAPPER='valgrind --log-file=secondlife.vg --leak-check=full --suppressions=/usr/lib/valgrind/glibc-2.5.supp --suppressions=secondlife-i686.supp'
## - Avoids an often-buggy X feature that doesn't really benefit us anyway.
export SDL_VIDEO_X11_DGAMOUSE=0
@ -41,7 +48,7 @@ export SDL_VIDEO_X11_DGAMOUSE=0
RUN_PATH=`dirname "$0" || echo .`
cd "${RUN_PATH}"
LD_LIBRARY_PATH="`pwd`"/lib:"`pwd`"/app_settings/mozilla-runtime-linux-i686:"${LD_LIBRARY_PATH}" bin/do-not-directly-run-secondlife-bin `cat gridargs.dat` $@ | cat
LD_LIBRARY_PATH="`pwd`"/lib:"`pwd`"/app_settings/mozilla-runtime-linux-i686:"${LD_LIBRARY_PATH}" $LL_WRAPPER bin/do-not-directly-run-secondlife-bin `cat gridargs.dat` $@ | cat
echo
echo '*********************************************************'

View File

@ -831,12 +831,12 @@ private:
class createStandardWearablesAllDoneCallback : public LLRefCount
{
public:
protected:
~createStandardWearablesAllDoneCallback();
};
class sendAgentWearablesUpdateCallback : public LLRefCount
{
public:
protected:
~sendAgentWearablesUpdateCallback();
};
@ -866,7 +866,6 @@ private:
S32 index,
LLWearable* wearable,
U32 todo = CALL_NONE);
~addWearableToAgentInventoryCallback() {};
virtual void fire(const LLUUID& inv_item);
private:

View File

@ -179,7 +179,7 @@ public:
static void cleanupDeadDrawables();
protected:
virtual ~LLDrawable() { destroy(); }
~LLDrawable() { destroy(); }
void moveUpdatePipeline(BOOL moved);
void updatePartition();
BOOL updateMoveDamped();

View File

@ -332,7 +332,6 @@ public:
{
mTitle = title;
}
~GestureShowCallback() {}
void fire(const LLUUID &inv_item)
{
LLPreviewGesture::show(mTitle.c_str(), inv_item, LLUUID::null);

View File

@ -296,6 +296,7 @@ BOOL LLFloaterPreference::postBuild()
LLFloaterPreference::~LLFloaterPreference()
{
sInstance = NULL;
delete mPreferenceCore;
}

View File

@ -4262,7 +4262,8 @@ void LLFolderView::idle(void* user_data)
{
self->scrollToShowItem(self->mSelectedItems.back());
// continue scrolling until animated layout change is done
if (!self->needsArrange() || !self->isInVisibleChain())
if (self->getCompletedFilterGeneration() >= self->mFilter.getMinRequiredGeneration() &&
(!self->needsArrange() || !self->isInVisibleChain()))
{
self->mNeedsScroll = FALSE;
}

View File

@ -168,7 +168,7 @@ void LLHUDEffectSpiral::triggerLocal()
{
if (show_beam)
{
LLViewerPartSourceBeam *psb = new LLViewerPartSourceBeam;
LLPointer<LLViewerPartSourceBeam> psb = new LLViewerPartSourceBeam;
psb->setColor(color);
psb->setSourceObject(mSourceObject);
psb->setTargetObject(mTargetObject);
@ -183,7 +183,7 @@ void LLHUDEffectSpiral::triggerLocal()
{
if (show_beam)
{
LLViewerPartSourceBeam *psb = new LLViewerPartSourceBeam;
LLPointer<LLViewerPartSourceBeam> psb = new LLViewerPartSourceBeam;
psb->setSourceObject(mSourceObject);
psb->setTargetObject(NULL);
psb->setColor(color);
@ -204,7 +204,7 @@ void LLHUDEffectSpiral::triggerLocal()
{
pos = gAgent.getPosAgentFromGlobal(mPositionGlobal);
}
LLViewerPartSourceSpiral *pss = new LLViewerPartSourceSpiral(pos);
LLPointer<LLViewerPartSourceSpiral> pss = new LLViewerPartSourceSpiral(pos);
if (!mSourceObject.isNull())
{
pss->setSourceObject(mSourceObject);
@ -218,10 +218,10 @@ void LLHUDEffectSpiral::triggerLocal()
}
else
{
LLViewerPartSource *ps = mPartSourcep;
LLPointer<LLViewerPartSource>& ps = mPartSourcep;
if (mPartSourcep->getType() == LLViewerPartSource::LL_PART_SOURCE_BEAM)
{
LLViewerPartSourceBeam *psb = (LLViewerPartSourceBeam *)ps;
LLViewerPartSourceBeam *psb = (LLViewerPartSourceBeam *)ps.get();
psb->setSourceObject(mSourceObject);
psb->setTargetObject(mTargetObject);
psb->setColor(color);
@ -232,7 +232,7 @@ void LLHUDEffectSpiral::triggerLocal()
}
else
{
LLViewerPartSourceSpiral *pss = (LLViewerPartSourceSpiral *)ps;
LLViewerPartSourceSpiral *pss = (LLViewerPartSourceSpiral *)ps.get();
pss->setSourceObject(mSourceObject);
}
}

View File

@ -74,7 +74,7 @@ protected:
static void sortObjects();
LLHUDObject(const U8 type);
virtual ~LLHUDObject();
~LLHUDObject();
virtual void render() = 0;
virtual void renderForSelect() {};

View File

@ -3455,10 +3455,13 @@ public:
* Do nothing. We only care about the destructor
*/
}
protected:
~LLWearInventoryCategoryCallback()
{
wear_inventory_category_on_avatar(gInventory.getCategory(mCatID), mAppend);
}
private:
LLUUID mCatID;
bool mAppend;

View File

@ -308,27 +308,6 @@ void LLOverlayBar::refresh()
{
mMusicRemote->setVisible(TRUE);
mMusicRemote->setEnabled(TRUE);
S32 musicPlaying = gAudiop->isInternetStreamPlaying();
if ( musicPlaying == 0 ) // stopped
{
mMusicRemote->setTransportState ( LLMediaRemoteCtrl::Stop, FALSE );
}
else
if ( musicPlaying == 1 ) // playing
{
mMusicRemote->setTransportState ( LLMediaRemoteCtrl::Play, FALSE );
if (gAudiop)
{
gAudiop->setInternetStreamGain ( gSavedSettings.getF32 ( "AudioLevelMusic" ) );
}
}
else
if ( musicPlaying == 2 ) // paused
{
mMusicRemote->setTransportState ( LLMediaRemoteCtrl::Stop, FALSE );
}
}
}

View File

@ -58,7 +58,7 @@ BOOL LLPanelGroupTab::postBuild()
if (txt)
{
mHelpText = txt->getText();
removeChild(txt);
removeChild(txt, TRUE);
}
return TRUE;
}
@ -265,13 +265,13 @@ BOOL LLPanelGroup::postBuild()
if (txt)
{
mDefaultNeedsApplyMesg = txt->getText();
removeChild(txt);
removeChild(txt, TRUE);
}
txt = (LLTextBox*)getChildByName("want_apply_text");
if (txt)
{
mWantApplyMesg = txt->getText();
removeChild(txt);
removeChild(txt, TRUE);
}
LLButton* button = (LLButton*) getChildByName("btn_ok");

View File

@ -115,7 +115,7 @@ BOOL LLPanelGroupGeneral::postBuild()
if (founder)
{
mFounderName = new LLNameBox(founder->getName(),founder->getRect(),LLUUID::null,FALSE,founder->getFont(),founder->getMouseOpaque());
removeChild(founder);
removeChild(founder, TRUE);
addChild(mFounderName);
}
@ -201,14 +201,14 @@ BOOL LLPanelGroupGeneral::postBuild()
if (txt)
{
mIncompleteMemberDataStr = txt->getText();
removeChild(txt);
removeChild(txt, TRUE);
}
txt = (LLTextBox*)getChildByName("confirm_group_create_str");
if (txt)
{
mConfirmGroupCreateStr = txt->getText();
removeChild(txt);
removeChild(txt, TRUE);
}
// If the group_id is null, then we are creating a new group

View File

@ -549,14 +549,14 @@ BOOL LLPanelGroupLandMoney::postBuild()
if ( no_permsp )
{
mImplementationp->mCantViewParcelsText = no_permsp->getText();
removeChild(no_permsp);
removeChild(no_permsp, TRUE);
}
no_permsp = (LLTextBox*) getChildByName("cant_view_group_accounting_text");
if ( no_permsp )
{
mImplementationp->mCantViewAccountsText = no_permsp->getText();
removeChild(no_permsp);
removeChild(no_permsp, TRUE);
}

View File

@ -259,7 +259,7 @@ BOOL LLPanelGroupNotices::postBuild()
if (txt)
{
mNoNoticesStr = txt->getText();
removeChild(txt);
removeChild(txt, TRUE);
}
mPanelCreateNotice = (LLPanel*) getChildByName("panel_create_new_notice",recurse);
@ -274,7 +274,7 @@ BOOL LLPanelGroupNotices::postBuild()
target->setToolTip(dtv->getToolTip());
mPanelCreateNotice->addChild(target);
mPanelCreateNotice->removeChild(dtv);
mPanelCreateNotice->removeChild(dtv, TRUE);
arrangeNoticeView(VIEW_PAST_NOTICE);

View File

@ -152,13 +152,13 @@ BOOL LLPanelGroupRoles::postBuild()
if (txt)
{
mDefaultNeedsApplyMesg = txt->getText();
removeChild(txt);
removeChild(txt, TRUE);
}
txt = (LLTextBox*)getChildByName("want_apply_text");
if (txt)
{
mWantApplyMesg = txt->getText();
removeChild(txt);
removeChild(txt, TRUE);
}
return LLPanelGroupTab::postBuild();
@ -521,21 +521,21 @@ BOOL LLPanelGroupSubTab::postBuild()
if (icon && icon->getImage().notNull())
{
mActionIcons["folder"] = icon->getImage();
removeChild(icon);
removeChild(icon, TRUE);
}
icon = (LLIconCtrl*) getChildByName("power_all_have_icon",no_recurse);
if (icon && icon->getImage().notNull())
{
mActionIcons["full"] = icon->getImage();
removeChild(icon);
removeChild(icon, TRUE);
}
icon = (LLIconCtrl*) getChildByName("power_partial_icon",no_recurse);
if (icon && icon->getImage().notNull())
{
mActionIcons["partial"] = icon->getImage();
removeChild(icon);
removeChild(icon, TRUE);
}
return LLPanelGroupTab::postBuild();
@ -1805,7 +1805,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root)
if (txt)
{
mRemoveEveryoneTxt = txt->getText();
parent->removeChild(txt);
parent->removeChild(txt, TRUE);
}
mCreateRoleButton =

View File

@ -1162,6 +1162,9 @@ void LLPanelObject::onCommitParametric( LLUICtrl* ctrl, void* userdata )
if (selected_type == MI_SCULPT)
{
self->mObject->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, TRUE, TRUE);
LLSculptParams *sculpt_params = (LLSculptParams *)self->mObject->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
if (sculpt_params)
volume_params.setSculptID(sculpt_params->getSculptTexture(), 0);
}
else
{

View File

@ -101,7 +101,7 @@ LLColor4 LLSelectMgr::sHighlightParentColor;
LLColor4 LLSelectMgr::sHighlightChildColor;
LLColor4 LLSelectMgr::sContextSilhouetteColor;
static LLObjectSelection* get_null_object_selection();
static LLObjectSelection *get_null_object_selection();
template<>
const LLHandle<LLObjectSelection>::NullFunc
LLHandle<LLObjectSelection>::sNullFunc = get_null_object_selection;
@ -125,14 +125,26 @@ struct LLDeRezInfo
//
static LLPointer<LLObjectSelection> sNullSelection;
//
// Functions
//
LLObjectSelection* get_null_object_selection()
void LLSelectMgr::cleanupGlobals()
{
static LLObjectSelection null_selection;
return &null_selection;;
delete gSelectMgr;
gSelectMgr = NULL;
sNullSelection = NULL;
}
LLObjectSelection *get_null_object_selection()
{
if (sNullSelection.isNull())
{
sNullSelection = new LLObjectSelection;
}
return sNullSelection;
}

View File

@ -94,9 +94,12 @@ typedef enum e_selection_type
class LLObjectSelection : public std::list<LLSelectNode*>, public LLRefCount
{
friend class LLSelectMgr;
protected:
~LLObjectSelection();
public:
LLObjectSelection();
virtual ~LLObjectSelection();
void updateEffects();
@ -195,6 +198,8 @@ public:
LLSelectMgr();
~LLSelectMgr();
static void cleanupGlobals();
// LLEditMenuHandler interface
virtual BOOL canUndo();
virtual void undo();

View File

@ -1697,7 +1697,7 @@ void LLSpatialPartition::processImagery(LLCamera* camera)
cube_map->initGL();
}
if (gPipeline.mCubeBuffer == NULL)
if (gPipeline.mCubeBuffer.isNull())
{
gPipeline.mCubeBuffer = new LLCubeMap();
gPipeline.mCubeBuffer->initGL();

View File

@ -146,7 +146,6 @@ public:
} eSetStateMode;
LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part);
virtual ~LLSpatialGroup();
BOOL isDead() { return isState(DEAD); }
BOOL isState(U32 state) const { return mState & state ? TRUE : FALSE; }
@ -190,6 +189,8 @@ public:
virtual void handleChildRemoval(const OctreeNode* parent, const OctreeNode* child);
protected:
virtual ~LLSpatialGroup();
U32 mState;
S32 mLODHash;
static S32 sLODSeed;
@ -323,11 +324,13 @@ public:
// class for creating bridges between spatial partitions
class LLSpatialBridge : public LLDrawable, public LLSpatialPartition
{
protected:
~LLSpatialBridge();
public:
typedef std::vector<LLPointer<LLSpatialBridge> > bridge_vector_t;
LLSpatialBridge(LLDrawable* root, U32 data_mask);
virtual ~LLSpatialBridge();
virtual BOOL isSpatialBridge() const { return TRUE; }

View File

@ -2787,25 +2787,26 @@ void update_app(BOOL mandatory, const std::string& auth_msg)
LLStringBase<char>::format_map_t args;
args["[MESSAGE]"] = msg;
BOOL *mandatoryp = new BOOL(mandatory);
// represent a bool as a null/non-null pointer
void *mandatoryp = mandatory ? &mandatory : NULL;
#if LL_WINDOWS
if (mandatory)
{
gViewerWindow->alertXml("DownloadWindowsMandatory", args,
update_dialog_callback,
(void *)mandatoryp);
mandatoryp);
}
else
{
#if LL_RELEASE_FOR_DOWNLOAD
gViewerWindow->alertXml("DownloadWindowsReleaseForDownload", args,
update_dialog_callback,
(void *)mandatoryp);
mandatoryp);
#else
gViewerWindow->alertXml("DownloadWindows", args,
update_dialog_callback,
(void *)mandatoryp);
mandatoryp);
#endif
}
#else
@ -2813,18 +2814,18 @@ void update_app(BOOL mandatory, const std::string& auth_msg)
{
gViewerWindow->alertXml("DownloadMacMandatory", args,
update_dialog_callback,
(void *)mandatoryp);
mandatoryp);
}
else
{
#if LL_RELEASE_FOR_DOWNLOAD
gViewerWindow->alertXml("DownloadMacReleaseForDownload", args,
update_dialog_callback,
(void *)mandatoryp);
mandatoryp);
#else
gViewerWindow->alertXml("DownloadMac", args,
update_dialog_callback,
(void *)mandatoryp);
mandatoryp);
#endif
}
#endif
@ -2835,7 +2836,7 @@ void update_app(BOOL mandatory, const std::string& auth_msg)
void update_dialog_callback(S32 option, void *userdata)
{
std::string update_exe_path;
BOOL mandatory = *(BOOL *)userdata;
BOOL mandatory = userdata != NULL;
#if !LL_RELEASE_FOR_DOWNLOAD
if (option == 2)

View File

@ -397,7 +397,7 @@ void LLToolBrushLand::handleSelect()
// if (!mBrushSelected)
{
mLastShowParcelOwners = gSavedSettings.getBOOL("ShowParcelOwners");
gSavedSettings.setBOOL("ShowParcelOwners", TRUE);
gSavedSettings.setBOOL("ShowParcelOwners", mLastShowParcelOwners);
mBrushSelected = TRUE;
}
}
@ -410,6 +410,7 @@ void LLToolBrushLand::handleDeselect()
gEditMenuHandler = NULL;
}
gFloaterTools->setStatusText("");
mLastShowParcelOwners = gSavedSettings.getBOOL("ShowParcelOwners");
gSavedSettings.setBOOL("ShowParcelOwners", mLastShowParcelOwners);
gParcelMgr->setSelectionVisible(TRUE);
mBrushSelected = FALSE;

View File

@ -198,7 +198,7 @@ void LLToolSelectLand::handleSelect()
{
gFloaterTools->setStatusText("Click and drag to select land");
mLastShowParcelOwners = gSavedSettings.getBOOL("ShowParcelOwners");
gSavedSettings.setBOOL("ShowParcelOwners", TRUE);
gSavedSettings.setBOOL("ShowParcelOwners", mLastShowParcelOwners);
}
@ -206,6 +206,7 @@ void LLToolSelectLand::handleDeselect()
{
gFloaterTools->setStatusText("");
mSelection = NULL;
mLastShowParcelOwners = gSavedSettings.getBOOL("ShowParcelOwners");
//gParcelMgr->deselectLand();
gSavedSettings.setBOOL("ShowParcelOwners", mLastShowParcelOwners);
}

View File

@ -171,7 +171,6 @@ protected:
class LLInventoryCallback : public LLRefCount
{
public:
virtual ~LLInventoryCallback() {}
virtual void fire(const LLUUID& inv_item) = 0;
};
@ -186,8 +185,11 @@ class RezAttachmentCallback : public LLInventoryCallback
{
public:
RezAttachmentCallback(LLViewerJointAttachment *attachmentp);
~RezAttachmentCallback();
void fire(const LLUUID& inv_item);
protected:
~RezAttachmentCallback();
private:
LLViewerJointAttachment* mAttach;
};

View File

@ -1408,6 +1408,8 @@ void init_server_menu(LLMenuGL* menu)
menu->createJumpKeys();
}
static std::vector<LLPointer<view_listener_t> > sMenus;
//-----------------------------------------------------------------------------
// cleanup_menus()
//-----------------------------------------------------------------------------
@ -1438,7 +1440,9 @@ void cleanup_menus()
gPopupMenuView = NULL;
delete gMenuHolder;
gMenuHolder = NULL;
gMenuHolder = NULL;
sMenus.clear();
}
//-----------------------------------------------------------------------------
@ -7529,199 +7533,205 @@ class LLToolsSelectTool : public view_listener_t
}
};
static void addMenu(view_listener_t *menu, const char *name)
{
sMenus.push_back(menu);
menu->registerListener(gMenuHolder, name);
}
void initialize_menus()
{
// File menu
init_menu_file();
// Edit menu
(new LLEditUndo())->registerListener(gMenuHolder, "Edit.Undo");
(new LLEditRedo())->registerListener(gMenuHolder, "Edit.Redo");
(new LLEditCut())->registerListener(gMenuHolder, "Edit.Cut");
(new LLEditCopy())->registerListener(gMenuHolder, "Edit.Copy");
(new LLEditPaste())->registerListener(gMenuHolder, "Edit.Paste");
(new LLEditDelete())->registerListener(gMenuHolder, "Edit.Delete");
(new LLEditSearch())->registerListener(gMenuHolder, "Edit.Search");
(new LLEditSelectAll())->registerListener(gMenuHolder, "Edit.SelectAll");
(new LLEditDeselect())->registerListener(gMenuHolder, "Edit.Deselect");
(new LLEditDuplicate())->registerListener(gMenuHolder, "Edit.Duplicate");
(new LLEditTakeOff())->registerListener(gMenuHolder, "Edit.TakeOff");
addMenu(new LLEditUndo(), "Edit.Undo");
addMenu(new LLEditRedo(), "Edit.Redo");
addMenu(new LLEditCut(), "Edit.Cut");
addMenu(new LLEditCopy(), "Edit.Copy");
addMenu(new LLEditPaste(), "Edit.Paste");
addMenu(new LLEditDelete(), "Edit.Delete");
addMenu(new LLEditSearch(), "Edit.Search");
addMenu(new LLEditSelectAll(), "Edit.SelectAll");
addMenu(new LLEditDeselect(), "Edit.Deselect");
addMenu(new LLEditDuplicate(), "Edit.Duplicate");
addMenu(new LLEditTakeOff(), "Edit.TakeOff");
(new LLEditEnableUndo())->registerListener(gMenuHolder, "Edit.EnableUndo");
(new LLEditEnableRedo())->registerListener(gMenuHolder, "Edit.EnableRedo");
(new LLEditEnableCut())->registerListener(gMenuHolder, "Edit.EnableCut");
(new LLEditEnableCopy())->registerListener(gMenuHolder, "Edit.EnableCopy");
(new LLEditEnablePaste())->registerListener(gMenuHolder, "Edit.EnablePaste");
(new LLEditEnableDelete())->registerListener(gMenuHolder, "Edit.EnableDelete");
(new LLEditEnableSelectAll())->registerListener(gMenuHolder, "Edit.EnableSelectAll");
(new LLEditEnableDeselect())->registerListener(gMenuHolder, "Edit.EnableDeselect");
(new LLEditEnableDuplicate())->registerListener(gMenuHolder, "Edit.EnableDuplicate");
(new LLEditEnableTakeOff())->registerListener(gMenuHolder, "Edit.EnableTakeOff");
(new LLEditEnableCustomizeAvatar())->registerListener(gMenuHolder, "Edit.EnableCustomizeAvatar");
addMenu(new LLEditEnableUndo(), "Edit.EnableUndo");
addMenu(new LLEditEnableRedo(), "Edit.EnableRedo");
addMenu(new LLEditEnableCut(), "Edit.EnableCut");
addMenu(new LLEditEnableCopy(), "Edit.EnableCopy");
addMenu(new LLEditEnablePaste(), "Edit.EnablePaste");
addMenu(new LLEditEnableDelete(), "Edit.EnableDelete");
addMenu(new LLEditEnableSelectAll(), "Edit.EnableSelectAll");
addMenu(new LLEditEnableDeselect(), "Edit.EnableDeselect");
addMenu(new LLEditEnableDuplicate(), "Edit.EnableDuplicate");
addMenu(new LLEditEnableTakeOff(), "Edit.EnableTakeOff");
addMenu(new LLEditEnableCustomizeAvatar(), "Edit.EnableCustomizeAvatar");
// View menu
(new LLViewMouselook())->registerListener(gMenuHolder, "View.Mouselook");
(new LLViewBuildMode())->registerListener(gMenuHolder, "View.BuildMode");
(new LLViewResetView())->registerListener(gMenuHolder, "View.ResetView");
(new LLViewLookAtLastChatter())->registerListener(gMenuHolder, "View.LookAtLastChatter");
(new LLViewShowHoverTips())->registerListener(gMenuHolder, "View.ShowHoverTips");
(new LLViewHighlightTransparent())->registerListener(gMenuHolder, "View.HighlightTransparent");
(new LLViewToggleBeacon())->registerListener(gMenuHolder, "View.ToggleBeacon");
(new LLViewToggleRenderType())->registerListener(gMenuHolder, "View.ToggleRenderType");
(new LLViewShowHUDAttachments())->registerListener(gMenuHolder, "View.ShowHUDAttachments");
(new LLViewZoomOut())->registerListener(gMenuHolder, "View.ZoomOut");
(new LLViewZoomIn())->registerListener(gMenuHolder, "View.ZoomIn");
(new LLViewZoomDefault())->registerListener(gMenuHolder, "View.ZoomDefault");
(new LLViewFullscreen())->registerListener(gMenuHolder, "View.Fullscreen");
(new LLViewDefaultUISize())->registerListener(gMenuHolder, "View.DefaultUISize");
addMenu(new LLViewMouselook(), "View.Mouselook");
addMenu(new LLViewBuildMode(), "View.BuildMode");
addMenu(new LLViewResetView(), "View.ResetView");
addMenu(new LLViewLookAtLastChatter(), "View.LookAtLastChatter");
addMenu(new LLViewShowHoverTips(), "View.ShowHoverTips");
addMenu(new LLViewHighlightTransparent(), "View.HighlightTransparent");
addMenu(new LLViewToggleBeacon(), "View.ToggleBeacon");
addMenu(new LLViewToggleRenderType(), "View.ToggleRenderType");
addMenu(new LLViewShowHUDAttachments(), "View.ShowHUDAttachments");
addMenu(new LLViewZoomOut(), "View.ZoomOut");
addMenu(new LLViewZoomIn(), "View.ZoomIn");
addMenu(new LLViewZoomDefault(), "View.ZoomDefault");
addMenu(new LLViewFullscreen(), "View.Fullscreen");
addMenu(new LLViewDefaultUISize(), "View.DefaultUISize");
(new LLViewEnableMouselook())->registerListener(gMenuHolder, "View.EnableMouselook");
(new LLViewEnableLastChatter())->registerListener(gMenuHolder, "View.EnableLastChatter");
addMenu(new LLViewEnableMouselook(), "View.EnableMouselook");
addMenu(new LLViewEnableLastChatter(), "View.EnableLastChatter");
(new LLViewCheckBuildMode())->registerListener(gMenuHolder, "View.CheckBuildMode");
(new LLViewCheckShowHoverTips())->registerListener(gMenuHolder, "View.CheckShowHoverTips");
(new LLViewCheckHighlightTransparent())->registerListener(gMenuHolder, "View.CheckHighlightTransparent");
(new LLViewCheckBeaconEnabled())->registerListener(gMenuHolder, "View.CheckBeaconEnabled");
(new LLViewCheckRenderType())->registerListener(gMenuHolder, "View.CheckRenderType");
(new LLViewCheckHUDAttachments())->registerListener(gMenuHolder, "View.CheckHUDAttachments");
addMenu(new LLViewCheckBuildMode(), "View.CheckBuildMode");
addMenu(new LLViewCheckShowHoverTips(), "View.CheckShowHoverTips");
addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent");
addMenu(new LLViewCheckBeaconEnabled(), "View.CheckBeaconEnabled");
addMenu(new LLViewCheckRenderType(), "View.CheckRenderType");
addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments");
// World menu
(new LLWorldChat())->registerListener(gMenuHolder, "World.Chat");
(new LLWorldStartGesture())->registerListener(gMenuHolder, "World.StartGesture");
(new LLWorldAlwaysRun())->registerListener(gMenuHolder, "World.AlwaysRun");
(new LLWorldFly())->registerListener(gMenuHolder, "World.Fly");
(new LLWorldCreateLandmark())->registerListener(gMenuHolder, "World.CreateLandmark");
(new LLWorldSetHomeLocation())->registerListener(gMenuHolder, "World.SetHomeLocation");
(new LLWorldTeleportHome())->registerListener(gMenuHolder, "World.TeleportHome");
(new LLWorldSetAway())->registerListener(gMenuHolder, "World.SetAway");
(new LLWorldSetBusy())->registerListener(gMenuHolder, "World.SetBusy");
addMenu(new LLWorldChat(), "World.Chat");
addMenu(new LLWorldStartGesture(), "World.StartGesture");
addMenu(new LLWorldAlwaysRun(), "World.AlwaysRun");
addMenu(new LLWorldFly(), "World.Fly");
addMenu(new LLWorldCreateLandmark(), "World.CreateLandmark");
addMenu(new LLWorldSetHomeLocation(), "World.SetHomeLocation");
addMenu(new LLWorldTeleportHome(), "World.TeleportHome");
addMenu(new LLWorldSetAway(), "World.SetAway");
addMenu(new LLWorldSetBusy(), "World.SetBusy");
(new LLWorldEnableCreateLandmark())->registerListener(gMenuHolder, "World.EnableCreateLandmark");
(new LLWorldEnableSetHomeLocation())->registerListener(gMenuHolder, "World.EnableSetHomeLocation");
(new LLWorldEnableTeleportHome())->registerListener(gMenuHolder, "World.EnableTeleportHome");
(new LLWorldEnableBuyLand())->registerListener(gMenuHolder, "World.EnableBuyLand");
addMenu(new LLWorldEnableCreateLandmark(), "World.EnableCreateLandmark");
addMenu(new LLWorldEnableSetHomeLocation(), "World.EnableSetHomeLocation");
addMenu(new LLWorldEnableTeleportHome(), "World.EnableTeleportHome");
addMenu(new LLWorldEnableBuyLand(), "World.EnableBuyLand");
(new LLWorldCheckAlwaysRun())->registerListener(gMenuHolder, "World.CheckAlwaysRun");
addMenu(new LLWorldCheckAlwaysRun(), "World.CheckAlwaysRun");
(new LLWorldForceSun())->registerListener(gMenuHolder, "World.ForceSun");
addMenu(new LLWorldForceSun(), "World.ForceSun");
// Tools menu
(new LLToolsSelectTool())->registerListener(gMenuHolder, "Tools.SelectTool");
(new LLToolsSelectOnlyMyObjects())->registerListener(gMenuHolder, "Tools.SelectOnlyMyObjects");
(new LLToolsSelectOnlyMovableObjects())->registerListener(gMenuHolder, "Tools.SelectOnlyMovableObjects");
(new LLToolsSelectBySurrounding())->registerListener(gMenuHolder, "Tools.SelectBySurrounding");
(new LLToolsShowHiddenSelection())->registerListener(gMenuHolder, "Tools.ShowHiddenSelection");
(new LLToolsShowSelectionLightRadius())->registerListener(gMenuHolder, "Tools.ShowSelectionLightRadius");
(new LLToolsSnapObjectXY())->registerListener(gMenuHolder, "Tools.SnapObjectXY");
(new LLToolsUseSelectionForGrid())->registerListener(gMenuHolder, "Tools.UseSelectionForGrid");
(new LLToolsLink())->registerListener(gMenuHolder, "Tools.Link");
(new LLToolsUnlink())->registerListener(gMenuHolder, "Tools.Unlink");
(new LLToolsStopAllAnimations())->registerListener(gMenuHolder, "Tools.StopAllAnimations");
(new LLToolsLookAtSelection())->registerListener(gMenuHolder, "Tools.LookAtSelection");
(new LLToolsBuyOrTake())->registerListener(gMenuHolder, "Tools.BuyOrTake");
(new LLToolsTakeCopy())->registerListener(gMenuHolder, "Tools.TakeCopy");
(new LLToolsSaveToInventory())->registerListener(gMenuHolder, "Tools.SaveToInventory");
(new LLToolsSaveToObjectInventory())->registerListener(gMenuHolder, "Tools.SaveToObjectInventory");
(new LLToolsSelectedScriptAction())->registerListener(gMenuHolder, "Tools.SelectedScriptAction");
addMenu(new LLToolsSelectTool(), "Tools.SelectTool");
addMenu(new LLToolsSelectOnlyMyObjects(), "Tools.SelectOnlyMyObjects");
addMenu(new LLToolsSelectOnlyMovableObjects(), "Tools.SelectOnlyMovableObjects");
addMenu(new LLToolsSelectBySurrounding(), "Tools.SelectBySurrounding");
addMenu(new LLToolsShowHiddenSelection(), "Tools.ShowHiddenSelection");
addMenu(new LLToolsShowSelectionLightRadius(), "Tools.ShowSelectionLightRadius");
addMenu(new LLToolsSnapObjectXY(), "Tools.SnapObjectXY");
addMenu(new LLToolsUseSelectionForGrid(), "Tools.UseSelectionForGrid");
addMenu(new LLToolsLink(), "Tools.Link");
addMenu(new LLToolsUnlink(), "Tools.Unlink");
addMenu(new LLToolsStopAllAnimations(), "Tools.StopAllAnimations");
addMenu(new LLToolsLookAtSelection(), "Tools.LookAtSelection");
addMenu(new LLToolsBuyOrTake(), "Tools.BuyOrTake");
addMenu(new LLToolsTakeCopy(), "Tools.TakeCopy");
addMenu(new LLToolsSaveToInventory(), "Tools.SaveToInventory");
addMenu(new LLToolsSaveToObjectInventory(), "Tools.SaveToObjectInventory");
addMenu(new LLToolsSelectedScriptAction(), "Tools.SelectedScriptAction");
(new LLToolsEnableToolNotPie())->registerListener(gMenuHolder, "Tools.EnableToolNotPie");
(new LLToolsEnableLink())->registerListener(gMenuHolder, "Tools.EnableLink");
(new LLToolsEnableUnlink())->registerListener(gMenuHolder, "Tools.EnableUnlink");
(new LLToolsEnableBuyOrTake())->registerListener(gMenuHolder, "Tools.EnableBuyOrTake");
(new LLToolsEnableTakeCopy())->registerListener(gMenuHolder, "Tools.EnableTakeCopy");
(new LLToolsEnableSaveToInventory())->registerListener(gMenuHolder, "Tools.SaveToInventory");
(new LLToolsEnableSaveToObjectInventory())->registerListener(gMenuHolder, "Tools.SaveToObjectInventory");
addMenu(new LLToolsEnableToolNotPie(), "Tools.EnableToolNotPie");
addMenu(new LLToolsEnableLink(), "Tools.EnableLink");
addMenu(new LLToolsEnableUnlink(), "Tools.EnableUnlink");
addMenu(new LLToolsEnableBuyOrTake(), "Tools.EnableBuyOrTake");
addMenu(new LLToolsEnableTakeCopy(), "Tools.EnableTakeCopy");
addMenu(new LLToolsEnableSaveToInventory(), "Tools.SaveToInventory");
addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.SaveToObjectInventory");
/*(new LLToolsVisibleBuyObject())->registerListener(gMenuHolder, "Tools.VisibleBuyObject");
(new LLToolsVisibleTakeObject())->registerListener(gMenuHolder, "Tools.VisibleTakeObject");*/
/*addMenu(new LLToolsVisibleBuyObject(), "Tools.VisibleBuyObject");
addMenu(new LLToolsVisibleTakeObject(), "Tools.VisibleTakeObject");*/
// Help menu
(new LLHelpLiveHelp())->registerListener(gMenuHolder, "Help.LiveHelp");
(new LLHelpMOTD())->registerListener(gMenuHolder, "Help.MOTD");
addMenu(new LLHelpLiveHelp(), "Help.LiveHelp");
addMenu(new LLHelpMOTD(), "Help.MOTD");
// Self pie menu
(new LLSelfStandUp())->registerListener(gMenuHolder, "Self.StandUp");
(new LLSelfRemoveAllAttachments())->registerListener(gMenuHolder, "Self.RemoveAllAttachments");
addMenu(new LLSelfStandUp(), "Self.StandUp");
addMenu(new LLSelfRemoveAllAttachments(), "Self.RemoveAllAttachments");
(new LLSelfEnableStandUp())->registerListener(gMenuHolder, "Self.EnableStandUp");
(new LLSelfEnableRemoveAllAttachments())->registerListener(gMenuHolder, "Self.EnableRemoveAllAttachments");
addMenu(new LLSelfEnableStandUp(), "Self.EnableStandUp");
addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments");
// Avatar pie menu
(new LLObjectMute())->registerListener(gMenuHolder, "Avatar.Mute");
(new LLAvatarAddFriend())->registerListener(gMenuHolder, "Avatar.AddFriend");
(new LLAvatarFreeze())->registerListener(gMenuHolder, "Avatar.Freeze");
(new LLAvatarDebug())->registerListener(gMenuHolder, "Avatar.Debug");
(new LLAvatarVisibleDebug())->registerListener(gMenuHolder, "Avatar.VisibleDebug");
(new LLAvatarEnableDebug())->registerListener(gMenuHolder, "Avatar.EnableDebug");
(new LLAvatarGiveCard())->registerListener(gMenuHolder, "Avatar.GiveCard");
(new LLAvatarEject())->registerListener(gMenuHolder, "Avatar.Eject");
(new LLAvatarSendIM())->registerListener(gMenuHolder, "Avatar.SendIM");
addMenu(new LLObjectMute(), "Avatar.Mute");
addMenu(new LLAvatarAddFriend(), "Avatar.AddFriend");
addMenu(new LLAvatarFreeze(), "Avatar.Freeze");
addMenu(new LLAvatarDebug(), "Avatar.Debug");
addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug");
addMenu(new LLAvatarEnableDebug(), "Avatar.EnableDebug");
addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard");
addMenu(new LLAvatarEject(), "Avatar.Eject");
addMenu(new LLAvatarSendIM(), "Avatar.SendIM");
(new LLObjectEnableMute())->registerListener(gMenuHolder, "Avatar.EnableMute");
(new LLAvatarEnableAddFriend())->registerListener(gMenuHolder, "Avatar.EnableAddFriend");
(new LLAvatarEnableFreezeEject())->registerListener(gMenuHolder, "Avatar.EnableFreezeEject");
addMenu(new LLObjectEnableMute(), "Avatar.EnableMute");
addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend");
addMenu(new LLAvatarEnableFreezeEject(), "Avatar.EnableFreezeEject");
// Object pie menu
(new LLObjectOpen())->registerListener(gMenuHolder, "Object.Open");
(new LLObjectBuild())->registerListener(gMenuHolder, "Object.Build");
(new LLObjectTouch())->registerListener(gMenuHolder, "Object.Touch");
(new LLObjectSitOrStand())->registerListener(gMenuHolder, "Object.SitOrStand");
(new LLObjectDelete())->registerListener(gMenuHolder, "Object.Delete");
(new LLObjectAttachToAvatar())->registerListener(gMenuHolder, "Object.AttachToAvatar");
(new LLObjectReturn())->registerListener(gMenuHolder, "Object.Return");
(new LLObjectReportAbuse())->registerListener(gMenuHolder, "Object.ReportAbuse");
(new LLObjectMute())->registerListener(gMenuHolder, "Object.Mute");
(new LLObjectBuy())->registerListener(gMenuHolder, "Object.Buy");
(new LLObjectEdit())->registerListener(gMenuHolder, "Object.Edit");
(new LLObjectInspect())->registerListener(gMenuHolder, "Object.Inspect");
addMenu(new LLObjectOpen(), "Object.Open");
addMenu(new LLObjectBuild(), "Object.Build");
addMenu(new LLObjectTouch(), "Object.Touch");
addMenu(new LLObjectSitOrStand(), "Object.SitOrStand");
addMenu(new LLObjectDelete(), "Object.Delete");
addMenu(new LLObjectAttachToAvatar(), "Object.AttachToAvatar");
addMenu(new LLObjectReturn(), "Object.Return");
addMenu(new LLObjectReportAbuse(), "Object.ReportAbuse");
addMenu(new LLObjectMute(), "Object.Mute");
addMenu(new LLObjectBuy(), "Object.Buy");
addMenu(new LLObjectEdit(), "Object.Edit");
addMenu(new LLObjectInspect(), "Object.Inspect");
(new LLObjectEnableOpen())->registerListener(gMenuHolder, "Object.EnableOpen");
(new LLObjectEnableTouch())->registerListener(gMenuHolder, "Object.EnableTouch");
(new LLObjectEnableSitOrStand())->registerListener(gMenuHolder, "Object.EnableSitOrStand");
(new LLObjectEnableDelete())->registerListener(gMenuHolder, "Object.EnableDelete");
(new LLObjectEnableWear())->registerListener(gMenuHolder, "Object.EnableWear");
(new LLObjectEnableReturn())->registerListener(gMenuHolder, "Object.EnableReturn");
(new LLObjectEnableReportAbuse())->registerListener(gMenuHolder, "Object.EnableReportAbuse");
(new LLObjectEnableMute())->registerListener(gMenuHolder, "Object.EnableMute");
(new LLObjectEnableBuy())->registerListener(gMenuHolder, "Object.EnableBuy");
addMenu(new LLObjectEnableOpen(), "Object.EnableOpen");
addMenu(new LLObjectEnableTouch(), "Object.EnableTouch");
addMenu(new LLObjectEnableSitOrStand(), "Object.EnableSitOrStand");
addMenu(new LLObjectEnableDelete(), "Object.EnableDelete");
addMenu(new LLObjectEnableWear(), "Object.EnableWear");
addMenu(new LLObjectEnableReturn(), "Object.EnableReturn");
addMenu(new LLObjectEnableReportAbuse(), "Object.EnableReportAbuse");
addMenu(new LLObjectEnableMute(), "Object.EnableMute");
addMenu(new LLObjectEnableBuy(), "Object.EnableBuy");
/*(new LLObjectVisibleTouch())->registerListener(gMenuHolder, "Object.VisibleTouch");
(new LLObjectVisibleCustomTouch())->registerListener(gMenuHolder, "Object.VisibleCustomTouch");
(new LLObjectVisibleStandUp())->registerListener(gMenuHolder, "Object.VisibleStandUp");
(new LLObjectVisibleSitHere())->registerListener(gMenuHolder, "Object.VisibleSitHere");
(new LLObjectVisibleCustomSit())->registerListener(gMenuHolder, "Object.VisibleCustomSit");*/
/*addMenu(new LLObjectVisibleTouch(), "Object.VisibleTouch");
addMenu(new LLObjectVisibleCustomTouch(), "Object.VisibleCustomTouch");
addMenu(new LLObjectVisibleStandUp(), "Object.VisibleStandUp");
addMenu(new LLObjectVisibleSitHere(), "Object.VisibleSitHere");
addMenu(new LLObjectVisibleCustomSit(), "Object.VisibleCustomSit");*/
// Attachment pie menu
(new LLAttachmentDrop())->registerListener(gMenuHolder, "Attachment.Drop");
(new LLAttachmentDetach())->registerListener(gMenuHolder, "Attachment.Detach");
addMenu(new LLAttachmentDrop(), "Attachment.Drop");
addMenu(new LLAttachmentDetach(), "Attachment.Detach");
(new LLAttachmentEnableDrop())->registerListener(gMenuHolder, "Attachment.EnableDrop");
(new LLAttachmentEnableDetach())->registerListener(gMenuHolder, "Attachment.EnableDetach");
addMenu(new LLAttachmentEnableDrop(), "Attachment.EnableDrop");
addMenu(new LLAttachmentEnableDetach(), "Attachment.EnableDetach");
// Land pie menu
(new LLLandBuild())->registerListener(gMenuHolder, "Land.Build");
(new LLLandSit())->registerListener(gMenuHolder, "Land.Sit");
(new LLLandBuyPass())->registerListener(gMenuHolder, "Land.BuyPass");
(new LLLandEdit())->registerListener(gMenuHolder, "Land.Edit");
addMenu(new LLLandBuild(), "Land.Build");
addMenu(new LLLandSit(), "Land.Sit");
addMenu(new LLLandBuyPass(), "Land.BuyPass");
addMenu(new LLLandEdit(), "Land.Edit");
(new LLLandEnableBuyPass())->registerListener(gMenuHolder, "Land.EnableBuyPass");
addMenu(new LLLandEnableBuyPass(), "Land.EnableBuyPass");
// Generic actions
(new LLShowFloater())->registerListener(gMenuHolder, "ShowFloater");
(new LLPromptShowURL())->registerListener(gMenuHolder, "PromptShowURL");
(new LLPromptShowFile())->registerListener(gMenuHolder, "PromptShowFile");
(new LLShowAgentProfile())->registerListener(gMenuHolder, "ShowAgentProfile");
(new LLShowAgentGroups())->registerListener(gMenuHolder, "ShowAgentGroups");
(new LLToggleControl())->registerListener(gMenuHolder, "ToggleControl");
addMenu(new LLShowFloater(), "ShowFloater");
addMenu(new LLPromptShowURL(), "PromptShowURL");
addMenu(new LLPromptShowFile(), "PromptShowFile");
addMenu(new LLShowAgentProfile(), "ShowAgentProfile");
addMenu(new LLShowAgentGroups(), "ShowAgentGroups");
addMenu(new LLToggleControl(), "ToggleControl");
(new LLGoToObject())->registerListener(gMenuHolder, "GoToObject");
(new LLPayObject())->registerListener(gMenuHolder, "PayObject");
addMenu(new LLGoToObject(), "GoToObject");
addMenu(new LLPayObject(), "PayObject");
(new LLEnablePayObject())->registerListener(gMenuHolder, "EnablePayObject");
(new LLEnableEdit())->registerListener(gMenuHolder, "EnableEdit");
addMenu(new LLEnablePayObject(), "EnablePayObject");
addMenu(new LLEnableEdit(), "EnableEdit");
(new LLFloaterVisible())->registerListener(gMenuHolder, "FloaterVisible");
(new LLSomethingSelected())->registerListener(gMenuHolder, "SomethingSelected");
(new LLSomethingSelectedNoHUD())->registerListener(gMenuHolder, "SomethingSelectedNoHUD");
(new LLEditableSelected())->registerListener(gMenuHolder, "EditableSelected");
addMenu(new LLFloaterVisible(), "FloaterVisible");
addMenu(new LLSomethingSelected(), "SomethingSelected");
addMenu(new LLSomethingSelectedNoHUD(), "SomethingSelectedNoHUD");
addMenu(new LLEditableSelected(), "EditableSelected");
}

View File

@ -767,8 +767,8 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
if (check_offer_throttle(from_name, false))
{
// I'm not sure this is a good idea. JC
// bool show_keep_discard = item->getPermissions().getCreator() != gAgent.getID();
bool show_keep_discard = true;
bool show_keep_discard = item->getPermissions().getCreator() != gAgent.getID();
//bool show_keep_discard = true;
switch(item->getType())
{
case LLAssetType::AT_NOTECARD:
@ -2197,7 +2197,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
if (chat.mSourceType == CHAT_SOURCE_OBJECT
&& chat.mChatType != CHAT_TYPE_DEBUG_MSG)
{
LLViewerPartSourceChat *psc = new LLViewerPartSourceChat(chatter->getPositionAgent());
LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent());
psc->setSourceObject(chatter);
psc->setColor(color);
//We set the particles to be owned by the object's owner,

View File

@ -4000,7 +4000,7 @@ void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& own
}
else
{
LLViewerPartSourceScript *pss = LLViewerPartSourceScript::unpackPSS(this, NULL, block_num);
LLPointer<LLViewerPartSourceScript> pss = LLViewerPartSourceScript::unpackPSS(this, NULL, block_num);
//If the owner is muted, don't create the system
if(gMuteListp->isMuted(owner_id)) return;
@ -4049,7 +4049,7 @@ void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_
}
else
{
LLViewerPartSourceScript *pss = LLViewerPartSourceScript::unpackPSS(this, NULL, dp);
LLPointer<LLViewerPartSourceScript> pss = LLViewerPartSourceScript::unpackPSS(this, NULL, dp);
//If the owner is muted, don't create the system
if(gMuteListp->isMuted(owner_id)) return;
// We need to be able to deal with a particle source that hasn't changed, but still got an update!

View File

@ -96,7 +96,7 @@ public:
class LLViewerObject : public LLPrimitive, public LLRefCount
{
protected:
virtual ~LLViewerObject(); // use unref()
~LLViewerObject(); // use unref()
// TomY: Provide for a list of extra parameter structures, mapped by structure name
struct ExtraParameter

View File

@ -2557,8 +2557,21 @@ bool LLParcelSelection::hasOthersSelected() const
return mSelectedOtherCount != 0;
}
static LLPointer<LLParcelSelection> sNullSelection;
LLParcelSelection* get_null_parcel_selection()
{
static LLParcelSelection null_selection;
return &null_selection;
if (sNullSelection.isNull())
{
sNullSelection = new LLParcelSelection;
}
return sNullSelection;
}
void LLViewerParcelMgr::cleanupGlobals()
{
delete gParcelMgr;
gParcelMgr = NULL;
sNullSelection = NULL;
}

View File

@ -53,12 +53,13 @@ class LLParcelSelection : public LLRefCount
{
friend class LLViewerParcelMgr;
protected:
~LLParcelSelection();
public:
LLParcelSelection(LLParcel* parcel);
LLParcelSelection();
~LLParcelSelection();
// this can return NULL at any time, as parcel selection
// might have been invalidated.
LLParcel* getParcel() { return mParcel; }
@ -99,6 +100,8 @@ public:
LLViewerParcelMgr();
~LLViewerParcelMgr();
static void cleanupGlobals();
BOOL selectionEmpty() const;
F32 getSelectionWidth() const { return F32(mEastNorth.mdV[VX] - mWestSouth.mdV[VX]); }
F32 getSelectionHeight() const { return F32(mEastNorth.mdV[VY] - mWestSouth.mdV[VY]); }

View File

@ -83,7 +83,7 @@ LLViewerPart &LLViewerPart::operator=(const LLViewerPart &part)
return *this;
}
void LLViewerPart::init(LLViewerPartSource *sourcep, LLViewerImage *imagep, LLVPCallback cb)
void LLViewerPart::init(LLPointer<LLViewerPartSource> sourcep, LLViewerImage *imagep, LLVPCallback cb)
{
LLMemType mt(LLMemType::MTYPE_PARTICLES);
mPartID = LLViewerPart::sNextPartID;
@ -653,7 +653,7 @@ void LLViewerPartSim::updateSimulation()
}
void LLViewerPartSim::addPartSource(LLViewerPartSource *sourcep)
void LLViewerPartSim::addPartSource(LLPointer<LLViewerPartSource> sourcep)
{
LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (!sourcep)

View File

@ -33,12 +33,13 @@ typedef void (*LLVPCallback)(LLViewerPart &part, const F32 dt);
class LLViewerPart : public LLPartData, public LLRefCount
{
protected:
~LLViewerPart();
public:
LLViewerPart();
~LLViewerPart();
LLViewerPart &operator=(const LLViewerPart &part);
void init(LLViewerPartSource *sourcep, LLViewerImage *imagep, LLVPCallback cb);
void init(LLPointer<LLViewerPartSource> sourcep, LLViewerImage *imagep, LLVPCallback cb);
U32 mPartID; // Particle ID used primarily for moving between groups
@ -113,7 +114,7 @@ public:
void updateSimulation();
void addPartSource(LLViewerPartSource *sourcep);
void addPartSource(LLPointer<LLViewerPartSource> sourcep);
void cleanupRegion(LLViewerRegion *regionp);

View File

@ -290,7 +290,7 @@ void LLViewerPartSourceScript::update(const F32 dt)
}
// static
LLViewerPartSourceScript *LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLViewerPartSourceScript *pssp, const S32 block_num)
LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, const S32 block_num)
{
LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (!pssp)
@ -299,10 +299,9 @@ LLViewerPartSourceScript *LLViewerPartSourceScript::unpackPSS(LLViewerObject *so
{
return NULL;
}
LLViewerPartSourceScript *new_pssp = new LLViewerPartSourceScript(source_objp);
LLPointer<LLViewerPartSourceScript> new_pssp = new LLViewerPartSourceScript(source_objp);
if (!new_pssp->mPartSysData.unpackBlock(block_num))
{
delete new_pssp;
return NULL;
}
if (new_pssp->mPartSysData.mTargetUUID.notNull())
@ -333,15 +332,14 @@ LLViewerPartSourceScript *LLViewerPartSourceScript::unpackPSS(LLViewerObject *so
}
LLViewerPartSourceScript *LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLViewerPartSourceScript *pssp, LLDataPacker &dp)
LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, LLDataPacker &dp)
{
LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (!pssp)
{
LLViewerPartSourceScript *new_pssp = new LLViewerPartSourceScript(source_objp);
LLPointer<LLViewerPartSourceScript> new_pssp = new LLViewerPartSourceScript(source_objp);
if (!new_pssp->mPartSysData.unpack(dp))
{
delete new_pssp;
return NULL;
}
if (new_pssp->mPartSysData.mTargetUUID.notNull())
@ -402,8 +400,8 @@ void LLViewerPartSourceSpiral::updatePart(LLViewerPart &part, const F32 dt)
F32 frac = part.mLastUpdateTime/part.mMaxAge;
LLVector3 center_pos;
LLViewerPartSource *ps = (LLViewerPartSource*)part.mPartSourcep;
LLViewerPartSourceSpiral *pss = (LLViewerPartSourceSpiral *)ps;
LLPointer<LLViewerPartSource>& ps = part.mPartSourcep;
LLViewerPartSourceSpiral *pss = (LLViewerPartSourceSpiral *)ps.get();
if (!pss->mSourceObjectp.isNull() && !pss->mSourceObjectp->mDrawable.isNull())
{
part.mPosAgent = pss->mSourceObjectp->getRenderPosition();

View File

@ -87,8 +87,8 @@ public:
BOOL updateFromMesg();
// Returns a new particle source to attach to an object...
static LLViewerPartSourceScript *unpackPSS(LLViewerObject *source_objp, LLViewerPartSourceScript *pssp, const S32 block_num);
static LLViewerPartSourceScript *unpackPSS(LLViewerObject *source_objp, LLViewerPartSourceScript *pssp, LLDataPacker &dp);
static LLPointer<LLViewerPartSourceScript> unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, const S32 block_num);
static LLPointer<LLViewerPartSourceScript> unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, LLDataPacker &dp);
LLViewerImage *getImage() const { return mImagep; }
void setImage(LLViewerImage *imagep);
@ -137,7 +137,6 @@ class LLViewerPartSourceBeam : public LLViewerPartSource
{
public:
LLViewerPartSourceBeam();
~LLViewerPartSourceBeam();
/*virtual*/ void setDead();
@ -155,6 +154,7 @@ public:
LLVector3d mLKGTargetPosGlobal;
LLColor4 mColor;
protected:
~LLViewerPartSourceBeam();
};

View File

@ -23,7 +23,6 @@ class LLVOClouds : public LLAlphaObject
{
public:
LLVOClouds(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp );
virtual ~LLVOClouds();
// Initialize data that's only inited once per class.
static void initClass();
@ -53,6 +52,8 @@ public:
void setCloudGroup(LLCloudGroup *cgp) { mCloudGroupp = cgp; }
protected:
virtual ~LLVOClouds();
LLCloudGroup *mCloudGroupp;
};

View File

@ -21,7 +21,6 @@ class LLVOGrass : public LLAlphaObject
{
public:
LLVOGrass(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
virtual ~LLVOGrass();
// Initialize data that's only inited once per class.
static void initClass();
@ -84,6 +83,9 @@ public:
F32 mBladeWindAngle;
F32 mBWAOverlap;
protected:
~LLVOGrass();
private:
void updateSpecies();
F32 mLastHeight; // For cheap update hack

View File

@ -18,9 +18,10 @@
class LLVOGround : public LLStaticViewerObject
{
protected:
~LLVOGround();
public:
LLVOGround(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
virtual ~LLVOGround();
/*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);

View File

@ -30,8 +30,6 @@ public:
LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
~LLVOPartGroup();
/*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate.
BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
BOOL isParticle();
@ -58,6 +56,8 @@ public:
LLViewerPartGroup* getViewerPartGroup() { return mViewerPartGroupp; }
protected:
~LLVOPartGroup();
LLViewerPartGroup *mViewerPartGroupp;
LLVector3 mExtents[2];
LLColor4 mDebugColor;

View File

@ -518,8 +518,6 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
mSun.setIntensity(SUN_INTENSITY);
mMoon.setIntensity(0.1f * SUN_INTENSITY);
mCubeMap = NULL;
mSunTexturep = gImageList.getImage(gSunTextureID, TRUE, TRUE);
mSunTexturep->setClamp(TRUE, TRUE);
mMoonTexturep = gImageList.getImage(gMoonTextureID, TRUE, TRUE);
@ -534,7 +532,6 @@ LLVOSky::~LLVOSky()
// Don't delete images - it'll get deleted by gImageList on shutdown
// This needs to be done for each texture
delete mCubeMap;
mCubeMap = NULL;
}
@ -576,7 +573,7 @@ void LLVOSky::initCubeMap()
{
images.push_back(mSkyTex[side].getImageRaw());
}
if (mCubeMap != NULL)
if (mCubeMap)
{
mCubeMap->init(images);
}

View File

@ -504,7 +504,6 @@ public:
};
LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
virtual ~LLVOSky();
// Initialize/delete data that's only inited once per class.
static void initClass();
@ -667,6 +666,8 @@ public:
LLFace *mFace[FACE_COUNT];
protected:
~LLVOSky();
LLPointer<LLViewerImage> mSunTexturep;
LLPointer<LLViewerImage> mMoonTexturep;
LLPointer<LLViewerImage> mBloomTexturep;
@ -716,7 +717,7 @@ protected:
LLColor3 mMoonDiffuse;
LLColor4U mFadeColor; // Color to fade in from
LLCubeMap *mCubeMap; // Cube map for the environment
LLPointer<LLCubeMap> mCubeMap; // Cube map for the environment
S32 mDrawRefl;
LLFrameTimer mUpdateTimer;

View File

@ -30,7 +30,6 @@ public:
eVertexDataMask;
LLVOSurfacePatch(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
virtual ~LLVOSurfacePatch();
/*virtual*/ void markDead();
@ -64,6 +63,8 @@ public:
BOOL mDirtiedPatch;
protected:
~LLVOSurfacePatch();
LLFacePool *mPool;
LLFacePool *getPool();
S32 mBaseComp;

View File

@ -16,7 +16,6 @@ class LLVOTextBubble : public LLAlphaObject
{
public:
LLVOTextBubble(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
virtual ~LLVOTextBubble();
/*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate.
/*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
@ -39,7 +38,9 @@ public:
LLColor4 mColor;
S32 mLOD;
BOOL mVolumeChanged;
protected:
~LLVOTextBubble();
BOOL setVolume(const LLVolumeParams &volume_params);
LLFrameTimer mUpdateTimer;
};

View File

@ -19,6 +19,9 @@ class LLDrawPool;
class LLVOTree : public LLViewerObject
{
protected:
~LLVOTree();
public:
enum
{
@ -29,7 +32,6 @@ public:
eVertexDataMask;
LLVOTree(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
virtual ~LLVOTree();
// Initialize data that's only inited once per class.
static void initClass();

View File

@ -49,6 +49,9 @@ public:
// Class which embodies all Volume objects (with pcode LL_PCODE_VOLUME)
class LLVOVolume : public LLViewerObject
{
protected:
virtual ~LLVOVolume();
public:
static void initClass();
static void preUpdateGeom();
@ -65,7 +68,6 @@ public:
public:
LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
virtual ~LLVOVolume();
/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);

View File

@ -36,7 +36,6 @@ public:
eVertexDataMask;
LLVOWater(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
virtual ~LLVOWater() {}
/*virtual*/ void markDead();

View File

@ -154,7 +154,6 @@ BOOL LLPipeline::sRenderGlow = FALSE;
LLPipeline::LLPipeline() :
mScreenTex(0),
mCubeBuffer(NULL),
mGlowMap(0),
mGlowBuffer(0),
mVertexShadersEnabled(FALSE),
@ -352,7 +351,6 @@ void LLPipeline::releaseGLBuffers()
if (mCubeBuffer)
{
delete mCubeBuffer;
mCubeBuffer = NULL;
}

View File

@ -343,7 +343,7 @@ public:
GLuint mFramebuffer[2];
//dynamic cube map scratch space
LLCubeMap* mCubeBuffer;
LLPointer<LLCubeMap> mCubeBuffer;
//frambuffer object for rendering dynamic cube maps
GLuint mCubeFrameBuffer;

View File

@ -0,0 +1,175 @@
# @file secondlife-i686.supp
# @brief Valgrind suppressions for Linux i686 viewer.
#
# Copyright (c) 2000-$CurrentYear$, Linden Research, Inc.
# $License$
#
# This is a Valgrind suppression file for use on the viewer.
#
# Hints for most successful use of valgrind:
#
# - If your distro comes with library packages that contain debug info
# (Fedora calls these debuginfo packages), install them.
# - Inside the SConstruct script, disable linking against tcmalloc.
# Valgrind and tcmalloc don't get along.
# - Delete the copy of libstdc++.so.6 that is bundled with the viewer
# (if you have one), so that the viewer will use the system's
# libstdc++.
# - After you build the viewer, replace the stripped
# do-not-directly-run-secondlife-bin binary with an unstripped copy.
# Mozilla noise.
{
Cond:mozilla-runtime/*.so
Memcheck:Cond
obj:*/mozilla-runtime-*/*.so
}
{
Value4:mozilla-runtime/*.so
Memcheck:Value4
obj:*/mozilla-runtime-*/*.so
}
{
Cond:mozilla-runtime/*/*.so
Memcheck:Cond
obj:*/mozilla-runtime-*/*/*.so
}
{
Value4:mozilla-runtime/*/*.so
Memcheck:Value4
obj:*/mozilla-runtime-*/*/*.so
}
{
Cond:mozilla-runtime/libmozjs.so
Memcheck:Cond
obj:*/libmozjs.so
}
{
Cond:mozilla-runtime/libxul
Memcheck:Cond
obj:*/libxul.so
}
{
Value4:mozilla-runtime/libxul
Memcheck:Value4
obj:*/libxul.so
}
# libcurl badness.
{
Cond:libcurl/inflate/Curl_unencode_gzip_write
Memcheck:Cond
fun:inflate
fun:inflate_stream
fun:Curl_unencode_gzip_write
}
{
Cond:libcurl/ares_mkquery/Curl_getaddrinfo
Memcheck:Cond
fun:ares_mkquery
fun:ares_query
fun:ares_search
fun:next_lookup
fun:Curl_getaddrinfo
}
# libdl business.
{
Cond:libdl/_dl_relocate_object
Memcheck:Cond
fun:_dl_relocate_object
}
# X11 fun.
{
Param:X11/_X11TransSocketWritev/writev/vector
Memcheck:Param
writev(vector[...])
fun:writev
fun:_X11TransSocketWritev
}
{
Param:X11/_X11TransWrite/write/buf
Memcheck:Param
write(buf)
obj:/lib/libc-2.6.so
fun:_X11TransWrite
}
# OpenSSL stuff.
{
Value4:libcrypto
Memcheck:Value4
obj:*/libcrypto.so.0.9*
}
{
Cond:libcrypto
Memcheck:Cond
obj:*/libcrypto.so.0.9*
}
{
Value4:libssl
Memcheck:Value4
obj:*/libssl.so.0.9*
}
{
Cond:libcrypto
Memcheck:Cond
obj:*/libssl.so.0.9*
}
# NVIDIA driver brokenness.
{
Addr4:NVIDIA/libGL
Memcheck:Addr4
obj:/usr/lib/libGL.so.1.0.*
}
{
Value4:NVIDIA/libGL
Memcheck:Value4
obj:/usr/lib/libGL.so.1.0.*
}
{
Cond:NVIDIA/libGL
Memcheck:Cond
obj:/usr/lib/libGL.so.1.0.*
}
{
Value4:NVIDIA/libGLcore
Memcheck:Value4
obj:/usr/lib/libGLcore.so.1.0.*
}
{
Cond:NVIDIA/libGLcore
Memcheck:Cond
obj:/usr/lib/libGLcore.so.1.0.*
}
{
Param:NVIDIA/ioctl
Memcheck:Param
ioctl(generic)
fun:ioctl
fun:_nv000130gl
}

View File

@ -391,6 +391,7 @@ class Linux_i686Manifest(LinuxManifest):
self.end_prefix("res-sdl")
self.path("featuretable_linux.txt")
self.path("secondlife-i686.supp")
self.path("app_settings/mozilla-runtime-linux-i686")