From 5cb5c267caed96b23e1c6c7b8d3c04aaefe84c6a Mon Sep 17 00:00:00 2001 From: JJ Linden Date: Mon, 13 Oct 2014 12:46:55 -0700 Subject: fixes for cmake warnings about policy changes. could not fully test these changes --- indra/newview/CMakeLists.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e8f4144e70..9899dac439 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2039,10 +2039,10 @@ if (LINUX) add_custom_target(copy_l_viewer_manifest ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.copy_touched) if (PACKAGE) - add_custom_target(package ALL DEPENDS ${product}.tar.bz2) + add_custom_target(llpackage ALL DEPENDS ${product}.tar.bz2) # Make sure we don't run two instances of viewer_manifest.py at the same time. - add_dependencies(package copy_l_viewer_manifest) - check_message_template(package) + add_dependencies(llpackage copy_l_viewer_manifest) + check_message_template(llpackage) endif (PACKAGE) endif (LINUX) @@ -2104,11 +2104,11 @@ if (DARWIN) endif (ENABLE_SIGNING) if (PACKAGE) - add_custom_target(package ALL DEPENDS ${VIEWER_BINARY_NAME}) - add_dependencies(package generate_viewer_version) + add_custom_target(llpackage ALL DEPENDS ${VIEWER_BINARY_NAME}) + add_dependencies(llpackage generate_viewer_version) add_custom_command( - TARGET package POST_BUILD + TARGET llpackage POST_BUILD COMMAND ${PYTHON_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2190,7 +2190,7 @@ if (PACKAGE) add_custom_target(generate_breakpad_symbols DEPENDS "${VIEWER_SYMBOL_FILE}") add_dependencies(generate_breakpad_symbols "${VIEWER_BINARY_NAME}" "${VIEWER_COPY_MANIFEST}") - add_dependencies(package generate_breakpad_symbols) + add_dependencies(llpackage generate_breakpad_symbols) endif(RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) endif (PACKAGE) -- cgit v1.2.3 From 3920d946c6ef0259d113801fb48f1bc176516fee Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 14 Oct 2014 16:44:29 -0400 Subject: Introduce fast_exit() wrapper for _exit() so we can boost::bind() it. --- indra/newview/llappviewer.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 3a5008507a..b44f54f59c 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -745,6 +745,15 @@ public: } }; +namespace { +// With Xcode 6, _exit() is too magical to use with boost::bind(), so provide +// this little helper function. +void fast_exit(int rc) +{ + _exit(rc); +} +} + bool LLAppViewer::init() { setupErrorHandling(mSecondInstance); @@ -801,10 +810,10 @@ bool LLAppViewer::init() S32 rc(gSavedSettings.getS32("QAModeTermCode")); if (rc >= 0) { - // QAModeTermCode set, terminate with that rc on LL_ERRS. Use _exit() - // rather than exit() because normal cleanup depends too much on - // successful startup! - LLError::setFatalFunction(boost::bind(_exit, rc)); + // QAModeTermCode set, terminate with that rc on LL_ERRS. Use + // fast_exit() rather than exit() because normal cleanup depends too + // much on successful startup! + LLError::setFatalFunction(boost::bind(fast_exit, rc)); } mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling")); -- cgit v1.2.3 From 327a99a8a868312ded565b53cba2e3c49ecdca12 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sat, 18 Oct 2014 11:25:07 -0700 Subject: Update to build on Xcode 6.0: more removal of unused variables and functions --- indra/newview/llagent.cpp | 2 -- indra/newview/llagent.h | 3 +-- indra/newview/llagentcamera.cpp | 2 -- indra/newview/llappviewermacosx.cpp | 11 +---------- indra/newview/llassetuploadresponders.cpp | 3 --- 5 files changed, 2 insertions(+), 19 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index e5a90e8a28..38c398374a 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2260,8 +2260,6 @@ void LLAgent::heardChat(const LLUUID& id) mChatTimer.reset(); } -const F32 SIT_POINT_EXTENTS = 0.2f; - LLSD ll_sdmap_from_vector3(const LLVector3& vec) { LLSD ret; diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index a2e9cedd88..56bd1428ce 100755 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -787,8 +787,7 @@ public: private: BOOL mShowAvatar; // Should we render the avatar? - U32 mAppearanceSerialNum; - + //-------------------------------------------------------------------- // Rendering state bitmap helpers //-------------------------------------------------------------------- diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 2356a84688..291dffa210 100755 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -885,7 +885,6 @@ void LLAgentCamera::cameraZoomIn(const F32 fraction) } - LLVector3d camera_offset(mCameraFocusOffsetTarget); LLVector3d camera_offset_unit(mCameraFocusOffsetTarget); F32 min_zoom = LAND_MIN_ZOOM; F32 current_distance = (F32)camera_offset_unit.normalize(); @@ -957,7 +956,6 @@ void LLAgentCamera::cameraOrbitIn(const F32 meters) } else { - LLVector3d camera_offset(mCameraFocusOffsetTarget); LLVector3d camera_offset_unit(mCameraFocusOffsetTarget); F32 current_distance = (F32)camera_offset_unit.normalize(); F32 new_distance = current_distance - meters; diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index c792eb8813..56154a2de3 100755 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -63,16 +63,7 @@ namespace int gArgC; char** gArgV; LLAppViewerMacOSX* gViewerAppPtr; -#ifdef LL_CARBON_CRASH_HANDLER - OSErr AEQuitHandler(const AppleEvent *messagein, AppleEvent *reply, long refIn) - { - OSErr result = noErr; - - LLAppViewer::instance()->userQuit(); - - return(result); - } -#endif + void (*gOldTerminateHandler)() = NULL; } diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index a98ff64d0a..e5c2d212fe 100755 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -63,9 +63,6 @@ #include "llsdutil.h" #include "llvfs.h" -// When uploading multiple files, don't display any of them when uploading more than this number. -static const S32 FILE_COUNT_DISPLAY_THRESHOLD = 5; - void dialog_refresh_all(); void on_new_single_inventory_upload_complete( -- cgit v1.2.3 From 91eab4a9ea0cda8ccff52987d76af285cf4d18ce Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sat, 18 Oct 2014 11:34:53 -0700 Subject: Update to build on Xcode 6.0: fix member initializer 'mAppearanceSerialNum' does not name a non-static data member or base class - already initialized in parent class llCharacter --- indra/newview/llagent.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 38c398374a..cd01ea1868 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -408,10 +408,8 @@ LLAgent::LLAgent() : mCurrentFidget(0), mFirstLogin(FALSE), mOutfitChosen(FALSE), - - mVoiceConnected(false), - mAppearanceSerialNum(0), + mVoiceConnected(false), mMouselookModeInSignal(NULL), mMouselookModeOutSignal(NULL) -- cgit v1.2.3 From f81394a544bbdec94d49bd0b056a0345e54ab6a3 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sat, 18 Oct 2014 11:37:14 -0700 Subject: Update to build on Xcode 6.0: fix 'using the result of an expression as a conditional without parentheses --- indra/newview/llappearancemgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 29534a4382..b3b8a40d39 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3752,7 +3752,7 @@ bool LLAppearanceMgr::moveWearable(LLViewerInventoryItem* item, bool closer_to_b //to cause appearance of the agent to be updated bool result = false; - if (result = gAgentWearables.moveWearable(item, closer_to_body)) + if ((result = gAgentWearables.moveWearable(item, closer_to_body))) { gAgentAvatarp->wearableUpdated(item->getWearableType()); } -- cgit v1.2.3 From ae54e5160ebe0cae5cdde49368f043ab8aded0a0 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sat, 18 Oct 2014 11:39:21 -0700 Subject: Update to build on Xcode 6.0: remove unused variables and functions --- indra/newview/llblocklist.h | 1 - indra/newview/llchicletbar.cpp | 10 ---------- 2 files changed, 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llblocklist.h b/indra/newview/llblocklist.h index bac79f869e..0f7fa41c32 100755 --- a/indra/newview/llblocklist.h +++ b/indra/newview/llblocklist.h @@ -83,7 +83,6 @@ private: LLHandle mContextMenu; - LLBlockedListItem* mSelectedItem; std::string mNameFilter; bool mDirty; bool mShouldAddAll; diff --git a/indra/newview/llchicletbar.cpp b/indra/newview/llchicletbar.cpp index 28e367fbe1..d8b04f7004 100755 --- a/indra/newview/llchicletbar.cpp +++ b/indra/newview/llchicletbar.cpp @@ -35,16 +35,6 @@ namespace { const std::string& PANEL_CHICLET_NAME = "chiclet_list_panel"; - - S32 get_curr_width(LLUICtrl* ctrl) - { - S32 cur_width = 0; - if ( ctrl && ctrl->getVisible() ) - { - cur_width = ctrl->getRect().getWidth(); - } - return cur_width; - } } LLChicletBar::LLChicletBar(const LLSD&) -- cgit v1.2.3 From 09c288ba5e9b5234bbb0bc087f628f0d83eb5aa0 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sat, 18 Oct 2014 11:41:34 -0700 Subject: Update to build on Xcode 6.0: clang fix for bracketed logical operations --- indra/newview/llcommunicationchannel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llcommunicationchannel.cpp b/indra/newview/llcommunicationchannel.cpp index 0821510645..627c9eb5c0 100755 --- a/indra/newview/llcommunicationchannel.cpp +++ b/indra/newview/llcommunicationchannel.cpp @@ -103,9 +103,9 @@ void LLCommunicationChannel::onDelete(LLNotificationPtr p) void LLCommunicationChannel::onFilterFail(LLNotificationPtr pNotificationPtr) { std::string notificationType = pNotificationPtr->getType(); - if ((notificationType == "groupnotify") + if (((notificationType == "groupnotify") || (notificationType == "offer") - || (notificationType == "notifytoast") + || (notificationType == "notifytoast")) && !pNotificationPtr->isCancelled()) { mHistory.insert(std::make_pair(pNotificationPtr->getDate(), pNotificationPtr)); -- cgit v1.2.3 From d4fa954517d253f7531da8b00bba2ff105678980 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sat, 18 Oct 2014 11:44:18 -0700 Subject: Update to build on Xcode 6.0: fix member initializer 'mSelectedItem' does not name a non-static data member or base class - already initialized in parent class --- indra/newview/llblocklist.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llblocklist.cpp b/indra/newview/llblocklist.cpp index 1c68fabf8b..272a68bdf7 100755 --- a/indra/newview/llblocklist.cpp +++ b/indra/newview/llblocklist.cpp @@ -40,7 +40,6 @@ static const LLBlockListNameTypeComparator NAME_TYPE_COMPARATOR; LLBlockList::LLBlockList(const Params& p) : LLFlatListViewEx(p), - mSelectedItem(NULL), mDirty(true), mShouldAddAll(true), mActionType(NONE), -- cgit v1.2.3 From 2b93f505a03a2d0662c97cb6466ac0aae2187571 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sat, 18 Oct 2014 11:45:05 -0700 Subject: Update to build on Xcode 6.0: private field isMuted is not used --- indra/newview/llconversationmodel.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 56e1a26709..deff94ea16 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -213,7 +213,6 @@ private: void onAvatarNameCache(const LLAvatarName& av_name); // callback used by fetchAvatarName void updateName(const LLAvatarName& av_name); - bool mIsMuted; // default is false bool mIsModerator; // default is false bool mDisplayModeratorLabel; // default is false std::string mDisplayName; -- cgit v1.2.3 From bdce32a02b34e42ab2f145af5f8beb54f4e2b534 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sat, 18 Oct 2014 11:56:23 -0700 Subject: Update to build on Xcode 6.0: collection of removal of unused variables [-Wunused-variable] --- indra/newview/lldrawable.cpp | 1 - indra/newview/lldrawpoolavatar.cpp | 2 -- indra/newview/llfasttimerview.cpp | 1 - indra/newview/llfilepicker.h | 2 -- indra/newview/llfloaterbuyland.cpp | 3 --- indra/newview/llfloatercamera.cpp | 4 +--- indra/newview/llfloaterfacebook.cpp | 1 - indra/newview/llfloaterflickr.cpp | 1 - indra/newview/llfloatergodtools.cpp | 8 -------- indra/newview/llfloatermap.cpp | 5 +---- 10 files changed, 2 insertions(+), 26 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index c56006d9a3..7c96c71e21 100755 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -54,7 +54,6 @@ const F32 MIN_INTERPOLATE_DISTANCE_SQUARED = 0.001f * 0.001f; const F32 MAX_INTERPOLATE_DISTANCE_SQUARED = 10.f * 10.f; const F32 OBJECT_DAMPING_TIME_CONSTANT = 0.06f; -const F32 MIN_SHADOW_CASTER_RADIUS = 2.0f; static LLTrace::BlockTimerStatHandle FTM_CULL_REBOUND("Cull Rebound"); diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 90e6dfe351..393bd70382 100755 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -71,8 +71,6 @@ extern BOOL gUseGLPick; F32 CLOTHING_GRAVITY_EFFECT = 0.7f; F32 CLOTHING_ACCEL_FORCE_FACTOR = 0.2f; -const S32 NUM_TEST_AVATARS = 30; -const S32 MIN_PIXEL_AREA_2_PASS_SKINNING = 500000000; // Format for gAGPVertices // vertex format for bumpmapping: diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 76c37439ab..b618bdff2c 100755 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -361,7 +361,6 @@ BOOL LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks) static BlockTimerStatHandle FTM_RENDER_TIMER("Timers"); static const S32 MARGIN = 10; -static const S32 LEGEND_WIDTH = 220; static std::vector sTimerColors; diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h index 0e0cec3943..b6e67375cd 100755 --- a/indra/newview/llfilepicker.h +++ b/indra/newview/llfilepicker.h @@ -164,11 +164,9 @@ private: #if LL_DARWIN S32 mPickOptions; std::vector mFileVector; - UInt32 mFileIndex; bool doNavChooseDialog(ELoadFilter filter); bool doNavSaveDialog(ESaveFilter filter, const std::string& filename); - //static Boolean navOpenFilterProc(AEDesc *theItem, void *info, void *callBackUD, NavFilterModes filterMode); std::vector* navOpenFilterProc(ELoadFilter filter); #endif diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index 060c091737..8d4868d0d3 100755 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -65,9 +65,6 @@ // NOTE: This is duplicated in lldatamoney.cpp ... const F32 GROUP_LAND_BONUS_FACTOR = 1.1f; -const F64 CURRENCY_ESTIMATE_FREQUENCY = 0.5; - // how long of a pause in typing a currency buy amount before an - // estimate is fetched from the server class LLFloaterBuyLandUI : public LLFloater diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index d0939b3eee..6a82b8c74c 100755 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -47,9 +47,7 @@ static LLDefaultChildRegistry::Register r("panel_camera_item" const F32 NUDGE_TIME = 0.25f; // in seconds const F32 ORBIT_NUDGE_RATE = 0.05f; // fraction of normal speed -// Constants -const F32 CAMERA_BUTTON_DELAY = 0.0f; - +// constants #define ORBIT "cam_rotate_stick" #define PAN "cam_track_stick" #define ZOOM "zoom" diff --git a/indra/newview/llfloaterfacebook.cpp b/indra/newview/llfloaterfacebook.cpp index 6888e076aa..3a2047cfef 100644 --- a/indra/newview/llfloaterfacebook.cpp +++ b/indra/newview/llfloaterfacebook.cpp @@ -59,7 +59,6 @@ static LLPanelInjector t_panel_photo("llfacebookphotopanel static LLPanelInjector t_panel_checkin("llfacebookcheckinpanel"); static LLPanelInjector t_panel_friends("llfacebookfriendspanel"); -const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte const std::string DEFAULT_CHECKIN_LOCATION_URL = "http://maps.secondlife.com/"; const std::string DEFAULT_CHECKIN_ICON_URL = "http://map.secondlife.com.s3.amazonaws.com/map_placeholder.png"; const std::string DEFAULT_CHECKIN_QUERY_PARAMETERS = "?sourceid=slshare_checkin&utm_source=facebook&utm_medium=checkin&utm_campaign=slshare"; diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp index 36afab86b7..51352e083a 100644 --- a/indra/newview/llfloaterflickr.cpp +++ b/indra/newview/llfloaterflickr.cpp @@ -55,7 +55,6 @@ static LLPanelInjector t_panel_photo("llflickrphotopanel"); static LLPanelInjector t_panel_account("llflickraccountpanel"); -const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_source=flickr&utm_medium=photo&utm_campaign=slshare"; const std::string DEFAULT_TAG_TEXT = "secondlife "; const std::string FLICKR_MACHINE_TAGS_NAMESPACE = "secondlife"; diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp index 6966ca5639..37774fbc5c 100755 --- a/indra/newview/llfloatergodtools.cpp +++ b/indra/newview/llfloatergodtools.cpp @@ -401,14 +401,9 @@ void LLFloaterGodTools::sendGodUpdateRegionInfo() // Floats because spinners only support floats. JC const F32 BILLABLE_FACTOR_DEFAULT = 1; -const F32 BILLABLE_FACTOR_MIN = 0.0f; -const F32 BILLABLE_FACTOR_MAX = 4.f; // floats because spinners only understand floats. JC const F32 PRICE_PER_METER_DEFAULT = 1.f; -const F32 PRICE_PER_METER_MIN = 0.f; -const F32 PRICE_PER_METER_MAX = 100.f; - LLPanelRegionTools::LLPanelRegionTools() : LLPanel() @@ -833,9 +828,6 @@ void LLPanelRegionTools::onSelectRegion() // ^ ^ ^ // LEFT R2 RIGHT -const F32 HOURS_TO_RADIANS = (2.f*F_PI)/24.f; - - LLPanelGridTools::LLPanelGridTools() : LLPanel() { diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index 473e2938be..bf5210206f 100755 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -52,10 +52,7 @@ // The minor cardinal direction labels are hidden if their height is more // than this proportion of the map. const F32 MAP_MINOR_DIR_THRESHOLD = 0.07f; -const S32 MAP_PADDING_LEFT = 0; -const S32 MAP_PADDING_TOP = 2; -const S32 MAP_PADDING_RIGHT = 2; -const S32 MAP_PADDING_BOTTOM = 0; + // // Member functions // -- cgit v1.2.3 From 24f035a7b76b22d83493d1e628251b424abc969a Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sat, 18 Oct 2014 12:02:16 -0700 Subject: Update to build on Xcode 6.0: clang fix for bracketed logical operations --- indra/newview/llfloaterimsession.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index 9def253ba5..fc7fcf3ab9 100755 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -396,7 +396,7 @@ bool LLFloaterIMSession::canAddSelectedToChat(const uuid_vec_t& uuids) { if (!mSession || mDialog == IM_SESSION_GROUP_START - || mDialog == IM_SESSION_INVITE && gAgent.isInGroup(mSessionID)) + || (mDialog == IM_SESSION_INVITE && gAgent.isInGroup(mSessionID))) { return false; } @@ -779,7 +779,7 @@ bool LLFloaterIMSession::toggle(const LLUUID& session_id) floater->setVisible(false); return false; } - else if(floater && (!floater->isDocked() || floater->getVisible() && !floater->hasFocus())) + else if(floater && ((!floater->isDocked() || floater->getVisible()) && !floater->hasFocus())) { floater->setVisible(TRUE); floater->setFocus(TRUE); -- cgit v1.2.3 From 51ed4c977a637063e63c8a3e447a2f7506d2b382 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sat, 18 Oct 2014 12:14:33 -0700 Subject: Update to build on Xcode 6.0: remove lots of unused variables --- indra/newview/llfloatermediasettings.h | 1 - indra/newview/llfloatermodelpreview.cpp | 6 ------ indra/newview/llfloaternamedesc.cpp | 5 ----- indra/newview/llfloaterpay.cpp | 1 - indra/newview/llfloaterpreference.cpp | 4 ---- indra/newview/llfloaterreporter.cpp | 2 -- indra/newview/llfloaterscriptlimits.h | 26 +++++--------------------- 7 files changed, 5 insertions(+), 40 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermediasettings.h b/indra/newview/llfloatermediasettings.h index 1d25530986..f93512eb3a 100755 --- a/indra/newview/llfloatermediasettings.h +++ b/indra/newview/llfloatermediasettings.h @@ -83,7 +83,6 @@ private: bool haveValuesChanged() const; LLSD mInitialValues; - bool mWaitingToClose; }; #endif // LL_LLFLOATERMEDIASETTINGS_H diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index b17ce97a2e..ab702c3645 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -121,12 +121,6 @@ S32 LLFloaterModelPreview::sUploadAmount = 10; LLFloaterModelPreview* LLFloaterModelPreview::sInstance = NULL; std::list LLModelLoader::sActiveLoaderList; -const S32 PREVIEW_BORDER_WIDTH = 2; -const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH; -const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE; -const S32 PREF_BUTTON_HEIGHT = 16 + 7 + 16; -const S32 PREVIEW_TEXTURE_HEIGHT = 300; - // "Retain%" decomp parameter has values from 0.0 to 1.0 by 0.01 // But according to the UI spec for upload model floater, this parameter // should be represented by Retain spinner with values from 1 to 100 by 1. diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index ee7f413a59..0cca715fe2 100755 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -52,14 +52,9 @@ #include "llinventorytype.h" const S32 PREVIEW_LINE_HEIGHT = 19; -const S32 PREVIEW_CLOSE_BOX_SIZE = 16; const S32 PREVIEW_BORDER_WIDTH = 2; const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH; -const S32 PREVIEW_VPAD = 2; const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE; -const S32 PREVIEW_HEADER_SIZE = 3 * PREVIEW_LINE_HEIGHT + PREVIEW_VPAD; -const S32 PREF_BUTTON_WIDTH = 64; -const S32 PREF_BUTTON_HEIGHT = 16; //----------------------------------------------------------------------------- // LLFloaterNameDesc() diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index f0c010b545..099a8828a4 100755 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -117,7 +117,6 @@ protected: S32 LLFloaterPay::sLastAmount = 0; -const S32 MAX_AMOUNT_LENGTH = 10; const S32 FASTPAY_BUTTON_WIDTH = 80; LLFloaterPay::LLFloaterPay(const LLSD& key) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index d3773767d0..1596861417 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -109,13 +109,9 @@ #include "lllogininstance.h" // to check if logged in yet #include "llsdserialize.h" -const F32 MAX_USER_FAR_CLIP = 512.f; -const F32 MIN_USER_FAR_CLIP = 64.f; const F32 BANDWIDTH_UPDATER_TIMEOUT = 0.5f; char const* const VISIBILITY_DEFAULT = "default"; char const* const VISIBILITY_HIDDEN = "hidden"; -char const* const VISIBILITY_VISIBLE = "visible"; -char const* const VISIBILITY_INVISIBLE = "invisible"; //control value for middle mouse as talk2push button const static std::string MIDDLE_MOUSE_CV = "MiddleMouse"; diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index a3b9713e3e..ae330211db 100755 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -82,8 +82,6 @@ #include "lltrans.h" -const U32 INCLUDE_SCREENSHOT = 0x01 << 0; - //----------------------------------------------------------------------------- // Globals //----------------------------------------------------------------------------- diff --git a/indra/newview/llfloaterscriptlimits.h b/indra/newview/llfloaterscriptlimits.h index a5cb1b6184..5ba0185d32 100755 --- a/indra/newview/llfloaterscriptlimits.h +++ b/indra/newview/llfloaterscriptlimits.h @@ -170,21 +170,17 @@ private: LLSD mContent; LLUUID mParcelId; bool mGotParcelMemoryUsed; - bool mGotParcelMemoryUsedDetails; bool mGotParcelMemoryMax; S32 mParcelMemoryMax; S32 mParcelMemoryUsed; - S32 mParcelMemoryUsedDetails; - + bool mGotParcelURLsUsed; - bool mGotParcelURLsUsedDetails; bool mGotParcelURLsMax; S32 mParcelURLsMax; S32 mParcelURLsUsed; - S32 mParcelURLsUsedDetails; - + std::vector mObjectListItems; - + protected: // LLRemoteParcelInfoObserver interface: @@ -208,17 +204,11 @@ public: LLPanelScriptLimitsAttachment() : LLPanelScriptLimitsInfo(), mGotAttachmentMemoryUsed(false), - mGotAttachmentMemoryUsedDetails(false), - mGotAttachmentMemoryMax(false), mAttachmentMemoryMax(0), mAttachmentMemoryUsed(0), - mAttachmentMemoryUsedDetails(0), mGotAttachmentURLsUsed(false), - mGotAttachmentURLsUsedDetails(false), - mGotAttachmentURLsMax(false), mAttachmentURLsMax(0), - mAttachmentURLsUsed(0), - mAttachmentURLsUsedDetails(0) + mAttachmentURLsUsed(0) {}; ~LLPanelScriptLimitsAttachment() @@ -237,18 +227,12 @@ public: private: bool mGotAttachmentMemoryUsed; - bool mGotAttachmentMemoryUsedDetails; - bool mGotAttachmentMemoryMax; S32 mAttachmentMemoryMax; S32 mAttachmentMemoryUsed; - S32 mAttachmentMemoryUsedDetails; - + bool mGotAttachmentURLsUsed; - bool mGotAttachmentURLsUsedDetails; - bool mGotAttachmentURLsMax; S32 mAttachmentURLsMax; S32 mAttachmentURLsUsed; - S32 mAttachmentURLsUsedDetails; protected: -- cgit v1.2.3 From 15e94f8ff2b73c33504dddf8b1c19250215ca9df Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sat, 18 Oct 2014 12:19:01 -0700 Subject: Update to build on Xcode 6.0: remove more of unused variables --- indra/newview/llfloatertos.cpp | 1 - indra/newview/llfloatertos.h | 1 - indra/newview/llfloatertwitter.cpp | 1 - 3 files changed, 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index 0613ffc94d..c1c21c593e 100755 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -50,7 +50,6 @@ LLFloaterTOS::LLFloaterTOS(const LLSD& data) : LLModalDialog( data["message"].asString() ), mMessage(data["message"].asString()), - mWebBrowserWindowId( 0 ), mLoadingScreenLoaded(false), mSiteAlive(false), mRealNavigateBegun(false), diff --git a/indra/newview/llfloatertos.h b/indra/newview/llfloatertos.h index 8921d11489..47126d06a6 100755 --- a/indra/newview/llfloatertos.h +++ b/indra/newview/llfloatertos.h @@ -62,7 +62,6 @@ public: private: std::string mMessage; - int mWebBrowserWindowId; bool mLoadingScreenLoaded; bool mSiteAlive; bool mRealNavigateBegun; diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp index 868d623d57..c48b1a3325 100644 --- a/indra/newview/llfloatertwitter.cpp +++ b/indra/newview/llfloatertwitter.cpp @@ -54,7 +54,6 @@ static LLPanelInjector t_panel_photo("lltwitterphotopanel"); static LLPanelInjector t_panel_account("lltwitteraccountpanel"); -const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte const std::string DEFAULT_PHOTO_LOCATION_URL = "http://maps.secondlife.com/"; const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_source=twitter&utm_medium=photo&utm_campaign=slshare"; const std::string DEFAULT_STATUS_TEXT = " #SecondLife"; -- cgit v1.2.3 From ac7710bf11f7d33625dfffa9d644662138134c34 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sat, 18 Oct 2014 12:21:28 -0700 Subject: Update to build on Xcode 6.0: fix member initializer 'mWaitingToClose' does not name a non-static data member or base class --- indra/newview/llfloatermediasettings.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp index 4f2a6ec1b7..4fd5c0587a 100755 --- a/indra/newview/llfloatermediasettings.cpp +++ b/indra/newview/llfloatermediasettings.cpp @@ -47,7 +47,6 @@ LLFloaterMediaSettings::LLFloaterMediaSettings(const LLSD& key) mPanelMediaSettingsGeneral(NULL), mPanelMediaSettingsSecurity(NULL), mPanelMediaSettingsPermissions(NULL), - mWaitingToClose( false ), mIdenticalHasMediaInfo( true ), mMultipleMedia(false), mMultipleValidMedia(false) -- cgit v1.2.3 From 8a6c5b48e30ed0a3502868c90048ce7ef9f73ce0 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sat, 18 Oct 2014 12:23:15 -0700 Subject: Update to build on Xcode 6.0: remove unused member variable --- indra/newview/llfloateruipreview.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index bfc36a6bfb..76ad2146f1 100755 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -180,7 +180,6 @@ private: LLButton* mToggleOverlapButton; // button to togle overlap panel/highlighting LLComboBox* mLanguageSelection; // combo box for primary language selection LLComboBox* mLanguageSelection_2; // combo box for secondary language selection - LLScrollContainer* mOverlapScrollView; // overlapping elements scroll container S32 mLastDisplayedX, mLastDisplayedY; // stored position of last floater so the new one opens up in the same place std::string mDelim; // the OS-specific delimiter character (/ or \) (*TODO: this shouldn't be needed, right?) -- cgit v1.2.3 From 3f19fd2fd2e2b7a536a782dae665f6d02ca86677 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sat, 18 Oct 2014 12:43:30 -0700 Subject: Update to build on Xcode 6.0: initialization needs a default constructor --- indra/newview/llgrouplist.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index b1b7a87ae8..ef238cefe3 100755 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -50,6 +50,8 @@ S32 LLGroupListItem::sIconWidth = 0; class LLGroupComparator : public LLFlatListView::ItemComparator { public: + LLGroupComparator() {}; + /** Returns true if item1 < item2, false otherwise */ /*virtual*/ bool compare(const LLPanel* item1, const LLPanel* item2) const { -- cgit v1.2.3 From e75752c8c0ea655efc167d7b9061f88a778191d0 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sat, 18 Oct 2014 13:11:03 -0700 Subject: Update to build on Xcode 6.0: remove more of unused variables --- indra/newview/llhudeffecttrail.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llhudeffecttrail.cpp b/indra/newview/llhudeffecttrail.cpp index 8771219034..fc6efdb840 100755 --- a/indra/newview/llhudeffecttrail.cpp +++ b/indra/newview/llhudeffecttrail.cpp @@ -42,13 +42,6 @@ #include "llvoavatar.h" #include "llworld.h" - -const F32 PARTICLE_SPACING = 0.01f; -const F32 MAX_SIZE = 0.025f; -const F32 START_POS_MAG = 1.f; -const F32 END_POS_MAG = 1.2f; - - LLHUDEffectSpiral::LLHUDEffectSpiral(const U8 type) : LLHUDEffect(type), mbInit(FALSE) { mKillTime = 10.f; -- cgit v1.2.3 From 685c36ef50559fcd976a71021bee3ced0b171d0a Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sun, 19 Oct 2014 15:19:44 -0700 Subject: Update to build on Xcode 6.0: assignment and comparison operator mixup --- indra/newview/llinventoryfilter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index f211acedf0..2773fbec12 100755 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -550,7 +550,7 @@ void LLInventoryFilter::setFilterSubString(const std::string& string) if (mFilterOps.mFilterTypes == FILTERTYPE_UUID) { mFilterOps.mFilterTypes &= ~FILTERTYPE_UUID; - mFilterOps.mFilterUUID == LLUUID::null; + mFilterOps.mFilterUUID = LLUUID::null; setModified(FILTER_RESTART); } -- cgit v1.2.3 From 74ac1bb4facffccd33faa531b086de051261230f Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sun, 19 Oct 2014 15:28:34 -0700 Subject: Update to build on Xcode 6.0: clang fix for bracketed logical operations --- indra/newview/llinventoryfilter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 2773fbec12..9f06c4d601 100755 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -663,13 +663,13 @@ void LLInventoryFilter::setHoursAgo(U32 hours) BOOL more_restrictive; if (FILTERDATEDIRECTION_NEWER == mFilterOps.mDateSearchDirection) { - less_restrictive = (are_date_limits_valid && ((is_increasing && mFilterOps.mHoursAgo)) || !hours); - more_restrictive = (are_date_limits_valid && (!is_increasing && hours) || is_increasing_from_zero); + less_restrictive = ((are_date_limits_valid && ((is_increasing && mFilterOps.mHoursAgo))) || !hours); + more_restrictive = ((are_date_limits_valid && (!is_increasing && hours)) || is_increasing_from_zero); } else { - less_restrictive = (are_date_limits_valid && ((is_decreasing && mFilterOps.mHoursAgo)) || !hours); - more_restrictive = (are_date_limits_valid && (!is_decreasing && hours) || is_increasing_from_zero); + less_restrictive = ((are_date_limits_valid && ((is_decreasing && mFilterOps.mHoursAgo))) || !hours); + more_restrictive = ((are_date_limits_valid && (!is_decreasing && hours)) || is_increasing_from_zero); } mFilterOps.mHoursAgo = hours; -- cgit v1.2.3 From 202a2c4daa98b959e19f1aaa99709e546e05cf30 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sun, 19 Oct 2014 15:28:52 -0700 Subject: Update to build on Xcode 6.0: remove unused const variables --- indra/newview/llhudnametag.cpp | 5 ----- indra/newview/llhudtext.cpp | 12 ------------ indra/newview/llhudview.cpp | 4 ---- indra/newview/llinventorymodelbackgroundfetch.cpp | 1 - 4 files changed, 22 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp index 31d832e524..73711196e6 100755 --- a/indra/newview/llhudnametag.cpp +++ b/indra/newview/llhudnametag.cpp @@ -52,17 +52,12 @@ const F32 SPRING_STRENGTH = 0.7f; -const F32 RESTORATION_SPRING_TIME_CONSTANT = 0.1f; const F32 HORIZONTAL_PADDING = 16.f; const F32 VERTICAL_PADDING = 12.f; const F32 LINE_PADDING = 3.f; // aka "leading" const F32 BUFFER_SIZE = 2.f; -const F32 MIN_EDGE_OVERLAP = 3.f; const F32 HUD_TEXT_MAX_WIDTH = 190.f; -const F32 HUD_TEXT_MAX_WIDTH_NO_BUBBLE = 1000.f; -const F32 RESIZE_TIME = 0.f; const S32 NUM_OVERLAP_ITERATIONS = 10; -const F32 NEIGHBOR_FORCE_FRACTION = 1.f; const F32 POSITION_DAMPING_TC = 0.2f; const F32 MAX_STABLE_CAMERA_VELOCITY = 0.1f; const F32 LOD_0_SCREEN_COVERAGE = 0.15f; diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index f648d7baae..2c204170f2 100755 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -48,23 +48,11 @@ #include "pipeline.h" #include - -const F32 SPRING_STRENGTH = 0.7f; -const F32 RESTORATION_SPRING_TIME_CONSTANT = 0.1f; const F32 HORIZONTAL_PADDING = 15.f; const F32 VERTICAL_PADDING = 12.f; const F32 BUFFER_SIZE = 2.f; -const F32 MIN_EDGE_OVERLAP = 3.f; const F32 HUD_TEXT_MAX_WIDTH = 190.f; const F32 HUD_TEXT_MAX_WIDTH_NO_BUBBLE = 1000.f; -const F32 RESIZE_TIME = 0.f; -const S32 NUM_OVERLAP_ITERATIONS = 10; -const F32 NEIGHBOR_FORCE_FRACTION = 1.f; -const F32 POSITION_DAMPING_TC = 0.2f; -const F32 MAX_STABLE_CAMERA_VELOCITY = 0.1f; -//const F32 LOD_0_SCREEN_COVERAGE = 0.15f; -//const F32 LOD_1_SCREEN_COVERAGE = 0.30f; -//const F32 LOD_2_SCREEN_COVERAGE = 0.40f; std::set > LLHUDText::sTextObjects; std::vector > LLHUDText::sVisibleTextObjects; diff --git a/indra/newview/llhudview.cpp b/indra/newview/llhudview.cpp index 9a63e99357..cead4dbce6 100755 --- a/indra/newview/llhudview.cpp +++ b/indra/newview/llhudview.cpp @@ -44,10 +44,6 @@ LLHUDView *gHUDView = NULL; -const S32 HUD_ARROW_SIZE = 32; - - - LLHUDView::LLHUDView(const LLRect& r) { buildFromFile( "panel_hud.xml"); diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 2de37b0790..9e56860c2b 100755 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -38,7 +38,6 @@ #include "llviewerregion.h" #include "llviewerwindow.h" -const F32 MAX_TIME_FOR_SINGLE_FETCH = 10.f; const S32 MAX_FETCH_RETRIES = 10; LLInventoryModelBackgroundFetch::LLInventoryModelBackgroundFetch() : -- cgit v1.2.3 From df5fbad3fce36ce57659fda202b91bcb6cdb4050 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sun, 19 Oct 2014 15:40:00 -0700 Subject: Update to build on Xcode 6.0: remove an unused const variable --- indra/newview/lllocalbitmaps.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 897ee8429a..2c2e66e08f 100755 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -74,7 +74,6 @@ bool LLLocalBitmapMgr::sNeedsRebake; static const F32 LL_LOCAL_TIMER_HEARTBEAT = 3.0; static const BOOL LL_LOCAL_USE_MIPMAPS = true; static const S32 LL_LOCAL_DISCARD_LEVEL = 0; -static const U32 LL_LOCAL_TEXLAYER_FOR_IDX = 0; static const bool LL_LOCAL_SLAM_FOR_DEBUG = true; static const bool LL_LOCAL_REPLACE_ON_DEL = true; static const S32 LL_LOCAL_UPDATE_RETRIES = 5; -- cgit v1.2.3 From 1f283b5bbbcc139bce747d81cef875f2cc1770a9 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sun, 19 Oct 2014 15:41:03 -0700 Subject: Update to build on Xcode 6.0: removal on unused variable(s) need more thought from Nat --- indra/newview/lllogininstance.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index df59283bc4..03ef11d8e5 100755 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -85,8 +85,7 @@ namespace { class ReadyToInstall; class StartingUpdaterService; class WaitingForDownload; - - LLLoginInstance & mLoginInstance; + boost::scoped_ptr mState; LLUpdaterService & mUpdaterService; @@ -145,7 +144,7 @@ namespace { virtual void exit(void); private: - MandatoryUpdateMachine & mMachine; + //MandatoryUpdateMachine & mMachine; }; @@ -193,7 +192,6 @@ std::string construct_start_string(); MandatoryUpdateMachine::MandatoryUpdateMachine(LLLoginInstance & loginInstance, LLUpdaterService & updaterService): - mLoginInstance(loginInstance), mUpdaterService(updaterService) { ; // No op. @@ -349,8 +347,8 @@ void MandatoryUpdateMachine::Error::onButtonClicked(const LLSD &, const LLSD &) //----------------------------------------------------------------------------- -MandatoryUpdateMachine::ReadyToInstall::ReadyToInstall(MandatoryUpdateMachine & machine): - mMachine(machine) +MandatoryUpdateMachine::ReadyToInstall::ReadyToInstall(MandatoryUpdateMachine & machine) //: + //mMachine(machine) { ; // No op. } -- cgit v1.2.3 From 2a5c662e46191a1af8b0f3ac919f45159bea0e79 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sun, 19 Oct 2014 17:18:05 -0700 Subject: Update to build on Xcode 6.0: initialization needs a default constructor --- indra/newview/llinventorybridge.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 833fbbadbb..2b27ff1862 100755 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -199,6 +199,7 @@ protected: class LLInventoryFolderViewModelBuilder { public: + LLInventoryFolderViewModelBuilder() {} virtual ~LLInventoryFolderViewModelBuilder() {} virtual LLInvFVBridge* createBridge(LLAssetType::EType asset_type, LLAssetType::EType actual_asset_type, @@ -653,6 +654,7 @@ public: class LLRecentInventoryBridgeBuilder : public LLInventoryFolderViewModelBuilder { public: + LLRecentInventoryBridgeBuilder() {} // Overrides FolderBridge for Recent Inventory Panel. // It use base functionality for bridges other than FolderBridge. virtual LLInvFVBridge* createBridge(LLAssetType::EType asset_type, -- cgit v1.2.3 From 2c8a685729b518bfdb4eab95c5b1a06af329c378 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sun, 19 Oct 2014 17:19:12 -0700 Subject: Update to build on Xcode 6.0: removal of an unused variable --- indra/newview/llmanipscale.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 2810941d83..84bec74a16 100755 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -229,8 +229,6 @@ void LLManipScale::render() const F32 BOX_HANDLE_BASE_SIZE = 50.0f; // box size in pixels = BOX_HANDLE_BASE_SIZE * BOX_HANDLE_BASE_FACTOR const F32 BOX_HANDLE_BASE_FACTOR = 0.2f; - LLVector3 center_agent = gAgent.getPosAgentFromGlobal(LLSelectMgr::getInstance()->getSelectionCenterGlobal()); - if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { for (S32 i = 0; i < NUM_MANIPULATORS; i++) -- cgit v1.2.3 From 81fc4e49f3b055b53d54600593e56a3d31428b66 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sun, 19 Oct 2014 17:20:04 -0700 Subject: Update to build on Xcode 6.0: removal of 2 unused variables --- indra/newview/llmaniptranslate.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index d22672bc16..cd41183601 100755 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -65,7 +65,6 @@ const S32 NUM_AXES = 3; const S32 MOUSE_DRAG_SLOP = 2; // pixels -const F32 HANDLE_HIDE_ANGLE = 0.15f; // radians const F32 SELECTED_ARROW_SCALE = 1.3f; const F32 MANIPULATOR_HOTSPOT_START = 0.2f; const F32 MANIPULATOR_HOTSPOT_END = 1.2f; -- cgit v1.2.3 From 6d9353de2aea794fc1332d7deeca87df863d253e Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sun, 19 Oct 2014 17:23:57 -0700 Subject: Update to build on Xcode 6.0: scoping fix for mediadata client --- indra/newview/llmediadataclient.cpp | 22 +++++++++++----------- indra/newview/llmediadataclient.h | 7 +++---- 2 files changed, 14 insertions(+), 15 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp index 691be13610..2fb9e60b29 100755 --- a/indra/newview/llmediadataclient.cpp +++ b/indra/newview/llmediadataclient.cpp @@ -92,7 +92,7 @@ std::ostream& operator<<(std::ostream &s, const LLMediaDataClient::request_queue std::ostream& operator<<(std::ostream &s, const LLMediaDataClient::Request &q); template -static typename T::iterator find_matching_request(T &c, const LLMediaDataClient::Request *request, LLMediaDataClient::Request::Type match_type) +typename T::iterator find_matching_request(T &c, const LLMediaDataClient::Request *request, LLMediaDataClient::Request::Type match_type) { for(typename T::iterator iter = c.begin(); iter != c.end(); ++iter) { @@ -106,7 +106,7 @@ static typename T::iterator find_matching_request(T &c, const LLMediaDataClient: } template -static typename T::iterator find_matching_request(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type) +typename T::iterator find_matching_request(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type) { for(typename T::iterator iter = c.begin(); iter != c.end(); ++iter) { @@ -123,7 +123,7 @@ static typename T::iterator find_matching_request(T &c, const LLUUID &id, LLMedi // to other elements in the container (such as std::vector). // If the implementation is changed to use a container with this property, this will need to be revisited. template -static void remove_matching_requests(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type) +void remove_matching_requests(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type) { for(typename T::iterator iter = c.begin(); iter != c.end();) { @@ -171,10 +171,10 @@ bool LLMediaDataClient::isEmpty() const bool LLMediaDataClient::isInQueue(const LLMediaDataClientObject::ptr_t &object) { - if(find_matching_request(mQueue, object->getID()) != mQueue.end()) + if(find_matching_request(mQueue, object->getID(), LLMediaDataClient::Request::ANY) != mQueue.end()) return true; - if(find_matching_request(mUnQueuedRequests, object->getID()) != mUnQueuedRequests.end()) + if(find_matching_request(mUnQueuedRequests, object->getID(), LLMediaDataClient::Request::ANY) != mUnQueuedRequests.end()) return true; return false; @@ -183,8 +183,8 @@ bool LLMediaDataClient::isInQueue(const LLMediaDataClientObject::ptr_t &object) void LLMediaDataClient::removeFromQueue(const LLMediaDataClientObject::ptr_t &object) { LL_DEBUGS("LLMediaDataClient") << "removing requests matching ID " << object->getID() << LL_ENDL; - remove_matching_requests(mQueue, object->getID()); - remove_matching_requests(mUnQueuedRequests, object->getID()); + remove_matching_requests(mQueue, object->getID(), LLMediaDataClient::Request::ANY); + remove_matching_requests(mUnQueuedRequests, object->getID(), LLMediaDataClient::Request::ANY); } void LLMediaDataClient::startQueueTimer() @@ -785,7 +785,7 @@ bool LLObjectMediaDataClient::isInQueue(const LLMediaDataClientObject::ptr_t &ob if(LLMediaDataClient::isInQueue(object)) return true; - if(find_matching_request(mRoundRobinQueue, object->getID()) != mRoundRobinQueue.end()) + if(find_matching_request(mRoundRobinQueue, object->getID(), LLMediaDataClient::Request::ANY) != mRoundRobinQueue.end()) return true; return false; @@ -796,7 +796,7 @@ void LLObjectMediaDataClient::removeFromQueue(const LLMediaDataClientObject::ptr // First, call parent impl. LLMediaDataClient::removeFromQueue(object); - remove_matching_requests(mRoundRobinQueue, object->getID()); + remove_matching_requests(mRoundRobinQueue, object->getID(), LLMediaDataClient::Request::ANY); } bool LLObjectMediaDataClient::processQueueTimer() @@ -952,7 +952,7 @@ void LLObjectMediaNavigateClient::enqueue(Request *request) } // If there's already a matching request in the queue, remove it. - request_queue_t::iterator iter = find_matching_request(mQueue, request); + request_queue_t::iterator iter = find_matching_request(mQueue, request, LLMediaDataClient::Request::ANY); if(iter != mQueue.end()) { LL_DEBUGS("LLMediaDataClient") << "removing matching queued request " << (**iter) << LL_ENDL; @@ -960,7 +960,7 @@ void LLObjectMediaNavigateClient::enqueue(Request *request) } else { - request_set_t::iterator set_iter = find_matching_request(mUnQueuedRequests, request); + request_set_t::iterator set_iter = find_matching_request(mUnQueuedRequests, request, LLMediaDataClient::Request::ANY); if(set_iter != mUnQueuedRequests.end()) { LL_DEBUGS("LLMediaDataClient") << "removing matching unqueued request " << (**set_iter) << LL_ENDL; diff --git a/indra/newview/llmediadataclient.h b/indra/newview/llmediadataclient.h index 231b883c32..80dd519812 100755 --- a/indra/newview/llmediadataclient.h +++ b/indra/newview/llmediadataclient.h @@ -281,10 +281,9 @@ private: bool mQueueTimerIsRunning; - template friend typename T::iterator find_matching_request(T &c, const LLMediaDataClient::Request *request, LLMediaDataClient::Request::Type match_type = LLMediaDataClient::Request::ANY); - template friend typename T::iterator find_matching_request(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type = LLMediaDataClient::Request::ANY); - template friend void remove_matching_requests(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type = LLMediaDataClient::Request::ANY); - + template friend typename T::iterator find_matching_request(T &c, const LLMediaDataClient::Request *request, LLMediaDataClient::Request::Type match_type); + template friend typename T::iterator find_matching_request(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type); + template friend void remove_matching_requests(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type); }; // MediaDataClient specific for the ObjectMedia cap -- cgit v1.2.3 From a37c41e3f5dbf49cdda0de21481b7c841050d971 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Sun, 19 Oct 2014 17:30:46 -0700 Subject: Update to build on Xcode 6.0: removal of some unused variables --- indra/newview/llmorphview.cpp | 9 --------- indra/newview/llnetmap.cpp | 1 - indra/newview/llpanelface.cpp | 2 -- indra/newview/llpanellandaudio.h | 1 - indra/newview/llpanellandmedia.h | 2 -- indra/newview/llpanellogin.cpp | 3 --- 6 files changed, 18 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmorphview.cpp b/indra/newview/llmorphview.cpp index 252d1b78ea..ff86400a56 100755 --- a/indra/newview/llmorphview.cpp +++ b/indra/newview/llmorphview.cpp @@ -47,17 +47,8 @@ LLMorphView *gMorphView = NULL; - -const F32 EDIT_AVATAR_ORBIT_SPEED = 0.1f; -const F32 EDIT_AVATAR_MAX_CAMERA_PITCH = 0.5f; - -const F32 CAMERA_MOVE_TIME = 0.5f; const F32 MORPH_NEAR_CLIP = 0.1f; -const F32 CAMERA_DIST_MIN = 0.4f; -const F32 CAMERA_DIST_MAX = 4.0f; -const F32 CAMERA_DIST_STEP = 1.5f; - //----------------------------------------------------------------------------- // LLMorphView() //----------------------------------------------------------------------------- diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 1685a18e26..5abc9dbbe2 100755 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -67,7 +67,6 @@ const F32 LLNetMap::MAP_SCALE_MIN = 32; const F32 LLNetMap::MAP_SCALE_MID = 1024; const F32 LLNetMap::MAP_SCALE_MAX = 4096; -const F32 MAP_SCALE_INCREMENT = 16; const F32 MAP_SCALE_ZOOM_FACTOR = 1.04f; // Zoom in factor per click of scroll wheel (4%) const F32 MIN_DOT_RADIUS = 3.5f; const F32 DOT_SCALE = 0.75f; diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index e3be1312e4..de2d315480 100755 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -77,8 +77,6 @@ const S32 MATMEDIA_MEDIA = 1; // Media const S32 MATTYPE_DIFFUSE = 0; // Diffuse material texture const S32 MATTYPE_NORMAL = 1; // Normal map const S32 MATTYPE_SPECULAR = 2; // Specular map -const S32 ALPHAMODE_NONE = 0; // No alpha mask applied -const S32 ALPHAMODE_BLEND = 1; // Alpha blending mode const S32 ALPHAMODE_MASK = 2; // Alpha masking mode const S32 BUMPY_TEXTURE = 18; // use supplied normal map const S32 SHINY_TEXTURE = 4; // use supplied specular map diff --git a/indra/newview/llpanellandaudio.h b/indra/newview/llpanellandaudio.h index 32a45100f4..7e4fce80e4 100755 --- a/indra/newview/llpanellandaudio.h +++ b/indra/newview/llpanellandaudio.h @@ -51,7 +51,6 @@ private: LLCheckBoxCtrl* mCheckEstateDisabledVoice; LLCheckBoxCtrl* mCheckParcelVoiceLocal; LLLineEditor* mMusicURLEdit; - LLCheckBoxCtrl* mMusicUrlCheck; LLCheckBoxCtrl* mCheckAVSoundAny; LLCheckBoxCtrl* mCheckAVSoundGroup; diff --git a/indra/newview/llpanellandmedia.h b/indra/newview/llpanellandmedia.h index 0e6292a25e..63cfa01470 100755 --- a/indra/newview/llpanellandmedia.h +++ b/indra/newview/llpanellandmedia.h @@ -59,12 +59,10 @@ private: LLButton* mSetURLButton; LLSpinCtrl* mMediaHeightCtrl; LLSpinCtrl* mMediaWidthCtrl; - LLTextBox* mMediaResetCtrlLabel; LLTextBox* mMediaSizeCtrlLabel; LLTextureCtrl* mMediaTextureCtrl; LLCheckBoxCtrl* mMediaAutoScaleCheck; LLCheckBoxCtrl* mMediaLoopCheck; - LLCheckBoxCtrl* mMediaUrlCheck; LLHandle mURLEntryFloater; diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index bbc3b85bf0..dd61929f35 100755 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -75,9 +75,6 @@ #include "llsdserialize.h" -const S32 BLACK_BORDER_HEIGHT = 160; -const S32 MAX_PASSWORD = 16; - LLPanelLogin *LLPanelLogin::sInstance = NULL; BOOL LLPanelLogin::sCapslockDidNotification = FALSE; -- cgit v1.2.3 From b8590d06d567d16b1835731a2422d13f26a1f787 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Mon, 20 Oct 2014 10:01:48 -0700 Subject: Update to build on Xcode 6.0: removal of some unused variables --- indra/newview/llpanelpeople.h | 1 - indra/newview/llpanelplaces.cpp | 1 - 2 files changed, 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 55eaf74f74..c1d7a134fa 100755 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -149,7 +149,6 @@ private: Updater* mFriendListUpdater; Updater* mNearbyListUpdater; Updater* mRecentListUpdater; - Updater* mFacebookListUpdater; Updater* mButtonsUpdater; LLHandle< LLFloater > mPicker; }; diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 2be96b9b78..4bcd932d4b 100755 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -75,7 +75,6 @@ #include "llviewerwindow.h" // Constants -static const S32 LANDMARK_FOLDERS_MENU_WIDTH = 250; static const F32 PLACE_INFO_UPDATE_INTERVAL = 3.0; static const std::string AGENT_INFO_TYPE = "agent"; static const std::string CREATE_LANDMARK_INFO_TYPE = "create_landmark"; -- cgit v1.2.3 From c8f3105e76c9e7a1091a15fc1c4a83881cd4fc3d Mon Sep 17 00:00:00 2001 From: callum_linden Date: Mon, 20 Oct 2014 10:47:23 -0700 Subject: Update to build on Xcode 6.0: clang demands a default ctor --- indra/newview/llplacesinventorybridge.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llplacesinventorybridge.h b/indra/newview/llplacesinventorybridge.h index 07d18d03c5..108991210f 100755 --- a/indra/newview/llplacesinventorybridge.h +++ b/indra/newview/llplacesinventorybridge.h @@ -85,6 +85,8 @@ protected: class LLPlacesInventoryBridgeBuilder : public LLInventoryFolderViewModelBuilder { public: + LLPlacesInventoryBridgeBuilder() {} + /*virtual*/ LLInvFVBridge* createBridge(LLAssetType::EType asset_type, LLAssetType::EType actual_asset_type, LLInventoryType::EType inv_type, -- cgit v1.2.3 From 5894e380b7a3437f79b03e3d71f0b5b0eaa7215f Mon Sep 17 00:00:00 2001 From: callum_linden Date: Mon, 20 Oct 2014 10:48:30 -0700 Subject: Update to build on Xcode 6.0: clang demands logical comparison brackets --- indra/newview/llselectmgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index eb3a4c37d9..060f6663d4 100755 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1941,7 +1941,7 @@ void LLSelectMgr::selectionSetMedia(U8 media_type, const LLSD &media_data) llassert(mMediaData.isMap()); const LLTextureEntry *texture_entry = object->getTE(te); if (!mMediaData.isMap() || - (NULL != texture_entry) && !texture_entry->hasMedia() && !mMediaData.has(LLMediaEntry::HOME_URL_KEY)) + ((NULL != texture_entry) && !texture_entry->hasMedia() && !mMediaData.has(LLMediaEntry::HOME_URL_KEY))) { // skip adding/updating media } -- cgit v1.2.3 From c7fb834c9d67e9249093f4ae27f53aa5e9e6fee7 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Mon, 20 Oct 2014 11:08:54 -0700 Subject: Update to build on Xcode 6.0: cast doesn't change overloading rules - poorly commented --- indra/newview/lltooldraganddrop.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 575e5c5c52..75620be69a 100755 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -947,8 +947,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info) const S32 item_index = mCurItemIndex; const EDragAndDropType dad_type = mCargoTypes[item_index]; // Call the right implementation function - (U32)callMemberFunction(*this, - LLDragAndDropDictionary::instance().get(dad_type, target)) + callMemberFunction(*this, LLDragAndDropDictionary::instance().get(dad_type, target)) (hit_obj, hit_face, pick_info.mKeyMask, TRUE); } } -- cgit v1.2.3 From 4e7ad651cbf12b97b2e27e2ab195b256074bc895 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Mon, 20 Oct 2014 11:14:23 -0700 Subject: Update to build on Xcode 6.0: clang demands logical comparison brackets --- indra/newview/llviewermessage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 44eb4361f1..9636b8d523 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2411,7 +2411,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) BOOL is_do_not_disturb = gAgent.isDoNotDisturb(); BOOL is_muted = LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat) // object IMs contain sender object id in session_id (STORM-1209) - || dialog == IM_FROM_TASK && LLMuteList::getInstance()->isMuted(session_id); + || (dialog == IM_FROM_TASK && LLMuteList::getInstance()->isMuted(session_id)); BOOL is_owned_by_me = FALSE; BOOL is_friend = (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL) ? false : true; BOOL accept_im_from_only_friend = gSavedSettings.getBOOL("VoiceCallsFriendsOnly"); @@ -5116,7 +5116,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data) if (object) { LLVector3 sit_spot = object->getPositionAgent() + (sitPosition * object->getRotation()); - if (!use_autopilot || isAgentAvatarValid() && gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == object->getRoot()) + if (!use_autopilot || (isAgentAvatarValid() && gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == object->getRoot())) { //we're already sitting on this object, so don't autopilot } -- cgit v1.2.3 From 3350922080a02217b419a32b412b6e33656f00da Mon Sep 17 00:00:00 2001 From: callum_linden Date: Mon, 20 Oct 2014 11:15:14 -0700 Subject: Update to build on Xcode 6.0: self assigment of var to var - typo? --- indra/newview/llviewerregion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 11cbf3fc24..049be1733e 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1924,7 +1924,7 @@ public: } else if( i != you_index) { - U32 loc = x << 16 | y << 8 | z; loc = loc; + U32 loc = x << 16 | y << 8 | z; U32 pos = 0x0; pos |= x; pos <<= 8; -- cgit v1.2.3 From c87185b7144e0265ef10d119f0c4c368f95a4fda Mon Sep 17 00:00:00 2001 From: callum_linden Date: Mon, 20 Oct 2014 11:28:39 -0700 Subject: Update to build on Xcode 6.0: clang demands logical comparison brackets --- indra/newview/llvoavatar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 22b979aa09..3460e7beeb 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4156,8 +4156,8 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass) } // Can't test for baked hair being defined, since that won't always be the case (not all viewers send baked hair) // TODO: 1.25 will be able to switch this logic back to calling isTextureVisible(); - if ( getImage(TEX_HAIR_BAKED, 0) && - getImage(TEX_HAIR_BAKED, 0)->getID() != IMG_INVISIBLE || LLDrawPoolAlpha::sShowDebugAlpha) + if ( ( getImage(TEX_HAIR_BAKED, 0) && + getImage(TEX_HAIR_BAKED, 0)->getID() != IMG_INVISIBLE ) || LLDrawPoolAlpha::sShowDebugAlpha) { LLViewerJoint* hair_mesh = getViewerJoint(MESH_ID_HAIR); if (hair_mesh) -- cgit v1.2.3 From 784b8c4a4d1b1d372c2d1c172407ce937d9adc37 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Mon, 20 Oct 2014 11:36:46 -0700 Subject: Update to build on Xcode 6.0: clang demands a public default ctor --- indra/newview/llwearableitemslist.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 58a00c5be0..c731a7d6cf 100755 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -382,6 +382,10 @@ class LLWearableItemCreationDateComparator : public LLWearableItemNameComparator { LOG_CLASS(LLWearableItemCreationDateComparator); +public: + // clang demands a default ctor here + LLWearableItemCreationDateComparator() {} + protected: /*virtual*/ bool doCompare(const LLPanelInventoryListItemBase* item1, const LLPanelInventoryListItemBase* item2) const; }; -- cgit v1.2.3 From 577a3973ea1bc268b14ba3101474fb0b9a9bade1 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Mon, 20 Oct 2014 14:00:39 -0700 Subject: Update to build on Xcode 6.0: Large (and final) collection of fixes for unused variables, unused const-variables, unused member variables & functions etc. Also removed flags from CMake --- indra/newview/llpreviewscript.cpp | 3 --- indra/newview/llscripteditor.cpp | 1 - indra/newview/llselectmgr.cpp | 3 --- indra/newview/llsidepanelappearance.h | 3 --- indra/newview/llsidepanelinventory.cpp | 3 --- indra/newview/llstatusbar.cpp | 5 ----- indra/newview/lltexturectrl.cpp | 6 ------ indra/newview/lltexturefetch.cpp | 3 +-- indra/newview/lltoastalertpanel.cpp | 1 - indra/newview/lltoastgroupnotifypanel.h | 2 -- indra/newview/lltoolbrush.cpp | 3 +-- indra/newview/lltoolcomp.cpp | 6 ------ indra/newview/lltoolfocus.cpp | 1 - indra/newview/llversioninfo.cpp | 2 -- indra/newview/llviewerkeyboard.cpp | 1 - indra/newview/llviewermessage.cpp | 5 ----- indra/newview/llviewerpartsim.cpp | 3 --- indra/newview/llviewerregion.cpp | 3 --- indra/newview/llviewertexlayer.cpp | 3 --- indra/newview/llviewertexteditor.cpp | 5 +---- indra/newview/llviewertexture.cpp | 1 - indra/newview/llviewertexturelist.cpp | 3 --- indra/newview/llvoavatar.cpp | 11 ----------- indra/newview/llvograss.cpp | 1 - indra/newview/llvoicevisualizer.cpp | 1 - indra/newview/llvopartgroup.cpp | 2 -- indra/newview/llvosky.cpp | 17 ----------------- indra/newview/llvotree.cpp | 3 --- indra/newview/llvovolume.cpp | 2 -- indra/newview/llvowater.cpp | 9 --------- indra/newview/llworld.cpp | 1 - indra/newview/llworldmapview.cpp | 1 - indra/newview/pipeline.cpp | 16 ---------------- 33 files changed, 3 insertions(+), 127 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 8eea5ea73e..45447b742b 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -106,9 +106,6 @@ const std::string DEFAULT_SCRIPT_NAME = "New Script"; // *TODO:Translate? const std::string DEFAULT_SCRIPT_DESC = "(No Description)"; // *TODO:Translate? // Description and header information - -const S32 MAX_EXPORT_SIZE = 1000; - const S32 MAX_HISTORY_COUNT = 10; const F32 LIVE_HELP_REFRESH_TIME = 1.f; diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp index 81920562a7..cd3a4dfd11 100644 --- a/indra/newview/llscripteditor.cpp +++ b/indra/newview/llscripteditor.cpp @@ -32,7 +32,6 @@ #include "lllocalcliprect.h" const S32 UI_TEXTEDITOR_LINE_NUMBER_MARGIN = 32; -const S32 UI_TEXTEDITOR_LINE_NUMBER_DIGITS = 4; static LLDefaultChildRegistry::Register r("script_editor"); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 060f6663d4..9e0bd9b6ed 100755 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -99,14 +99,11 @@ LLViewerObject* getSelectedParentObject(LLViewerObject *object) ; // Consts // -const S32 NUM_SELECTION_UNDO_ENTRIES = 200; const F32 SILHOUETTE_UPDATE_THRESHOLD_SQUARED = 0.02f; -const S32 MAX_ACTION_QUEUE_SIZE = 20; const S32 MAX_SILS_PER_FRAME = 50; const S32 MAX_OBJECTS_PER_PACKET = 254; // For linked sets const S32 MAX_CHILDREN_PER_TASK = 255; -const S32 MAX_CHILDREN_PER_PHYSICAL_TASK = 32; // // Globals diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index cde05a8d9b..440fce07bb 100755 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -90,9 +90,6 @@ private: LLTextBox* mCurrentLookName; LLTextBox* mOutfitStatus; - // Used to make sure the user's inventory is in memory. - LLCurrentlyWornFetchObserver* mFetchWorn; - // Search string for filtering landmarks and teleport // history locations std::string mFilterSubString; diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 4970eec636..0e23e2ad10 100755 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -70,10 +70,7 @@ static LLPanelInjector t_inventory("sidepanel_inventory"); static const char * const INBOX_BUTTON_NAME = "inbox_btn"; static const char * const INBOX_LAYOUT_PANEL_NAME = "inbox_layout_panel"; -static const char * const MAIN_INVENTORY_LAYOUT_PANEL_NAME = "main_inventory_layout_panel"; - static const char * const INVENTORY_LAYOUT_STACK_NAME = "inventory_layout_stack"; - static const char * const MARKETPLACE_INBOX_PANEL = "marketplace_inbox"; // diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index eedb829b48..2d4b23d892 100755 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -94,16 +94,11 @@ extern S32 MENU_BAR_HEIGHT; // TODO: these values ought to be in the XML too -const S32 MENU_PARCEL_SPACING = 1; // Distance from right of menu item to parcel information const S32 SIM_STAT_WIDTH = 8; -const F32 SIM_WARN_FRACTION = 0.75f; -const F32 SIM_FULL_FRACTION = 0.98f; const LLColor4 SIM_OK_COLOR(0.f, 1.f, 0.f, 1.f); const LLColor4 SIM_WARN_COLOR(1.f, 1.f, 0.f, 1.f); const LLColor4 SIM_FULL_COLOR(1.f, 0.f, 0.f, 1.f); const F32 ICON_TIMER_EXPIRY = 3.f; // How long the balance and health icons should flash after a change. -const F32 ICON_FLASH_FREQUENCY = 2.f; -const S32 TEXT_HEIGHT = 18; static void onClickVolume(void*); diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index c12753acb0..eebed63ef2 100755 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -72,12 +72,6 @@ #include "llfloaterreg.h" #include "lllocalbitmaps.h" -static const S32 HPAD = 4; -static const S32 VPAD = 4; -static const S32 LINE = 16; -static const S32 FOOTER_HEIGHT = 100; -static const S32 BORDER_PAD = HPAD; -static const S32 TEXTURE_INVENTORY_PADDING = 30; static const F32 CONTEXT_CONE_IN_ALPHA = 0.0f; static const F32 CONTEXT_CONE_OUT_ALPHA = 1.f; static const F32 CONTEXT_FADE_TIME = 0.08f; diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index d9a874be49..085391a666 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -338,7 +338,7 @@ private: // Threads: Ttf DecodeResponder(LLTextureFetch* fetcher, const LLUUID& id, LLTextureFetchWorker* worker) - : mFetcher(fetcher), mID(id), mWorker(worker) + : mFetcher(fetcher), mID(id) { } @@ -354,7 +354,6 @@ private: private: LLTextureFetch* mFetcher; LLUUID mID; - LLTextureFetchWorker* mWorker; // debug only (may get deleted from under us, use mFetcher/mID) }; struct Compare diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index c82894a5cc..0a9453534b 100755 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -48,7 +48,6 @@ const S32 MAX_ALLOWED_MSG_WIDTH = 400; const F32 DEFAULT_BUTTON_DELAY = 0.5f; -const S32 MSG_PAD = 8; /*static*/ LLControlGroup* LLToastAlertPanel::sSettings = NULL; /*static*/ LLToastAlertPanel::URLLoader* LLToastAlertPanel::sURLLoader; diff --git a/indra/newview/lltoastgroupnotifypanel.h b/indra/newview/lltoastgroupnotifypanel.h index 431fd32da2..269c23798c 100755 --- a/indra/newview/lltoastgroupnotifypanel.h +++ b/indra/newview/lltoastgroupnotifypanel.h @@ -60,8 +60,6 @@ private: static const S32 DEFAULT_MESSAGE_MAX_LINE_COUNT; - LLButton* mSaveInventoryBtn; - LLUUID mGroupID; LLOfferInfo* mInventoryOffer; }; diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp index e3eb8ba7af..0a0bfaf58b 100755 --- a/indra/newview/lltoolbrush.cpp +++ b/indra/newview/lltoolbrush.cpp @@ -65,8 +65,7 @@ const std::string REGION_BLOCKS_TERRAFORM_MSG = "This region does not allow terr const S32 LAND_BRUSH_SIZE_COUNT = 3; const F32 LAND_BRUSH_SIZE[LAND_BRUSH_SIZE_COUNT] = {1.0f, 2.0f, 4.0f}; -const S32 LAND_STEPS = 3; -const F32 LAND_METERS_PER_SECOND = 1.0f; + enum { E_LAND_LEVEL = 0, diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp index 4bda9072d0..5a63f6e286 100755 --- a/indra/newview/lltoolcomp.cpp +++ b/indra/newview/lltoolcomp.cpp @@ -52,14 +52,8 @@ #include "llfloatertools.h" #include "llviewercontrol.h" -const S32 BUTTON_HEIGHT = 16; -const S32 BUTTON_WIDTH_SMALL = 32; -const S32 BUTTON_WIDTH_BIG = 48; -const S32 HPAD = 4; - extern LLControlGroup gSavedSettings; - // we use this in various places instead of NULL static LLPointer sNullTool(new LLTool(std::string("null"), NULL)); diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp index 58073d1186..7de91c7757 100755 --- a/indra/newview/lltoolfocus.cpp +++ b/indra/newview/lltoolfocus.cpp @@ -61,7 +61,6 @@ BOOL gCameraBtnOrbit = FALSE; BOOL gCameraBtnPan = FALSE; const S32 SLOP_RANGE = 4; -const F32 FOCUS_OFFSET_FACTOR = 1.f; // // Camera - shared functionality diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index 6a8fad0134..5cc7d7bed3 100755 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -38,8 +38,6 @@ #error "Channel or Version information is undefined" #endif -const char * const LL_CHANNEL = LL_VIEWER_CHANNEL; - // // Set the version numbers in indra/VIEWER_VERSION // diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index b0f4802e20..b6c27b0abc 100755 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -53,7 +53,6 @@ const F32 FLY_FRAMES = 4; const F32 NUDGE_TIME = 0.25f; // in seconds const S32 NUDGE_FRAMES = 2; const F32 ORBIT_NUDGE_RATE = 0.05f; // fraction of normal speed -const F32 YAW_NUDGE_RATE = 0.05f; // fraction of normal speed struct LLKeyboardActionRegistry : public LLRegistrySingleton, LLKeyboardActionRegistry> diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 9636b8d523..762f75edd4 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -128,10 +128,7 @@ extern void on_new_message(const LLSD& msg); // // Constants // -const F32 BIRD_AUDIBLE_RADIUS = 32.0f; -const F32 SIT_DISTANCE_FROM_TARGET = 0.25f; const F32 CAMERA_POSITION_THRESHOLD_SQUARED = 0.001f * 0.001f; -static const F32 LOGOUT_REPLY_TIME = 3.f; // Wait this long after LogoutReply before quitting. // Determine how quickly residents' scripts can issue question dialogs // Allow bursts of up to 5 dialogs in 10 seconds. 10*2=20 seconds recovery if throttle kicks in @@ -7117,8 +7114,6 @@ void process_user_info_reply(LLMessageSystem* msg, void**) //--------------------------------------------------------------------------- const S32 SCRIPT_DIALOG_MAX_BUTTONS = 12; -const S32 SCRIPT_DIALOG_BUTTON_STR_SIZE = 24; -const S32 SCRIPT_DIALOG_MAX_MESSAGE_SIZE = 512; const char* SCRIPT_DIALOG_HEADER = "Script Dialog:\n"; bool callback_script_dialog(const LLSD& notification, const LLSD& response) diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 76418ad6a6..8b55f40baa 100755 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -42,8 +42,6 @@ #include "llvovolume.h" const F32 PART_SIM_BOX_SIDE = 16.f; -const F32 PART_SIM_BOX_OFFSET = 0.5f*PART_SIM_BOX_SIDE; -const F32 PART_SIM_BOX_RAD = 0.5f*F_SQRT3*PART_SIM_BOX_SIDE; //static S32 LLViewerPartSim::sMaxParticleCount = 0; @@ -311,7 +309,6 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt) if (part->mFlags & LLPartData::LL_PART_WIND_MASK) { - LLVector3 tempVel(part->mVelocity); part->mVelocity *= 1.f - 0.1f*dt; part->mVelocity += 0.1f*dt*regionp->mWind.getVelocity(regionp->getPosRegionFromAgent(part->mPosAgent)); } diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 049be1733e..c0c9855903 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -87,8 +87,6 @@ // out the two lists of capabilities for analysis. //#define DEBUG_CAPS_GRANTS -const F32 WATER_TEXTURE_SCALE = 8.f; // Number of times to repeat the water texture across a region -const S16 MAX_MAP_DIST = 10; // The server only keeps our pending agent info for 60 seconds. // We want to allow for seed cap retry, but its not useful after that 60 seconds. // Give it 3 chances, each at 18 seconds to give ourselves a few seconds to connect anyways if we give up. @@ -1924,7 +1922,6 @@ public: } else if( i != you_index) { - U32 loc = x << 16 | y << 8 | z; U32 pos = 0x0; pos |= x; pos <<= 8; diff --git a/indra/newview/llviewertexlayer.cpp b/indra/newview/llviewertexlayer.cpp index 65ba3fb6e5..66e5742911 100755 --- a/indra/newview/llviewertexlayer.cpp +++ b/indra/newview/llviewertexlayer.cpp @@ -39,9 +39,6 @@ #include "pipeline.h" #include "llviewercontrol.h" -static const S32 BAKE_UPLOAD_ATTEMPTS = 7; -static const F32 BAKE_UPLOAD_RETRY_DELAY = 2.f; // actual delay grows by power of 2 each attempt - // runway consolidate extern std::string self_av_string(); diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 0c4f55d704..85ae64aeff 100755 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -169,8 +169,7 @@ public: mImage(image), mLabel(utf8str_to_wstring(inv_item->getName())), mItem(inv_item), - mEditor(editor), - mHasMouseHover(false) + mEditor(editor) { mStyle = new LLStyle(LLStyle::Params().font(LLFontGL::getFontSansSerif())); @@ -262,8 +261,6 @@ private: std::string mToolTip; LLPointer mItem; LLTextEditor& mEditor; - bool mHasMouseHover; - }; diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 4e2eef39d6..023457c0c8 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -452,7 +452,6 @@ void LLViewerTexture::initClass() // tuning params const F32 discard_bias_delta = .25f; const F32 discard_delta_time = 0.5f; -const S32 min_non_tex_system_mem = (128<<20); // 128 MB // non-const (used externally F32 texmem_lower_bound_scale = 0.85f; F32 texmem_middle_bound_scale = 0.925f; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index b98726900f..8c27ddc63c 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1258,9 +1258,6 @@ LLPointer LLViewerTextureList::convertToUploadFile(LLPointer LLVOPartGroup::sVB = NULL; diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 07c2f0d44d..4dab213fa0 100755 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -62,8 +62,6 @@ static const S32 NUM_TILES = NUM_TILES_X * NUM_TILES_Y; static const F32 SUN_DISK_RADIUS = 0.5f; static const F32 MOON_DISK_RADIUS = SUN_DISK_RADIUS * 0.9f; static const F32 SUN_INTENSITY = 1e5; -static const F32 SUN_DISK_INTENSITY = 24.f; - // Texture coordinates: static const LLVector2 TEX00 = LLVector2(0.f, 0.f); @@ -619,21 +617,6 @@ static inline LLColor3 colorMix(LLColor3 const & left, LLColor3 const & right, F return (left + ((right - left) * amount)); } -static inline F32 texture2D(LLPointer const & tex, LLVector2 const & uv) -{ - U16 w = tex->getWidth(); - U16 h = tex->getHeight(); - - U16 r = U16(uv[0] * w) % w; - U16 c = U16(uv[1] * h) % h; - - U8 const * imageBuffer = tex->getData(); - - U8 sample = imageBuffer[r * w + c]; - - return sample / 255.f; -} - static inline LLColor3 smear(F32 val) { return LLColor3(val, val, val); diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index 66c0ace79d..367fa21b91 100755 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -396,9 +396,6 @@ void LLVOTree::idleUpdate(LLAgent &agent, const F64 &time) mTrunkLOD = trunk_LOD; } -const F32 TREE_BLEND_MIN = 1.f; -const F32 TREE_BLEND_RANGE = 1.f; - void LLVOTree::render(LLAgent &agent) { } diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index a83e2e020e..2d0992cea2 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -78,10 +78,8 @@ #include "llvocache.h" #include "llmaterialmgr.h" -const S32 MIN_QUIET_FRAMES_COALESCE = 30; const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; const F32 FORCE_CULL_AREA = 8.f; -const F32 MAX_LOD_DISTANCE = 24.f; U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG = 20; BOOL gAnimateTextures = TRUE; diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp index e3419af10d..9ce16a1674 100755 --- a/indra/newview/llvowater.cpp +++ b/indra/newview/llvowater.cpp @@ -43,9 +43,6 @@ #include "pipeline.h" #include "llspatialpartition.h" -const BOOL gUseRoam = FALSE; - - /////////////////////////////////// template inline T LERP(T a, T b, F32 factor) @@ -53,12 +50,6 @@ template inline T LERP(T a, T b, F32 factor) return a + (b - a) * factor; } -const U32 N_RES_HALF = (N_RES >> 1); - -const U32 WIDTH = (N_RES * WAVE_STEP); //128.f //64 // width of wave tile, in meters -const F32 WAVE_STEP_INV = (1. / WAVE_STEP); - - LLVOWater::LLVOWater(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) : diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index b4e8114a5f..f95bbe241a 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -70,7 +70,6 @@ U32 gAgentPauseSerialNum = 0; // // Constants // -const S32 MAX_NUMBER_OF_CLOUDS = 750; const S32 WORLD_PATCH_SIZE = 16; extern LLColor4U MAX_WATER_COLOR; diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 7cb53a0706..2ebefbdb11 100755 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -67,7 +67,6 @@ const F32 OCEAN_GREEN = (F32)(0x47)/255.f; const F32 OCEAN_BLUE = (F32)(0x5F)/255.f; const F32 GODLY_TELEPORT_HEIGHT = 200.f; -const S32 SCROLL_HINT_WIDTH = 65; const F32 BIG_DOT_RADIUS = 5.f; BOOL LLWorldMapView::sHandledLastClick = FALSE; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 3dfe1e5992..03712c1065 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -207,15 +207,9 @@ F32 LLPipeline::CameraDoFResScale; F32 LLPipeline::RenderAutoHideSurfaceAreaLimit; LLTrace::EventStatHandle LLPipeline::sStatBatchSize("renderbatchsize"); -const F32 BACKLIGHT_DAY_MAGNITUDE_AVATAR = 0.2f; -const F32 BACKLIGHT_NIGHT_MAGNITUDE_AVATAR = 0.1f; const F32 BACKLIGHT_DAY_MAGNITUDE_OBJECT = 0.1f; const F32 BACKLIGHT_NIGHT_MAGNITUDE_OBJECT = 0.08f; -const S32 MAX_OFFSCREEN_GEOMETRY_CHANGES_PER_FRAME = 10; -const U32 REFLECTION_MAP_RES = 128; const U32 DEFERRED_VB_MASK = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_TEXCOORD1; -// Max number of occluders to search for. JC -const S32 MAX_OCCLUDER_COUNT = 2; extern S32 gBoxFrame; //extern BOOL gHideSelectedObjects; @@ -410,16 +404,6 @@ static LLPipelineListener sPipelineListener; static LLCullResult* sCull = NULL; -static const U32 gl_cube_face[] = -{ - GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, - GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, - GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, - GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB, -}; - void validate_framebuffer_object(); -- cgit v1.2.3 From 9bd460ca075a0f27fef426a23f5e341155a75932 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 21 Oct 2014 13:15:52 -0400 Subject: fix version number generation for cmake 3.x and autobuild 1.0 compatibility --- indra/newview/CMakeLists.txt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 9899dac439..f5a04a49d0 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1298,7 +1298,7 @@ set(viewer_HEADER_FILES source_group("CMake Rules" FILES ViewerInstall.cmake) -# the viewer_version.txt file created here is for passing to viewer_manifest +# the viewer_version.txt file created here is for passing to viewer_manifest and autobuild # the summary.json file is created for the benefit of the TeamCity builds, where # it is used to provide descriptive information to the build results page add_custom_target(generate_viewer_version ALL @@ -1663,6 +1663,9 @@ if (WINDOWS) LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO /LARGEADDRESSAWARE" LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF /LARGEADDRESSAWARE" ) + + add_dependencies(${VIEWER_BINARY_NAME} generate_viewer_version) + if(USE_PRECOMPILED_HEADERS) set_target_properties( ${VIEWER_BINARY_NAME} @@ -1798,7 +1801,6 @@ if (WINDOWS) --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/copy_touched.bat DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py - generate_viewer_version stage_third_party_libs ${COPY_INPUT_DEPENDENCIES} COMMENT "Performing viewer_manifest copy" @@ -1870,10 +1872,9 @@ if (WINDOWS) ${COPY_INPUT_DEPENDENCIES} ) - add_custom_target(package ALL DEPENDS + add_custom_target(llpackage ALL DEPENDS ${CMAKE_CFG_INTDIR}/touched.bat windows-setup-build-all - generate_viewer_version ) # temporarily disable packaging of event_host until hg subrepos get # sorted out on the parabuild cluster... @@ -1988,6 +1989,8 @@ if (LINUX) llcommon ) + add_dependencies(${VIEWER_BINARY_NAME} generate_viewer_version) + add_custom_command( OUTPUT ${product}.tar.bz2 COMMAND ${PYTHON_EXECUTABLE} @@ -2006,7 +2009,6 @@ if (LINUX) --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py - generate_viewer_version ${COPY_INPUT_DEPENDENCIES} ) @@ -2031,7 +2033,6 @@ if (LINUX) --source=${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py - generate_viewer_version ${COPY_INPUT_DEPENDENCIES} COMMENT "Performing viewer_manifest copy" ) @@ -2073,6 +2074,8 @@ if (DARWIN) "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app/Contents/Info.plist" ) + add_dependencies(${VIEWER_BINARY_NAME} generate_viewer_version) + add_custom_command( TARGET ${VIEWER_BINARY_NAME} POST_BUILD COMMAND ${PYTHON_EXECUTABLE} @@ -2092,7 +2095,6 @@ if (DARWIN) DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py - generate_viewer_version ) add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit mac-crash-logger) @@ -2127,7 +2129,6 @@ if (DARWIN) ${SIGNING_SETTING} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py - generate_viewer_version ) endif (PACKAGE) endif (DARWIN) -- cgit v1.2.3 From 918e2b629bd3dadfbe5288c0d72d93bcca1b8cfe Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 23 Oct 2014 20:23:08 -0700 Subject: Bring in new TUT library build. Clean up ensure_equals() overloads. The new TUT library build eliminates the ambiguity about ensure_equals(const char*, ...) versus ensure_equals(const std::string&, ...). Now it's all based on const std::string&. Remove pointless const char* overloads and ambiguous forwarding templates. With clang in Xcode 6, any new datatypes we intend to use with ensure_equals() must have operator<<(std::ostream&, datatype) declared BEFORE lltut.h #includes tut.hpp. Reorder code in certain test source files to guarantee that visibility. --- indra/newview/tests/lllogininstance_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index adeb848e03..9ee6403739 100755 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -488,7 +488,7 @@ namespace tut template<> template<> void lllogininstance_object::test<3>() { - skip(); + skip("test fails with Xcode 6, skipping"); set_test_name("Test Mandatory Update User Accepts"); @@ -517,7 +517,7 @@ namespace tut template<> template<> void lllogininstance_object::test<4>() { - skip(); + skip("test fails with Xcode 6, skipping"); set_test_name("Test Mandatory Update User Decline"); -- cgit v1.2.3 From 7a2cfdc980c2199565a8682c5ba9c4d5c5b711eb Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 28 Oct 2014 11:22:48 -0400 Subject: add --deep to codesign for the mac --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 7544fe1c41..4f34f4bff9 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -883,7 +883,7 @@ class Darwin_i386_Manifest(ViewerManifest): try: sign_attempts-=1; self.run_command( - 'codesign --verbose --force --keychain "%(home_path)s/Library/Keychains/viewer.keychain" --sign %(identity)r %(bundle)r' % { + 'codesign --verbose --deep --force --keychain "%(home_path)s/Library/Keychains/viewer.keychain" --sign %(identity)r %(bundle)r' % { 'home_path' : home_path, 'identity': identity, 'bundle': self.get_dst_prefix() -- cgit v1.2.3 From bfd7878d9aeb4b18b8e57d5c3b96ac050854c884 Mon Sep 17 00:00:00 2001 From: JJ Linden Date: Tue, 28 Oct 2014 16:47:20 -0700 Subject: adding line to test that app was signed appropriately --- indra/newview/viewer_manifest.py | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 4f34f4bff9..7c16c1f43e 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -897,6 +897,7 @@ class Darwin_i386_Manifest(ViewerManifest): else: print >> sys.stderr, "Maximum codesign attempts exceeded; giving up" raise + self.run_command('spctl -a -texec -vv %(bundle)r' % self.get_dst_prefix()) imagename="SecondLife_" + '_'.join(self.args['version']) -- cgit v1.2.3 From 8530ca0b3dcb877655106453597c81d37cd91a36 Mon Sep 17 00:00:00 2001 From: JJ Linden Date: Tue, 28 Oct 2014 18:31:07 -0700 Subject: fix for formatting issue --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 7c16c1f43e..043b345cbf 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -897,7 +897,7 @@ class Darwin_i386_Manifest(ViewerManifest): else: print >> sys.stderr, "Maximum codesign attempts exceeded; giving up" raise - self.run_command('spctl -a -texec -vv %(bundle)r' % self.get_dst_prefix()) + self.run_command('spctl -a -texec -vv %(bundle)r' % { 'bundle': self.get_dst_prefix() }) imagename="SecondLife_" + '_'.join(self.args['version']) -- cgit v1.2.3 From aa7c939a6bf95245d61d18e2dad76464b271e06f Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 29 Oct 2014 18:34:14 -0400 Subject: reorder finalizing for OSX so that the signature is applied to the app after copying into the dmg; preserves extended attributes --- indra/newview/viewer_manifest.py | 93 +++++++++++++++++++++------------------- 1 file changed, 50 insertions(+), 43 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 043b345cbf..402c30d9ab 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -858,49 +858,6 @@ class Darwin_i386_Manifest(ViewerManifest): def package_finish(self): global CHANNEL_VENDOR_BASE - # Sign the app if requested. - if 'signature' in self.args: - identity = self.args['signature'] - if identity == '': - identity = 'Developer ID Application' - - # Look for an environment variable set via build.sh when running in Team City. - try: - build_secrets_checkout = os.environ['build_secrets_checkout'] - except KeyError: - pass - else: - # variable found so use it to unlock keyvchain followed by codesign - home_path = os.environ['HOME'] - keychain_pwd_path = os.path.join(build_secrets_checkout,'code-signing-osx','password.txt') - keychain_pwd = open(keychain_pwd_path).read().rstrip() - - self.run_command('security unlock-keychain -p "%s" "%s/Library/Keychains/viewer.keychain"' % ( keychain_pwd, home_path ) ) - signed=False - sign_attempts=3 - sign_retry_wait=15 - while (not signed) and (sign_attempts > 0): - try: - sign_attempts-=1; - self.run_command( - 'codesign --verbose --deep --force --keychain "%(home_path)s/Library/Keychains/viewer.keychain" --sign %(identity)r %(bundle)r' % { - 'home_path' : home_path, - 'identity': identity, - 'bundle': self.get_dst_prefix() - }) - signed=True # if no exception was raised, the codesign worked - except ManifestError, err: - if sign_attempts: - print >> sys.stderr, "codesign failed, waiting %d seconds before retrying" % sign_retry_wait - time.sleep(sign_retry_wait) - sign_retry_wait*=2 - else: - print >> sys.stderr, "Maximum codesign attempts exceeded; giving up" - raise - self.run_command('spctl -a -texec -vv %(bundle)r' % { 'bundle': self.get_dst_prefix() }) - - imagename="SecondLife_" + '_'.join(self.args['version']) - # MBW -- If the mounted volume name changes, it breaks the .DS_Store's background image and icon positioning. # If we really need differently named volumes, we'll need to create multiple DS_Store file images, or use some other trick. @@ -982,6 +939,56 @@ class Darwin_i386_Manifest(ViewerManifest): # Set the disk image root's custom icon bit self.run_command('SetFile -a C %r' % volpath) + + # Sign the app if requested; + # do this in the copy that's in the .dmg so that the extended attributes used by + # the signature are preserved; moving the files using python will leave them behind + # and invalidate the signatures. + if 'signature' in self.args: + app_in_dmg=os.path.join(volpath,self.get_dst_prefix()) + print "Attempting to sign '%s'" % app_in_dmg + identity = self.args['signature'] + if identity == '': + identity = 'Developer ID Application' + + # Look for an environment variable set via build.sh when running in Team City. + try: + build_secrets_checkout = os.environ['build_secrets_checkout'] + except KeyError: + pass + else: + # variable found so use it to unlock keychain followed by codesign + home_path = os.environ['HOME'] + keychain_pwd_path = os.path.join(build_secrets_checkout,'code-signing-osx','password.txt') + keychain_pwd = open(keychain_pwd_path).read().rstrip() + + self.run_command('security unlock-keychain -p "%s" "%s/Library/Keychains/viewer.keychain"' % ( keychain_pwd, home_path ) ) + signed=False + sign_attempts=3 + sign_retry_wait=15 + while (not signed) and (sign_attempts > 0): + try: + sign_attempts-=1; + self.run_command( + 'codesign --verbose --deep --force --keychain "%(home_path)s/Library/Keychains/viewer.keychain" --sign %(identity)r %(bundle)r' % { + 'home_path' : home_path, + 'identity': identity, + 'bundle': app_in_dmg + }) + signed=True # if no exception was raised, the codesign worked + except ManifestError, err: + if sign_attempts: + print >> sys.stderr, "codesign failed, waiting %d seconds before retrying" % sign_retry_wait + time.sleep(sign_retry_wait) + sign_retry_wait*=2 + else: + print >> sys.stderr, "Maximum codesign attempts exceeded; giving up" + raisef + self.run_command('spctl -a -texec -vv %(bundle)r' % { 'bundle': app_in_dmg }) + + imagename="SecondLife_" + '_'.join(self.args['version']) + + finally: # Unmount the image even if exceptions from any of the above self.run_command('hdiutil detach -force %r' % devfile) -- cgit v1.2.3 From 4a329b391992af09116dc04b54daced3c50d4cba Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 29 Oct 2014 18:42:43 -0400 Subject: fix signature target path --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 402c30d9ab..4d500b7ab7 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -945,7 +945,7 @@ class Darwin_i386_Manifest(ViewerManifest): # the signature are preserved; moving the files using python will leave them behind # and invalidate the signatures. if 'signature' in self.args: - app_in_dmg=os.path.join(volpath,self.get_dst_prefix()) + app_in_dmg=os.path.join(volpath,self.app_name()+".app") print "Attempting to sign '%s'" % app_in_dmg identity = self.args['signature'] if identity == '': -- cgit v1.2.3 From cfc6e5b1b7c0ef8f8b0c374000b4ed5ec8365c6a Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 10 Nov 2014 16:48:09 -0500 Subject: Fix typo in new viewer_manifest.py codesigning logic. 'raisef' is not a Python statement. --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 4d500b7ab7..a2039b4528 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -983,7 +983,7 @@ class Darwin_i386_Manifest(ViewerManifest): sign_retry_wait*=2 else: print >> sys.stderr, "Maximum codesign attempts exceeded; giving up" - raisef + raise self.run_command('spctl -a -texec -vv %(bundle)r' % { 'bundle': app_in_dmg }) imagename="SecondLife_" + '_'.join(self.args['version']) -- cgit v1.2.3 From fbaff6d3a0b91aeca32cfbfe7c388516e99c846a Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 12 Nov 2014 17:55:52 -0500 Subject: Eliminate LLAppViewer::cleanup() dup --analyzeperformance code block. Not sure at what point the redundancy was introduced, but it seems clear we only want to run performance analysis once per shutdown. --- indra/newview/llappviewer.cpp | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b44f54f59c..c1234edfeb 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1688,19 +1688,12 @@ bool LLAppViewer::cleanup() //dump scene loading monitor results LLSceneMonitor::instance().dumpToFile(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "scene_monitor_results.csv")); - if (LLFastTimerView::sAnalyzePerformance) - { - LL_INFOS() << "Analyzing performance" << LL_ENDL; - std::string baseline_name = LLTrace::BlockTimer::sLogName + "_baseline.slp"; - std::string current_name = LLTrace::BlockTimer::sLogName + ".slp"; - std::string report_name = LLTrace::BlockTimer::sLogName + "_report.csv"; - - LLFastTimerView::doAnalysis( - gDirUtilp->getExpandedFilename(LL_PATH_LOGS, baseline_name), - gDirUtilp->getExpandedFilename(LL_PATH_LOGS, current_name), - gDirUtilp->getExpandedFilename(LL_PATH_LOGS, report_name)); - } - LLMetricPerformanceTesterBasic::cleanClass(); + // There used to be an 'if (LLFastTimerView::sAnalyzePerformance)' block + // here, completely redundant with the one that occurs later in this same + // function. Presumably the duplication was due to an automated merge gone + // bad. Not knowing which instance to prefer, we chose to retain the later + // one because it happens just after mFastTimerLogThread is deleted. This + // comment is in case we guessed wrong, so we can move it here instead. // remove any old breakpad minidump files from the log directory if (! isError()) @@ -2045,7 +2038,7 @@ bool LLAppViewer::cleanup() sImageDecodeThread = NULL; delete mFastTimerLogThread; mFastTimerLogThread = NULL; - + if (LLFastTimerView::sAnalyzePerformance) { LL_INFOS() << "Analyzing performance" << LL_ENDL; -- cgit v1.2.3 From b30c8ed9c5e36dde628b9e35eeb3898cf8e6b5d0 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 14 Nov 2014 13:29:14 -0500 Subject: Comment out now-unused GPU_TABLE_FILENAME in llfeaturemanager.cpp. The "death to the GPU table" change has commented out the only references to the GPU_TABLE_FILENAME constant, and Xcode 6.x regards that as an error. --- indra/newview/llfeaturemanager.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 4db0422634..a1246e31d9 100755 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -76,7 +76,9 @@ const char FEATURE_TABLE_FILENAME[] = "featuretable%s.txt"; const char FEATURE_TABLE_VER_FILENAME[] = "featuretable%s.%s.txt"; #endif +#if 0 // consuming code in #if 0 below const char GPU_TABLE_FILENAME[] = "gpu_table.txt"; +#endif const char GPU_TABLE_VER_FILENAME[] = "gpu_table.%s.txt"; LLFeatureInfo::LLFeatureInfo(const std::string& name, const BOOL available, const F32 level) -- cgit v1.2.3 From 680194deaf7a35caaa629abc16e886d71baff636 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 21 Nov 2014 18:09:12 -0500 Subject: automate keeping the About SL -> Licenses tab correct --- indra/newview/CMakeLists.txt | 2 + indra/newview/llfloaterabout.cpp | 56 ++++++++------------- .../newview/skins/default/xui/en/floater_about.xml | 57 ++-------------------- indra/newview/viewer_manifest.py | 24 ++------- 4 files changed, 30 insertions(+), 109 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index f5a04a49d0..0905ae7a73 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -5,6 +5,7 @@ project(viewer) include(00-Common) include(Boost) include(BuildVersion) +include(BuildPackagesInfo) include(DBusGlib) include(DirectX) include(OpenSSL) @@ -1583,6 +1584,7 @@ set(viewer_APPSETTINGS_FILES app_settings/viewerart.xml ${CMAKE_SOURCE_DIR}/../etc/message.xml ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg + packages-info.txt ) source_group("App Settings" FILES ${viewer_APPSETTINGS_FILES}) diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 66149a4367..7ac3ac2f61 100755 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -123,18 +123,17 @@ BOOL LLFloaterAbout::postBuild() LLViewerTextEditor *support_widget = getChild("support_editor", true); - LLViewerTextEditor *linden_names_widget = - getChild("linden_names", true); - LLViewerTextEditor *contrib_names_widget = getChild("contrib_names", true); - LLViewerTextEditor *trans_names_widget = - getChild("trans_names", true); + LLViewerTextEditor *licenses_widget = + getChild("licenses_editor", true); getChild("copy_btn")->setCommitCallback( boost::bind(&LLFloaterAbout::onClickCopyToClipboard, this)); + static const LLUIColor about_color = LLUIColorTable::instance().getColor("TextFgReadOnlyColor"); + if (gAgent.getRegion()) { // start fetching server release notes URL @@ -153,24 +152,6 @@ BOOL LLFloaterAbout::postBuild() support_widget->setEnabled(FALSE); support_widget->startOfDoc(); - // Get the names of Lindens, added by viewer_manifest.py at build time - std::string lindens_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"lindens.txt"); - llifstream linden_file; - std::string lindens; - linden_file.open(lindens_path); /* Flawfinder: ignore */ - if (linden_file.is_open()) - { - std::getline(linden_file, lindens); // all names are on a single line - linden_file.close(); - linden_names_widget->setText(lindens); - } - else - { - LL_INFOS("AboutInit") << "Could not read lindens file at " << lindens_path << LL_ENDL; - } - linden_names_widget->setEnabled(FALSE); - linden_names_widget->startOfDoc(); - // Get the names of contributors, extracted from .../doc/contributions.txt by viewer_manifest.py at build time std::string contributors_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"contributors.txt"); llifstream contrib_file; @@ -189,23 +170,28 @@ BOOL LLFloaterAbout::postBuild() contrib_names_widget->setEnabled(FALSE); contrib_names_widget->startOfDoc(); - // Get the names of translators, extracted from .../doc/tranlations.txt by viewer_manifest.py at build time - std::string translators_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"translators.txt"); - llifstream trans_file; - std::string translators; - trans_file.open(translators_path); /* Flawfinder: ignore */ - if (trans_file.is_open()) + // Get the Versions and Copyrights, created at build time + std::string licenses_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"packages-info.txt"); + llifstream licenses_file; + licenses_file.open(licenses_path); /* Flawfinder: ignore */ + if (licenses_file.is_open()) { - std::getline(trans_file, translators); // all names are on a single line - trans_file.close(); + std::string license_line; + licenses_widget->clear(); + while ( std::getline(licenses_file, license_line) ) + { + licenses_widget->appendText(license_line+"\n", FALSE, + LLStyle::Params() .color(about_color)); + } + licenses_file.close(); } else { - LL_WARNS("AboutInit") << "Could not read translators file at " << translators_path << LL_ENDL; + // this case will use the (out of date) hard coded value from the XUI + LL_INFOS("AboutInit") << "Could not read licenses file at " << licenses_path << LL_ENDL; } - trans_names_widget->setText(translators); - trans_names_widget->setEnabled(FALSE); - trans_names_widget->startOfDoc(); + licenses_widget->setEnabled(FALSE); + licenses_widget->startOfDoc(); return TRUE; } diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index ef2f158a86..60f36770bb 100755 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -51,44 +51,20 @@ name="credits_panel"> -Second Life is brought to you by the Lindens: - - -Philip, Andrew, Doug, Richard, Phoenix, Ian, Mark, Robin, Dan, Char, Ryan, Eric, Jim, Lee, Jeff, Michael, Kelly, Steve, Catherine, Bub, Ramzi, Jill, Jeska, Don, Kona, Callum, Charity, Jack, Shawn, babbage, James, Lauren, Blue, Brent, Reuben, Pathfinder, Jesse, Patsy, Torley, Bo, Cyn, Jonathan, Gia, Annette, Ginsu, Harry, Lex, Runitai, Guy, Cornelius, Beth, Swiss, Thumper, Wendy, Teeple, Seth, Dee, Mia, Sally, Liana, Aura, Beez, Milo, Red, Gulliver, Marius, Joe, Jose, Dore, Justin, Nora, Morpheus, Lexie, Amber, Chris, Xan, Leyla, Walker, Sabin, Joshua, Hiromi, Tofu, Fritz, June, Jean, Ivy, Dez, Ken, Betsy, Which, Spike, Rob, Zee, Dustin, George, Claudia, del, Matthew, jane, jay, Adrian, Yool, Rika, Yoz, siobhan, Qarl, Benjamin, Beast, Everett, madhavi, Christopher, Izzy, stephany, Jeremy, sean, adreanne, Pramod, Tobin, sejong, Iridium, maurice, kj, Meta, kari, JP, bert, kyle, Jon, Socrates, Bridie, Ivan, maria, Aric, Coco, Periapse, sandy, Storrs, Lotte, Colossus, Brad, Pastrami, Zen, BigPapi, Banzai, Sardonyx, Mani, Garry, Jaime, Neuro, Samuel, Niko, CeeLo, Austin, Soft, Poppy, emma, tessa, angelo, kurz, alexa, Sue, CG, Blake, Erica, Brett, Bevis, kristen, Q, simon, Enus, MJ, laurap, Kip, Scouse, Ron, Ram, kend, Marty, Prospero, melissa, kraft, Nat, Seraph, Hamilton, Lordan, Green, miz, Ashlei, Trinity, Ekim, Echo, Charlie, Rowan, Rome, Jt, Doris, benoc, Christy, Bao, Kate, Tj, Patch, Cheah, Johan, Brandy, Angela, Oreh, Cogsworth, Lan, Mitchell, Space, Bambers, Einstein, Bender, Malbers, Matias, Maggie, Rothman, Milton, Niall, Marin, Allison, Mango, Andrea, Katt, Yi, Ambroff, Rico, Raymond, Gail, Christa, William, Dawn, Usi, Dynamike, M, Corr, Dante, Molly, kaylee, Danica, Kelv, Lil, jacob, Nya, Rodney, elsie, Blondin, Grant, Nyx, Devin, Monty, Minerva, Keira, Katie, Jenn, Makai, Clare, Joy, Cody, Gayathri, FJ, spider, Oskar, Landon, Jarv, Noelle, Al, Doc, Gray, Vir, t, Maestro, Simone, Shannon, yang, Courtney, Scott, charlene, Quixote, Susan, Zed, Amanda, Katelin, Esbee, JoRoan, Enkidu, roxie, Scarlet, Merov, Kevin, Judy, Rand, Newell, Les, Dessie, Galen, Michon, Geo, Siz, Calyle, Pete, Praveen, Callen, Sheldon, Pink, Nelson, jenelle, Terrence, Nathan, Juan, Sascha, Huseby, Karina, Kaye, Kotler, Lis, Darv, Charrell, Dakota, Kimmora, Theeba, Taka, Mae, Perry, Ducot, dana, Esther, Dough, gisele, Doten, Viale, Fisher, jessieann, ashley, Torres, delby, rountree, kurt, Slaton, Madison, Rue, Gino, Wen, Casssandra, Brodesky, Squid, Gez, Rakesh, Gecko, Ladan, Tony, Tatem, Squire, Falcon, BK, Crimp, Tiggs, Bacon, Coyot, Carmilla, Webb, Sea, Arch, Jillian, Jason, Bernard, Vogt, Peggy, dragon, Pup, xandix, Wallace, Bewest, Inoshiro, Rhett, AG, Aimee, Ghengis, Itiaes, Eli, Steffan, Epic, Grapes, Stone, Prep, Scobu, Robert, Alain, Carla, Vicky, Tia, Alec, Taras, Lisa, Oz, Ariane, Log, House, Kazu, Kim, Drofnas, Tyler, Campbell, Michele, Madeline, Nelly, Baron, Thor, Lori, Hele, Fredrik, Teddy, Pixie, Berry, Gabrielle, Alfonso, Brooke, Wolf, Ringo, Cru, Charlar, Rodvik, Gibson, Elise, Bagman, Greger, Leonidas, Jerm, Leslie, CB, Brenda, Durian, Carlo, mm, Zeeshan, Caleb, Max, Elikak, Mercille, Steph, Chase, Baker - - +Second Life is brought to you by the Lindens, with open source contributions from: -Dummy Name replaced at run time - - -and translations from: - - Dummy Name replaced at run time @@ -138,7 +89,7 @@ Dummy Name replaced at run time left="5" text_color="LtGray" max_length="65536" - name="credits_editor" + name="licenses_editor" top="5" width="435" word_wrap="true"> diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index a2039b4528..2394dd26b9 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -55,7 +55,6 @@ class ViewerManifest(LLManifest): def construct(self): super(ViewerManifest, self).construct() - self.exclude("*.svn*") self.path(src="../../scripts/messages/message_template.msg", dst="app_settings/message_template.msg") self.path(src="../../etc/message.xml", dst="app_settings/message.xml") @@ -74,26 +73,6 @@ class ViewerManifest(LLManifest): contributions_path = "../../doc/contributions.txt" contributor_names = self.extract_names(contributions_path) self.put_in_file(contributor_names, "contributors.txt", src=contributions_path) - # include the extracted list of translators - translations_path = "../../doc/translations.txt" - translator_names = self.extract_names(translations_path) - self.put_in_file(translator_names, "translators.txt", src=translations_path) - # include the list of Lindens (if any) - # see https://wiki.lindenlab.com/wiki/Generated_Linden_Credits - linden_names_path = os.getenv("LINDEN_CREDITS") - if not linden_names_path : - print "No 'LINDEN_CREDITS' specified in environment, using built-in list" - else: - try: - linden_file = open(linden_names_path,'r') - except IOError: - print "No Linden names found at '%s', using built-in list" % linden_names_path - else: - # all names should be one line, but the join below also converts to a string - linden_names = ', '.join(linden_file.readlines()) - self.put_in_file(linden_names, "lindens.txt", src=linden_names_path) - linden_file.close() - print "Linden names extracted from '%s'" % linden_names_path # ... and the entire windlight directory self.path("windlight") @@ -107,6 +86,9 @@ class ViewerManifest(LLManifest): self.path("dictionaries") self.end_prefix(pkgdir) + # include the extracted packages information (see BuildPackagesInfo.cmake) + self.path(src=os.path.join(self.args['build'],"packages-info.txt"), dst="packages-info.txt") + # CHOP-955: If we have "sourceid" or "viewer_channel" in the # build process environment, generate it into # settings_install.xml. -- cgit v1.2.3 From 23711c927561ee85b6d46e7e741cdc652649686e Mon Sep 17 00:00:00 2001 From: callum_linden Date: Wed, 10 Dec 2014 08:44:08 -0800 Subject: Rename llround(..) to ll_round(..) because of a collision with MS llround (long long round) in VS2013 --- indra/newview/lldrawable.cpp | 2 +- indra/newview/lldrawpoolbump.cpp | 4 +- indra/newview/llfasttimerview.cpp | 12 +-- indra/newview/llflexibleobject.cpp | 2 +- indra/newview/llfloaterbuyland.cpp | 4 +- indra/newview/llfloaterland.cpp | 8 +- indra/newview/llfloaterlandholdings.cpp | 4 +- indra/newview/llfloatermap.cpp | 4 +- indra/newview/llfloaterpathfindingcharacters.cpp | 2 +- indra/newview/llfloaterpreference.cpp | 4 +- indra/newview/llfloatersnapshot.cpp | 4 +- indra/newview/llfloaterworldmap.cpp | 6 +- indra/newview/llglsandbox.cpp | 8 +- indra/newview/llhudnametag.cpp | 2 +- indra/newview/lllandmarkactions.cpp | 10 +-- indra/newview/llmanip.cpp | 4 +- indra/newview/llmaniprotate.cpp | 8 +- indra/newview/llmanipscale.cpp | 14 ++-- indra/newview/llmaniptranslate.cpp | 8 +- indra/newview/llmediactrl.cpp | 18 ++--- indra/newview/llnetmap.cpp | 28 +++---- indra/newview/llpanelclassified.cpp | 6 +- indra/newview/llpanelgrouplandmoney.cpp | 4 +- indra/newview/llpanellandmarkinfo.cpp | 6 +- indra/newview/llpanelobject.cpp | 12 +-- indra/newview/llpanelpick.cpp | 6 +- indra/newview/llpanelplaceinfo.cpp | 12 +-- indra/newview/llpanelplaceprofile.cpp | 2 +- indra/newview/llpanelprimmediacontrols.cpp | 8 +- indra/newview/llslurl.cpp | 24 +++--- indra/newview/llsnapshotlivepreview.cpp | 16 ++-- indra/newview/llsurface.cpp | 12 +-- indra/newview/lltoolselectland.cpp | 4 +- indra/newview/llviewerdisplay.cpp | 8 +- indra/newview/llviewerkeyboard.cpp | 6 +- indra/newview/llviewermedia.cpp | 6 +- indra/newview/llviewerparcelmgr.cpp | 18 ++--- indra/newview/llviewerpartsim.cpp | 2 +- indra/newview/llviewerpartsource.cpp | 2 +- indra/newview/llviewertextureanim.cpp | 2 +- indra/newview/llviewerwindow.cpp | 94 ++++++------------------ indra/newview/llvlcomposition.cpp | 12 +-- indra/newview/llvoavatar.cpp | 2 +- indra/newview/llvoicevivox.cpp | 2 +- indra/newview/llvopartgroup.cpp | 2 +- indra/newview/llvovolume.cpp | 8 +- indra/newview/llwlanimator.cpp | 2 +- indra/newview/llworld.cpp | 4 +- indra/newview/llworldmapview.cpp | 44 +++++------ 49 files changed, 217 insertions(+), 265 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 7c96c71e21..3293b02131 100755 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -873,7 +873,7 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update) } pos -= camera.getOrigin(); - mDistanceWRTCamera = llround(pos.magVec(), 0.01f); + mDistanceWRTCamera = ll_round(pos.magVec(), 0.01f); mVObjp->updateLOD(); } } diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 67d1642639..33f7bc305c 100755 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -1329,7 +1329,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI for( i = minimum; i <= maximum; i++ ) { F32 minus_one_to_one = F32(maximum - i) * twice_one_over_range - 1.f; - bias_and_scale_lut[i] = llclampb(llround(127 * minus_one_to_one * ARTIFICIAL_SCALE + 128)); + bias_and_scale_lut[i] = llclampb(ll_round(127 * minus_one_to_one * ARTIFICIAL_SCALE + 128)); } } else @@ -1337,7 +1337,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI for( i = minimum; i <= maximum; i++ ) { F32 minus_one_to_one = F32(i - minimum) * twice_one_over_range - 1.f; - bias_and_scale_lut[i] = llclampb(llround(127 * minus_one_to_one * ARTIFICIAL_SCALE + 128)); + bias_and_scale_lut[i] = llclampb(ll_round(127 * minus_one_to_one * ARTIFICIAL_SCALE + 128)); } } diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index b618bdff2c..4a059fdc67 100755 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -219,7 +219,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) if (hasMouseCapture()) { F32 lerp = llclamp(1.f - (F32) (x - mGraphRect.mLeft) / (F32) mGraphRect.getWidth(), 0.f, 1.f); - mScrollIndex = llround( lerp * (F32)(mRecording.getNumRecordedPeriods() - MAX_VISIBLE_HISTORY)); + mScrollIndex = ll_round( lerp * (F32)(mRecording.getNumRecordedPeriods() - MAX_VISIBLE_HISTORY)); mScrollIndex = llclamp( mScrollIndex, 0, (S32)mRecording.getNumRecordedPeriods()); return TRUE; } @@ -1135,7 +1135,7 @@ void LLFastTimerView::drawLineGraph() max_time = llmax(F32Microseconds(1.f), F32Microseconds(cur_max)); } - max_calls = llround(lerp((F32)max_calls, (F32) cur_max_calls, LLSmoothInterpolation::getInterpolant(0.1f))); + max_calls = ll_round(lerp((F32)max_calls, (F32) cur_max_calls, LLSmoothInterpolation::getInterpolant(0.1f))); if (llabs((S32)(max_calls - cur_max_calls)) <= 1) { max_calls = cur_max_calls; @@ -1471,7 +1471,7 @@ void LLFastTimerView::drawBars() LLRect frame_bar_rect; frame_bar_rect.setLeftTopAndSize(mBarRect.mLeft, bars_top, - llround((mAverageTimerRow.mBars[0].mTotalTime / mTotalTimeDisplay) * mBarRect.getWidth()), + ll_round((mAverageTimerRow.mBars[0].mTotalTime / mTotalTimeDisplay) * mBarRect.getWidth()), bar_height); mAverageTimerRow.mTop = frame_bar_rect.mTop; mAverageTimerRow.mBottom = frame_bar_rect.mBottom; @@ -1485,7 +1485,7 @@ void LLFastTimerView::drawBars() row.mTop = frame_bar_rect.mTop; row.mBottom = frame_bar_rect.mBottom; frame_bar_rect.mRight = frame_bar_rect.mLeft - + llround((row.mBars[0].mTotalTime / mTotalTimeDisplay) * mBarRect.getWidth()); + + ll_round((row.mBars[0].mTotalTime / mTotalTimeDisplay) * mBarRect.getWidth()); drawBar(frame_bar_rect, row, image_width, image_height); frame_bar_rect.translate(0, -(bar_height + vpad)); @@ -1616,8 +1616,8 @@ S32 LLFastTimerView::drawBar(LLRect bar_rect, TimerBarRow& row, S32 image_width, } LLRect children_rect; - children_rect.mLeft = llround(timer_bar.mChildrenStart / mTotalTimeDisplay * (F32)mBarRect.getWidth()) + mBarRect.mLeft; - children_rect.mRight = llround(timer_bar.mChildrenEnd / mTotalTimeDisplay * (F32)mBarRect.getWidth()) + mBarRect.mLeft; + children_rect.mLeft = ll_round(timer_bar.mChildrenStart / mTotalTimeDisplay * (F32)mBarRect.getWidth()) + mBarRect.mLeft; + children_rect.mRight = ll_round(timer_bar.mChildrenEnd / mTotalTimeDisplay * (F32)mBarRect.getWidth()) + mBarRect.mLeft; if (bar_rect.getHeight() > MIN_BAR_HEIGHT) { diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index b64034b945..b6e61f83b1 100755 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -308,7 +308,7 @@ void LLVolumeImplFlexible::updateRenderRes() mRenderRes = (S32) (12.f*app_angle); #else //legacy behavior //number of segments only cares about z axis - F32 app_angle = llround((F32) atan2( mVO->getScale().mV[2]*2.f, drawablep->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f); + F32 app_angle = ll_round((F32) atan2( mVO->getScale().mV[2]*2.f, drawablep->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f); // Rendering sections increases with visible angle on the screen mRenderRes = (S32)(FLEXIBLE_OBJECT_MAX_SECTIONS*4*app_angle*DEG_TO_RAD/LLViewerCamera::getInstance()->getView()); diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index 8d4868d0d3..0a0e5ffc06 100755 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -389,9 +389,9 @@ void LLFloaterBuyLandUI::updateParcelInfo() } mParcelBillableArea = - llround(mRegion->getBillableFactor() * mParcelActualArea); + ll_round(mRegion->getBillableFactor() * mParcelActualArea); - mParcelSupportedObjects = llround( + mParcelSupportedObjects = ll_round( parcel->getMaxPrimCapacity() * parcel->getParcelPrimBonus()); // Can't have more than region max tasks, regardless of parcel // object bonus factor. diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 7621c35ed2..8c4feff1d9 100755 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -1224,7 +1224,7 @@ void LLPanelLandObjects::refresh() { S32 sw_max = parcel->getSimWideMaxPrimCapacity(); S32 sw_total = parcel->getSimWidePrimCount(); - S32 max = llround(parcel->getMaxPrimCapacity() * parcel->getParcelPrimBonus()); + S32 max = ll_round(parcel->getMaxPrimCapacity() * parcel->getParcelPrimBonus()); S32 total = parcel->getPrimCount(); S32 owned = parcel->getOwnerPrimCount(); S32 group = parcel->getGroupPrimCount(); @@ -2049,9 +2049,9 @@ void LLPanelLandOptions::refresh() else { mLocationText->setTextArg("[LANDING]",llformat("%d, %d, %d (%d\xC2\xB0)", - llround(pos.mV[VX]), - llround(pos.mV[VY]), - llround(pos.mV[VZ]), + ll_round(pos.mV[VX]), + ll_round(pos.mV[VY]), + ll_round(pos.mV[VZ]), user_look_at_angle)); } diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp index cf03087afb..f34760a6bf 100755 --- a/indra/newview/llfloaterlandholdings.cpp +++ b/indra/newview/llfloaterlandholdings.cpp @@ -208,8 +208,8 @@ void LLFloaterLandHoldings::processPlacesReply(LLMessageSystem* msg, void**) self->mActualArea += actual_area; self->mBillableArea += billable_area; - S32 region_x = llround(global_x) % REGION_WIDTH_UNITS; - S32 region_y = llround(global_y) % REGION_WIDTH_UNITS; + S32 region_x = ll_round(global_x) % REGION_WIDTH_UNITS; + S32 region_y = ll_round(global_y) % REGION_WIDTH_UNITS; std::string location; location = llformat("%s (%d, %d)", sim_name.c_str(), region_x, region_y); diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index bf5210206f..333ff863e5 100755 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -153,8 +153,8 @@ void LLFloaterMap::setDirectionPos( LLTextBox* text_box, F32 rotation ) radius -= 8.f; text_box->setOrigin( - llround(map_half_width - text_half_width + radius * cos( rotation )), - llround(map_half_height - text_half_height + radius * sin( rotation )) ); + ll_round(map_half_width - text_half_width + radius * cos( rotation )), + ll_round(map_half_height - text_half_height + radius * sin( rotation )) ); } void LLFloaterMap::updateMinorDirections() diff --git a/indra/newview/llfloaterpathfindingcharacters.cpp b/indra/newview/llfloaterpathfindingcharacters.cpp index 69c9d94dfa..87f927ff65 100755 --- a/indra/newview/llfloaterpathfindingcharacters.cpp +++ b/indra/newview/llfloaterpathfindingcharacters.cpp @@ -224,7 +224,7 @@ LLSD LLFloaterPathfindingCharacters::buildCharacterScrollListItemData(const LLPa columns[2]["column"] = "owner"; columns[2]["value"] = getOwnerName(pCharacterPtr); - S32 cpuTime = llround(pCharacterPtr->getCPUTime()); + S32 cpuTime = ll_round(pCharacterPtr->getCPUTime()); std::string cpuTimeString = llformat("%d", cpuTime); LLStringUtil::format_map_t string_args; string_args["[CPU_TIME]"] = cpuTimeString; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 1596861417..2047171e25 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -287,8 +287,8 @@ void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator) { if (fmodf((decimal_val * test_denominator) + 0.01f, 1.f) < 0.02f) { - numerator = llround(decimal_val * test_denominator); - denominator = llround(test_denominator); + numerator = ll_round(decimal_val * test_denominator); + denominator = ll_round(test_denominator); break; } } diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 8677028942..971da74158 100755 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -911,11 +911,11 @@ BOOL LLFloaterSnapshot::Impl::checkImageSize(LLSnapshotLivePreview* previewp, S3 //change another value proportionally if(isWidthChanged) { - height = llround(width / aspect_ratio) ; + height = ll_round(width / aspect_ratio) ; } else { - width = llround(height * aspect_ratio) ; + width = ll_round(height * aspect_ratio) ; } //bound w/h by the max_value diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index ff66bdedb0..cc4753577d 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -659,9 +659,9 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global) F32 region_y = (F32)fmod( pos_global.mdV[VY], (F64)REGION_WIDTH_METERS ); std::string full_name = llformat("%s (%d, %d, %d)", sim_name.c_str(), - llround(region_x), - llround(region_y), - llround((F32)pos_global.mdV[VZ])); + ll_round(region_x), + ll_round(region_y), + ll_round((F32)pos_global.mdV[VZ])); std::string tooltip(""); mTrackedStatus = LLTracker::TRACKING_LOCATION; diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 4b8ac2b3cf..9574691fee 100755 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -80,10 +80,10 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) S32 top = llmax(y, mDragStartY); S32 bottom =llmin(y, mDragStartY); - left = llround((F32) left * LLUI::getScaleFactor().mV[VX]); - right = llround((F32) right * LLUI::getScaleFactor().mV[VX]); - top = llround((F32) top * LLUI::getScaleFactor().mV[VY]); - bottom = llround((F32) bottom * LLUI::getScaleFactor().mV[VY]); + left = ll_round((F32) left * LLUI::getScaleFactor().mV[VX]); + right = ll_round((F32) right * LLUI::getScaleFactor().mV[VX]); + top = ll_round((F32) top * LLUI::getScaleFactor().mV[VY]); + bottom = ll_round((F32) bottom * LLUI::getScaleFactor().mV[VY]); F32 old_far_plane = LLViewerCamera::getInstance()->getFar(); F32 old_near_plane = LLViewerCamera::getInstance()->getNear(); diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp index 73711196e6..c7d108b6de 100755 --- a/indra/newview/llhudnametag.cpp +++ b/indra/newview/llhudnametag.cpp @@ -310,7 +310,7 @@ void LLHUDNameTag::renderText(BOOL for_select) { LLUIImagePtr rect_top_image = LLUI::getUIImage("Rounded_Rect_Top"); LLRect label_top_rect = screen_rect; - const S32 label_height = llround((mFontp->getLineHeight() * (F32)mLabelSegments.size() + (VERTICAL_PADDING / 3.f))); + const S32 label_height = ll_round((mFontp->getLineHeight() * (F32)mLabelSegments.size() + (VERTICAL_PADDING / 3.f))); label_top_rect.mBottom = label_top_rect.mTop - label_height; LLColor4 label_top_color = text_color; label_top_color.mV[VALPHA] = gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor; diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp index f893daaeb2..9c00243f44 100755 --- a/indra/newview/lllandmarkactions.cpp +++ b/indra/newview/lllandmarkactions.cpp @@ -74,9 +74,9 @@ public: if (!landmark->getGlobalPos(landmark_global_pos)) return false; //we have to round off each coordinates to compare positions properly - return llround(mPos.mdV[VX]) == llround(landmark_global_pos.mdV[VX]) - && llround(mPos.mdV[VY]) == llround(landmark_global_pos.mdV[VY]) - && llround(mPos.mdV[VZ]) == llround(landmark_global_pos.mdV[VZ]); + return ll_round(mPos.mdV[VX]) == ll_round(landmark_global_pos.mdV[VX]) + && ll_round(mPos.mdV[VY]) == ll_round(landmark_global_pos.mdV[VY]) + && ll_round(mPos.mdV[VZ]) == ll_round(landmark_global_pos.mdV[VZ]); } }; @@ -320,7 +320,7 @@ void LLLandmarkActions::getRegionNameAndCoordsFromPosGlobal(const LLVector3d& gl { LLVector3 pos = sim_infop->getLocalPos(global_pos); std::string name = sim_infop->getName() ; - cb(name, llround(pos.mV[VX]), llround(pos.mV[VY]),llround(pos.mV[VZ])); + cb(name, ll_round(pos.mV[VX]), ll_round(pos.mV[VY]),ll_round(pos.mV[VZ])); } else { @@ -364,7 +364,7 @@ void LLLandmarkActions::onRegionResponseNameAndCoords(region_name_and_coords_cal { LLVector3 local_pos = sim_infop->getLocalPos(global_pos); std::string name = sim_infop->getName() ; - cb(name, llround(local_pos.mV[VX]), llround(local_pos.mV[VY]), llround(local_pos.mV[VZ])); + cb(name, ll_round(local_pos.mV[VX]), ll_round(local_pos.mV[VY]), ll_round(local_pos.mV[VZ])); } } diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp index 0935691ebc..8567180dd6 100755 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -521,8 +521,8 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string std::string val_string; std::string fraction_string; - F32 val_to_print = llround(value, 0.001f); - S32 fractional_portion = llround(fmodf(llabs(val_to_print), 1.f) * 100.f); + F32 val_to_print = ll_round(value, 0.001f); + S32 fractional_portion = ll_round(fmodf(llabs(val_to_print), 1.f) * 100.f); if (val_to_print < 0.f) { if (fractional_portion == 0) diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index 7861573908..25d4c12b8d 100755 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -368,9 +368,9 @@ void LLManipRotate::render() LLQuaternion object_rot = first_object->getRotationEdit(); object_rot.getEulerAngles(&(euler_angles.mV[VX]), &(euler_angles.mV[VY]), &(euler_angles.mV[VZ])); euler_angles *= RAD_TO_DEG; - euler_angles.mV[VX] = llround(fmodf(euler_angles.mV[VX] + 360.f, 360.f), 0.05f); - euler_angles.mV[VY] = llround(fmodf(euler_angles.mV[VY] + 360.f, 360.f), 0.05f); - euler_angles.mV[VZ] = llround(fmodf(euler_angles.mV[VZ] + 360.f, 360.f), 0.05f); + euler_angles.mV[VX] = ll_round(fmodf(euler_angles.mV[VX] + 360.f, 360.f), 0.05f); + euler_angles.mV[VY] = ll_round(fmodf(euler_angles.mV[VY] + 360.f, 360.f), 0.05f); + euler_angles.mV[VZ] = ll_round(fmodf(euler_angles.mV[VZ] + 360.f, 360.f), 0.05f); renderXYZ(euler_angles); } @@ -1524,7 +1524,6 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y ) F32 mouse_angle = fmodf(atan2(projected_mouse * axis1, projected_mouse * axis2) * RAD_TO_DEG + 360.f, 360.f); F32 relative_mouse_angle = fmodf(mouse_angle + (SNAP_ANGLE_DETENTE / 2), SNAP_ANGLE_INCREMENT); - //fmodf(llround(mouse_angle * RAD_TO_DEG, 7.5f) + 360.f, 360.f); LLVector3 object_axis; getObjectAxisClosestToMouse(object_axis); @@ -1608,7 +1607,6 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y ) F32 mouse_angle = fmodf(atan2(projected_mouse * axis1, projected_mouse * axis2) * RAD_TO_DEG + 360.f, 360.f); F32 relative_mouse_angle = fmodf(mouse_angle + (SNAP_ANGLE_DETENTE / 2), SNAP_ANGLE_INCREMENT); - //fmodf(llround(mouse_angle * RAD_TO_DEG, 7.5f) + 360.f, 360.f); LLVector3 object_axis; getObjectAxisClosestToMouse(object_axis); diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 84bec74a16..ed833cba53 100755 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -1552,8 +1552,8 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) mScaleSnapUnit1 = mScaleSnapUnit1 / (mSnapDir1 * mScaleDir); mScaleSnapUnit2 = mScaleSnapUnit2 / (mSnapDir2 * mScaleDir); - mTickPixelSpacing1 = llround((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir1).length()); - mTickPixelSpacing2 = llround((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir2).length()); + mTickPixelSpacing1 = ll_round((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir1).length()); + mTickPixelSpacing2 = ll_round((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir2).length()); if (uniform) { @@ -1624,8 +1624,8 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) F32 grid_offset2 = fmodf(dist_grid_axis, smallest_subdivision2); // how many smallest grid units are we away from largest grid scale? - S32 sub_div_offset_1 = llround(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 / sGridMinSubdivisionLevel) / smallest_subdivision1); - S32 sub_div_offset_2 = llround(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 / sGridMinSubdivisionLevel) / smallest_subdivision2); + S32 sub_div_offset_1 = ll_round(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 / sGridMinSubdivisionLevel) / smallest_subdivision1); + S32 sub_div_offset_2 = ll_round(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 / sGridMinSubdivisionLevel) / smallest_subdivision2); S32 num_ticks_per_side1 = llmax(1, lltrunc(0.5f * mSnapGuideLength / smallest_subdivision1)); S32 num_ticks_per_side2 = llmax(1, lltrunc(0.5f * mSnapGuideLength / smallest_subdivision2)); @@ -1679,7 +1679,7 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) LLVector2 screen_translate_axis(llabs(mScaleDir * LLViewerCamera::getInstance()->getLeftAxis()), llabs(mScaleDir * LLViewerCamera::getInstance()->getUpAxis())); screen_translate_axis.normalize(); - S32 tick_label_spacing = llround(screen_translate_axis * sTickLabelSpacing); + S32 tick_label_spacing = ll_round(screen_translate_axis * sTickLabelSpacing); for (pass = 0; pass < 3; pass++) { @@ -1759,8 +1759,8 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) stop_tick = llmin(max_ticks1, num_ticks_per_side1); F32 grid_resolution = mObjectSelection->getSelectType() == SELECT_TYPE_HUD ? 0.25f : llmax(gSavedSettings.getF32("GridResolution"), 0.001f); - S32 label_sub_div_offset_1 = llround(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 * 32.f) / smallest_subdivision1); - S32 label_sub_div_offset_2 = llround(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 * 32.f) / smallest_subdivision2); + S32 label_sub_div_offset_1 = ll_round(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 * 32.f) / smallest_subdivision1); + S32 label_sub_div_offset_2 = ll_round(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 * 32.f) / smallest_subdivision2); for (S32 i = start_tick; i <= stop_tick; i++) { diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index cd41183601..394db71fb9 100755 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -1245,7 +1245,7 @@ void LLManipTranslate::renderSnapGuides() // find distance to nearest smallest grid unit F32 offset_nearest_grid_unit = fmodf(dist_grid_axis, smallest_grid_unit_scale); // how many smallest grid units are we away from largest grid scale? - S32 sub_div_offset = llround(fmodf(dist_grid_axis - offset_nearest_grid_unit, getMinGridScale() / sGridMinSubdivisionLevel) / smallest_grid_unit_scale); + S32 sub_div_offset = ll_round(fmodf(dist_grid_axis - offset_nearest_grid_unit, getMinGridScale() / sGridMinSubdivisionLevel) / smallest_grid_unit_scale); S32 num_ticks_per_side = llmax(1, llfloor(0.5f * guide_size_meters / smallest_grid_unit_scale)); LLGLDepthTest gls_depth(GL_FALSE); @@ -1360,12 +1360,12 @@ void LLManipTranslate::renderSnapGuides() } } - sub_div_offset = llround(fmod(dist_grid_axis - offset_nearest_grid_unit, getMinGridScale() * 32.f) / smallest_grid_unit_scale); + sub_div_offset = ll_round(fmod(dist_grid_axis - offset_nearest_grid_unit, getMinGridScale() * 32.f) / smallest_grid_unit_scale); LLVector2 screen_translate_axis(llabs(translate_axis * LLViewerCamera::getInstance()->getLeftAxis()), llabs(translate_axis * LLViewerCamera::getInstance()->getUpAxis())); screen_translate_axis.normVec(); - S32 tick_label_spacing = llround(screen_translate_axis * sTickLabelSpacing); + S32 tick_label_spacing = ll_round(screen_translate_axis * sTickLabelSpacing); // render tickmark values for (S32 i = -num_ticks_per_side; i <= num_ticks_per_side; i++) @@ -1403,7 +1403,7 @@ void LLManipTranslate::renderSnapGuides() F32 offset_val = 0.5f * tick_offset.mV[ARROW_TO_AXIS[mManipPart]] / getMinGridScale(); EGridMode grid_mode = LLSelectMgr::getInstance()->getGridMode(); F32 text_highlight = 0.8f; - if(i - llround(offset_nearest_grid_unit / smallest_grid_unit_scale) == 0 && mInSnapRegime) + if(i - ll_round(offset_nearest_grid_unit / smallest_grid_unit_scale) == 0 && mInSnapRegime) { text_highlight = 1.f; } diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index f4e08dc790..b96bdd73ff 100755 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -120,8 +120,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : if(!getDecoupleTextureSize()) { - S32 screen_width = llround((F32)getRect().getWidth() * LLUI::getScaleFactor().mV[VX]); - S32 screen_height = llround((F32)getRect().getHeight() * LLUI::getScaleFactor().mV[VY]); + S32 screen_width = ll_round((F32)getRect().getWidth() * LLUI::getScaleFactor().mV[VX]); + S32 screen_height = ll_round((F32)getRect().getHeight() * LLUI::getScaleFactor().mV[VY]); setTextureSize(screen_width, screen_height); } @@ -474,8 +474,8 @@ void LLMediaCtrl::reshape( S32 width, S32 height, BOOL called_from_parent ) { if(!getDecoupleTextureSize()) { - S32 screen_width = llround((F32)width * LLUI::getScaleFactor().mV[VX]); - S32 screen_height = llround((F32)height * LLUI::getScaleFactor().mV[VY]); + S32 screen_width = ll_round((F32)width * LLUI::getScaleFactor().mV[VX]); + S32 screen_height = ll_round((F32)height * LLUI::getScaleFactor().mV[VY]); // when floater is minimized, these sizes are negative if ( screen_height > 0 && screen_width > 0 ) @@ -789,13 +789,13 @@ void LLMediaCtrl::draw() { // max width, adjusted height width = r.getWidth(); - height = llmin(llmax(llround(width / media_aspect), 0), r.getHeight()); + height = llmin(llmax(ll_round(width / media_aspect), 0), r.getHeight()); } else { // max height, adjusted width height = r.getHeight(); - width = llmin(llmax(llround(height * media_aspect), 0), r.getWidth()); + width = llmin(llmax(ll_round(height * media_aspect), 0), r.getWidth()); } } else @@ -879,14 +879,14 @@ void LLMediaCtrl::convertInputCoords(S32& x, S32& y) coords_opengl = mMediaSource->getMediaPlugin()->getTextureCoordsOpenGL(); } - x = llround((F32)x * LLUI::getScaleFactor().mV[VX]); + x = ll_round((F32)x * LLUI::getScaleFactor().mV[VX]); if ( ! coords_opengl ) { - y = llround((F32)(y) * LLUI::getScaleFactor().mV[VY]); + y = ll_round((F32)(y) * LLUI::getScaleFactor().mV[VY]); } else { - y = llround((F32)(getRect().getHeight() - y) * LLUI::getScaleFactor().mV[VY]); + y = ll_round((F32)(getRect().getHeight() - y) * LLUI::getScaleFactor().mV[VY]); }; } diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 5abc9dbbe2..d7e7f13e87 100755 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -209,7 +209,7 @@ void LLNetMap::draw() } // figure out where agent is - S32 region_width = llround(LLWorld::getInstance()->getRegionWidthInMeters()); + S32 region_width = ll_round(LLWorld::getInstance()->getRegionWidthInMeters()); for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) @@ -380,8 +380,8 @@ void LLNetMap::draw() (pos_map.mV[VX] >= getRect().getWidth()) || (pos_map.mV[VY] >= getRect().getHeight()) ) { - S32 x = llround( pos_map.mV[VX] ); - S32 y = llround( pos_map.mV[VY] ); + S32 x = ll_round( pos_map.mV[VX] ); + S32 y = ll_round( pos_map.mV[VY] ); LLWorldMapView::drawTrackingCircle( getRect(), x, y, color, 1, 10); } else { @@ -421,12 +421,12 @@ void LLNetMap::draw() // Draw dot for self avatar position LLVector3d pos_global = gAgent.getPositionGlobal(); pos_map = globalPosToView(pos_global); - S32 dot_width = llround(mDotRadius * 2.f); + S32 dot_width = ll_round(mDotRadius * 2.f); LLUIImagePtr you = LLWorldMapView::sAvatarYouLargeImage; if (you) { - you->draw(llround(pos_map.mV[VX] - mDotRadius), - llround(pos_map.mV[VY] - mDotRadius), + you->draw(ll_round(pos_map.mV[VX] - mDotRadius), + ll_round(pos_map.mV[VY] - mDotRadius), dot_width, dot_width); @@ -530,8 +530,8 @@ void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color, { if (draw_arrow) { - S32 x = llround( pos_local.mV[VX] ); - S32 y = llround( pos_local.mV[VY] ); + S32 x = ll_round( pos_local.mV[VX] ); + S32 y = ll_round( pos_local.mV[VY] ); LLWorldMapView::drawTrackingCircle( getRect(), x, y, color, 1, 10 ); LLWorldMapView::drawTrackingArrow( getRect(), x, y, color ); } @@ -547,8 +547,8 @@ void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color, LLVector3d LLNetMap::viewPosToGlobal( S32 x, S32 y ) { - x -= llround(getRect().getWidth() / 2 + mCurPan.mV[VX]); - y -= llround(getRect().getHeight() / 2 + mCurPan.mV[VY]); + x -= ll_round(getRect().getWidth() / 2 + mCurPan.mV[VX]); + y -= ll_round(getRect().getHeight() / 2 + mCurPan.mV[VY]); LLVector3 pos_local( (F32)x, (F32)y, 0 ); @@ -684,7 +684,7 @@ void LLNetMap::renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U & LLVector3 local_pos; local_pos.setVec( pos - mObjectImageCenterGlobal ); - S32 diameter_pixels = llround(2 * radius_meters * mObjectMapTPM); + S32 diameter_pixels = ll_round(2 * radius_meters * mObjectMapTPM); renderPoint( local_pos, color, diameter_pixels ); } @@ -700,8 +700,8 @@ void LLNetMap::renderPoint(const LLVector3 &pos_local, const LLColor4U &color, const S32 image_width = (S32)mObjectImagep->getWidth(); const S32 image_height = (S32)mObjectImagep->getHeight(); - S32 x_offset = llround(pos_local.mV[VX] * mObjectMapTPM + image_width / 2); - S32 y_offset = llround(pos_local.mV[VY] * mObjectMapTPM + image_height / 2); + S32 x_offset = ll_round(pos_local.mV[VX] * mObjectMapTPM + image_width / 2); + S32 y_offset = ll_round(pos_local.mV[VY] * mObjectMapTPM + image_height / 2); if ((x_offset < 0) || (x_offset >= image_width)) { @@ -780,7 +780,7 @@ void LLNetMap::createObjectImage() // ... which is, the diagonal of the rect. F32 width = (F32)getRect().getWidth(); F32 height = (F32)getRect().getHeight(); - S32 square_size = llround( sqrt(width*width + height*height) ); + S32 square_size = ll_round( sqrt(width*width + height*height) ); // Find the least power of two >= the minimum size. const S32 MIN_SIZE = 64; diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 3cd39d7c7e..878f1af9ef 100755 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -462,9 +462,9 @@ std::string LLPanelClassifiedInfo::createLocationText( if (!pos_global.isNull()) { - S32 region_x = llround((F32)pos_global.mdV[VX]) % REGION_WIDTH_UNITS; - S32 region_y = llround((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS; - S32 region_z = llround((F32)pos_global.mdV[VZ]); + S32 region_x = ll_round((F32)pos_global.mdV[VX]) % REGION_WIDTH_UNITS; + S32 region_y = ll_round((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS; + S32 region_z = ll_round((F32)pos_global.mdV[VZ]); location_text.append(llformat(" (%d, %d, %d)", region_x, region_y, region_z)); } diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index 375c54479d..7f82eecdb0 100755 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -473,8 +473,8 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) land_type = LLTrans::getString("land_type_unknown"); } - S32 region_x = llround(global_x) % REGION_WIDTH_UNITS; - S32 region_y = llround(global_y) % REGION_WIDTH_UNITS; + S32 region_x = ll_round(global_x) % REGION_WIDTH_UNITS; + S32 region_y = ll_round(global_y) % REGION_WIDTH_UNITS; std::string location = sim_name + llformat(" (%d, %d)", region_x, region_y); std::string area; committed+=billable_area; diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 63ddc05037..a660cb3b21 100755 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -131,9 +131,9 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type) if (name.empty()) { - S32 region_x = llround(agent_pos.mV[VX]); - S32 region_y = llround(agent_pos.mV[VY]); - S32 region_z = llround(agent_pos.mV[VZ]); + S32 region_x = ll_round(agent_pos.mV[VX]); + S32 region_y = ll_round(agent_pos.mV[VY]); + S32 region_z = ll_round(agent_pos.mV[VZ]); std::string region_name; LLViewerRegion* region = parcel_mgr->getSelectionRegion(); diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 9123252f4c..ba23e7013d 100755 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -411,9 +411,9 @@ void LLPanelObject::getState( ) LLQuaternion object_rot = objectp->getRotationEdit(); object_rot.getEulerAngles(&(mCurEulerDegrees.mV[VX]), &(mCurEulerDegrees.mV[VY]), &(mCurEulerDegrees.mV[VZ])); mCurEulerDegrees *= RAD_TO_DEG; - mCurEulerDegrees.mV[VX] = fmod(llround(mCurEulerDegrees.mV[VX], OBJECT_ROTATION_PRECISION) + 360.f, 360.f); - mCurEulerDegrees.mV[VY] = fmod(llround(mCurEulerDegrees.mV[VY], OBJECT_ROTATION_PRECISION) + 360.f, 360.f); - mCurEulerDegrees.mV[VZ] = fmod(llround(mCurEulerDegrees.mV[VZ], OBJECT_ROTATION_PRECISION) + 360.f, 360.f); + mCurEulerDegrees.mV[VX] = fmod(ll_round(mCurEulerDegrees.mV[VX], OBJECT_ROTATION_PRECISION) + 360.f, 360.f); + mCurEulerDegrees.mV[VY] = fmod(ll_round(mCurEulerDegrees.mV[VY], OBJECT_ROTATION_PRECISION) + 360.f, 360.f); + mCurEulerDegrees.mV[VZ] = fmod(ll_round(mCurEulerDegrees.mV[VZ], OBJECT_ROTATION_PRECISION) + 360.f, 360.f); if (enable_rotate) { @@ -1567,9 +1567,9 @@ void LLPanelObject::sendRotation(BOOL btn_down) if (mObject.isNull()) return; LLVector3 new_rot(mCtrlRotX->get(), mCtrlRotY->get(), mCtrlRotZ->get()); - new_rot.mV[VX] = llround(new_rot.mV[VX], OBJECT_ROTATION_PRECISION); - new_rot.mV[VY] = llround(new_rot.mV[VY], OBJECT_ROTATION_PRECISION); - new_rot.mV[VZ] = llround(new_rot.mV[VZ], OBJECT_ROTATION_PRECISION); + new_rot.mV[VX] = ll_round(new_rot.mV[VX], OBJECT_ROTATION_PRECISION); + new_rot.mV[VY] = ll_round(new_rot.mV[VY], OBJECT_ROTATION_PRECISION); + new_rot.mV[VZ] = ll_round(new_rot.mV[VZ], OBJECT_ROTATION_PRECISION); // Note: must compare before conversion to radians LLVector3 delta = new_rot - mCurEulerDegrees; diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp index 44cca21a76..8fa9aac024 100755 --- a/indra/newview/llpanelpick.cpp +++ b/indra/newview/llpanelpick.cpp @@ -284,9 +284,9 @@ std::string LLPanelPickInfo::createLocationText(const std::string& owner_name, c if (!pos_global.isNull()) { - S32 region_x = llround((F32)pos_global.mdV[VX]) % REGION_WIDTH_UNITS; - S32 region_y = llround((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS; - S32 region_z = llround((F32)pos_global.mdV[VZ]); + S32 region_x = ll_round((F32)pos_global.mdV[VX]) % REGION_WIDTH_UNITS; + S32 region_y = ll_round((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS; + S32 region_z = ll_round((F32)pos_global.mdV[VZ]); location_text.append(llformat(" (%d, %d, %d)", region_x, region_y, region_z)); } return location_text; diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index 4e7c5f6ed2..e62b5a4f1d 100755 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -231,15 +231,15 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data) // If the region position is zero, grab position from the global if(mPosRegion.isExactlyZero()) { - region_x = llround(parcel_data.global_x) % REGION_WIDTH_UNITS; - region_y = llround(parcel_data.global_y) % REGION_WIDTH_UNITS; - region_z = llround(parcel_data.global_z); + region_x = ll_round(parcel_data.global_x) % REGION_WIDTH_UNITS; + region_y = ll_round(parcel_data.global_y) % REGION_WIDTH_UNITS; + region_z = ll_round(parcel_data.global_z); } else { - region_x = llround(mPosRegion.mV[VX]); - region_y = llround(mPosRegion.mV[VY]); - region_z = llround(mPosRegion.mV[VZ]); + region_x = ll_round(mPosRegion.mV[VX]); + region_y = ll_round(mPosRegion.mV[VY]); + region_z = ll_round(mPosRegion.mV[VZ]); } if (!parcel_data.name.empty()) diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index ed91d277dd..e853b2d050 100755 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -551,7 +551,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, // Can't have more than region max tasks, regardless of parcel // object bonus factor. - S32 primitives = llmin(llround(parcel->getMaxPrimCapacity() * parcel->getParcelPrimBonus()), + S32 primitives = llmin(ll_round(parcel->getMaxPrimCapacity() * parcel->getParcelPrimBonus()), (S32)region->getMaxTasks()); const U8* available = (U8*)getString("available").c_str(); diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 7c0e448a99..f42df221e4 100755 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -630,12 +630,12 @@ void LLPanelPrimMediaControls::updateShape() // convert screenspace bbox to pixels (in screen coords) LLRect window_rect = gViewerWindow->getWorldViewRectScaled(); LLCoordGL screen_min; - screen_min.mX = llround((F32)window_rect.mLeft + (F32)window_rect.getWidth() * (min.mV[VX] + 1.f) * 0.5f); - screen_min.mY = llround((F32)window_rect.mBottom + (F32)window_rect.getHeight() * (min.mV[VY] + 1.f) * 0.5f); + screen_min.mX = ll_round((F32)window_rect.mLeft + (F32)window_rect.getWidth() * (min.mV[VX] + 1.f) * 0.5f); + screen_min.mY = ll_round((F32)window_rect.mBottom + (F32)window_rect.getHeight() * (min.mV[VY] + 1.f) * 0.5f); LLCoordGL screen_max; - screen_max.mX = llround((F32)window_rect.mLeft + (F32)window_rect.getWidth() * (max.mV[VX] + 1.f) * 0.5f); - screen_max.mY = llround((F32)window_rect.mBottom + (F32)window_rect.getHeight() * (max.mV[VY] + 1.f) * 0.5f); + screen_max.mX = ll_round((F32)window_rect.mLeft + (F32)window_rect.getWidth() * (max.mV[VX] + 1.f) * 0.5f); + screen_max.mY = ll_round((F32)window_rect.mBottom + (F32)window_rect.getHeight() * (max.mV[VY] + 1.f) * 0.5f); // grow panel so that screenspace bounding box fits inside "media_region" element of panel LLRect media_panel_rect; diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp index 3a82233320..728fc69723 100755 --- a/indra/newview/llslurl.cpp +++ b/indra/newview/llslurl.cpp @@ -323,9 +323,9 @@ LLSLURL::LLSLURL(const std::string& grid, { mGrid = grid; mRegion = region; - S32 x = llround( (F32)fmod( position[VX], (F32)REGION_WIDTH_METERS ) ); - S32 y = llround( (F32)fmod( position[VY], (F32)REGION_WIDTH_METERS ) ); - S32 z = llround( (F32)position[VZ] ); + S32 x = ll_round( (F32)fmod( position[VX], (F32)REGION_WIDTH_METERS ) ); + S32 y = ll_round( (F32)fmod( position[VY], (F32)REGION_WIDTH_METERS ) ); + S32 z = ll_round( (F32)position[VZ] ); mType = LOCATION; mPosition = LLVector3(x, y, z); } @@ -379,9 +379,9 @@ std::string LLSLURL::getSLURLString() const case LOCATION: { // lookup the grid - S32 x = llround( (F32)mPosition[VX] ); - S32 y = llround( (F32)mPosition[VY] ); - S32 z = llround( (F32)mPosition[VZ] ); + S32 x = ll_round( (F32)mPosition[VX] ); + S32 y = ll_round( (F32)mPosition[VY] ); + S32 z = ll_round( (F32)mPosition[VZ] ); return LLGridManager::getInstance()->getSLURLBase(mGrid) + LLURI::escape(mRegion) + llformat("/%d/%d/%d",x,y,z); } @@ -416,9 +416,9 @@ std::string LLSLURL::getLoginString() const case LOCATION: unescaped_start << "uri:" << mRegion << "&" - << llround(mPosition[0]) << "&" - << llround(mPosition[1]) << "&" - << llround(mPosition[2]); + << ll_round(mPosition[0]) << "&" + << ll_round(mPosition[1]) << "&" + << ll_round(mPosition[2]); break; case HOME_LOCATION: unescaped_start << "home"; @@ -462,9 +462,9 @@ std::string LLSLURL::getLocationString() const { return llformat("%s/%d/%d/%d", mRegion.c_str(), - (int)llround(mPosition[0]), - (int)llround(mPosition[1]), - (int)llround(mPosition[2])); + (int)ll_round(mPosition[0]), + (int)ll_round(mPosition[1]), + (int)ll_round(mPosition[2])); } // static diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 600ebf5914..ee5fd7cb71 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -177,14 +177,14 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail if (image_aspect_ratio > window_aspect_ratio) { // trim off top and bottom - S32 new_height = llround((F32)getRect().getWidth() / image_aspect_ratio); + S32 new_height = ll_round((F32)getRect().getWidth() / image_aspect_ratio); rect.mBottom += (getRect().getHeight() - new_height) / 2; rect.mTop -= (getRect().getHeight() - new_height) / 2; } else if (image_aspect_ratio < window_aspect_ratio) { // trim off left and right - S32 new_width = llround((F32)getRect().getHeight() * image_aspect_ratio); + S32 new_width = ll_round((F32)getRect().getHeight() * image_aspect_ratio); rect.mLeft += (getRect().getWidth() - new_width) / 2; rect.mRight -= (getRect().getWidth() - new_width) / 2; } @@ -345,9 +345,9 @@ void LLSnapshotLivePreview::draw() LLLocalClipRect clip(getLocalRect()); { // draw diagonal stripe with gradient that passes over screen - S32 x1 = gViewerWindow->getWindowWidthScaled() * llround((clamp_rescale(shine_interp, 0.f, 1.f, -1.f - SHINE_WIDTH, 1.f))); - S32 x2 = x1 + llround(gViewerWindow->getWindowWidthScaled() * SHINE_WIDTH); - S32 x3 = x2 + llround(gViewerWindow->getWindowWidthScaled() * SHINE_WIDTH); + S32 x1 = gViewerWindow->getWindowWidthScaled() * ll_round((clamp_rescale(shine_interp, 0.f, 1.f, -1.f - SHINE_WIDTH, 1.f))); + S32 x2 = x1 + ll_round(gViewerWindow->getWindowWidthScaled() * SHINE_WIDTH); + S32 x3 = x2 + ll_round(gViewerWindow->getWindowWidthScaled() * SHINE_WIDTH); S32 y1 = 0; S32 y2 = gViewerWindow->getWindowHeightScaled(); @@ -429,7 +429,7 @@ void LLSnapshotLivePreview::draw() gGL.pushMatrix(); { LLRect& rect = mImageRect[old_image_index]; - gGL.translatef((F32)rect.mLeft, (F32)rect.mBottom - llround(getRect().getHeight() * 2.f * (fall_interp * fall_interp)), 0.f); + gGL.translatef((F32)rect.mLeft, (F32)rect.mBottom - ll_round(getRect().getHeight() * 2.f * (fall_interp * fall_interp)), 0.f); gGL.rotatef(-45.f * fall_interp, 0.f, 0.f, 1.f); gGL.begin(LLRender::QUADS); { @@ -483,13 +483,13 @@ BOOL LLSnapshotLivePreview::setThumbnailImageSize() { // image too wide, shrink to width mThumbnailWidth = max_width; - mThumbnailHeight = llround((F32)max_width / aspect_ratio); + mThumbnailHeight = ll_round((F32)max_width / aspect_ratio); } else { // image too tall, shrink to height mThumbnailHeight = max_height; - mThumbnailWidth = llround((F32)max_height * aspect_ratio); + mThumbnailWidth = ll_round((F32)max_height * aspect_ratio); } if (mThumbnailWidth > width || mThumbnailHeight > height) diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp index e75af8db53..503dd6747d 100755 --- a/indra/newview/llsurface.cpp +++ b/indra/newview/llsurface.cpp @@ -1232,10 +1232,10 @@ BOOL LLSurface::generateWaterTexture(const F32 x, const F32 y, S32 x_begin, y_begin, x_end, y_end; - x_begin = llround(x * scale_inv); - y_begin = llround(y * scale_inv); - x_end = llround((x + width) * scale_inv); - y_end = llround((y + width) * scale_inv); + x_begin = ll_round(x * scale_inv); + y_begin = ll_round(y * scale_inv); + x_end = ll_round((x + width) * scale_inv); + y_end = ll_round((y + width) * scale_inv); if (x_end > tex_width) { @@ -1283,9 +1283,9 @@ BOOL LLSurface::generateWaterTexture(const F32 x, const F32 y, // Want non-linear curve for transparency gradient coloru = MAX_WATER_COLOR; const F32 frac = 1.f - 2.f/(2.f - (height - WATER_HEIGHT)); - S32 alpha = 64 + llround((255-64)*frac); + S32 alpha = 64 + ll_round((255-64)*frac); - alpha = llmin(llround((F32)MAX_WATER_COLOR.mV[3]), alpha); + alpha = llmin(ll_round((F32)MAX_WATER_COLOR.mV[3]), alpha); alpha = llmax(64, alpha); coloru.mV[3] = alpha; diff --git a/indra/newview/lltoolselectland.cpp b/indra/newview/lltoolselectland.cpp index 44c0cb3124..ff991dc9fd 100755 --- a/indra/newview/lltoolselectland.cpp +++ b/indra/newview/lltoolselectland.cpp @@ -219,8 +219,8 @@ void LLToolSelectLand::handleDeselect() void LLToolSelectLand::roundXY(LLVector3d &vec) { - vec.mdV[VX] = llround( vec.mdV[VX], (F64)PARCEL_GRID_STEP_METERS ); - vec.mdV[VY] = llround( vec.mdV[VY], (F64)PARCEL_GRID_STEP_METERS ); + vec.mdV[VX] = ll_round( vec.mdV[VX], (F64)PARCEL_GRID_STEP_METERS ); + vec.mdV[VY] = ll_round( vec.mdV[VY], (F64)PARCEL_GRID_STEP_METERS ); } diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 981e4c40aa..cd9b2ed11b 100755 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1176,8 +1176,8 @@ LLRect get_whole_screen_region() if (zoom_factor > 1.f) { S32 num_horizontal_tiles = llceil(zoom_factor); - S32 tile_width = llround((F32)gViewerWindow->getWorldViewWidthScaled() / zoom_factor); - S32 tile_height = llround((F32)gViewerWindow->getWorldViewHeightScaled() / zoom_factor); + S32 tile_width = ll_round((F32)gViewerWindow->getWorldViewWidthScaled() / zoom_factor); + S32 tile_height = ll_round((F32)gViewerWindow->getWorldViewHeightScaled() / zoom_factor); int tile_y = sub_region / num_horizontal_tiles; int tile_x = sub_region - (tile_y * num_horizontal_tiles); @@ -1471,8 +1471,8 @@ void render_ui_2d() int pos_y = sub_region / llceil(zoom_factor); int pos_x = sub_region - (pos_y*llceil(zoom_factor)); // offset for this tile - LLFontGL::sCurOrigin.mX -= llround((F32)gViewerWindow->getWindowWidthScaled() * (F32)pos_x / zoom_factor); - LLFontGL::sCurOrigin.mY -= llround((F32)gViewerWindow->getWindowHeightScaled() * (F32)pos_y / zoom_factor); + LLFontGL::sCurOrigin.mX -= ll_round((F32)gViewerWindow->getWindowWidthScaled() * (F32)pos_x / zoom_factor); + LLFontGL::sCurOrigin.mY -= ll_round((F32)gViewerWindow->getWindowHeightScaled() * (F32)pos_y / zoom_factor); } stop_glerror(); diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index b6c27b0abc..0a9bc2a56c 100755 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -65,7 +65,7 @@ void agent_jump( EKeystate s ) { if( KEYSTATE_UP == s ) return; F32 time = gKeyboard->getCurKeyElapsedTime(); - S32 frame_count = llround(gKeyboard->getCurKeyElapsedFrameCount()); + S32 frame_count = ll_round(gKeyboard->getCurKeyElapsedFrameCount()); if( time < FLY_TIME || frame_count <= FLY_FRAMES @@ -125,7 +125,7 @@ static void agent_push_forwardbackward( EKeystate s, S32 direction, LLAgent::EDo if (KEYSTATE_UP == s) return; F32 time = gKeyboard->getCurKeyElapsedTime(); - S32 frame_count = llround(gKeyboard->getCurKeyElapsedFrameCount()); + S32 frame_count = ll_round(gKeyboard->getCurKeyElapsedFrameCount()); if( time < NUDGE_TIME || frame_count <= NUDGE_FRAMES) { @@ -176,7 +176,7 @@ static void agent_slide_leftright( EKeystate s, S32 direction, LLAgent::EDoubleT agent_handle_doubletap_run(s, mode); if( KEYSTATE_UP == s ) return; F32 time = gKeyboard->getCurKeyElapsedTime(); - S32 frame_count = llround(gKeyboard->getCurKeyElapsedFrameCount()); + S32 frame_count = ll_round(gKeyboard->getCurKeyElapsedFrameCount()); if( time < NUDGE_TIME || frame_count <= NUDGE_FRAMES) { diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 8499012cfc..a1451d770a 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -924,7 +924,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg) { F32 approximate_interest_dimension = (F32) sqrt(pimpl->getInterest()); - pimpl->setLowPrioritySizeLimit(llround(approximate_interest_dimension)); + pimpl->setLowPrioritySizeLimit(ll_round(approximate_interest_dimension)); } } else @@ -2330,8 +2330,8 @@ void LLViewerMediaImpl::scaleTextureCoords(const LLVector2& texture_coords, S32 texture_y = 1.0 + texture_y; // scale x and y to texel units. - *x = llround(texture_x * mMediaSource->getTextureWidth()); - *y = llround((1.0f - texture_y) * mMediaSource->getTextureHeight()); + *x = ll_round(texture_x * mMediaSource->getTextureWidth()); + *y = ll_round((1.0f - texture_y) * mMediaSource->getTextureHeight()); // Adjust for the difference between the actual texture height and the amount of the texture in use. *y -= (mMediaSource->getTextureHeight() - mMediaSource->getHeight()); diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 7c94442f09..e85d8198aa 100755 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -281,7 +281,7 @@ S32 LLViewerParcelMgr::getSelectedArea() const F64 width = mEastNorth.mdV[VX] - mWestSouth.mdV[VX]; F64 height = mEastNorth.mdV[VY] - mWestSouth.mdV[VY]; F32 area = (F32)(width * height); - rv = llround(area); + rv = ll_round(area); } return rv; } @@ -301,10 +301,10 @@ void LLViewerParcelMgr::writeHighlightSegments(F32 west, F32 south, F32 east, F32 north) { S32 x, y; - S32 min_x = llround( west / PARCEL_GRID_STEP_METERS ); - S32 max_x = llround( east / PARCEL_GRID_STEP_METERS ); - S32 min_y = llround( south / PARCEL_GRID_STEP_METERS ); - S32 max_y = llround( north / PARCEL_GRID_STEP_METERS ); + S32 min_x = ll_round( west / PARCEL_GRID_STEP_METERS ); + S32 max_x = ll_round( east / PARCEL_GRID_STEP_METERS ); + S32 min_y = ll_round( south / PARCEL_GRID_STEP_METERS ); + S32 max_y = ll_round( north / PARCEL_GRID_STEP_METERS ); const S32 STRIDE = mParcelsPerEdge+1; @@ -416,12 +416,12 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectParcelAt(const LLVector3d& pos_ LLVector3d northeast = pos_global; southwest -= LLVector3d( PARCEL_GRID_STEP_METERS/2, PARCEL_GRID_STEP_METERS/2, 0 ); - southwest.mdV[VX] = llround( southwest.mdV[VX], (F64)PARCEL_GRID_STEP_METERS ); - southwest.mdV[VY] = llround( southwest.mdV[VY], (F64)PARCEL_GRID_STEP_METERS ); + southwest.mdV[VX] = ll_round( southwest.mdV[VX], (F64)PARCEL_GRID_STEP_METERS ); + southwest.mdV[VY] = ll_round( southwest.mdV[VY], (F64)PARCEL_GRID_STEP_METERS ); northeast += LLVector3d( PARCEL_GRID_STEP_METERS/2, PARCEL_GRID_STEP_METERS/2, 0 ); - northeast.mdV[VX] = llround( northeast.mdV[VX], (F64)PARCEL_GRID_STEP_METERS ); - northeast.mdV[VY] = llround( northeast.mdV[VY], (F64)PARCEL_GRID_STEP_METERS ); + northeast.mdV[VX] = ll_round( northeast.mdV[VX], (F64)PARCEL_GRID_STEP_METERS ); + northeast.mdV[VY] = ll_round( northeast.mdV[VY], (F64)PARCEL_GRID_STEP_METERS ); // Snap to parcel return selectLand( southwest, northeast, TRUE ); diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 8b55f40baa..230bdca4ef 100755 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -388,7 +388,7 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt) } // Do glow interpolation - part->mGlow.mV[3] = (U8) llround(lerp(part->mStartGlow, part->mEndGlow, frac)*255.f); + part->mGlow.mV[3] = (U8) ll_round(lerp(part->mStartGlow, part->mEndGlow, frac)*255.f); // Set the last update time to now. part->mLastUpdateTime = cur_time; diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp index a7fd2e0fe4..7efa821bbf 100755 --- a/indra/newview/llviewerpartsource.cpp +++ b/indra/newview/llviewerpartsource.cpp @@ -313,7 +313,7 @@ void LLViewerPartSourceScript::update(const F32 dt) part->mStartGlow = mPartSysData.mPartData.mStartGlow; part->mEndGlow = mPartSysData.mPartData.mEndGlow; - part->mGlow = LLColor4U(0, 0, 0, (U8) llround(part->mStartGlow*255.f)); + part->mGlow = LLColor4U(0, 0, 0, (U8) ll_round(part->mStartGlow*255.f)); if (mPartSysData.mPattern & LLPartSysData::LL_PART_SRC_PATTERN_DROP) { diff --git a/indra/newview/llviewertextureanim.cpp b/indra/newview/llviewertextureanim.cpp index 2b364851a7..9af92d7377 100755 --- a/indra/newview/llviewertextureanim.cpp +++ b/indra/newview/llviewertextureanim.cpp @@ -179,7 +179,7 @@ S32 LLViewerTextureAnim::animateTextures(F32 &off_s, F32 &off_t, if (!(mMode & SMOOTH)) { - frame_counter = (F32)llround(frame_counter); + frame_counter = (F32)ll_round(frame_counter); } // diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 9dcd0b81e0..b63222590d 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -898,8 +898,8 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK const char* buttonstatestr = ""; S32 x = pos.mX; S32 y = pos.mY; - x = llround((F32)x / mDisplayScale.mV[VX]); - y = llround((F32)y / mDisplayScale.mV[VY]); + x = ll_round((F32)x / mDisplayScale.mV[VX]); + y = ll_round((F32)y / mDisplayScale.mV[VY]); // only send mouse clicks to UI if UI is visible if(gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) @@ -1065,8 +1065,8 @@ BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK { S32 x = pos.mX; S32 y = pos.mY; - x = llround((F32)x / mDisplayScale.mV[VX]); - y = llround((F32)y / mDisplayScale.mV[VY]); + x = ll_round((F32)x / mDisplayScale.mV[VX]); + y = ll_round((F32)y / mDisplayScale.mV[VY]); BOOL down = TRUE; BOOL handle = handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_RIGHT,down); @@ -1263,8 +1263,8 @@ void LLViewerWindow::handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask S32 x = pos.mX; S32 y = pos.mY; - x = llround((F32)x / mDisplayScale.mV[VX]); - y = llround((F32)y / mDisplayScale.mV[VY]); + x = ll_round((F32)x / mDisplayScale.mV[VX]); + y = ll_round((F32)y / mDisplayScale.mV[VY]); mMouseInWindow = TRUE; @@ -1722,7 +1722,7 @@ LLViewerWindow::LLViewerWindow(const Params& p) LLCoordWindow size; mWindow->getSize(&size); mWindowRectRaw.set(0, size.mY, size.mX, 0); - mWindowRectScaled.set(0, llround((F32)size.mY / mDisplayScale.mV[VY]), llround((F32)size.mX / mDisplayScale.mV[VX]), 0); + mWindowRectScaled.set(0, ll_round((F32)size.mY / mDisplayScale.mV[VY]), ll_round((F32)size.mX / mDisplayScale.mV[VX]), 0); } LLFontManager::initClass(); @@ -2250,8 +2250,8 @@ void LLViewerWindow::reshape(S32 width, S32 height) LLUI::setScaleFactor(mDisplayScale); // update our window rectangle - mWindowRectScaled.mRight = mWindowRectScaled.mLeft + llround((F32)width / mDisplayScale.mV[VX]); - mWindowRectScaled.mTop = mWindowRectScaled.mBottom + llround((F32)height / mDisplayScale.mV[VY]); + mWindowRectScaled.mRight = mWindowRectScaled.mLeft + ll_round((F32)width / mDisplayScale.mV[VX]); + mWindowRectScaled.mTop = mWindowRectScaled.mBottom + ll_round((F32)height / mDisplayScale.mV[VY]); setup2DViewport(); @@ -2444,8 +2444,8 @@ void LLViewerWindow::draw() microsecondsToTimecodeString(gFrameTime,text); const LLFontGL* font = LLFontGL::getFontSansSerif(); font->renderUTF8(text, 0, - llround((getWindowWidthScaled()/2)-100.f), - llround((getWindowHeightScaled()-60.f)), + ll_round((getWindowWidthScaled()/2)-100.f), + ll_round((getWindowHeightScaled()-60.f)), LLColor4( 1.f, 1.f, 1.f, 1.f ), LLFontGL::LEFT, LLFontGL::TOP); } @@ -2521,7 +2521,7 @@ void LLViewerWindow::draw() const S32 DIST_FROM_TOP = 20; LLFontGL::getFontSansSerifBig()->renderUTF8( mOverlayTitle, 0, - llround( getWindowWidthScaled() * 0.5f), + ll_round( getWindowWidthScaled() * 0.5f), getWindowHeightScaled() - DIST_FROM_TOP, LLColor4(1, 1, 1, 0.4f), LLFontGL::HCENTER, LLFontGL::TOP); @@ -3373,7 +3373,7 @@ void LLViewerWindow::updateMouseDelta() fdx = fdx + ((F32) dx - fdx) * llmin(gFrameIntervalSeconds.value()*amount,1.f); fdy = fdy + ((F32) dy - fdy) * llmin(gFrameIntervalSeconds.value()*amount,1.f); - mCurrentMouseDelta.set(llround(fdx), llround(fdy)); + mCurrentMouseDelta.set(ll_round(fdx), ll_round(fdy)); mouse_vel.setVec(fdx,fdy); } else @@ -3488,10 +3488,10 @@ void LLViewerWindow::updateWorldViewRect(bool use_full_window) new_world_rect.mTop = llmax(new_world_rect.mTop, new_world_rect.mBottom + 1); new_world_rect.mRight = llmax(new_world_rect.mRight, new_world_rect.mLeft + 1); - new_world_rect.mLeft = llround((F32)new_world_rect.mLeft * mDisplayScale.mV[VX]); - new_world_rect.mRight = llround((F32)new_world_rect.mRight * mDisplayScale.mV[VX]); - new_world_rect.mBottom = llround((F32)new_world_rect.mBottom * mDisplayScale.mV[VY]); - new_world_rect.mTop = llround((F32)new_world_rect.mTop * mDisplayScale.mV[VY]); + new_world_rect.mLeft = ll_round((F32)new_world_rect.mLeft * mDisplayScale.mV[VX]); + new_world_rect.mRight = ll_round((F32)new_world_rect.mRight * mDisplayScale.mV[VX]); + new_world_rect.mBottom = ll_round((F32)new_world_rect.mBottom * mDisplayScale.mV[VY]); + new_world_rect.mTop = ll_round((F32)new_world_rect.mTop * mDisplayScale.mV[VY]); } if (mWorldViewRectRaw != new_world_rect) @@ -5140,10 +5140,10 @@ void LLViewerWindow::calcDisplayScale() LLRect LLViewerWindow::calcScaledRect(const LLRect & rect, const LLVector2& display_scale) { LLRect res = rect; - res.mLeft = llround((F32)res.mLeft / display_scale.mV[VX]); - res.mRight = llround((F32)res.mRight / display_scale.mV[VX]); - res.mBottom = llround((F32)res.mBottom / display_scale.mV[VY]); - res.mTop = llround((F32)res.mTop / display_scale.mV[VY]); + res.mLeft = ll_round((F32)res.mLeft / display_scale.mV[VX]); + res.mRight = ll_round((F32)res.mRight / display_scale.mV[VX]); + res.mBottom = ll_round((F32)res.mBottom / display_scale.mV[VY]); + res.mTop = ll_round((F32)res.mTop / display_scale.mV[VY]); return res; } @@ -5406,8 +5406,8 @@ void LLPickInfo::updateXYCoords() LLPointer imagep = LLViewerTextureManager::getFetchedTexture(tep->getID()); if(mUVCoords.mV[VX] >= 0.f && mUVCoords.mV[VY] >= 0.f && imagep.notNull()) { - mXYCoords.mX = llround(mUVCoords.mV[VX] * (F32)imagep->getWidth()); - mXYCoords.mY = llround((1.f - mUVCoords.mV[VY]) * (F32)imagep->getHeight()); + mXYCoords.mX = ll_round(mUVCoords.mV[VX] * (F32)imagep->getWidth()); + mXYCoords.mY = ll_round((1.f - mUVCoords.mV[VY]) * (F32)imagep->getHeight()); } } } @@ -5436,7 +5436,7 @@ void LLPickInfo::getSurfaceInfo() if (objectp) { - if (gViewerWindow->cursorIntersect(llround((F32)mMousePt.mX), llround((F32)mMousePt.mY), 1024.f, + if (gViewerWindow->cursorIntersect(ll_round((F32)mMousePt.mX), ll_round((F32)mMousePt.mY), 1024.f, objectp, -1, mPickTransparent, &mObjectFace, &intersection, @@ -5478,52 +5478,6 @@ void LLPickInfo::getSurfaceInfo() } } - -/* code to get UV via a special UV render - removed in lieu of raycast method -LLVector2 LLPickInfo::pickUV() -{ - LLVector2 result(-1.f, -1.f); - - LLViewerObject* objectp = getObject(); - if (!objectp) - { - return result; - } - - if (mObjectFace > -1 && - objectp->mDrawable.notNull() && objectp->getPCode() == LL_PCODE_VOLUME && - mObjectFace < objectp->mDrawable->getNumFaces()) - { - S32 scaled_x = llround((F32)mPickPt.mX * gViewerWindow->getDisplayScale().mV[VX]); - S32 scaled_y = llround((F32)mPickPt.mY * gViewerWindow->getDisplayScale().mV[VY]); - const S32 UV_PICK_WIDTH = 5; - const S32 UV_PICK_HALF_WIDTH = (UV_PICK_WIDTH - 1) / 2; - U8 uv_pick_buffer[UV_PICK_WIDTH * UV_PICK_WIDTH * 4]; - LLFace* facep = objectp->mDrawable->getFace(mObjectFace); - if (facep) - { - LLGLState scissor_state(GL_SCISSOR_TEST); - scissor_state.enable(); - LLViewerCamera::getInstance()->setPerspective(FOR_SELECTION, scaled_x - UV_PICK_HALF_WIDTH, scaled_y - UV_PICK_HALF_WIDTH, UV_PICK_WIDTH, UV_PICK_WIDTH, FALSE); - //glViewport(scaled_x - UV_PICK_HALF_WIDTH, scaled_y - UV_PICK_HALF_WIDTH, UV_PICK_WIDTH, UV_PICK_WIDTH); - glScissor(scaled_x - UV_PICK_HALF_WIDTH, scaled_y - UV_PICK_HALF_WIDTH, UV_PICK_WIDTH, UV_PICK_WIDTH); - - glClear(GL_DEPTH_BUFFER_BIT); - - facep->renderSelectedUV(); - - glReadPixels(scaled_x - UV_PICK_HALF_WIDTH, scaled_y - UV_PICK_HALF_WIDTH, UV_PICK_WIDTH, UV_PICK_WIDTH, GL_RGBA, GL_UNSIGNED_BYTE, uv_pick_buffer); - U8* center_pixel = &uv_pick_buffer[4 * ((UV_PICK_WIDTH * UV_PICK_HALF_WIDTH) + UV_PICK_HALF_WIDTH + 1)]; - - result.mV[VX] = (F32)((center_pixel[VGREEN] & 0xf) + (16.f * center_pixel[VRED])) / 4095.f; - result.mV[VY] = (F32)((center_pixel[VGREEN] >> 4) + (16.f * center_pixel[VBLUE])) / 4095.f; - } - } - - return result; -} */ - - //static bool LLPickInfo::isFlora(LLViewerObject* object) { diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp index 4e9400872a..c4430f4308 100755 --- a/indra/newview/llvlcomposition.cpp +++ b/indra/newview/llvlcomposition.cpp @@ -123,10 +123,10 @@ BOOL LLVLComposition::generateHeights(const F32 x, const F32 y, S32 x_begin, y_begin, x_end, y_end; - x_begin = llround( x * mScaleInv ); - y_begin = llround( y * mScaleInv ); - x_end = llround( (x + width) * mScaleInv ); - y_end = llround( (y + width) * mScaleInv ); + x_begin = ll_round( x * mScaleInv ); + y_begin = ll_round( y * mScaleInv ); + x_end = ll_round( (x + width) * mScaleInv ); + y_end = ll_round( (y + width) * mScaleInv ); if (x_end > mWidth) { @@ -318,8 +318,8 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y, S32 x_begin, y_begin, x_end, y_end; x_begin = (S32)(x * mScaleInv); y_begin = (S32)(y * mScaleInv); - x_end = llround( (x + width) * mScaleInv ); - y_end = llround( (y + width) * mScaleInv ); + x_end = ll_round( (x + width) * mScaleInv ); + y_end = ll_round( (y + width) * mScaleInv ); if (x_end > mWidth) { diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 9ba0c9a4b2..d6fb6a5235 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7066,7 +7066,7 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe if (it != contents.mParams.end()) { S32 index = it - contents.mParams.begin(); - contents.mParamAppearanceVersion = llround(contents.mParamWeights[index]); + contents.mParamAppearanceVersion = ll_round(contents.mParamWeights[index]); LL_DEBUGS("Avatar") << "appversion req by appearance_version param: " << contents.mParamAppearanceVersion << LL_ENDL; } } diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 54b4119331..f288a18bca 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -2463,7 +2463,7 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void) if(!p->mIsSelf) { // scale from the range 0.0-1.0 to vivox volume in the range 0-100 - S32 volume = llround(p->mVolume / VOLUME_SCALE_VIVOX); + S32 volume = ll_round(p->mVolume / VOLUME_SCALE_VIVOX); bool mute = p->mOnMuteList; if(mute) diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index a9a1393e54..1ba0868544 100755 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -681,7 +681,7 @@ void LLVOPartGroup::getGeometry(S32 idx, } else { - pglow = LLColor4U(0, 0, 0, (U8) llround(255.f*part.mStartGlow)); + pglow = LLColor4U(0, 0, 0, (U8) ll_round(255.f*part.mStartGlow)); pcolor = part.mStartColor; } } diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 2d0992cea2..703334a6da 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1220,7 +1220,7 @@ S32 LLVOVolume::computeLODDetail(F32 distance, F32 radius) { // We've got LOD in the profile, and in the twist. Use radius. F32 tan_angle = (LLVOVolume::sLODFactor*radius)/distance; - cur_detail = LLVolumeLODGroup::getDetailFromTan(llround(tan_angle, 0.01f)); + cur_detail = LLVolumeLODGroup::getDetailFromTan(ll_round(tan_angle, 0.01f)); } else { @@ -1278,8 +1278,8 @@ BOOL LLVOVolume::calcLOD() // DON'T Compensate for field of view changing on FOV zoom. distance *= F_PI/3.f; - cur_detail = computeLODDetail(llround(distance, 0.01f), - llround(radius, 0.01f)); + cur_detail = computeLODDetail(ll_round(distance, 0.01f), + ll_round(radius, 0.01f)); if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_LOD_INFO) && @@ -1292,7 +1292,7 @@ BOOL LLVOVolume::calcLOD() if (cur_detail != mLOD) { - mAppAngle = llround((F32) atan2( mDrawable->getRadius(), mDrawable->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f); + mAppAngle = ll_round((F32) atan2( mDrawable->getRadius(), mDrawable->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f); mLOD = cur_detail; return TRUE; } diff --git a/indra/newview/llwlanimator.cpp b/indra/newview/llwlanimator.cpp index e568638cf6..2142885767 100755 --- a/indra/newview/llwlanimator.cpp +++ b/indra/newview/llwlanimator.cpp @@ -242,7 +242,7 @@ std::string LLWLAnimator::timeToString(F32 curTime) // get hours and minutes hours = (S32) (24.0 * curTime); curTime -= ((F32) hours / 24.0f); - min = llround(24.0f * 60.0f * curTime); + min = ll_round(24.0f * 60.0f * curTime); // handle case where it's 60 if(min == 60) diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index f95bbe241a..74fb1ec78e 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -977,8 +977,8 @@ void LLWorld::updateWaterObjects() } // Resize and reshape the water objects - const S32 water_center_x = center_x + llround((wx + dim[0]) * 0.5f * gDirAxes[dir][0]); - const S32 water_center_y = center_y + llround((wy + dim[1]) * 0.5f * gDirAxes[dir][1]); + const S32 water_center_x = center_x + ll_round((wx + dim[0]) * 0.5f * gDirAxes[dir][0]); + const S32 water_center_y = center_y + ll_round((wy + dim[1]) * 0.5f * gDirAxes[dir][1]); LLVOWater* waterp = mEdgeWaterObjects[dir]; if (!waterp || waterp->isDead()) diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 2ebefbdb11..62fad32246 100755 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -419,8 +419,8 @@ void LLWorldMapView::draw() if (overlayimage) { // Inform the fetch mechanism of the size we need - S32 draw_size = llround(sMapScale); - overlayimage->setKnownDrawSize(llround(draw_size * LLUI::getScaleFactor().mV[VX]), llround(draw_size * LLUI::getScaleFactor().mV[VY])); + S32 draw_size = ll_round(sMapScale); + overlayimage->setKnownDrawSize(ll_round(draw_size * LLUI::getScaleFactor().mV[VX]), ll_round(draw_size * LLUI::getScaleFactor().mV[VY])); // Draw something whenever we have enough info if (overlayimage->hasGLTexture()) { @@ -508,7 +508,7 @@ void LLWorldMapView::draw() drawImage(pos_global, sAvatarYouImage); LLVector3 pos_map = globalPosToView(pos_global); - if (!pointInView(llround(pos_map.mV[VX]), llround(pos_map.mV[VY]))) + if (!pointInView(ll_round(pos_map.mV[VX]), ll_round(pos_map.mV[VY]))) { drawTracking(pos_global, lerp(LLColor4::yellow, LLColor4::orange, 0.4f), @@ -773,8 +773,8 @@ void LLWorldMapView::drawGenericItem(const LLItemInfo& item, LLUIImagePtr image) void LLWorldMapView::drawImage(const LLVector3d& global_pos, LLUIImagePtr image, const LLColor4& color) { LLVector3 pos_map = globalPosToView( global_pos ); - image->draw(llround(pos_map.mV[VX] - image->getWidth() /2.f), - llround(pos_map.mV[VY] - image->getHeight()/2.f), + image->draw(ll_round(pos_map.mV[VX] - image->getWidth() /2.f), + ll_round(pos_map.mV[VY] - image->getHeight()/2.f), color); } @@ -783,8 +783,8 @@ void LLWorldMapView::drawImageStack(const LLVector3d& global_pos, LLUIImagePtr i LLVector3 pos_map = globalPosToView( global_pos ); for(U32 i=0; idraw(llround(pos_map.mV[VX] - image->getWidth() /2.f), - llround(pos_map.mV[VY] - image->getHeight()/2.f + i*offset), + image->draw(ll_round(pos_map.mV[VX] - image->getWidth() /2.f), + ll_round(pos_map.mV[VY] - image->getHeight()/2.f + i*offset), color); } } @@ -958,8 +958,8 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& const std::string& label, const std::string& tooltip, S32 vert_offset ) { LLVector3 pos_local = globalPosToView( pos_global ); - S32 x = llround( pos_local.mV[VX] ); - S32 y = llround( pos_local.mV[VY] ); + S32 x = ll_round( pos_local.mV[VX] ); + S32 y = ll_round( pos_local.mV[VY] ); LLFontGL* font = LLFontGL::getFontSansSerifSmall(); S32 text_x = x; S32 text_y = (S32)(y - sTrackCircleImage->getHeight()/2 - font->getLineHeight()); @@ -1110,8 +1110,8 @@ static void drawDot(F32 x_pixels, F32 y_pixels, if(-HEIGHT_THRESHOLD <= relative_z && relative_z <= HEIGHT_THRESHOLD) { - dot_image->draw(llround(x_pixels) - dot_image->getWidth()/2, - llround(y_pixels) - dot_image->getHeight()/2, + dot_image->draw(ll_round(x_pixels) - dot_image->getWidth()/2, + ll_round(y_pixels) - dot_image->getHeight()/2, color); } else @@ -1166,9 +1166,9 @@ void LLWorldMapView::drawAvatar(F32 x_pixels, dot_image = sAvatarAboveImage; } } - S32 dot_width = llround(dot_radius * 2.f); - dot_image->draw(llround(x_pixels - dot_radius), - llround(y_pixels - dot_radius), + S32 dot_width = ll_round(dot_radius * 2.f); + dot_image->draw(ll_round(x_pixels - dot_radius), + ll_round(y_pixels - dot_radius), dot_width, dot_width, color); @@ -1195,8 +1195,8 @@ void LLWorldMapView::drawIconName(F32 x_pixels, const std::string& second_line) { const S32 VERT_PAD = 8; - S32 text_x = llround(x_pixels); - S32 text_y = llround(y_pixels + S32 text_x = ll_round(x_pixels); + S32 text_y = ll_round(y_pixels - BIG_DOT_RADIUS - VERT_PAD); @@ -1384,8 +1384,8 @@ void LLWorldMapView::setDirectionPos( LLTextBox* text_box, F32 rotation ) F32 radius = llmin( map_half_height - text_half_height, map_half_width - text_half_width ); text_box->setOrigin( - llround(map_half_width - text_half_width + radius * cos( rotation )), - llround(map_half_height - text_half_height + radius * sin( rotation )) ); + ll_round(map_half_width - text_half_width + radius * cos( rotation )), + ll_round(map_half_height - text_half_height + radius * sin( rotation )) ); } @@ -1433,8 +1433,8 @@ void LLWorldMapView::reshape( S32 width, S32 height, BOOL called_from_parent ) bool LLWorldMapView::checkItemHit(S32 x, S32 y, LLItemInfo& item, LLUUID* id, bool track) { LLVector3 pos_view = globalPosToView(item.getGlobalPosition()); - S32 item_x = llround(pos_view.mV[VX]); - S32 item_y = llround(pos_view.mV[VY]); + S32 item_x = ll_round(pos_view.mV[VX]); + S32 item_y = ll_round(pos_view.mV[VY]); if (x < item_x - BIG_DOT_RADIUS) return false; if (x > item_x + BIG_DOT_RADIUS) return false; @@ -1598,8 +1598,8 @@ BOOL LLWorldMapView::handleMouseDown( S32 x, S32 y, MASK mask ) { gFocusMgr.setMouseCapture( this ); - mMouseDownPanX = llround(sPanX); - mMouseDownPanY = llround(sPanY); + mMouseDownPanX = ll_round(sPanX); + mMouseDownPanY = ll_round(sPanY); mMouseDownX = x; mMouseDownY = y; sHandledLastClick = TRUE; -- cgit v1.2.3 From eae38f7d57be5576199294b501e082c6d850473c Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 12 Dec 2014 13:46:41 -0800 Subject: Eliminate use of boost::lambda with boost::function (Trac #10864). https://svn.boost.org/trac/boost/ticket/10864 I've used boost::lambda with boost::function in a number of creative ways over the years. But the clang 6 shipped with Xcode 6 seems to have somehow broken lambda + function in Boost 1.57. boost::phoenix is a partial workaround. Sadly, lambda's comma-operator overload doesn't seem to be supported, necessitating a couple ugly workarounds. With real lambdas now supported by current compilers, I'm sure the Boost community has little incentive to repair the lambda + function problem. Presumably we'll be able to use such features ourselves Real Soon Now... --- indra/newview/llwindowlistener.cpp | 49 ++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 15 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llwindowlistener.cpp b/indra/newview/llwindowlistener.cpp index a8e06511d7..734018cfc2 100755 --- a/indra/newview/llwindowlistener.cpp +++ b/indra/newview/llwindowlistener.cpp @@ -44,10 +44,7 @@ #include #include #include -#include -#include - -namespace bll = boost::lambda; +#include LLWindowListener::LLWindowListener(LLViewerWindow *window, const KeyboardGetter& kbgetter) : LLEventAPI("LLWindow", "Inject input events into the LLWindow instance"), @@ -358,6 +355,30 @@ static WhichButton buttons; typedef boost::function MouseFunc; +// Wrap a function returning 'void' to return 'true' instead. I'm sure there's +// a more generic way to accomplish this, but generically handling the +// arguments seems to require variadic templates and perfect forwarding. (We +// used to be able to write (boost::lambda::bind(...), true), counting on +// boost::lambda's comma operator overload, until +// https://svn.boost.org/trac/boost/ticket/10864. And boost::phoenix doesn't +// seem to overload comma the same way; or at least not with bind().) +class MouseFuncTrue +{ + typedef boost::function MouseFuncVoid; + MouseFuncVoid mFunc; + +public: + MouseFuncTrue(const MouseFuncVoid& func): + mFunc(func) + {} + + bool operator()(LLCoordGL coords, MASK mask) const + { + mFunc(coords, mask); + return true; + } +}; + static void mouseEvent(const MouseFunc& func, const LLSD& request) { // Ensure we send response @@ -464,11 +485,11 @@ void LLWindowListener::mouseDown(LLSD const & request) if (actions.valid) { // Normally you can pass NULL to an LLWindow* without compiler - // complaint, but going through boost::lambda::bind() evidently + // complaint, but going through boost::bind() evidently // bypasses that special case: it only knows you're trying to pass an // int to a pointer. Explicitly cast NULL to the desired pointer type. - mouseEvent(bll::bind(actions.down, mWindow, - static_cast(NULL), bll::_1, bll::_2), + mouseEvent(boost::bind(actions.down, mWindow, + static_cast(NULL), _1, _2), request); } } @@ -478,8 +499,8 @@ void LLWindowListener::mouseUp(LLSD const & request) Actions actions(buttons.lookup(request["button"])); if (actions.valid) { - mouseEvent(bll::bind(actions.up, mWindow, - static_cast(NULL), bll::_1, bll::_2), + mouseEvent(boost::bind(actions.up, mWindow, + static_cast(NULL), _1, _2), request); } } @@ -489,12 +510,10 @@ void LLWindowListener::mouseMove(LLSD const & request) // We want to call the same central mouseEvent() routine for // handleMouseMove() as for button clicks. But handleMouseMove() returns // void, whereas mouseEvent() accepts a function returning bool -- and - // uses that bool return. Use (void-lambda-expression, true) to construct - // a callable that returns bool anyway. Pass 'true' because we expect that - // our caller will usually treat 'false' as a problem. - mouseEvent((bll::bind(&LLWindowCallbacks::handleMouseMove, mWindow, - static_cast(NULL), bll::_1, bll::_2), - true), + // uses that bool return. Use MouseFuncTrue to construct a callable that + // returns bool anyway. + mouseEvent(MouseFuncTrue(boost::bind(&LLWindowCallbacks::handleMouseMove, mWindow, + static_cast(NULL), _1, _2)), request); } -- cgit v1.2.3 From bbd6d8dc0e1604335f22c03c1d9add1510e6ce46 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Fri, 12 Dec 2014 17:42:16 -0800 Subject: Implicit conversion from ostream to string needs help in VS2013 --- indra/newview/llpanelmaininventory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index a7c9dbdf7b..a5063de0f4 100755 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -246,7 +246,7 @@ LLPanelMainInventory::~LLPanelMainInventory( void ) llofstream filtersFile(filterSaveName.str()); if(!LLSDSerialize::toPrettyXML(filterRoot, filtersFile)) { - LL_WARNS() << "Could not write to filters save file " << filterSaveName << LL_ENDL; + LL_WARNS() << "Could not write to filters save file " << filterSaveName.str() << LL_ENDL; } else filtersFile.close(); -- cgit v1.2.3 From f884c008d5bb693ca93f6bf28221528666816e7e Mon Sep 17 00:00:00 2001 From: callum_linden Date: Mon, 15 Dec 2014 13:35:03 -0800 Subject: fix for some std::pair/STL syntax --- indra/newview/llcommunicationchannel.cpp | 2 +- indra/newview/llfloaterpathfindingobjects.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llcommunicationchannel.cpp b/indra/newview/llcommunicationchannel.cpp index 627c9eb5c0..cf98b56b4c 100755 --- a/indra/newview/llcommunicationchannel.cpp +++ b/indra/newview/llcommunicationchannel.cpp @@ -108,6 +108,6 @@ void LLCommunicationChannel::onFilterFail(LLNotificationPtr pNotificationPtr) || (notificationType == "notifytoast")) && !pNotificationPtr->isCancelled()) { - mHistory.insert(std::make_pair(pNotificationPtr->getDate(), pNotificationPtr)); + mHistory.insert(history_list_t::value_type(pNotificationPtr->getDate(), pNotificationPtr)); } } diff --git a/indra/newview/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp index d72ee073e1..f6ff83eaf4 100755 --- a/indra/newview/llfloaterpathfindingobjects.cpp +++ b/indra/newview/llfloaterpathfindingobjects.cpp @@ -406,7 +406,7 @@ void LLFloaterPathfindingObjects::addObjectToScrollList(const LLPathfindingObjec if (pObjectPtr->hasOwner() && !pObjectPtr->hasOwnerName()) { - mMissingNameObjectsScrollListItems.insert(std::make_pair(pObjectPtr->getUUID().asString(), scrollListItem)); + mMissingNameObjectsScrollListItems.insert(scroll_list_item_map::value_type(pObjectPtr->getUUID().asString(), scrollListItem)); pObjectPtr->registerOwnerNameListener(boost::bind(&LLFloaterPathfindingObjects::handleObjectNameResponse, this, _1)); } } -- cgit v1.2.3 From 6bea6bfa45f9f049a8d537b545d1f1969e14d56a Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 17 Dec 2014 14:57:41 -0500 Subject: Delete misleading comment about testing llcapabilitylistener. There was a comment in CMakeLists.txt left over from 2009 (!) about commenting out the unit test for llcapabilitylistener. Fortunately we've since reinstated the test as an integration test, but the comment was never removed -- until now. --- indra/newview/CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0905ae7a73..5acbe40050 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2371,11 +2371,6 @@ include(LLAddBuildTest) SET(viewer_TEST_SOURCE_FILES llagentaccess.cpp llwlparammanager.cpp - # Not *actually* a unit test, it's an integration test. - # Because it won't work in the new unit test iface, i've commented out - # and notified Nat. Delete this when it's replaced! - # + poppy & brad 2009-06-05 - # llcapabilitylistener.cpp ) set_source_files_properties( ${viewer_TEST_SOURCE_FILES} -- cgit v1.2.3 From 651b73368b9ad0c24776313e3f9e330ce6fe2910 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 19 Dec 2014 15:34:12 -0500 Subject: Sort include(...) lines to make it easier for a person to verify. --- indra/newview/CMakeLists.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 5acbe40050..1569061eba 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -4,18 +4,19 @@ project(viewer) include(00-Common) include(Boost) -include(BuildVersion) include(BuildPackagesInfo) +include(BuildVersion) +include(CMakeCopyIfDifferent) include(DBusGlib) include(DirectX) -include(OpenSSL) include(DragDrop) include(EXPAT) include(FMODEX) -include(OPENAL) -include(OpenGL) +include(GLOD) +include(GooglePerfTools) include(Hunspell) include(JsonCpp) +include(LLAppearance) include(LLAudio) include(LLCharacter) include(LLCommon) @@ -23,6 +24,8 @@ include(LLCoreHttp) include(LLImage) include(LLImageJ2COJ) include(LLInventory) +include(LLKDU) +include(LLLogin) include(LLMath) include(LLMessage) include(LLPhysicsExtensions) @@ -37,18 +40,15 @@ include(LScript) include(Linking) include(NDOF) include(NVAPI) -include(GooglePerfTools) +include(OPENAL) +include(OpenGL) +include(OpenSSL) +include(PNG) include(TemplateCheck) include(UI) include(UnixInstall) -include(LLKDU) include(ViewerMiscLibs) -include(LLLogin) include(VisualLeakDetector) -include(GLOD) -include(CMakeCopyIfDifferent) -include(LLAppearance) -include(PNG) include(ZLIB) if (NOT HAVOK_TPV) -- cgit v1.2.3 From 707e51629ec2d540871cb625a7293c1fdebcebcf Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 22 Dec 2014 16:43:28 -0500 Subject: update libs to match vivox distribution --- indra/newview/viewer_manifest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 2394dd26b9..c360fc32ac 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1154,11 +1154,11 @@ class Linux_i686_Manifest(LinuxManifest): self.path("SLVoice") self.end_prefix() if self.prefix(src="../packages/lib/release", dst="lib"): - self.path("libortp.so") - self.path("libsndfile.so.1") + self.path("libortp.dylib") + self.path("libsndfile.dylib") #self.path("libvivoxoal.so.1") # no - we'll re-use the viewer's own OpenAL lib - self.path("libvivoxsdk.so") - self.path("libvivoxplatform.so") + self.path("libvivoxsdk.dylib") + self.path("libvivoxplatform.dylib") self.end_prefix("lib") # plugin runtime -- cgit v1.2.3 From 3fde4149d821bcd84d5e8b99bcede5aeaa99c968 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Tue, 23 Dec 2014 13:44:29 -0800 Subject: Updated path to NSIS installer for most recent (non-beta) version of NSIS v2.46 --- indra/newview/viewer_manifest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index c360fc32ac..fc6f0c0021 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -604,9 +604,9 @@ class Windows_i686_Manifest(ViewerManifest): # http://www.scratchpaper.com/ # Check two paths, one for Program Files, and one for Program Files (x86). # Yay 64bit windows. - NSIS_path = os.path.expandvars('${ProgramFiles}\\NSIS\\Unicode\\makensis.exe') + NSIS_path = os.path.expandvars('${ProgramFiles}\\NSIS\\makensis.exe') if not os.path.exists(NSIS_path): - NSIS_path = os.path.expandvars('${ProgramFiles(x86)}\\NSIS\\Unicode\\makensis.exe') + NSIS_path = os.path.expandvars('${ProgramFiles(x86)}\\NSIS\\makensis.exe') installer_created=False nsis_attempts=3 nsis_retry_wait=15 -- cgit v1.2.3 From 1568aeaa504f162e2c04003f523a8332e776a81e Mon Sep 17 00:00:00 2001 From: callum_linden Date: Tue, 23 Dec 2014 14:43:26 -0800 Subject: Restore Unicode path to viewer_manifest script - apparently we use the Unicode version of NSIS, not the one from the NULLSOFT site --- indra/newview/viewer_manifest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index fc6f0c0021..4daa959d4a 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -595,7 +595,7 @@ class Windows_i686_Manifest(ViewerManifest): # it also does python-style % substitution self.replace_in("installers/windows/installer_template.nsi", tempfile, { "%%VERSION%%":version_vars, - "%%SOURCE%%":self.get_src_prefix(), + "%%SOURCE%%":self.get_src_sprefix(), "%%INST_VARS%%":inst_vars_template % substitution_strings, "%%INSTALL_FILES%%":self.nsi_file_commands(True), "%%DELETE_FILES%%":self.nsi_file_commands(False)}) @@ -604,9 +604,9 @@ class Windows_i686_Manifest(ViewerManifest): # http://www.scratchpaper.com/ # Check two paths, one for Program Files, and one for Program Files (x86). # Yay 64bit windows. - NSIS_path = os.path.expandvars('${ProgramFiles}\\NSIS\\makensis.exe') + NSIS_path = os.path.expandvars('${ProgramFiles}\\NSIS\\Unicode\\makensis.exe') if not os.path.exists(NSIS_path): - NSIS_path = os.path.expandvars('${ProgramFiles(x86)}\\NSIS\\makensis.exe') + NSIS_path = os.path.expandvars('${ProgramFiles(x86)}\\NSIS\\Unicode\\makensis.exe') installer_created=False nsis_attempts=3 nsis_retry_wait=15 -- cgit v1.2.3 From f6952f3d994d7434fd53e1ec893cab1ce17c9047 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Mon, 29 Dec 2014 13:25:23 -0800 Subject: Fix typo introduced into viewer_manifest file (sprefix -> prefix) --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 4daa959d4a..c360fc32ac 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -595,7 +595,7 @@ class Windows_i686_Manifest(ViewerManifest): # it also does python-style % substitution self.replace_in("installers/windows/installer_template.nsi", tempfile, { "%%VERSION%%":version_vars, - "%%SOURCE%%":self.get_src_sprefix(), + "%%SOURCE%%":self.get_src_prefix(), "%%INST_VARS%%":inst_vars_template % substitution_strings, "%%INSTALL_FILES%%":self.nsi_file_commands(True), "%%DELETE_FILES%%":self.nsi_file_commands(False)}) -- cgit v1.2.3 From 087e497ab5776d54da7ee0ae4550679c65df28e4 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 7 Jan 2015 17:11:19 -0500 Subject: Replace reduce(operator.or_, ...) with any(...). The any() builtin was introduced in Python 2.5. Not only is its intent clearer, but it handles the case of zero items -- which the reduce(or_) construct does not. Sporadically we've seen exceptions from generate_breakpad_symbols.py when reduce(or_, ...) is given zero items. This masks the actual error (failure to dump symbols? failure to read them?), masquerading as a bug in the Python script. --- indra/newview/generate_breakpad_symbols.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/generate_breakpad_symbols.py b/indra/newview/generate_breakpad_symbols.py index 4181e4ebb3..d351c406bc 100755 --- a/indra/newview/generate_breakpad_symbols.py +++ b/indra/newview/generate_breakpad_symbols.py @@ -31,7 +31,6 @@ $/LicenseInfo$ import collections import fnmatch import itertools -import operator import os import re import sys @@ -149,7 +148,7 @@ def main(configuration, search_dirs, viewer_exes, libs_suffix, dump_syms_tool, v == os.path.splitext(os.path.basename(m))[0].lower() # there must be at least one .sym file in tarfile_members that matches # each required module (ignoring file extensions) - if not reduce(operator.or_, itertools.imap(match_module_basename, tarfile_members)): + if not any(itertools.imap(match_module_basename, tarfile_members)): print >> sys.stderr, "failed to find required %s in generated %s" \ % (required_module, viewer_symbol_file) os.remove(viewer_symbol_file) -- cgit v1.2.3 From 27951fa1d40abd8cca679f3192264472469e9364 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 7 Jan 2015 19:45:51 -0500 Subject: First cut at consuming new slplugins autobuild package. The contents are extracted, but not yet built into the viewer installer. --- indra/newview/CMakeLists.txt | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 1569061eba..8649386f76 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -44,6 +44,7 @@ include(OPENAL) include(OpenGL) include(OpenSSL) include(PNG) +include(Prebuilt) include(TemplateCheck) include(UI) include(UnixInstall) @@ -60,6 +61,9 @@ if(FMODEX) include_directories(${FMODEX_INCLUDE_DIR}) endif(FMODEX) +# install SLPlugin host executable and its dynamic-library plugins +use_prebuilt_binary(slplugins) + include_directories( ${DBUSGLIB_INCLUDE_DIRS} ${JSONCPP_INCLUDE_DIR} @@ -1816,10 +1820,10 @@ if (WINDOWS) add_dependencies(${VIEWER_BINARY_NAME} copy_win_scripts) endif (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts) - add_dependencies(${VIEWER_BINARY_NAME} - SLPlugin - windows-crash-logger - ) +## add_dependencies(${VIEWER_BINARY_NAME} +## SLPlugin +## windows-crash-logger +## ) # sets the 'working directory' for debugging from visual studio. if (NOT UNATTENDED) @@ -2099,7 +2103,8 @@ if (DARWIN) ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) - add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit mac-crash-logger) +##add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit mac-crash-logger) + add_dependencies(${VIEWER_BINARY_NAME} mac-crash-logger) if (ENABLE_SIGNING) set(SIGNING_SETTING "--signature=${SIGNING_IDENTITY}") @@ -2153,19 +2158,21 @@ if (PACKAGE) if (DARWIN) list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}") # *TODO: Generate these search dirs in the cmake files related to each binary. - list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/llplugin/slplugin/${CMAKE_CFG_INTDIR}") +## list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/llplugin/slplugin/${CMAKE_CFG_INTDIR}") list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/mac_crash_logger/${CMAKE_CFG_INTDIR}") - list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/gstreamer010/${CMAKE_CFG_INTDIR}") - list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}") - list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/webkit/${CMAKE_CFG_INTDIR}") +## list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/gstreamer010/${CMAKE_CFG_INTDIR}") +## list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}") +## list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/webkit/${CMAKE_CFG_INTDIR}") set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-darwin.tar.bz2") - set(VIEWER_EXE_GLOBS "'Second Life' SLPlugin mac-crash-logger") +## set(VIEWER_EXE_GLOBS "'Second Life' SLPlugin mac-crash-logger") + set(VIEWER_EXE_GLOBS "'Second Life' mac-crash-logger") set(VIEWER_LIB_GLOB "*.dylib") endif (DARWIN) if (LINUX) list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/packaged") set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-linux.tar.bz2") - set(VIEWER_EXE_GLOBS "do-not-directly-run-secondlife-bin SLPlugin") +## set(VIEWER_EXE_GLOBS "do-not-directly-run-secondlife-bin SLPlugin") + set(VIEWER_EXE_GLOBS "do-not-directly-run-secondlife-bin") set(VIEWER_LIB_GLOB "*${CMAKE_SHARED_MODULE_SUFFIX}*") set(VIEWER_COPY_MANIFEST copy_l_viewer_manifest) endif (LINUX) -- cgit v1.2.3 From 355d00685137aa0c42fdd93853096ac718a474b2 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 8 Jan 2015 16:48:29 -0500 Subject: Rationalize use of AUTOBUILD environment variable across languages. Ensure that AUTOBUILD is always in native path syntax on every platform. Remove local build.sh logic to infer AUTOBUILD: either the generic build.sh has set it properly, or scream for help. Since cygwin bash scripts need a cygwin-syntax path to autobuild, convert to a local 'autobuild' variable using shell_path. Remove kludges in other languages involving cygdrive twiddling. --- indra/newview/viewer_manifest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index c360fc32ac..33f31c0578 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -38,7 +38,7 @@ viewer_dir = os.path.dirname(__file__) # Put it FIRST because some of our build hosts have an ancient install of # indra.util.llmanifest under their system Python! sys.path.insert(0, os.path.join(viewer_dir, os.pardir, "lib", "python")) -from indra.util.llmanifest import LLManifest, main, proper_windows_path, path_ancestors, CHANNEL_VENDOR_BASE, RELEASE_CHANNEL, ManifestError +from indra.util.llmanifest import LLManifest, main, path_ancestors, CHANNEL_VENDOR_BASE, RELEASE_CHANNEL, ManifestError try: from llbase import llsd except ImportError: @@ -613,7 +613,7 @@ class Windows_i686_Manifest(ViewerManifest): while (not installer_created) and (nsis_attempts > 0): try: nsis_attempts-=1; - self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile)) + self.run_command('"' + NSIS_path + '" ' + self.dst_path_of(tempfile)) installer_created=True # if no exception was raised, the codesign worked except ManifestError, err: if nsis_attempts: -- cgit v1.2.3 From cfe7095752ced4ca5a234f75d987608f4e047e88 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 12 Jan 2015 12:03:08 -0500 Subject: Update viewer_package.py to grab slplugin.exe et al. from package. This only applies to the Windows package so far, because so far only the Windows package exists. --- indra/newview/viewer_manifest.py | 109 ++++++++++++++------------------------- 1 file changed, 39 insertions(+), 70 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index c360fc32ac..7ee1a37175 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -331,14 +331,18 @@ class Windows_i686_Manifest(ViewerManifest): def construct(self): super(Windows_i686_Manifest, self).construct() + pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') + relpkgdir = os.path.join(pkgdir, "lib", "release") + debpkgdir = os.path.join(pkgdir, "lib", "debug") + if self.is_packaging_viewer(): # Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe. self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe()) # Plugin host application - self.path2basename(os.path.join(os.pardir, - 'llplugin', 'slplugin', self.args['configuration']), - "slplugin.exe") + # The current slplugin package places slplugin.exe right into the + # packages base directory. + self.path2basename(pkgdir, "slplugin.exe") self.path2basename("../viewer_components/updater/scripts/windows", "update_install.bat") # Get shared libs from the shared libs staging directory @@ -358,15 +362,10 @@ class Windows_i686_Manifest(ViewerManifest): # Mesh 3rd party libs needed for auto LOD and collada reading try: - if self.args['configuration'].lower() == 'debug': - self.path("libcollada14dom22-d.dll") - else: - self.path("libcollada14dom22.dll") - self.path("glod.dll") except RuntimeError, err: print err.message - print "Skipping COLLADA and GLOD libraries (assumming linked statically)" + print "Skipping GLOD library (assumming linked statically)" # Get fmodex dll, continue if missing try: @@ -425,82 +424,52 @@ class Windows_i686_Manifest(ViewerManifest): self.path("featuretable_xp.txt") # Media plugins - QuickTime - if self.prefix(src='../media_plugins/quicktime/%s' % self.args['configuration'], dst="llplugin"): - self.path("media_plugin_quicktime.dll") - self.end_prefix() - # Media plugins - WebKit/Qt - if self.prefix(src='../media_plugins/webkit/%s' % self.args['configuration'], dst="llplugin"): + if self.prefix(src=os.path.join(pkgdir, "llplugin"), dst="llplugin"): + self.path("media_plugin_quicktime.dll") self.path("media_plugin_webkit.dll") - self.end_prefix() + self.path("qtcore4.dll") + self.path("qtgui4.dll") + self.path("qtnetwork4.dll") + self.path("qtopengl4.dll") + self.path("qtwebkit4.dll") + self.path("qtxmlpatterns4.dll") + + # For WebKit/Qt plugin runtimes (image format plugins) + if self.prefix(src="imageformats", dst="imageformats"): + self.path("qgif4.dll") + self.path("qico4.dll") + self.path("qjpeg4.dll") + self.path("qmng4.dll") + self.path("qsvg4.dll") + self.path("qtiff4.dll") + self.end_prefix() + + # For WebKit/Qt plugin runtimes (codec/character encoding plugins) + if self.prefix(src="codecs", dst="codecs"): + self.path("qcncodecs4.dll") + self.path("qjpcodecs4.dll") + self.path("qkrcodecs4.dll") + self.path("qtwcodecs4.dll") + self.end_prefix() + + self.end_prefix() # winmm.dll shim if self.prefix(src='../media_plugins/winmmshim/%s' % self.args['configuration'], dst=""): self.path("winmm.dll") self.end_prefix() - if self.args['configuration'].lower() == 'debug': - if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'debug'), - dst="llplugin"): + if self.prefix(src=debpkgdir, dst="llplugin"): self.path("libeay32.dll") - self.path("qtcored4.dll") - self.path("qtguid4.dll") - self.path("qtnetworkd4.dll") - self.path("qtopengld4.dll") - self.path("qtwebkitd4.dll") - self.path("qtxmlpatternsd4.dll") self.path("ssleay32.dll") - - # For WebKit/Qt plugin runtimes (image format plugins) - if self.prefix(src="imageformats", dst="imageformats"): - self.path("qgifd4.dll") - self.path("qicod4.dll") - self.path("qjpegd4.dll") - self.path("qmngd4.dll") - self.path("qsvgd4.dll") - self.path("qtiffd4.dll") - self.end_prefix() - - # For WebKit/Qt plugin runtimes (codec/character encoding plugins) - if self.prefix(src="codecs", dst="codecs"): - self.path("qcncodecsd4.dll") - self.path("qjpcodecsd4.dll") - self.path("qkrcodecsd4.dll") - self.path("qtwcodecsd4.dll") - self.end_prefix() - self.end_prefix() + else: - if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'release'), - dst="llplugin"): + if self.prefix(src=relpkgdir, dst="llplugin"): self.path("libeay32.dll") - self.path("qtcore4.dll") - self.path("qtgui4.dll") - self.path("qtnetwork4.dll") - self.path("qtopengl4.dll") - self.path("qtwebkit4.dll") - self.path("qtxmlpatterns4.dll") self.path("ssleay32.dll") - - # For WebKit/Qt plugin runtimes (image format plugins) - if self.prefix(src="imageformats", dst="imageformats"): - self.path("qgif4.dll") - self.path("qico4.dll") - self.path("qjpeg4.dll") - self.path("qmng4.dll") - self.path("qsvg4.dll") - self.path("qtiff4.dll") - self.end_prefix() - - # For WebKit/Qt plugin runtimes (codec/character encoding plugins) - if self.prefix(src="codecs", dst="codecs"): - self.path("qcncodecs4.dll") - self.path("qjpcodecs4.dll") - self.path("qkrcodecs4.dll") - self.path("qtwcodecs4.dll") - self.end_prefix() - self.end_prefix() # pull in the crash logger and updater from other projects -- cgit v1.2.3 From 9cca28f526693a47f6007ddca44f0a58c90f7edb Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 12 Jan 2015 17:18:28 -0500 Subject: On Mac, if we can't symlink .dylibs, print error message and continue. To this point, we've been failing the build with a Python OSError traceback, which is less than ideal. --- indra/newview/viewer_manifest.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 7ee1a37175..01590db648 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -747,8 +747,12 @@ class Darwin_i386_Manifest(ViewerManifest): # create a symlink to the real copy of the dylib. resource_path = self.dst_path_of(os.path.join(app, "Contents", "Resources")) for libfile in dylibs: - symlinkf(os.path.join(os.pardir, os.pardir, os.pardir, libfile), - os.path.join(resource_path, libfile)) + src = os.path.join(os.pardir, os.pardir, os.pardir, libfile) + dst = os.path.join(resource_path, libfile) + try: + symlinkf(src, dst) + except OSError as err: + print "Can't symlink %s -> %s: %s" % (src, dst, err) # SLPlugin.app/Contents/Resources gets those Qt4 libraries it needs. if self.prefix(src="", dst="SLPlugin.app/Contents/Resources"): for libfile in ('libQtCore.4.dylib', -- cgit v1.2.3 From 23ec88963169df93fc7a8d9a046e77c24aa396f3 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 13 Jan 2015 14:54:35 -0500 Subject: changes to fix compiler warnings merged in from viewer-release --- indra/newview/llvoavatarself.cpp | 3 +-- indra/newview/llvoavatarself.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 0be8df349d..170a8c41f4 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -158,8 +158,7 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id, LLVOAvatar(id, pcode, regionp), mScreenp(NULL), mLastRegionHandle(0), - mRegionCrossingCount(0), - mInitialBakesLoaded(false) + mRegionCrossingCount(0) { mMotionController.mIsSelf = TRUE; diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 13ffc057b0..7f641b6242 100755 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -105,7 +105,6 @@ private: private: LLUUID mInitialBakeIDs[6]; - bool mInitialBakesLoaded; /******************************************************************************** -- cgit v1.2.3 From baf2153eff089d5285e31bf47118cf2bdf181b0d Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 14 Jan 2015 11:52:56 -0800 Subject: Integrate Callum's Mac slplugins package --- indra/newview/viewer_manifest.py | 46 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 01590db648..954e454080 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -619,12 +619,16 @@ class Darwin_i386_Manifest(ViewerManifest): # copy over the build result (this is a no-op if run within the xcode script) self.path(self.args['configuration'] + "/Second Life.app", dst="") + pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') + relpkgdir = os.path.join(pkgdir, "lib", "release") + debpkgdir = os.path.join(pkgdir, "lib", "debug") + if self.prefix(src="", dst="Contents"): # everything goes in Contents self.path("Info.plist", dst="Info.plist") # copy additional libs in /Contents/MacOS/ - self.path("../packages/lib/release/libndofdev.dylib", dst="Resources/libndofdev.dylib") - self.path("../packages/lib/release/libhunspell-1.3.0.dylib", dst="Resources/libhunspell-1.3.0.dylib") + self.path(os.path.join(relpkgdir, "libndofdev.dylib"), dst="Resources/libndofdev.dylib") + self.path(os.path.join(relpkgdir, "libhunspell-1.3.0.dylib"), dst="Resources/libhunspell-1.3.0.dylib") if self.prefix(dst="MacOS"): self.path2basename("../viewer_components/updater/scripts/darwin", "*.py") @@ -684,7 +688,6 @@ class Darwin_i386_Manifest(ViewerManifest): print "Skipping %s" % dst return [] - libdir = "../packages/lib/release" # dylibs is a list of all the .dylib files we expect to need # in our bundled sub-apps. For each of these we'll create a # symlink from sub-app/Contents/Resources to the real .dylib. @@ -694,7 +697,7 @@ class Darwin_i386_Manifest(ViewerManifest): "llcommon", self.args['configuration'], libfile), - os.path.join(libdir, libfile)), + os.path.join(relpkgdir, libfile)), dst=libfile) for libfile in ( @@ -705,7 +708,7 @@ class Darwin_i386_Manifest(ViewerManifest): "libexception_handler.dylib", "libGLOD.dylib", ): - dylibs += path_optional(os.path.join(libdir, libfile), libfile) + dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile) # SLVoice and vivox lols, no symlinks needed for libfile in ( @@ -717,30 +720,29 @@ class Darwin_i386_Manifest(ViewerManifest): 'ca-bundle.crt', 'SLVoice', ): - self.path2basename(libdir, libfile) + self.path2basename(relpkgdir, libfile) # dylibs that vary based on configuration if self.args['configuration'].lower() == 'debug': for libfile in ( "libfmodexL.dylib", ): - dylibs += path_optional(os.path.join("../packages/lib/debug", - libfile), libfile) + dylibs += path_optional(os.path.join(debpkgdir, libfile), libfile) else: for libfile in ( "libfmodex.dylib", ): - dylibs += path_optional(os.path.join("../packages/lib/release", - libfile), libfile) + dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile) # our apps - for app_bld_dir, app in (("mac_crash_logger", "mac-crash-logger.app"), + for app_bld_dir, app in ((os.path.join(os.pardir, + "mac_crash_logger", + self.args['configuration']), + "mac-crash-logger.app"), # plugin launcher - (os.path.join("llplugin", "slplugin"), "SLPlugin.app"), + (pkgdir, "SLPlugin.app"), ): - self.path2basename(os.path.join(os.pardir, - app_bld_dir, self.args['configuration']), - app) + self.path2basename(app_bld_dir, app) # our apps dependencies on shared libs # for each app, for each dylib we collected in dylibs, @@ -769,26 +771,24 @@ class Darwin_i386_Manifest(ViewerManifest): 'libQtWebKit.4.7.1.dylib', 'libQtXml.4.dylib', 'libQtXml.4.7.1.dylib'): - self.path2basename("../packages/lib/release", libfile) + self.path2basename(relpkgdir, libfile) self.end_prefix("SLPlugin.app/Contents/Resources") # Qt4 codecs go to llplugin. Not certain why but this is the first # location probed according to dtruss so we'll go with that. - if self.prefix(src="../packages/plugins/codecs/", dst="llplugin/codecs"): + if self.prefix(src=os.path.join(pkgdir, "llplugin/codecs/"), dst="llplugin/codecs"): self.path("libq*.dylib") self.end_prefix("llplugin/codecs") # Similarly for imageformats. - if self.prefix(src="../packages/plugins/imageformats/", dst="llplugin/imageformats"): + if self.prefix(src=os.path.join(pkgdir, "llplugin/imageformats/"), dst="llplugin/imageformats"): self.path("libq*.dylib") self.end_prefix("llplugin/imageformats") # SLPlugin plugins proper - if self.prefix(src="", dst="llplugin"): - self.path2basename("../media_plugins/quicktime/" + self.args['configuration'], - "media_plugin_quicktime.dylib") - self.path2basename("../media_plugins/webkit/" + self.args['configuration'], - "media_plugin_webkit.dylib") + if self.prefix(src=os.path.join(pkgdir, "llplugin"), dst="llplugin"): + self.path("media_plugin_quicktime.dylib") + self.path("media_plugin_webkit.dylib") self.end_prefix("llplugin") self.end_prefix("Resources") -- cgit v1.2.3 From 2cb5dc973506562120751d343e852b007b73df78 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 19 Jan 2015 14:39:34 +0000 Subject: Link viewer with OpenAL if appropriate --- indra/newview/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 8649386f76..2b669bb21d 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1374,6 +1374,9 @@ if (LINUX) set(viewer_LIBRARIES Xinerama ) + if (OPENAL) + LIST(APPEND viewer_LIBRARIES ${OPENAL_LIBRARIES}) + endif (OPENAL) endif (LINUX) if (WINDOWS) -- cgit v1.2.3 From 1efff804b4daa5ca3160a7e4509629e78d3964b7 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 19 Jan 2015 15:33:19 +0000 Subject: On Linux, don't try to copy SLPlugin or the webkit or gstreamer plugins since we're not building them as part of the viewer build any more. --- indra/newview/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 2b669bb21d..d3ac1612ad 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1992,9 +1992,9 @@ if (LINUX) set(COPY_INPUT_DEPENDENCIES ${VIEWER_BINARY_NAME} linux-crash-logger - SLPlugin - media_plugin_webkit - media_plugin_gstreamer010 +## SLPlugin +## media_plugin_webkit +## media_plugin_gstreamer010 llcommon ) -- cgit v1.2.3 From 93fe221208399e47333fa9c696c60c3e0ad3eebb Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 21 Jan 2015 08:28:33 -0500 Subject: Backed out changeset 1e36e0629994 copying .dylibs on Linux The .dylib files in the Linux Vivox package were erroneous to start with; while the affected changeset bypassed copy errors, it too was wrong. Now that the Linux Vivox package contains Linux .so files, revert to the correct filenames to copy. --- indra/newview/viewer_manifest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index c360fc32ac..2394dd26b9 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1154,11 +1154,11 @@ class Linux_i686_Manifest(LinuxManifest): self.path("SLVoice") self.end_prefix() if self.prefix(src="../packages/lib/release", dst="lib"): - self.path("libortp.dylib") - self.path("libsndfile.dylib") + self.path("libortp.so") + self.path("libsndfile.so.1") #self.path("libvivoxoal.so.1") # no - we'll re-use the viewer's own OpenAL lib - self.path("libvivoxsdk.dylib") - self.path("libvivoxplatform.dylib") + self.path("libvivoxsdk.so") + self.path("libvivoxplatform.so") self.end_prefix("lib") # plugin runtime -- cgit v1.2.3 From 0c463802a65b5812b4e852f1499f7e15708b2aa6 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 21 Jan 2015 13:51:49 -0500 Subject: Make Linux viewer build consume slplugins package, and copy its files into eventual viewer package -- instead of finding them in the viewer build tree. Also update Windows to current slplugins package build. --- indra/newview/viewer_manifest.py | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 5b03cd83ca..a717ffa5df 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -958,6 +958,11 @@ class Darwin_i386_Manifest(ViewerManifest): class LinuxManifest(ViewerManifest): def construct(self): super(LinuxManifest, self).construct() + + pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') + relpkgdir = os.path.join(pkgdir, "lib", "release") + debpkgdir = os.path.join(pkgdir, "lib", "debug") + self.path("licenses-linux.txt","licenses.txt") if self.prefix("linux_tools", dst=""): self.path("client-readme.txt","README-linux.txt") @@ -976,7 +981,7 @@ class LinuxManifest(ViewerManifest): if self.prefix(src="", dst="bin"): self.path("secondlife-bin","do-not-directly-run-secondlife-bin") self.path("../linux_crash_logger/linux-crash-logger","linux-crash-logger.bin") - self.path2basename("../llplugin/slplugin", "SLPlugin") + self.path2basename(pkgdir, "SLPlugin") self.path2basename("../viewer_components/updater/scripts/linux", "update_install") self.end_prefix("bin") @@ -996,9 +1001,9 @@ class LinuxManifest(ViewerManifest): self.end_prefix(icon_path) # plugins - if self.prefix(src="", dst="bin/llplugin"): - self.path2basename("../media_plugins/webkit", "libmedia_plugin_webkit.so") - self.path("../media_plugins/gstreamer010/libmedia_plugin_gstreamer010.so", "libmedia_plugin_gstreamer.so") + if self.prefix(src=os.path.join(pkgdir, "llplugin"), dst="bin/llplugin"): + self.path("libmedia_plugin_webkit.so") + self.path("libmedia_plugin_gstreamer.so") self.end_prefix("bin/llplugin") # llcommon @@ -1060,7 +1065,11 @@ class Linux_i686_Manifest(LinuxManifest): def construct(self): super(Linux_i686_Manifest, self).construct() - if self.prefix("../packages/lib/release", dst="lib"): + pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') + relpkgdir = os.path.join(pkgdir, "lib", "release") + debpkgdir = os.path.join(pkgdir, "lib", "debug") + + if self.prefix(relpkgdir, dst="lib"): self.path("libapr-1.so") self.path("libapr-1.so.0") self.path("libapr-1.so.0.4.5") @@ -1123,10 +1132,10 @@ class Linux_i686_Manifest(LinuxManifest): self.end_prefix("lib") # Vivox runtimes - if self.prefix(src="../packages/lib/release", dst="bin"): + if self.prefix(src=relpkgdir, dst="bin"): self.path("SLVoice") self.end_prefix() - if self.prefix(src="../packages/lib/release", dst="lib"): + if self.prefix(src=relpkgdir, dst="lib"): self.path("libortp.so") self.path("libsndfile.so.1") #self.path("libvivoxoal.so.1") # no - we'll re-use the viewer's own OpenAL lib @@ -1135,7 +1144,7 @@ class Linux_i686_Manifest(LinuxManifest): self.end_prefix("lib") # plugin runtime - if self.prefix(src="../packages/lib/release", dst="lib"): + if self.prefix(src=os.path.join(pkgdir, "lib"), dst="lib"): self.path("libQtCore.so*") self.path("libQtGui.so*") self.path("libQtNetwork.so*") @@ -1146,7 +1155,8 @@ class Linux_i686_Manifest(LinuxManifest): self.end_prefix("lib") # For WebKit/Qt plugin runtimes (image format plugins) - if self.prefix(src="../packages/plugins/imageformats", dst="bin/llplugin/imageformats"): + if self.prefix(src=os.path.join(pkgdir, "llplugin", "imageformats"), + dst="bin/llplugin/imageformats"): self.path("libqgif.so") self.path("libqico.so") self.path("libqjpeg.so") @@ -1156,7 +1166,8 @@ class Linux_i686_Manifest(LinuxManifest): self.end_prefix("bin/llplugin/imageformats") # For WebKit/Qt plugin runtimes (codec/character encoding plugins) - if self.prefix(src="../packages/plugins/codecs", dst="bin/llplugin/codecs"): + if self.prefix(src=os.path.join(pkgdir, "llplugin", "codecs"), + dst="bin/llplugin/codecs"): self.path("libqcncodecs.so") self.path("libqjpcodecs.so") self.path("libqkrcodecs.so") -- cgit v1.2.3 From 260dbb3428d7e21ca7a386e15c9aa52f5f815844 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 21 Jan 2015 16:36:19 -0500 Subject: For Linux, add libalut.so.0.0.0.0 and libalut.so.0 to viewer tarball. The former is the real .so, to which libalut.so is only a symlink. We were packaging the symlink without including its target. (This appears to have changed since our last Vivox drop for Linux.) --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index a717ffa5df..ff776e6f8b 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1089,7 +1089,7 @@ class Linux_i686_Manifest(LinuxManifest): self.path("libfusion-1.4.so.5") self.path("libdirect-1.4.so.5*") self.path("libhunspell-1.3.so*") - self.path("libalut.so") + self.path("libalut.so*") self.path("libopenal.so", "libopenal.so.1") self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname # KLUDGE: As of 2012-04-11, the 'fontconfig' package installs -- cgit v1.2.3 From c93648e3d2a5a70a6fc8c0de46d45580798b0386 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 23 Jan 2015 04:09:17 -0800 Subject: Make MandatoryUpdateMachine use LLLoginInstance's LLNotificationsInterface. LLLoginInstance has a test hook setNotificationsInterface(), used by lllogininstance_test.cpp to redirect notifications through a dummy LLNotificationsInterface implementation. Certain of LLLoginInstance's MandatoryUpdateMachine state classes need to post notifications too; but until now they directly called LLNotificationsUtil::add(). In the production viewer, this should (!) be the same as calling through LLLoginInstance::mNotifications -- but it broke two of the LLLoginInstance unit tests, so they were skipped. Since MandatoryUpdateMachine's constructor is already passed the invoking LLLoginInstance&, make it store the reference. Add MandatoryUpdateMachine:: getNotificationsInterface(), which forwards to new LLLoginInstance:: getNotificationsInterface(). Change LLNotificationsUtil::add() calls in MandatoryUpdateMachine state classes to call through mMachine's getNotificationInterface() instead. This allows us to remove #include "llnotificationsutil.h" from lllogininstance.cpp, also that #include plus stub LLNotificationsUtil::add() implementation from lllogininstance_test.cpp. Finally, it allows us to remove the skip() calls from the two unit tests. --- indra/newview/lllogininstance.cpp | 16 +++++++++++----- indra/newview/lllogininstance.h | 1 + indra/newview/tests/lllogininstance_test.cpp | 12 ------------ 3 files changed, 12 insertions(+), 17 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 03ef11d8e5..b4d0bb6823 100755 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -58,7 +58,6 @@ #include "llmachineid.h" #include "llupdaterservice.h" #include "llevents.h" -#include "llnotificationsutil.h" #include "llappviewer.h" #include @@ -75,9 +74,14 @@ namespace { { public: MandatoryUpdateMachine(LLLoginInstance & loginInstance, LLUpdaterService & updaterService); - + void start(void); - + + LLNotificationsInterface& getNotificationsInterface() const + { + return mLoginInstance.getNotificationsInterface(); + } + private: class State; class CheckingForUpdate; @@ -87,6 +91,7 @@ namespace { class WaitingForDownload; boost::scoped_ptr mState; + LLLoginInstance & mLoginInstance; LLUpdaterService & mUpdaterService; void setCurrentState(State * newState); @@ -192,6 +197,7 @@ std::string construct_start_string(); MandatoryUpdateMachine::MandatoryUpdateMachine(LLLoginInstance & loginInstance, LLUpdaterService & updaterService): + mLoginInstance(loginInstance), mUpdaterService(updaterService) { ; // No op. @@ -326,7 +332,7 @@ MandatoryUpdateMachine::Error::Error(MandatoryUpdateMachine & machine): void MandatoryUpdateMachine::Error::enter(void) { LL_INFOS() << "entering error" << LL_ENDL; - LLNotificationsUtil::add("FailedRequiredUpdateInstall", LLSD(), LLSD(), boost::bind(&MandatoryUpdateMachine::Error::onButtonClicked, this, _1, _2)); + mMachine.getNotificationsInterface().add("FailedRequiredUpdateInstall", LLSD(), LLSD(), boost::bind(&MandatoryUpdateMachine::Error::onButtonClicked, this, _1, _2)); } @@ -382,7 +388,7 @@ MandatoryUpdateMachine::StartingUpdaterService::StartingUpdaterService(Mandatory void MandatoryUpdateMachine::StartingUpdaterService::enter(void) { LL_INFOS() << "entering start update service" << LL_ENDL; - LLNotificationsUtil::add("UpdaterServiceNotRunning", LLSD(), LLSD(), boost::bind(&MandatoryUpdateMachine::StartingUpdaterService::onButtonClicked, this, _1, _2)); + mMachine.getNotificationsInterface().add("UpdaterServiceNotRunning", LLSD(), LLSD(), boost::bind(&MandatoryUpdateMachine::StartingUpdaterService::onButtonClicked, this, _1, _2)); } diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h index b0247da7c8..c6773bbf68 100755 --- a/indra/newview/lllogininstance.h +++ b/indra/newview/lllogininstance.h @@ -70,6 +70,7 @@ public: void setPlatformInfo(const std::string platform, const std::string platform_version); void setNotificationsInterface(LLNotificationsInterface* ni) { mNotifications = ni; } + LLNotificationsInterface& getNotificationsInterface() const { return *mNotifications; } typedef boost::function UpdaterLauncherCallback; void setUpdaterLauncher(const UpdaterLauncherCallback& ulc) { mUpdaterLauncher = ulc; } diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index 9ee6403739..1b0334498e 100755 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -192,14 +192,6 @@ const std::string &LLVersionInfo::getChannel() { return VIEWERLOGIN_CHANNEL; } void LLAppViewer::forceQuit(void) {} LLAppViewer * LLAppViewer::sInstance = 0; -//----------------------------------------------------------------------------- -#include "llnotificationsutil.h" -LLNotificationPtr LLNotificationsUtil::add(const std::string& name, - const LLSD& substitutions, - const LLSD& payload, - boost::function functor) { return LLNotificationPtr((LLNotification*)0); } - - //----------------------------------------------------------------------------- #include "llupdaterservice.h" @@ -488,8 +480,6 @@ namespace tut template<> template<> void lllogininstance_object::test<3>() { - skip("test fails with Xcode 6, skipping"); - set_test_name("Test Mandatory Update User Accepts"); // Part 1 - Mandatory Update, with User accepts response. @@ -517,8 +507,6 @@ namespace tut template<> template<> void lllogininstance_object::test<4>() { - skip("test fails with Xcode 6, skipping"); - set_test_name("Test Mandatory Update User Decline"); // Test connect with update needed. -- cgit v1.2.3 From 198046e21d08f7af67287c0ea7260163c424fe0d Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 27 Jan 2015 15:34:43 -0500 Subject: Include MSVCP120.DLL and MSVCR120.DLL in Windows viewer package. Generalize Copy3rdPartyLibs.cmake to eliminate some clone-and-tweak redundancy. --- indra/newview/viewer_manifest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 176f257005..a20ca8802a 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -385,11 +385,11 @@ class Windows_i686_Manifest(ViewerManifest): # These need to be installed as a SxS assembly, currently a 'private' assembly. # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx if self.args['configuration'].lower() == 'debug': - self.path("msvcr100d.dll") - self.path("msvcp100d.dll") + self.path("msvcr120d.dll") + self.path("msvcp120d.dll") else: - self.path("msvcr100.dll") - self.path("msvcp100.dll") + self.path("msvcr120.dll") + self.path("msvcp120.dll") # Vivox runtimes self.path("SLVoice.exe") -- cgit v1.2.3 From ae6440eecc4d6c018a3634c2c06052757bde962f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 28 Jan 2015 15:55:18 -0500 Subject: MAINT-4744: Eliminate viewer dependency on (old) GNU libstdc++. To be more accurate, this changeset doesn't actually eliminate the dependency: it eliminates the use cases for the llifstream / llofstream feature that requires it. Currently you can construct an llifstream or llofstream from an open LLFILE* file handle (or, except on Windows, an int file descriptor). But rather than containing a streambuf implementation based on FILE*, llfile.h relies on the fact that the Windows std::filebuf happens to support that as a nonstandard extension; also on a nonstandard GNU extension __gnu_cxx::stdio_filebuf. To move from GNU libstdc++ to clang's libc++ (the direction on Mac), we could code a streambuf that supports FILE*. But before doing that, it's worth asking whether anyone actually uses this questionable feature. In fact there were only two methods: LLWearable::exportFile() and importFile() -- and only one call to either, in LLViewerWearable::saveNewAsset(). The code in saveNewAsset() opened the LLFILE* immediately before calling exportFile(), meaning we could reasonably push the open operation down into exportFile(). That logic was complex anyway due to the need for the caller to close the LLFILE* regardless of the success of the exportFile(). Change LLWearable::exportFile() and importFile() to accept a std::string filename rather than an open LLFILE*. Change LLViewerWearable::saveNewAsset() to simply call exportFile(filename) rather than horsing around with an LLFILE* handle. (This improves the code in another way too: it encapsulates the need to open the relevant file in binary mode. Previously, each caller had to remember to do that.) To prevent inadvertent reintroduction of ll[io]fstream(LLFILE*) code, add llstream_LLFILE preprocessor macro (default 0) to control access to the relevant constructors. Also suppress rdbuf() override, the only method whose signature references llstdio_filebuf. --- indra/newview/llviewerwearable.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerwearable.cpp b/indra/newview/llviewerwearable.cpp index 7de82a4710..0f73515b5d 100755 --- a/indra/newview/llviewerwearable.cpp +++ b/indra/newview/llviewerwearable.cpp @@ -509,18 +509,7 @@ void LLViewerWearable::saveNewAsset() const //LL_INFOS() << *this << LL_ENDL; const std::string filename = asset_id_to_filename(mAssetID); - LLFILE* fp = LLFile::fopen(filename, "wb"); /* Flawfinder: ignore */ - BOOL successful_save = FALSE; - if(fp && exportFile(fp)) - { - successful_save = TRUE; - } - if(fp) - { - fclose(fp); - fp = NULL; - } - if(!successful_save) + if(! exportFile(filename)) { std::string buffer = llformat("Unable to save '%s' to wearable file.", mName.c_str()); LL_WARNS() << buffer << LL_ENDL; -- cgit v1.2.3 From b362f247ce452c534f4b0868cbba06b9215c1c8f Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 9 Feb 2015 14:29:09 -0500 Subject: included libopenal in linux package --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index a20ca8802a..32cf9d3df6 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1090,7 +1090,7 @@ class Linux_i686_Manifest(LinuxManifest): self.path("libdirect-1.4.so.5*") self.path("libhunspell-1.3.so*") self.path("libalut.so*") - self.path("libopenal.so", "libopenal.so.1") + self.path("libopenal.so*") self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname # KLUDGE: As of 2012-04-11, the 'fontconfig' package installs # libfontconfig.so.1.4.4, along with symlinks libfontconfig.so.1 -- cgit v1.2.3 From 4673020c6395bf0542017c6a118d797fa19285dc Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Tue, 10 Feb 2015 16:41:23 -0800 Subject: Update Windows Installer script to block Vista with SP1 and lower. --- .../installers/windows/installer_template.nsi | 41 +++++---------------- indra/newview/installers/windows/lang_da.nsi | Bin 8026 -> 8032 bytes indra/newview/installers/windows/lang_de.nsi | Bin 9346 -> 9352 bytes indra/newview/installers/windows/lang_en-us.nsi | Bin 8120 -> 8126 bytes indra/newview/installers/windows/lang_es.nsi | Bin 8764 -> 8770 bytes indra/newview/installers/windows/lang_fr.nsi | Bin 9030 -> 9036 bytes indra/newview/installers/windows/lang_it.nsi | Bin 8372 -> 8378 bytes indra/newview/installers/windows/lang_ja.nsi | Bin 7288 -> 7294 bytes indra/newview/installers/windows/lang_pl.nsi | Bin 8426 -> 8432 bytes indra/newview/installers/windows/lang_pt-br.nsi | Bin 8788 -> 8794 bytes indra/newview/installers/windows/lang_ru.nsi | Bin 8144 -> 8150 bytes indra/newview/installers/windows/lang_tr.nsi | Bin 8266 -> 8272 bytes indra/newview/installers/windows/lang_zh.nsi | Bin 6798 -> 6804 bytes 13 files changed, 9 insertions(+), 32 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 65581a6781..c07ba560a7 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -27,12 +27,12 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Compiler flags ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -SetOverwrite on ; overwrite files -SetCompress auto ; compress iff saves space -SetCompressor /solid lzma ; compress whole installer as one block -SetDatablockOptimize off ; only saves us 0.1%, not worth it -XPStyle on ; add an XP manifest to the installer -RequestExecutionLevel admin ; on Vista we must be admin because we write to Program Files +SetOverwrite on ; Overwrite files +SetCompress auto ; Compress if saves space +SetCompressor /solid lzma ; Compress whole installer as one block +SetDatablockOptimize off ; Only saves us 0.1%, not worth it +XPStyle on ; Add an XP manifest to the installer +RequestExecutionLevel admin ; For when we write to Program Files ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Project flags @@ -118,7 +118,6 @@ Var DO_UNINSTALL_V2 ; If non-null, path to a previous Viewer 2 installation !insertmacro GetParameters !insertmacro GetOptions !include WinVer.nsh ; For OS and SP detection -!include x64.nsh ; For 64bit OS detection ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; After install completes, launch app @@ -145,26 +144,18 @@ FunctionEnd ; Currently: Windows 32bit XP SP3, 64bit XP SP2 and Server 2003 SP2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckWindowsVersion - ${If} ${AtMostWin2000} + ${If} ${AtMostWin2003} MessageBox MB_OK $(CheckWindowsVersionMB) Quit ${EndIf} - ${If} ${IsWinXP} - ${AndIfNot} ${RunningX64} - ${AndIfNot} ${IsServicePack} 3 - MessageBox MB_OK $(CheckWindowsVersionMB) - Quit - ${EndIf} - - ${If} ${IsWinXP} - ${AndIf} ${RunningX64} + ${If} ${IsWinVista} ${AndIfNot} ${IsServicePack} 2 MessageBox MB_OK $(CheckWindowsVersionMB) Quit ${EndIf} - ${If} ${IsWin2003} + ${If} ${IsWin2008} ${AndIfNot} ${IsServicePack} 2 MessageBox MB_OK $(CheckWindowsVersionMB) Quit @@ -175,20 +166,6 @@ FunctionEnd ;Recommend Upgrading Service Pack ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckWindowsServPack - ${If} ${IsWinVista} - ${AndIfNot} ${IsServicePack} 2 - MessageBox MB_OK $(CheckWindowsServPackMB) - DetailPrint $(UseLatestServPackDP) - Return - ${EndIf} - - ${If} ${IsWin2008} - ${AndIfNot} ${IsServicePack} 2 - MessageBox MB_OK $(CheckWindowsServPackMB) - DetailPrint $(UseLatestServPackDP) - Return - ${EndIf} - ${If} ${IsWin7} ${AndIfNot} ${IsServicePack} 1 MessageBox MB_OK $(CheckWindowsServPackMB) diff --git a/indra/newview/installers/windows/lang_da.nsi b/indra/newview/installers/windows/lang_da.nsi index 2352649b4b..1080fd2e3d 100755 Binary files a/indra/newview/installers/windows/lang_da.nsi and b/indra/newview/installers/windows/lang_da.nsi differ diff --git a/indra/newview/installers/windows/lang_de.nsi b/indra/newview/installers/windows/lang_de.nsi index 397262afe1..fd59bf8f71 100755 Binary files a/indra/newview/installers/windows/lang_de.nsi and b/indra/newview/installers/windows/lang_de.nsi differ diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi index df0d55d9e0..4cf605e398 100755 Binary files a/indra/newview/installers/windows/lang_en-us.nsi and b/indra/newview/installers/windows/lang_en-us.nsi differ diff --git a/indra/newview/installers/windows/lang_es.nsi b/indra/newview/installers/windows/lang_es.nsi index 32967a0dfa..bfc1bf7248 100755 Binary files a/indra/newview/installers/windows/lang_es.nsi and b/indra/newview/installers/windows/lang_es.nsi differ diff --git a/indra/newview/installers/windows/lang_fr.nsi b/indra/newview/installers/windows/lang_fr.nsi index 7c75e25360..c2ee17fbd4 100755 Binary files a/indra/newview/installers/windows/lang_fr.nsi and b/indra/newview/installers/windows/lang_fr.nsi differ diff --git a/indra/newview/installers/windows/lang_it.nsi b/indra/newview/installers/windows/lang_it.nsi index ce66b61f9f..cb97335488 100755 Binary files a/indra/newview/installers/windows/lang_it.nsi and b/indra/newview/installers/windows/lang_it.nsi differ diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi index e68830123a..3fbf434b6a 100755 Binary files a/indra/newview/installers/windows/lang_ja.nsi and b/indra/newview/installers/windows/lang_ja.nsi differ diff --git a/indra/newview/installers/windows/lang_pl.nsi b/indra/newview/installers/windows/lang_pl.nsi index 7883819190..1564c25293 100755 Binary files a/indra/newview/installers/windows/lang_pl.nsi and b/indra/newview/installers/windows/lang_pl.nsi differ diff --git a/indra/newview/installers/windows/lang_pt-br.nsi b/indra/newview/installers/windows/lang_pt-br.nsi index eb3fb2386c..8e858c8742 100755 Binary files a/indra/newview/installers/windows/lang_pt-br.nsi and b/indra/newview/installers/windows/lang_pt-br.nsi differ diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi index 3b0042fbf5..8b98ed5032 100755 Binary files a/indra/newview/installers/windows/lang_ru.nsi and b/indra/newview/installers/windows/lang_ru.nsi differ diff --git a/indra/newview/installers/windows/lang_tr.nsi b/indra/newview/installers/windows/lang_tr.nsi index b9be1eab08..7c41811b30 100755 Binary files a/indra/newview/installers/windows/lang_tr.nsi and b/indra/newview/installers/windows/lang_tr.nsi differ diff --git a/indra/newview/installers/windows/lang_zh.nsi b/indra/newview/installers/windows/lang_zh.nsi index 3c6f6fd289..e89a1e7e51 100755 Binary files a/indra/newview/installers/windows/lang_zh.nsi and b/indra/newview/installers/windows/lang_zh.nsi differ -- cgit v1.2.3 From 14acb2fd0f3bb08fe5f524e887c5c3c6dee1113f Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Wed, 11 Feb 2015 14:26:54 -0800 Subject: Comments formatting changes, no behavior changes --- .../installers/windows/installer_template.nsi | 447 ++++++++++----------- 1 file changed, 221 insertions(+), 226 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index c07ba560a7..7e3cfe04d2 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -1,6 +1,6 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; secondlife setup.nsi -;; Copyright 2004-2011, Linden Research, Inc. +;; Copyright 2004-2015, Linden Research, Inc. ;; ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public @@ -18,7 +18,7 @@ ;; ;; Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA ;; -;; NSIS Unicode 2.38.1 or higher required +;; NSIS Unicode 2.46.5 or higher required ;; http://www.scratchpaper.com/ ;; ;; Author: James Cook, Don Kjer, Callum Prentice @@ -27,15 +27,15 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Compiler flags ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -SetOverwrite on ; Overwrite files -SetCompress auto ; Compress if saves space -SetCompressor /solid lzma ; Compress whole installer as one block -SetDatablockOptimize off ; Only saves us 0.1%, not worth it -XPStyle on ; Add an XP manifest to the installer -RequestExecutionLevel admin ; For when we write to Program Files +SetOverwrite on # Overwrite files +SetCompress auto # Compress if saves space +SetCompressor /solid lzma # Compress whole installer as one block +SetDatablockOptimize off # Only saves us 0.1%, not worth it +XPStyle on # Add an XP manifest to the installer +RequestExecutionLevel admin # For when we write to Program Files ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Project flags +;; Project flags ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %%VERSION%% @@ -72,23 +72,23 @@ LangString LanguageCode ${LANG_RUSSIAN} "ru" LangString LanguageCode ${LANG_TURKISH} "tr" LangString LanguageCode ${LANG_TRADCHINESE} "zh" -;; this placeholder is replaced by viewer_manifest.py +# this placeholder is replaced by viewer_manifest.py %%INST_VARS%% Name ${INSTNAME} -SubCaption 0 $(LicenseSubTitleSetup) ; override "license agreement" text +SubCaption 0 $(LicenseSubTitleSetup) # Override "license agreement" text -BrandingText " " ; bottom of window text +BrandingText " " # Bottom of window text Icon %%SOURCE%%\installers\windows\install_icon.ico UninstallIcon %%SOURCE%%\installers\windows\uninstall_icon.ico -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 +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 # Overwrite files by default +AutoCloseWindow true # After all files install, close window InstallDir "$PROGRAMFILES\${INSTNAME}" InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" @@ -97,51 +97,53 @@ Page directory dirPre Page instfiles ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Variables +;; Variables ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Var INSTPROG Var INSTEXE Var INSTSHORTCUT -Var COMMANDLINE ; command line passed to this installer, set in .onInit -Var SHORTCUT_LANG_PARAM ; "--set InstallLanguage de", passes language to viewer -Var SKIP_DIALOGS ; set from command line in .onInit. autoinstall - ; GUI and the defaults. -Var SKIP_AUTORUN ; skip automatic launch of viewer after install -Var DO_UNINSTALL_V2 ; If non-null, path to a previous Viewer 2 installation that will be uninstalled. - -;;; Function definitions should go before file includes, because calls to -;;; DLLs like LangDLL trigger an implicit file include, so if that call is at -;;; the end of this script NSIS has to decompress the whole installer before -;;; it can call the DLL function. JC - -!include "FileFunc.nsh" ; For GetParameters, GetOptions +Var COMMANDLINE # Command line passed to this installer, set in .onInit +Var SHORTCUT_LANG_PARAM # "--set InstallLanguage de", Passes language to viewer +Var SKIP_DIALOGS # Set from command line in .onInit. autoinstall + # GUI and the defaults. +Var SKIP_AUTORUN # Skip automatic launch of viewer after install +Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation that will be uninstalled. + +# Function definitions should go before file includes, because calls to +# DLLs like LangDLL trigger an implicit file include, so if that call is at +# the end of this script NSIS has to decompress the whole installer before +# it can call the DLL function. JC + +!include "FileFunc.nsh" # For GetParameters, GetOptions !insertmacro GetParameters !insertmacro GetOptions -!include WinVer.nsh ; For OS and SP detection +!include WinVer.nsh # For OS and SP detection ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; After install completes, launch app +;; After install completes, launch app ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function .onInstSuccess -Call CheckWindowsServPack ; Warn if not on the latest SP before asking to launch. - Push $R0 # Option value, unused +Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. + Push $R0 # Option value, unused StrCmp $SKIP_AUTORUN "true" +2; - # Assumes SetOutPath $INSTDIR +# Assumes SetOutPath $INSTDIR Exec '"$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM' Pop $R0 + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Pre-directory page callback +;; Pre-directory page callback ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function dirPre StrCmp $SKIP_DIALOGS "true" 0 +2 Abort + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Make sure this computer meets the minimum system requirements. -; Currently: Windows 32bit XP SP3, 64bit XP SP2 and Server 2003 SP2 +;; Make sure this computer meets the minimum system requirements. +;; Currently: Windows Vista SP2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckWindowsVersion ${If} ${AtMostWin2003} @@ -160,10 +162,11 @@ Function CheckWindowsVersion MessageBox MB_OK $(CheckWindowsVersionMB) Quit ${EndIf} + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;Recommend Upgrading Service Pack +;; Recommend Upgrading to Service Pack 1 for Windows 7, if not present ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckWindowsServPack ${If} ${IsWin7} @@ -179,10 +182,11 @@ Function CheckWindowsServPack DetailPrint $(UseLatestServPackDP) Return ${EndIf} + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Make sure the user can install/uninstall +;; Make sure the user can install ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckIfAdministrator DetailPrint $(CheckAdministratorInstDP) @@ -193,10 +197,11 @@ Function CheckIfAdministrator Quit lbl_is_admin: Return + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; +;; Make sure the user can uninstall ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.CheckIfAdministrator DetailPrint $(CheckAdministratorUnInstDP) @@ -207,11 +212,12 @@ Function un.CheckIfAdministrator Quit lbl_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. +;; 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 @@ -223,10 +229,11 @@ Function CheckIfAlreadyCurrent continue_install: Pop $0 Return + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Checks for CPU valid (must have SSE2 support) +;; Checks for CPU valid (must have SSE2 support) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckCPUFlags Push $1 @@ -238,11 +245,12 @@ Function CheckCPUFlags OK_SSE2: Pop $1 Return + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Close the program, if running. Modifies no variables. -; Allows user to bail out of install process. +;; Close the program, if running. Modifies no variables. +;; Allows user to bail out of install process. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CloseSecondLife Push $0 @@ -268,50 +276,51 @@ Function CloseSecondLife DONE: Pop $0 Return + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Test our connection to secondlife.com -; Also allows us to count attempted installs by examining web logs. -; *TODO: Return current SL version info and have installer check -; if it is up to date. +;; Test our connection to secondlife.com +;; Also allows us to count attempted installs by examining web logs. +;; *TODO: Return current SL version info and have installer check +;; if it is up to date. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckNetworkConnection Push $0 Push $1 Push $2 # Option value for GetOptions DetailPrint $(CheckNetworkConnectionDP) - ; Look for a tag value from the stub installer, used for statistics - ; to correlate installs. Default to "" if not found on command line. +# Look for a tag value from the stub installer, used for statistics to correlate installs. +# Default to "" if not found on command line. StrCpy $2 "" ${GetOptions} $COMMANDLINE "/STUBTAG=" $2 GetTempFileName $0 - !define HTTP_TIMEOUT 5000 ; milliseconds - ; Don't show secondary progress bar, this will be quick. + !define HTTP_TIMEOUT 5000 # milliseconds +# Don't show secondary progress bar, this will be quick. NSISdl::download_quiet \ /TIMEOUT=${HTTP_TIMEOUT} \ "http://install.secondlife.com/check/?stubtag=$2&version=${VERSION_LONG}" \ $0 - Pop $1 ; Return value, either "success", "cancel" or an error message + Pop $1 # Return value, either "success", "cancel" or an error message ; MessageBox MB_OK "Download result: $1" ; Result ignored for now ; StrCmp $1 "success" +2 ; DetailPrint "Connection failed: $1" - Delete $0 ; temporary file + Delete $0 # temporary file Pop $2 Pop $1 Pop $0 Return + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Function CheckOldExeName -; Viewer versions < 3.6.12 used the name 'SecondLife.exe' -; If that name is found in the install folder, delete it to invalidate any -; old shortcuts to it that may be in non-standard locations, so that the user -; does not end up running the old version (potentially getting caught in an -; infinite update loop). See MAINT-3575 -; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Function CheckOldExeName +;; Viewer versions < 3.6.12 used the name 'SecondLife.exe' +;; If that name is found in the install folder, delete it to invalidate any +;; old shortcuts to it that may be in non-standard locations. This is to prevent +;; the userpotentially getting caught in an infinite update loop). See MAINT-3575 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckOldExeName IfFileExists "$INSTDIR\SecondLife.exe" CHECKOLDEXE_FOUND CHECKOLDEXE_DONE @@ -319,23 +328,22 @@ Function CheckOldExeName CHECKOLDEXE_FOUND: Delete "$INSTDIR\SecondLife.exe" CHECKOLDEXE_DONE: -FunctionEnd +FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Function CheckWillUninstallV2 -; -; If we are being called through auto-update, we need to uninstall any -; existing V2 installation. Otherwise, we wind up with -; SecondLifeViewer2 and SecondLifeViewer installations existing side -; by side no indication which to use. -; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Function CheckWillUninstallV2 +;; +;; If called through auto-update, need to uninstall any existing V2 installation. +;; Don't want to end up with SecondLifeViewer2 and SecondLifeViewer installations +;; existing side by side with no indication on which to use. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckWillUninstallV2 StrCpy $DO_UNINSTALL_V2 "" StrCmp $SKIP_DIALOGS "true" 0 CHECKV2_DONE - StrCmp $INSTDIR "$PROGRAMFILES\SecondLifeViewer2" CHECKV2_DONE ; don't uninstall our own install dir. + StrCmp $INSTDIR "$PROGRAMFILES\SecondLifeViewer2" CHECKV2_DONE # Don't uninstall our own install dir. IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" CHECKV2_FOUND CHECKV2_DONE CHECKV2_FOUND: @@ -346,7 +354,7 @@ CHECKV2_DONE: FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Save user files to temp location +;; Save user files to temp location ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function PreserveUserFiles @@ -354,18 +362,18 @@ Push $0 Push $1 Push $2 - RMDir /r "$TEMP\SecondLifeSettingsBackup" + RMDir /r "$TEMP\SecondLifeSettingsBackup" # Clear out any old data that might be there CreateDirectory "$TEMP\SecondLifeSettingsBackup" - StrCpy $0 0 ; Index number used to iterate via EnumRegKey + 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 + 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 + StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing - ; Required since ProfileImagePath is of type REG_EXPAND_SZ +# Required since ProfileImagePath is of type REG_EXPAND_SZ ExpandEnvStrings $2 $2 CreateDirectory "$TEMP\SecondLifeSettingsBackup\$0" @@ -380,7 +388,7 @@ Pop $2 Pop $1 Pop $0 -; Copy files in Documents and Settings\All Users\SecondLife +# Copy 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 @@ -391,7 +399,7 @@ Pop $0 FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Restore user files from temp location +;; Restore user files from temp location ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function RestoreUserFiles @@ -399,16 +407,16 @@ Push $0 Push $1 Push $2 - StrCpy $0 0 ; Index number used to iterate via EnumRegKey + 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 + 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 + StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing - ; Required since ProfileImagePath is of type REG_EXPAND_SZ +# Required since ProfileImagePath is of type REG_EXPAND_SZ ExpandEnvStrings $2 $2 CreateDirectory "$2\Application Data\SecondLife\" @@ -423,7 +431,7 @@ Pop $2 Pop $1 Pop $0 -; Copy files in Documents and Settings\All Users\SecondLife +# Copy 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 @@ -434,7 +442,7 @@ Pop $0 FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Remove temp dirs +;; Remove temp directories ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function RemoveTempUserFiles @@ -442,16 +450,16 @@ Push $0 Push $1 Push $2 - StrCpy $0 0 ; Index number used to iterate via EnumRegKey + 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 + 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 + StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing - ; Required since ProfileImagePath is of type REG_EXPAND_SZ +# Required since ProfileImagePath is of type REG_EXPAND_SZ ExpandEnvStrings $2 $2 RMDir /r "$TEMP\SecondLifeSettingsBackup\$0\*" @@ -465,7 +473,7 @@ Pop $2 Pop $1 Pop $0 -; Copy files in Documents and Settings\All Users\SecondLife +# Copy 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 @@ -474,10 +482,9 @@ Pop $0 FunctionEnd - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Clobber user files - TEST ONLY -; This is here for testing, generally not desirable to call it. +;; Clobber user files - TEST ONLY +;; This is here for testing, DO NOT USE UNLESS YOU KNOW WHAT YOU ARE TESTING FOR! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Function ClobberUserFilesTESTONLY @@ -485,16 +492,16 @@ FunctionEnd ;Push $1 ;Push $2 ; -; StrCpy $0 0 ; Index number used to iterate via EnumRegKey +; 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 +; 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 +; StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing ; -; ; Required since ProfileImagePath is of type REG_EXPAND_SZ +;# Required since ProfileImagePath is of type REG_EXPAND_SZ ; ExpandEnvStrings $2 $2 ; ; RMDir /r "$2\Application Data\SecondLife\" @@ -508,7 +515,7 @@ FunctionEnd ;Pop $1 ;Pop $0 ; -;; Copy files in Documents and Settings\All Users\SecondLife +;# Copy 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 @@ -518,10 +525,10 @@ FunctionEnd ;FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Delete the installed shader files -;;; Since shaders are in active development, we'll likely need to shuffle them -;;; around a bit from build to build. This ensures that shaders that we move -;;; or rename in the dev tree don't get left behind in the install. +;; Delete the installed shader files +;; Since shaders are in active development, we'll likely need to shuffle them +;; around a bit from build to build. This ensures that shaders that were removed +;; or renamed don't get left behind in the install directory. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function RemoveOldShaders @@ -531,14 +538,13 @@ RMDir /r "$INSTDIR\app_settings\shaders\*" FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Delete the installed XUI files -;;; We've changed the directory hierarchy for skins, putting all XUI and texture -;;; files under a specific skin directory, i.e. skins/default/xui/en-us as opposed -;;; to skins/xui/en-us. Need to clean up the old path when upgrading +;; Delete the installed XUI files +;; We've changed the directory hierarchy for skins, putting all XUI and texture +;; files under a specific skin directory, i.e. skins/default/xui/en-us as opposed +;; to skins/xui/en-us. Need to clean up the old path when upgrading. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function RemoveOldXUI -;; remove old XUI and texture files RmDir /r "$INSTDIR\skins\html" RmDir /r "$INSTDIR\skins\xui" RmDir /r "$INSTDIR\skins\textures" @@ -547,47 +553,41 @@ Delete "$INSTDIR\skins\*.txt" FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Remove any releasenotes files. -;;; We are no longer including release notes with the viewer. This will delete -;;; any that were left behind by an older installer. Delete will not fail if -;;; the files do not exist +;; Remove any release notes files. +;; We are no longer including release notes with the viewer, so remove them. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function RemoveOldReleaseNotes -;; remove releasenotes.txt file from application directory, and the shortcut -;; from the start menu. Delete "$SMPROGRAMS\$INSTSHORTCUT\SL Release Notes.lnk" Delete "$INSTDIR\releasenotes.txt" FunctionEnd - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Delete files in Documents and Settings\\SecondLife -; Delete files in Documents and Settings\All Users\SecondLife +;; Delete files in \Users\\AppData\Roaming\SecondLife ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.DocumentsAndSettingsFolder -; Delete files in Documents and Settings\\SecondLife +# Delete files in \Users\\AppData\Roaming\SecondLife Push $0 Push $1 Push $2 - DetailPrint "Deleting files in Documents and Settings folder" + DetailPrint "Deleting Second Life files" - StrCpy $0 0 ; Index number used to iterate via EnumRegKey + 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 + 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 + StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing - ; Required since ProfileImagePath is of type REG_EXPAND_SZ +# Required since ProfileImagePath is of type REG_EXPAND_SZ ExpandEnvStrings $2 $2 - ; Remove all cache and settings files but leave any other .txt files to preserve the chat logs +# Remove all settings files but leave any other .txt files to preserve the chat logs ; RMDir /r "$2\Application Data\SecondLife\logs" RMDir /r "$2\Application Data\SecondLife\browser_profile" RMDir /r "$2\Application Data\SecondLife\user_settings" @@ -606,23 +606,23 @@ Pop $2 Pop $1 Pop $0 -; Delete files in Documents and Settings\All Users\SecondLife +# Delete files in Program Data folder Push $0 ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" StrCmp $0 "" +2 RMDir /r "$0\SecondLife" Pop $0 -; Delete files 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. +# Delete files 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" FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Close the program, if running. Modifies no variables. -; Allows user to bail out of uninstall process. +;; Close the program, if running. Modifies no variables. +;; Allows user to bail out of uninstall process. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.CloseSecondLife Push $0 @@ -646,14 +646,13 @@ Function un.CloseSecondLife DONE: Pop $0 Return -FunctionEnd +FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; -; Delete the stored password for the current Windows user -; DEV-10821 -- Unauthorised user can gain access to an SL account after a real user has uninstalled -; +;; Delete the stored password for the current Windows user +;; DEV-10821 -- Unauthorised user can gain access to an SL account after a real user has uninstalled +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.RemovePassword DetailPrint "Removing Second Life password" @@ -665,23 +664,21 @@ SetShellVarContext all FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Delete the installed files -;;; This deletes the uninstall executable, but it works -;;; because it is copied to temp directory before running -;;; -;;; Note: You must list all files here, because we only -;;; want to delete our files, not things users left in the -;;; application directories. +;; Delete the installed files +;; This deletes the uninstall executable, but it works because it is copied to temp directory before running +;; +;; 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 +# Remove mozilla file first so recursive directory deletion doesn't get hung up Delete "$INSTDIR\app_settings\mozilla\components" -;; This placeholder is replaced by the complete list of files to uninstall by viewer_manifest.py +# This placeholder is replaced by the complete list of files to uninstall by viewer_manifest.py %%DELETE_FILES%% -;; Optional/obsolete files. Delete won't fail if they don't exist. +# Optional/obsolete files. Delete won't fail if they don't exist. Delete "$INSTDIR\dronesettings.ini" Delete "$INSTDIR\message_template.msg" Delete "$INSTDIR\newview.pdb" @@ -694,9 +691,11 @@ Delete "$INSTDIR\motions\*.lla" Delete "$INSTDIR\trial\*.html" Delete "$INSTDIR\newview.exe" Delete "$INSTDIR\SecondLife.exe" -;; MAINT-3099 workaround - prevent these log files, if present, from causing a user alert + +# MAINT-3099 workaround - prevent these log files, if present, from causing a user alert Delete "$INSTDIR\VivoxVoiceService-*.log" -;; Remove entire help directory + +# Remove entire help directory Delete "$INSTDIR\help\Advanced\*" RMDir "$INSTDIR\help\Advanced" Delete "$INSTDIR\help\basics\*" @@ -714,7 +713,7 @@ RMDir "$INSTDIR" IfFileExists "$INSTDIR" FOLDERFOUND NOFOLDER FOLDERFOUND: - ; Silent uninstall always removes all files (/SD IDYES) +# Silent uninstall always removes all files (/SD IDYES) MessageBox MB_YESNO $(DeleteProgramFilesMB) /SD IDYES IDNO NOFOLDER RMDir /r "$INSTDIR" @@ -723,33 +722,35 @@ NOFOLDER: FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Uninstall settings +;; Uninstall settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; UninstallText $(UninstallTextMsg) ShowUninstDetails show ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Uninstall section +;; Uninstall Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Section Uninstall -; Start with some default values. +# Start with some default values. StrCpy $INSTPROG "${INSTNAME}" StrCpy $INSTEXE "${INSTEXE}" StrCpy $INSTSHORTCUT "${SHORTCUT}" -Call un.CheckIfAdministrator ; Make sure the user can install/uninstall -; uninstall for all users (if you change this, change it in the install as well) +# Make sure the user can install/uninstall +Call un.CheckIfAdministrator + +# uninstall for all users (if you change this, change it in the install as well) SetShellVarContext all -; Make sure we're not running +# Make sure we're not running Call un.CloseSecondLife -; Clean up registry keys and subkeys (these should all be !defines somewhere) +# Clean up registry keys and subkeys (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" -; Clean up shortcuts +# Clean up shortcuts Delete "$SMPROGRAMS\$INSTSHORTCUT\*.*" RMDir "$SMPROGRAMS\$INSTSHORTCUT" @@ -757,81 +758,85 @@ Delete "$DESKTOP\$INSTSHORTCUT.lnk" Delete "$INSTDIR\$INSTSHORTCUT.lnk" Delete "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" -; Clean up cache and log files. -; Leave them in-place for non AGNI installs. +# Clean up cache and log files, but leave them in-place for non AGNI installs. !ifdef UNINSTALL_SETTINGS Call un.DocumentsAndSettingsFolder !endif -; remove stored password on uninstall +# Remove stored password on uninstall Call un.RemovePassword Call un.ProgramFiles -SectionEnd ; end of uninstall section +# End of uninstall section + +SectionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; 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 +;; Prep Installer Section +;; +;; 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 -Call CheckWindowsVersion ; Don't install On unsupported systems +Call CheckWindowsVersion # Don't install On unsupported systems Push $0 - ${GetParameters} $COMMANDLINE ; get our command line + ${GetParameters} $COMMANDLINE # Get our command line ${GetOptions} $COMMANDLINE "/SKIP_DIALOGS" $0 - IfErrors +2 0 ; If error jump past setting SKIP_DIALOGS + IfErrors +2 0 # If error jump past setting SKIP_DIALOGS StrCpy $SKIP_DIALOGS "true" ${GetOptions} $COMMANDLINE "/SKIP_AUTORUN" $0 - IfErrors +2 0 ; If error jump past setting SKIP_AUTORUN + IfErrors +2 0 # If error jump past setting SKIP_AUTORUN StrCpy $SKIP_AUTORUN "true" - ${GetOptions} $COMMANDLINE "/LANGID=" $0 ; /LANGID=1033 implies US English + ${GetOptions} $COMMANDLINE "/LANGID=" $0 # /LANGID=1033 implies US English - ; If no language (error), then proceed +# If no language (error), then proceed IfErrors lbl_configure_default_lang - ; No error means we got a language, so use it +# No error means we got a language, so use it StrCpy $LANGUAGE $0 Goto lbl_return lbl_configure_default_lang: - ; If we currently have a version of SL installed, default to the language of that install - ; Otherwise don't change $LANGUAGE and it will default to the OS UI language. +# If we currently have a version of SL installed, default to the language of that install +# Otherwise don't change $LANGUAGE and it will default to the OS UI language. ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" - IfErrors +2 0 ; If error skip the copy instruction + IfErrors +2 0 # If error skip the copy instruction StrCpy $LANGUAGE $0 - ; For silent installs, no language prompt, use default +# For silent installs, no language prompt, use default IfSilent lbl_return StrCmp $SKIP_DIALOGS "true" lbl_return lbl_build_menu: Push "" - # Use separate file so labels can be UTF-16 but we can still merge changes - # into this ASCII file. JC +# Use separate file so labels can be UTF-16 but we can still merge changes into this ASCII file. JC !include "%%SOURCE%%\installers\windows\language_menu.nsi" - Push A ; A means auto count languages for the auto count to work the first empty push (Push "") must remain + Push A # A means auto count languages for the auto count to work the first empty push (Push "") must remain LangDLL::LangDialog $(InstallerLanguageTitle) $(SelectInstallerLanguage) Pop $0 StrCmp $0 "cancel" 0 +2 Abort StrCpy $LANGUAGE $0 - ; save language in registry +# save language in registry WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" $LANGUAGE lbl_return: Pop $0 Return + FunctionEnd +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Prep Uninstaller Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.onInit - ; read language from registry and set for uninstaller - ; Key will be removed on successful uninstall +# Read language from registry and set for uninstaller. Key will be removed on successful uninstall ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" IfErrors lbl_end StrCpy $LANGUAGE $0 @@ -840,56 +845,50 @@ lbl_end: FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; MAIN SECTION +;; Default Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Section "" ; (default section) +Section "" # (default section) -SetShellVarContext all ; install for all users (if you change this, change it in the uninstall as well) +SetShellVarContext all # install for all users (if you change this, change it in the uninstall as well) -; Start with some default values. +# Start with some default values. StrCpy $INSTPROG "${INSTNAME}" StrCpy $INSTEXE "${INSTEXE}" StrCpy $INSTSHORTCUT "${SHORTCUT}" -Call CheckCPUFlags ; Make sure we have SSE2 support -Call CheckIfAdministrator ; Make sure the user can install/uninstall -Call CheckIfAlreadyCurrent ; Make sure that we haven't already installed this version -Call CloseSecondLife ; Make sure we're not running -Call CheckNetworkConnection ; ping secondlife.com -Call CheckWillUninstallV2 ; See if a V2 install exists and will be removed. -Call CheckOldExeName ; Clean up a previous version of the exe +Call CheckCPUFlags # Make sure we have SSE2 support +Call CheckIfAdministrator # Make sure the user can install/uninstall +Call CheckIfAlreadyCurrent # Make sure that we haven't already installed this version +Call CloseSecondLife # Make sure we're not running +Call CheckNetworkConnection # ping secondlife.com +Call CheckWillUninstallV2 # See if a V2 install exists and will be removed. +Call CheckOldExeName # Clean up a previous version of the exe -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; StrCmp $DO_UNINSTALL_V2 "" PRESERVE_DONE Call PreserveUserFiles PRESERVE_DONE: -;;; 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. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Need to clean out shader files from previous installs to fix DEV-5663 +# 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. + +# Need to clean out shader files from previous installs to fix DEV-5663 Call RemoveOldShaders -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Need to clean out old XUI files that predate skinning +# Need to clean out old XUI files that predate skinning Call RemoveOldXUI -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Clear out old releasenotes.txt files. These are now on the public wiki. +# Clear out old releasenotes.txt files. These are now on the public wiki. Call RemoveOldReleaseNotes -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Files -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py +# This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py %%INSTALL_FILES%% # Pass the installer's language to the client to use as a default StrCpy $SHORTCUT_LANG_PARAM "--set InstallLanguage $(LanguageCode)" -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Shortcuts in start menu +# Shortcuts in start menu CreateDirectory "$SMPROGRAMS\$INSTSHORTCUT" SetOutPath "$INSTDIR" CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \ @@ -908,8 +907,7 @@ WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Scripting Language Help.url" \ CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \ '"$INSTDIR\uninst.exe"' '' -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Other shortcuts +# Other shortcuts SetOutPath "$INSTDIR" CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \ "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" @@ -918,9 +916,7 @@ CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \ CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ '"$INSTDIR\uninst.exe"' '' - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Write registry +# Write registry WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$INSTDIR" WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}" WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT" @@ -928,35 +924,34 @@ 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"' -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Write URL registry info +# Write URL registry info WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life" WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "URL Protocol" "" WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' -;; URL param must be last item passed to viewer, it ignores subsequent params -;; to avoid parameter injection attacks. + +# URL param must be last item passed to viewer, it ignores subsequent params to avoid parameter injection attacks. WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"' WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info"(default)" "URL:Second Life" WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info" "URL Protocol" "" WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' -;; URL param must be last item passed to viewer, it ignores subsequent params -;; to avoid parameter injection attacks. + +# URL param must be last item passed to viewer, it ignores subsequent params to avoid parameter injection attacks. WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"' -; write out uninstaller +# write out uninstaller WriteUninstaller "$INSTDIR\uninst.exe" -; Uninstall existing "Second Life Viewer 2" install if needed. +# Uninstall existing "Second Life Viewer 2" install if needed. StrCmp $DO_UNINSTALL_V2 "" REMOVE_SLV2_DONE ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S _?=$PROGRAMFILES\SecondLifeViewer2' - Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" ; with _? option above, uninst.exe will be left behind. - RMDir "$PROGRAMFILES\SecondLifeViewer2" ; will remove only if empty. + Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" # with _? option above, uninst.exe will be left behind. + RMDir "$PROGRAMFILES\SecondLifeViewer2" # will remove only if empty. Call RestoreUserFiles Call RemoveTempUserFiles REMOVE_SLV2_DONE: -; end of default section +# end of default section SectionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EOF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- cgit v1.2.3 From 4491a3df9a4ec6897373997bf6c29c50130569ee Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Wed, 11 Feb 2015 21:53:02 -0800 Subject: A few more comments changes --- .../newview/installers/windows/installer_template.nsi | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 7e3cfe04d2..a28cf4fca0 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -842,14 +842,15 @@ Function un.onInit StrCpy $LANGUAGE $0 lbl_end: Return + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Default Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Section "" # (default section) +Section "" -SetShellVarContext all # install for all users (if you change this, change it in the uninstall as well) +SetShellVarContext all # Install for all users (if you change this, change it in the uninstall as well) # Start with some default values. StrCpy $INSTPROG "${INSTNAME}" @@ -858,11 +859,11 @@ StrCpy $INSTSHORTCUT "${SHORTCUT}" Call CheckCPUFlags # Make sure we have SSE2 support Call CheckIfAdministrator # Make sure the user can install/uninstall -Call CheckIfAlreadyCurrent # Make sure that we haven't already installed this version -Call CloseSecondLife # Make sure we're not running -Call CheckNetworkConnection # ping secondlife.com -Call CheckWillUninstallV2 # See if a V2 install exists and will be removed. -Call CheckOldExeName # Clean up a previous version of the exe +Call CheckIfAlreadyCurrent # Make sure this version is not already installed +Call CloseSecondLife # Make sure Second Life not currently running +Call CheckNetworkConnection # Ping secondlife.com +Call CheckWillUninstallV2 # Check if SecondLife is already installed +Call CheckOldExeName # Clean up a previous version of the exeicutable StrCmp $DO_UNINSTALL_V2 "" PRESERVE_DONE Call PreserveUserFiles @@ -870,8 +871,7 @@ PRESERVE_DONE: # 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. +;Call RemoveCacheFiles # Installing over removes potentially corrupted VFS and cache files. # Need to clean out shader files from previous installs to fix DEV-5663 Call RemoveOldShaders @@ -951,7 +951,6 @@ StrCmp $DO_UNINSTALL_V2 "" REMOVE_SLV2_DONE Call RemoveTempUserFiles REMOVE_SLV2_DONE: -# end of default section SectionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EOF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- cgit v1.2.3 From ac368a2384c33004bddba1059938d42e16d996d7 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Wed, 11 Feb 2015 22:22:19 -0800 Subject: A little more cleanup --- indra/newview/installers/windows/installer_template.nsi | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index a28cf4fca0..8872bef993 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -769,8 +769,6 @@ Call un.RemovePassword Call un.ProgramFiles -# End of uninstall section - SectionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- cgit v1.2.3 From 4794985d8d210a8e7bc738b620c269222ff25c85 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Wed, 11 Feb 2015 22:25:17 -0800 Subject: Show Details button at install and uninstall Note: Showing details adds a lot of overhead and will slow down the processes, but allows the user the option of seeing what is going on. Usefull for errors that occure. --- indra/newview/installers/windows/installer_template.nsi | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 8872bef993..96ca83bdda 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -86,7 +86,6 @@ 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 # Overwrite files by default AutoCloseWindow true # After all files install, close window @@ -725,7 +724,6 @@ FunctionEnd ;; Uninstall settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; UninstallText $(UninstallTextMsg) -ShowUninstDetails show ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Uninstall Section -- cgit v1.2.3 From 68c94399ed36ec66314e672dafc4afefa9116c00 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Thu, 12 Feb 2015 14:33:31 -0800 Subject: Backed out changeset: 24c470cccee0 - added SKIP_AUTORUN command flag... --- indra/newview/installers/windows/installer_template.nsi | 6 ------ 1 file changed, 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 96ca83bdda..7682d4b9ed 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -105,7 +105,6 @@ Var COMMANDLINE # Command line passed to this installer, set in .onInit Var SHORTCUT_LANG_PARAM # "--set InstallLanguage de", Passes language to viewer Var SKIP_DIALOGS # Set from command line in .onInit. autoinstall # GUI and the defaults. -Var SKIP_AUTORUN # Skip automatic launch of viewer after install Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation that will be uninstalled. # Function definitions should go before file includes, because calls to @@ -124,7 +123,6 @@ Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation Function .onInstSuccess Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. Push $R0 # Option value, unused - StrCmp $SKIP_AUTORUN "true" +2; # Assumes SetOutPath $INSTDIR Exec '"$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM' Pop $R0 @@ -785,10 +783,6 @@ Call CheckWindowsVersion # Don't install On unsupported systems IfErrors +2 0 # If error jump past setting SKIP_DIALOGS StrCpy $SKIP_DIALOGS "true" - ${GetOptions} $COMMANDLINE "/SKIP_AUTORUN" $0 - IfErrors +2 0 # If error jump past setting SKIP_AUTORUN - StrCpy $SKIP_AUTORUN "true" - ${GetOptions} $COMMANDLINE "/LANGID=" $0 # /LANGID=1033 implies US English # If no language (error), then proceed -- cgit v1.2.3 From b0d01b0a0ad6e4daffe5663fa56d373ea690ed30 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Thu, 12 Feb 2015 14:34:44 -0800 Subject: Backed out changeset: bd12d1ab1943 - MAINT-3591 Remove "Start Second Life now?" dialogue... --- indra/newview/installers/windows/installer_template.nsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 7682d4b9ed..73e5b8cf74 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -123,8 +123,24 @@ Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation Function .onInstSuccess Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. Push $R0 # Option value, unused + + StrCmp $SKIP_DIALOGS "true" label_launch + + ${GetOptions} $COMMANDLINE "/AUTOSTART" $R0 + # If parameter was there (no error) just launch + # Otherwise ask + IfErrors label_ask_launch label_launch + +label_ask_launch: + # Don't launch by default when silent + IfSilent label_no_launch + MessageBox MB_YESNO $(InstSuccesssQuestion) \ + IDYES label_launch IDNO label_no_launch + +label_launch: # Assumes SetOutPath $INSTDIR Exec '"$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM' +label_no_launch: Pop $R0 FunctionEnd -- cgit v1.2.3 From 0a14115c94a98546be1c2528b9ccc32ce2a61e5a Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Sat, 14 Feb 2015 00:15:35 -0800 Subject: Rearrange the order of sections to better follow un/installation procedure --- .../installers/windows/installer_template.nsi | 1208 ++++++++++---------- 1 file changed, 602 insertions(+), 606 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 73e5b8cf74..36a8d7216b 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -91,6 +91,7 @@ AutoCloseWindow true # After all files install, close window InstallDir "$PROGRAMFILES\${INSTNAME}" InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" +UninstallText $(UninstallTextMsg) DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) Page directory dirPre Page instfiles @@ -117,34 +118,6 @@ Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation !insertmacro GetOptions !include WinVer.nsh # For OS and SP detection -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; After install completes, launch app -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function .onInstSuccess -Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. - Push $R0 # Option value, unused - - StrCmp $SKIP_DIALOGS "true" label_launch - - ${GetOptions} $COMMANDLINE "/AUTOSTART" $R0 - # If parameter was there (no error) just launch - # Otherwise ask - IfErrors label_ask_launch label_launch - -label_ask_launch: - # Don't launch by default when silent - IfSilent label_no_launch - MessageBox MB_YESNO $(InstSuccesssQuestion) \ - IDYES label_launch IDNO label_no_launch - -label_launch: -# Assumes SetOutPath $INSTDIR - Exec '"$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM' -label_no_launch: - Pop $R0 - -FunctionEnd - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Pre-directory page callback ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -155,96 +128,74 @@ Function dirPre FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Make sure this computer meets the minimum system requirements. -;; Currently: Windows Vista SP2 +;; Prep Installer Section +;; +;; 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 CheckWindowsVersion - ${If} ${AtMostWin2003} - MessageBox MB_OK $(CheckWindowsVersionMB) - Quit - ${EndIf} - - ${If} ${IsWinVista} - ${AndIfNot} ${IsServicePack} 2 - MessageBox MB_OK $(CheckWindowsVersionMB) - Quit - ${EndIf} +Function .onInit +Call CheckCPUFlags # Make sure we have SSE2 support +Call CheckWindowsVersion # Don't install On unsupported systems + Push $0 + ${GetParameters} $COMMANDLINE # Get our command line - ${If} ${IsWin2008} - ${AndIfNot} ${IsServicePack} 2 - MessageBox MB_OK $(CheckWindowsVersionMB) - Quit - ${EndIf} + ${GetOptions} $COMMANDLINE "/SKIP_DIALOGS" $0 + IfErrors +2 0 # If error jump past setting SKIP_DIALOGS + StrCpy $SKIP_DIALOGS "true" -FunctionEnd + ${GetOptions} $COMMANDLINE "/LANGID=" $0 # /LANGID=1033 implies US English -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Recommend Upgrading to Service Pack 1 for Windows 7, if not present -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function CheckWindowsServPack - ${If} ${IsWin7} - ${AndIfNot} ${IsServicePack} 1 - MessageBox MB_OK $(CheckWindowsServPackMB) - DetailPrint $(UseLatestServPackDP) - Return - ${EndIf} +# If no language (error), then proceed + IfErrors lbl_configure_default_lang +# No error means we got a language, so use it + StrCpy $LANGUAGE $0 + Goto lbl_return - ${If} ${IsWin2008R2} - ${AndIfNot} ${IsServicePack} 1 - MessageBox MB_OK $(CheckWindowsServPackMB) - DetailPrint $(UseLatestServPackDP) - Return - ${EndIf} +lbl_configure_default_lang: +# If we currently have a version of SL installed, default to the language of that install +# Otherwise don't change $LANGUAGE and it will default to the OS UI language. + ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" + IfErrors +2 0 # If error skip the copy instruction + StrCpy $LANGUAGE $0 -FunctionEnd +# For silent installs, no language prompt, use default + IfSilent lbl_return + StrCmp $SKIP_DIALOGS "true" lbl_return + +lbl_build_menu: + Push "" +# Use separate file so labels can be UTF-16 but we can still merge changes into this ASCII file. JC + !include "%%SOURCE%%\installers\windows\language_menu.nsi" + + Push A # A means auto count languages for the auto count to work the first empty push (Push "") must remain + LangDLL::LangDialog $(InstallerLanguageTitle) $(SelectInstallerLanguage) + Pop $0 + StrCmp $0 "cancel" 0 +2 + Abort + StrCpy $LANGUAGE $0 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Make sure the user can install -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function CheckIfAdministrator - DetailPrint $(CheckAdministratorInstDP) - UserInfo::GetAccountType - Pop $R0 - StrCmp $R0 "Admin" lbl_is_admin - MessageBox MB_OK $(CheckAdministratorInstMB) - Quit -lbl_is_admin: +# save language in registry + WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" $LANGUAGE +lbl_return: + Pop $0 Return FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Make sure the user can uninstall +;; Prep Uninstaller Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function un.CheckIfAdministrator - DetailPrint $(CheckAdministratorUnInstDP) - UserInfo::GetAccountType - Pop $R0 - StrCmp $R0 "Admin" lbl_is_admin - MessageBox MB_OK $(CheckAdministratorUnInstMB) - Quit -lbl_is_admin: +Function un.onInit +# Read language from registry and set for uninstaller. Key will be removed on successful uninstall + ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" + IfErrors lbl_end + StrCpy $LANGUAGE $0 +lbl_end: 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 continue_install - StrCmp $SKIP_DIALOGS "true" continue_install - MessageBox MB_OKCANCEL $(CheckIfCurrentMB) /SD IDOK IDOK continue_install - Quit -continue_install: - Pop $0 - Return - -FunctionEnd - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Checks for CPU valid (must have SSE2 support) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -262,333 +213,356 @@ Function CheckCPUFlags FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Close the program, if running. Modifies no variables. -;; Allows user to bail out of install process. +;; Make sure this computer meets the minimum system requirements. +;; Currently: Windows Vista SP2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function CloseSecondLife - Push $0 - FindWindow $0 "Second Life" "" - IntCmp $0 0 DONE - - StrCmp $SKIP_DIALOGS "true" CLOSE - MessageBox MB_OKCANCEL $(CloseSecondLifeInstMB) IDOK CLOSE IDCANCEL CANCEL_INSTALL - - CANCEL_INSTALL: +Function CheckWindowsVersion + ${If} ${AtMostWin2003} + MessageBox MB_OK $(CheckWindowsVersionMB) Quit + ${EndIf} - CLOSE: - DetailPrint $(CloseSecondLifeInstDP) - SendMessage $0 16 0 0 - - LOOP: - FindWindow $0 "Second Life" "" - IntCmp $0 0 DONE - Sleep 500 - Goto LOOP + ${If} ${IsWinVista} + ${AndIfNot} ${IsServicePack} 2 + MessageBox MB_OK $(CheckWindowsVersionMB) + Quit + ${EndIf} - DONE: - Pop $0 - Return + ${If} ${IsWin2008} + ${AndIfNot} ${IsServicePack} 2 + MessageBox MB_OK $(CheckWindowsVersionMB) + Quit + ${EndIf} FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Test our connection to secondlife.com -;; Also allows us to count attempted installs by examining web logs. -;; *TODO: Return current SL version info and have installer check -;; if it is up to date. +;; Install Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function CheckNetworkConnection - Push $0 - Push $1 - Push $2 # Option value for GetOptions - DetailPrint $(CheckNetworkConnectionDP) -# Look for a tag value from the stub installer, used for statistics to correlate installs. -# Default to "" if not found on command line. - StrCpy $2 "" - ${GetOptions} $COMMANDLINE "/STUBTAG=" $2 - GetTempFileName $0 - !define HTTP_TIMEOUT 5000 # milliseconds -# Don't show secondary progress bar, this will be quick. - NSISdl::download_quiet \ - /TIMEOUT=${HTTP_TIMEOUT} \ - "http://install.secondlife.com/check/?stubtag=$2&version=${VERSION_LONG}" \ - $0 - Pop $1 # Return value, either "success", "cancel" or an error message - ; MessageBox MB_OK "Download result: $1" - ; Result ignored for now - ; StrCmp $1 "success" +2 - ; DetailPrint "Connection failed: $1" - Delete $0 # temporary file - Pop $2 - Pop $1 - Pop $0 - Return +Section "" -FunctionEnd +SetShellVarContext all # Install for all users (if you change this, change it in the uninstall as well) -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Function CheckOldExeName -;; Viewer versions < 3.6.12 used the name 'SecondLife.exe' -;; If that name is found in the install folder, delete it to invalidate any -;; old shortcuts to it that may be in non-standard locations. This is to prevent -;; the userpotentially getting caught in an infinite update loop). See MAINT-3575 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +# Start with some default values. +StrCpy $INSTPROG "${INSTNAME}" +StrCpy $INSTEXE "${INSTEXE}" +StrCpy $INSTSHORTCUT "${SHORTCUT}" -Function CheckOldExeName - IfFileExists "$INSTDIR\SecondLife.exe" CHECKOLDEXE_FOUND CHECKOLDEXE_DONE +Call CheckIfAdministrator # Make sure the user can install/uninstall +Call CheckIfAlreadyCurrent # Make sure this version is not already installed +Call CloseSecondLife # Make sure Second Life not currently running +Call CheckNetworkConnection # Ping secondlife.com +Call CheckWillUninstallV2 # Check if SecondLife is already installed +Call CheckOldExeName # Clean up a previous version of the exeicutable -CHECKOLDEXE_FOUND: - Delete "$INSTDIR\SecondLife.exe" -CHECKOLDEXE_DONE: +StrCmp $DO_UNINSTALL_V2 "" PRESERVE_DONE + Call PreserveUserFiles +PRESERVE_DONE: -FunctionEnd +# 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. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Function CheckWillUninstallV2 -;; -;; If called through auto-update, need to uninstall any existing V2 installation. -;; Don't want to end up with SecondLifeViewer2 and SecondLifeViewer installations -;; existing side by side with no indication on which to use. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function CheckWillUninstallV2 +# Need to clean out shader files from previous installs to fix DEV-5663 +Call RemoveOldShaders - StrCpy $DO_UNINSTALL_V2 "" +# Need to clean out old XUI files that predate skinning +Call RemoveOldXUI - StrCmp $SKIP_DIALOGS "true" 0 CHECKV2_DONE - StrCmp $INSTDIR "$PROGRAMFILES\SecondLifeViewer2" CHECKV2_DONE # Don't uninstall our own install dir. - IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" CHECKV2_FOUND CHECKV2_DONE +# Clear out old releasenotes.txt files. These are now on the public wiki. +Call RemoveOldReleaseNotes -CHECKV2_FOUND: - StrCpy $DO_UNINSTALL_V2 "true" +# This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py +%%INSTALL_FILES%% -CHECKV2_DONE: +# Pass the installer's language to the client to use as a default +StrCpy $SHORTCUT_LANG_PARAM "--set InstallLanguage $(LanguageCode)" -FunctionEnd +# Shortcuts in start menu +CreateDirectory "$SMPROGRAMS\$INSTSHORTCUT" +SetOutPath "$INSTDIR" +CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \ + "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Save user files to temp location -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function PreserveUserFiles -Push $0 -Push $1 -Push $2 +WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Account.url" \ + "InternetShortcut" "URL" \ + "http://join.secondlife.com/" +WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Your Account.url" \ + "InternetShortcut" "URL" \ + "http://www.secondlife.com/account/" +WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Scripting Language Help.url" \ + "InternetShortcut" "URL" \ + "http://wiki.secondlife.com/wiki/LSL_Portal" +CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \ + '"$INSTDIR\uninst.exe"' '' - RMDir /r "$TEMP\SecondLifeSettingsBackup" # Clear out any old data that might be there - CreateDirectory "$TEMP\SecondLifeSettingsBackup" - StrCpy $0 0 # Index number used to iterate via EnumRegKey +# Other shortcuts +SetOutPath "$INSTDIR" +CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \ + "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" +CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \ + "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" +CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ + '"$INSTDIR\uninst.exe"' '' - LOOP: - EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 - StrCmp $1 "" DONE # no more users +# Write registry +WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$INSTDIR" +WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}" +WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT" +WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE" +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"' - ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" - StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing +# Write URL registry info +WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life" +WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "URL Protocol" "" +WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' -# Required since ProfileImagePath is of type REG_EXPAND_SZ - ExpandEnvStrings $2 $2 +# URL param must be last item passed to viewer, it ignores subsequent params to avoid parameter injection attacks. +WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"' +WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info"(default)" "URL:Second Life" +WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info" "URL Protocol" "" +WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' - CreateDirectory "$TEMP\SecondLifeSettingsBackup\$0" - CopyFiles /SILENT "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\$0" +# URL param must be last item passed to viewer, it ignores subsequent params to avoid parameter injection attacks. +WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"' - CONTINUE: - IntOp $0 $0 + 1 - Goto LOOP - DONE: +# Write out uninstaller +WriteUninstaller "$INSTDIR\uninst.exe" -Pop $2 -Pop $1 -Pop $0 +# Uninstall existing "Second Life Viewer 2" install if needed. +StrCmp $DO_UNINSTALL_V2 "" REMOVE_SLV2_DONE + ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S _?=$PROGRAMFILES\SecondLifeViewer2' + Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" # with _? option above, uninst.exe will be left behind. + RMDir "$PROGRAMFILES\SecondLifeViewer2" # will remove only if empty. -# Copy 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 - CreateDirectory "$TEMP\SecondLifeSettingsBackup\AllUsers\" - CopyFiles /SILENT "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\AllUsers\" -Pop $0 + Call RestoreUserFiles + Call RemoveTempUserFiles +REMOVE_SLV2_DONE: -FunctionEnd +SectionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Restore user files from temp location +;; Uninstall Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RestoreUserFiles +Section Uninstall -Push $0 -Push $1 -Push $2 +# Start with some default values. +StrCpy $INSTPROG "${INSTNAME}" +StrCpy $INSTEXE "${INSTEXE}" +StrCpy $INSTSHORTCUT "${SHORTCUT}" - StrCpy $0 0 # Index number used to iterate via EnumRegKey +# Make sure the user can install/uninstall +Call un.CheckIfAdministrator - LOOP: - EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 - StrCmp $1 "" DONE # no more users +# Uninstall for all users (if you change this, change it in the install as well) +SetShellVarContext all - ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" - StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing +# Make sure we're not running +Call un.CloseSecondLife -# Required since ProfileImagePath is of type REG_EXPAND_SZ - ExpandEnvStrings $2 $2 +# Clean up registry keys and subkeys (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" - CreateDirectory "$2\Application Data\SecondLife\" - CopyFiles /SILENT "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLife\" +# Clean up shortcuts +Delete "$SMPROGRAMS\$INSTSHORTCUT\*.*" +RMDir "$SMPROGRAMS\$INSTSHORTCUT" - CONTINUE: - IntOp $0 $0 + 1 - Goto LOOP - DONE: +Delete "$DESKTOP\$INSTSHORTCUT.lnk" +Delete "$INSTDIR\$INSTSHORTCUT.lnk" +Delete "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" -Pop $2 -Pop $1 -Pop $0 +# Clean up cache and log files, but leave them in-place for non AGNI installs. -# Copy 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 - CreateDirectory "$2\Application Data\SecondLife\" - CopyFiles /SILENT "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLife\" -Pop $0 +!ifdef UNINSTALL_SETTINGS +Call un.DocumentsAndSettingsFolder +!endif -FunctionEnd +# Remove stored password on uninstall +Call un.RemovePassword + +Call un.ProgramFiles + +SectionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Remove temp directories +;; Make sure the user can install ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RemoveTempUserFiles +Function CheckIfAdministrator + DetailPrint $(CheckAdministratorInstDP) + UserInfo::GetAccountType + Pop $R0 + StrCmp $R0 "Admin" lbl_is_admin + MessageBox MB_OK $(CheckAdministratorInstMB) + Quit +lbl_is_admin: + Return -Push $0 -Push $1 -Push $2 +FunctionEnd - StrCpy $0 0 # Index number used to iterate via EnumRegKey +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Make sure the user can uninstall +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function un.CheckIfAdministrator + DetailPrint $(CheckAdministratorUnInstDP) + UserInfo::GetAccountType + Pop $R0 + StrCmp $R0 "Admin" lbl_is_admin + MessageBox MB_OK $(CheckAdministratorUnInstMB) + Quit +lbl_is_admin: + Return - LOOP: - EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 - StrCmp $1 "" DONE # no more users +FunctionEnd - ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" - StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; 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 continue_install + StrCmp $SKIP_DIALOGS "true" continue_install + MessageBox MB_OKCANCEL $(CheckIfCurrentMB) /SD IDOK IDOK continue_install + Quit +continue_install: + Pop $0 + Return -# Required since ProfileImagePath is of type REG_EXPAND_SZ - ExpandEnvStrings $2 $2 +FunctionEnd + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Function CheckWillUninstallV2 +;; +;; If called through auto-update, need to uninstall any existing V2 installation. +;; Don't want to end up with SecondLifeViewer2 and SecondLifeViewer installations +;; existing side by side with no indication on which to use. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function CheckWillUninstallV2 - RMDir /r "$TEMP\SecondLifeSettingsBackup\$0\*" + StrCpy $DO_UNINSTALL_V2 "" - CONTINUE: - IntOp $0 $0 + 1 - Goto LOOP - DONE: + StrCmp $SKIP_DIALOGS "true" 0 CHECKV2_DONE + StrCmp $INSTDIR "$PROGRAMFILES\SecondLifeViewer2" CHECKV2_DONE # Don't uninstall our own install dir. + IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" CHECKV2_FOUND CHECKV2_DONE -Pop $2 -Pop $1 -Pop $0 +CHECKV2_FOUND: + StrCpy $DO_UNINSTALL_V2 "true" -# Copy 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 "$TEMP\SecondLifeSettingsBackup\AllUsers\*" -Pop $0 +CHECKV2_DONE: FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Clobber user files - TEST ONLY -;; This is here for testing, DO NOT USE UNLESS YOU KNOW WHAT YOU ARE TESTING FOR! +;; Close the program, if running. Modifies no variables. +;; Allows user to bail out of install process. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;Function ClobberUserFilesTESTONLY +Function CloseSecondLife + Push $0 + FindWindow $0 "Second Life" "" + IntCmp $0 0 DONE + + StrCmp $SKIP_DIALOGS "true" CLOSE + MessageBox MB_OKCANCEL $(CloseSecondLifeInstMB) IDOK CLOSE IDCANCEL CANCEL_INSTALL -;Push $0 -;Push $1 -;Push $2 -; -; 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 -; -; RMDir /r "$2\Application Data\SecondLife\" -; -; CONTINUE: -; IntOp $0 $0 + 1 -; Goto LOOP -; DONE: -; -;Pop $2 -;Pop $1 -;Pop $0 -; -;# Copy 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 "$2\Application Data\SecondLife\" -;Pop $0 -; -;FunctionEnd + CANCEL_INSTALL: + Quit -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete the installed shader files -;; Since shaders are in active development, we'll likely need to shuffle them -;; around a bit from build to build. This ensures that shaders that were removed -;; or renamed don't get left behind in the install directory. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RemoveOldShaders + CLOSE: + DetailPrint $(CloseSecondLifeInstDP) + SendMessage $0 16 0 0 -;; Remove old shader files first so fallbacks will work. see DEV-5663 -RMDir /r "$INSTDIR\app_settings\shaders\*" + LOOP: + FindWindow $0 "Second Life" "" + IntCmp $0 0 DONE + Sleep 500 + Goto LOOP + + DONE: + Pop $0 + Return FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete the installed XUI files -;; We've changed the directory hierarchy for skins, putting all XUI and texture -;; files under a specific skin directory, i.e. skins/default/xui/en-us as opposed -;; to skins/xui/en-us. Need to clean up the old path when upgrading. +;; Close the program, if running. Modifies no variables. +;; Allows user to bail out of uninstall process. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RemoveOldXUI +Function un.CloseSecondLife + Push $0 + FindWindow $0 "Second Life" "" + IntCmp $0 0 DONE + MessageBox MB_OKCANCEL $(CloseSecondLifeUnInstMB) IDOK CLOSE IDCANCEL CANCEL_UNINSTALL -RmDir /r "$INSTDIR\skins\html" -RmDir /r "$INSTDIR\skins\xui" -RmDir /r "$INSTDIR\skins\textures" -Delete "$INSTDIR\skins\*.txt" + CANCEL_UNINSTALL: + Quit + + CLOSE: + DetailPrint $(CloseSecondLifeUnInstDP) + SendMessage $0 16 0 0 + + LOOP: + FindWindow $0 "Second Life" "" + IntCmp $0 0 DONE + Sleep 500 + Goto LOOP + + DONE: + Pop $0 + Return FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Remove any release notes files. -;; We are no longer including release notes with the viewer, so remove them. +;; Test our connection to secondlife.com +;; Also allows us to count attempted installs by examining web logs. +;; *TODO: Return current SL version info and have installer check +;; if it is up to date. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RemoveOldReleaseNotes - -Delete "$SMPROGRAMS\$INSTSHORTCUT\SL Release Notes.lnk" -Delete "$INSTDIR\releasenotes.txt" +Function CheckNetworkConnection + Push $0 + Push $1 + Push $2 # Option value for GetOptions + DetailPrint $(CheckNetworkConnectionDP) +# Look for a tag value from the stub installer, used for statistics to correlate installs. +# Default to "" if not found on command line. + StrCpy $2 "" + ${GetOptions} $COMMANDLINE "/STUBTAG=" $2 + GetTempFileName $0 + !define HTTP_TIMEOUT 5000 # milliseconds +# Don't show secondary progress bar, this will be quick. + NSISdl::download_quiet \ + /TIMEOUT=${HTTP_TIMEOUT} \ + "http://install.secondlife.com/check/?stubtag=$2&version=${VERSION_LONG}" \ + $0 + Pop $1 # Return value, either "success", "cancel" or an error message + ; MessageBox MB_OK "Download result: $1" + ; Result ignored for now + ; StrCmp $1 "success" +2 + ; DetailPrint "Connection failed: $1" + Delete $0 # temporary file + Pop $2 + Pop $1 + Pop $0 + Return FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete files in \Users\\AppData\Roaming\SecondLife +;; Save user files to temp location ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function un.DocumentsAndSettingsFolder +Function PreserveUserFiles -# Delete files in \Users\\AppData\Roaming\SecondLife Push $0 Push $1 Push $2 - DetailPrint "Deleting Second Life files" - - StrCpy $0 0 # Index number used to iterate via EnumRegKey + RMDir /r "$TEMP\SecondLifeSettingsBackup" # Clear out any old data that might be there + CreateDirectory "$TEMP\SecondLifeSettingsBackup" + StrCpy $0 0 # Index number used to iterate via EnumRegKey LOOP: EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 @@ -600,15 +574,8 @@ Push $2 # Required since ProfileImagePath is of type REG_EXPAND_SZ ExpandEnvStrings $2 $2 -# Remove all settings files but leave any other .txt files to preserve the chat logs -; RMDir /r "$2\Application Data\SecondLife\logs" - RMDir /r "$2\Application Data\SecondLife\browser_profile" - RMDir /r "$2\Application Data\SecondLife\user_settings" - Delete "$2\Application Data\SecondLife\*.xml" - Delete "$2\Application Data\SecondLife\*.bmp" - Delete "$2\Application Data\SecondLife\search_history.txt" - Delete "$2\Application Data\SecondLife\plugin_cookies.txt" - Delete "$2\Application Data\SecondLife\typed_locations.txt" + CreateDirectory "$TEMP\SecondLifeSettingsBackup\$0" + CopyFiles /SILENT "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\$0" CONTINUE: IntOp $0 $0 + 1 @@ -619,344 +586,373 @@ Pop $2 Pop $1 Pop $0 -# Delete files in Program Data folder +# Copy 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" + ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" + StrCmp $0 "" +2 + CreateDirectory "$TEMP\SecondLifeSettingsBackup\AllUsers\" + CopyFiles /SILENT "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\AllUsers\" Pop $0 -# Delete files 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" - FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Close the program, if running. Modifies no variables. -;; Allows user to bail out of uninstall process. +;; Restore user files from temp location ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function un.CloseSecondLife - Push $0 - FindWindow $0 "Second Life" "" - IntCmp $0 0 DONE - MessageBox MB_OKCANCEL $(CloseSecondLifeUnInstMB) IDOK CLOSE IDCANCEL CANCEL_UNINSTALL +Function RestoreUserFiles - CANCEL_UNINSTALL: - Quit +Push $0 +Push $1 +Push $2 - CLOSE: - DetailPrint $(CloseSecondLifeUnInstDP) - SendMessage $0 16 0 0 + StrCpy $0 0 # Index number used to iterate via EnumRegKey LOOP: - FindWindow $0 "Second Life" "" - IntCmp $0 0 DONE - Sleep 500 - Goto 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 + + CreateDirectory "$2\Application Data\SecondLife\" + CopyFiles /SILENT "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLife\" + CONTINUE: + IntOp $0 $0 + 1 + Goto LOOP DONE: - Pop $0 - Return + +Pop $2 +Pop $1 +Pop $0 + +# Copy 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 + CreateDirectory "$2\Application Data\SecondLife\" + CopyFiles /SILENT "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLife\" +Pop $0 FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete the stored password for the current Windows user -;; DEV-10821 -- Unauthorised user can gain access to an SL account after a real user has uninstalled +;; Remove temp directories ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function un.RemovePassword +Function RemoveTempUserFiles -DetailPrint "Removing Second Life password" +Push $0 +Push $1 +Push $2 -SetShellVarContext current -Delete "$APPDATA\SecondLife\user_settings\password.dat" -SetShellVarContext all + StrCpy $0 0 # Index number used to iterate via EnumRegKey -FunctionEnd + LOOP: + EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 + StrCmp $1 "" DONE # no more users -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete the installed files -;; This deletes the uninstall executable, but it works because it is copied to temp directory before running -;; -;; 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 + ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" + StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing -# Remove mozilla file first so recursive directory deletion doesn't get hung up -Delete "$INSTDIR\app_settings\mozilla\components" +# Required since ProfileImagePath is of type REG_EXPAND_SZ + ExpandEnvStrings $2 $2 -# This placeholder is replaced by the complete list of files to uninstall by viewer_manifest.py -%%DELETE_FILES%% + RMDir /r "$TEMP\SecondLifeSettingsBackup\$0\*" -# Optional/obsolete files. Delete won't fail if they don't exist. -Delete "$INSTDIR\dronesettings.ini" -Delete "$INSTDIR\message_template.msg" -Delete "$INSTDIR\newview.pdb" -Delete "$INSTDIR\newview.map" -Delete "$INSTDIR\SecondLife.pdb" -Delete "$INSTDIR\SecondLife.map" -Delete "$INSTDIR\comm.dat" -Delete "$INSTDIR\*.glsl" -Delete "$INSTDIR\motions\*.lla" -Delete "$INSTDIR\trial\*.html" -Delete "$INSTDIR\newview.exe" -Delete "$INSTDIR\SecondLife.exe" + CONTINUE: + IntOp $0 $0 + 1 + Goto LOOP + DONE: -# MAINT-3099 workaround - prevent these log files, if present, from causing a user alert -Delete "$INSTDIR\VivoxVoiceService-*.log" +Pop $2 +Pop $1 +Pop $0 -# Remove entire help directory -Delete "$INSTDIR\help\Advanced\*" -RMDir "$INSTDIR\help\Advanced" -Delete "$INSTDIR\help\basics\*" -RMDir "$INSTDIR\help\basics" -Delete "$INSTDIR\help\Concepts\*" -RMDir "$INSTDIR\help\Concepts" -Delete "$INSTDIR\help\welcome\*" -RMDir "$INSTDIR\help\welcome" -Delete "$INSTDIR\help\*" -RMDir "$INSTDIR\help" +# Copy 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 "$TEMP\SecondLifeSettingsBackup\AllUsers\*" +Pop $0 -Delete "$INSTDIR\uninst.exe" -RMDir "$INSTDIR" +FunctionEnd -IfFileExists "$INSTDIR" FOLDERFOUND NOFOLDER +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Function CheckOldExeName +;; Viewer versions < 3.6.12 used the name 'SecondLife.exe' +;; If that name is found in the install folder, delete it to invalidate any +;; old shortcuts to it that may be in non-standard locations. This is to prevent +;; the userpotentially getting caught in an infinite update loop). See MAINT-3575 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -FOLDERFOUND: -# Silent uninstall always removes all files (/SD IDYES) - MessageBox MB_YESNO $(DeleteProgramFilesMB) /SD IDYES IDNO NOFOLDER - RMDir /r "$INSTDIR" +Function CheckOldExeName + IfFileExists "$INSTDIR\SecondLife.exe" CHECKOLDEXE_FOUND CHECKOLDEXE_DONE -NOFOLDER: +CHECKOLDEXE_FOUND: + Delete "$INSTDIR\SecondLife.exe" +CHECKOLDEXE_DONE: FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Uninstall settings +;; Delete the installed shader files +;; Since shaders are in active development, we'll likely need to shuffle them +;; around a bit from build to build. This ensures that shaders that were removed +;; or renamed don't get left behind in the install directory. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -UninstallText $(UninstallTextMsg) +Function RemoveOldShaders -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Uninstall Section -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Section Uninstall +;; Remove old shader files first so fallbacks will work. see DEV-5663 +RMDir /r "$INSTDIR\app_settings\shaders\*" -# Start with some default values. -StrCpy $INSTPROG "${INSTNAME}" -StrCpy $INSTEXE "${INSTEXE}" -StrCpy $INSTSHORTCUT "${SHORTCUT}" +FunctionEnd -# Make sure the user can install/uninstall -Call un.CheckIfAdministrator +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Delete the installed XUI files +;; We've changed the directory hierarchy for skins, putting all XUI and texture +;; files under a specific skin directory, i.e. skins/default/xui/en-us as opposed +;; to skins/xui/en-us. Need to clean up the old path when upgrading. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function RemoveOldXUI -# uninstall for all users (if you change this, change it in the install as well) -SetShellVarContext all +RmDir /r "$INSTDIR\skins\html" +RmDir /r "$INSTDIR\skins\xui" +RmDir /r "$INSTDIR\skins\textures" +Delete "$INSTDIR\skins\*.txt" -# Make sure we're not running -Call un.CloseSecondLife +FunctionEnd -# Clean up registry keys and subkeys (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" +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Remove any release notes files. +;; We are no longer including release notes with the viewer, so remove them. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function RemoveOldReleaseNotes -# Clean up shortcuts -Delete "$SMPROGRAMS\$INSTSHORTCUT\*.*" -RMDir "$SMPROGRAMS\$INSTSHORTCUT" +Delete "$SMPROGRAMS\$INSTSHORTCUT\SL Release Notes.lnk" +Delete "$INSTDIR\releasenotes.txt" -Delete "$DESKTOP\$INSTSHORTCUT.lnk" -Delete "$INSTDIR\$INSTSHORTCUT.lnk" -Delete "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" +FunctionEnd -# Clean up cache and log files, but leave them in-place for non AGNI installs. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Delete files in \Users\\AppData\Roaming\SecondLife +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function un.DocumentsAndSettingsFolder -!ifdef UNINSTALL_SETTINGS -Call un.DocumentsAndSettingsFolder -!endif +# Delete files in \Users\\AppData\Roaming\SecondLife +Push $0 +Push $1 +Push $2 -# Remove stored password on uninstall -Call un.RemovePassword + DetailPrint "Deleting Second Life files" -Call un.ProgramFiles + StrCpy $0 0 # Index number used to iterate via EnumRegKey -SectionEnd + LOOP: + EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 + StrCmp $1 "" DONE # no more users -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Prep Installer Section -;; -;; 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 -Call CheckWindowsVersion # Don't install On unsupported systems - Push $0 - ${GetParameters} $COMMANDLINE # Get our command line + ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" + StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing - ${GetOptions} $COMMANDLINE "/SKIP_DIALOGS" $0 - IfErrors +2 0 # If error jump past setting SKIP_DIALOGS - StrCpy $SKIP_DIALOGS "true" +# Required since ProfileImagePath is of type REG_EXPAND_SZ + ExpandEnvStrings $2 $2 - ${GetOptions} $COMMANDLINE "/LANGID=" $0 # /LANGID=1033 implies US English +# Remove all settings files but leave any other .txt files to preserve the chat logs +; RMDir /r "$2\Application Data\SecondLife\logs" + RMDir /r "$2\Application Data\SecondLife\browser_profile" + RMDir /r "$2\Application Data\SecondLife\user_settings" + Delete "$2\Application Data\SecondLife\*.xml" + Delete "$2\Application Data\SecondLife\*.bmp" + Delete "$2\Application Data\SecondLife\search_history.txt" + Delete "$2\Application Data\SecondLife\plugin_cookies.txt" + Delete "$2\Application Data\SecondLife\typed_locations.txt" -# If no language (error), then proceed - IfErrors lbl_configure_default_lang -# No error means we got a language, so use it - StrCpy $LANGUAGE $0 - Goto lbl_return + CONTINUE: + IntOp $0 $0 + 1 + Goto LOOP + DONE: -lbl_configure_default_lang: -# If we currently have a version of SL installed, default to the language of that install -# Otherwise don't change $LANGUAGE and it will default to the OS UI language. - ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" - IfErrors +2 0 # If error skip the copy instruction - StrCpy $LANGUAGE $0 +Pop $2 +Pop $1 +Pop $0 -# For silent installs, no language prompt, use default - IfSilent lbl_return - StrCmp $SKIP_DIALOGS "true" lbl_return - -lbl_build_menu: - Push "" -# Use separate file so labels can be UTF-16 but we can still merge changes into this ASCII file. JC - !include "%%SOURCE%%\installers\windows\language_menu.nsi" - - Push A # A means auto count languages for the auto count to work the first empty push (Push "") must remain - LangDLL::LangDialog $(InstallerLanguageTitle) $(SelectInstallerLanguage) - Pop $0 - StrCmp $0 "cancel" 0 +2 - Abort - StrCpy $LANGUAGE $0 +# Delete files in Program Data folder +Push $0 + ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" + StrCmp $0 "" +2 + RMDir /r "$0\SecondLife" +Pop $0 -# save language in registry - WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" $LANGUAGE -lbl_return: - Pop $0 - Return +# Delete files 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" FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Prep Uninstaller Section +;; Delete the stored password for the current Windows user +;; DEV-10821 -- Unauthorised user can gain access to an SL account after a real user has uninstalled ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function un.onInit -# Read language from registry and set for uninstaller. Key will be removed on successful uninstall - ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" - IfErrors lbl_end - StrCpy $LANGUAGE $0 -lbl_end: - Return +Function un.RemovePassword + +DetailPrint "Removing Second Life password" + +SetShellVarContext current +Delete "$APPDATA\SecondLife\user_settings\password.dat" +SetShellVarContext all FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Default Section +;; Delete the installed files +;; This deletes the uninstall executable, but it works because it is copied to temp directory before running +;; +;; Note: You must list all files here, because we only want to delete our files, +;; not things users left in the application directories. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Section "" - -SetShellVarContext all # Install for all users (if you change this, change it in the uninstall as well) - -# Start with some default values. -StrCpy $INSTPROG "${INSTNAME}" -StrCpy $INSTEXE "${INSTEXE}" -StrCpy $INSTSHORTCUT "${SHORTCUT}" - -Call CheckCPUFlags # Make sure we have SSE2 support -Call CheckIfAdministrator # Make sure the user can install/uninstall -Call CheckIfAlreadyCurrent # Make sure this version is not already installed -Call CloseSecondLife # Make sure Second Life not currently running -Call CheckNetworkConnection # Ping secondlife.com -Call CheckWillUninstallV2 # Check if SecondLife is already installed -Call CheckOldExeName # Clean up a previous version of the exeicutable +Function un.ProgramFiles -StrCmp $DO_UNINSTALL_V2 "" PRESERVE_DONE - Call PreserveUserFiles -PRESERVE_DONE: +# Remove mozilla file first so recursive directory deletion doesn't get hung up +Delete "$INSTDIR\app_settings\mozilla\components" -# 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. +# This placeholder is replaced by the complete list of files to uninstall by viewer_manifest.py +%%DELETE_FILES%% -# Need to clean out shader files from previous installs to fix DEV-5663 -Call RemoveOldShaders +# Optional/obsolete files. Delete won't fail if they don't exist. +Delete "$INSTDIR\dronesettings.ini" +Delete "$INSTDIR\message_template.msg" +Delete "$INSTDIR\newview.pdb" +Delete "$INSTDIR\newview.map" +Delete "$INSTDIR\SecondLife.pdb" +Delete "$INSTDIR\SecondLife.map" +Delete "$INSTDIR\comm.dat" +Delete "$INSTDIR\*.glsl" +Delete "$INSTDIR\motions\*.lla" +Delete "$INSTDIR\trial\*.html" +Delete "$INSTDIR\newview.exe" +Delete "$INSTDIR\SecondLife.exe" -# Need to clean out old XUI files that predate skinning -Call RemoveOldXUI +# MAINT-3099 workaround - prevent these log files, if present, from causing a user alert +Delete "$INSTDIR\VivoxVoiceService-*.log" -# Clear out old releasenotes.txt files. These are now on the public wiki. -Call RemoveOldReleaseNotes +# Remove entire help directory +Delete "$INSTDIR\help\Advanced\*" +RMDir "$INSTDIR\help\Advanced" +Delete "$INSTDIR\help\basics\*" +RMDir "$INSTDIR\help\basics" +Delete "$INSTDIR\help\Concepts\*" +RMDir "$INSTDIR\help\Concepts" +Delete "$INSTDIR\help\welcome\*" +RMDir "$INSTDIR\help\welcome" +Delete "$INSTDIR\help\*" +RMDir "$INSTDIR\help" -# This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py -%%INSTALL_FILES%% +Delete "$INSTDIR\uninst.exe" +RMDir "$INSTDIR" -# Pass the installer's language to the client to use as a default -StrCpy $SHORTCUT_LANG_PARAM "--set InstallLanguage $(LanguageCode)" +IfFileExists "$INSTDIR" FOLDERFOUND NOFOLDER -# Shortcuts in start menu -CreateDirectory "$SMPROGRAMS\$INSTSHORTCUT" -SetOutPath "$INSTDIR" -CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \ - "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" +FOLDERFOUND: +# Silent uninstall always removes all files (/SD IDYES) + MessageBox MB_YESNO $(DeleteProgramFilesMB) /SD IDYES IDNO NOFOLDER + RMDir /r "$INSTDIR" +NOFOLDER: -WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Account.url" \ - "InternetShortcut" "URL" \ - "http://join.secondlife.com/" -WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Your Account.url" \ - "InternetShortcut" "URL" \ - "http://www.secondlife.com/account/" -WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Scripting Language Help.url" \ - "InternetShortcut" "URL" \ - "http://wiki.secondlife.com/wiki/LSL_Portal" -CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \ - '"$INSTDIR\uninst.exe"' '' +FunctionEnd -# Other shortcuts -SetOutPath "$INSTDIR" -CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \ - "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" -CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \ - "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" -CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ - '"$INSTDIR\uninst.exe"' '' +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; After install completes, launch app +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function .onInstSuccess +Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. + Push $R0 # Option value, unused -# Write registry -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$INSTDIR" -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}" -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT" -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE" -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"' + StrCmp $SKIP_DIALOGS "true" label_launch -# Write URL registry info -WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life" -WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "URL Protocol" "" -WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' + ${GetOptions} $COMMANDLINE "/AUTOSTART" $R0 + # If parameter was there (no error) just launch + # Otherwise ask + IfErrors label_ask_launch label_launch + +label_ask_launch: + # Don't launch by default when silent + IfSilent label_no_launch + MessageBox MB_YESNO $(InstSuccesssQuestion) \ + IDYES label_launch IDNO label_no_launch + +label_launch: +# Assumes SetOutPath $INSTDIR + Exec '"$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM' +label_no_launch: + Pop $R0 -# URL param must be last item passed to viewer, it ignores subsequent params to avoid parameter injection attacks. -WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"' -WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info"(default)" "URL:Second Life" -WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info" "URL Protocol" "" -WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' +FunctionEnd -# URL param must be last item passed to viewer, it ignores subsequent params to avoid parameter injection attacks. -WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"' +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Recommend Upgrading to Service Pack 1 for Windows 7, if not present +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function CheckWindowsServPack + ${If} ${IsWin7} + ${AndIfNot} ${IsServicePack} 1 + MessageBox MB_OK $(CheckWindowsServPackMB) + DetailPrint $(UseLatestServPackDP) + Return + ${EndIf} -# write out uninstaller -WriteUninstaller "$INSTDIR\uninst.exe" + ${If} ${IsWin2008R2} + ${AndIfNot} ${IsServicePack} 1 + MessageBox MB_OK $(CheckWindowsServPackMB) + DetailPrint $(UseLatestServPackDP) + Return + ${EndIf} -# Uninstall existing "Second Life Viewer 2" install if needed. -StrCmp $DO_UNINSTALL_V2 "" REMOVE_SLV2_DONE - ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S _?=$PROGRAMFILES\SecondLifeViewer2' - Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" # with _? option above, uninst.exe will be left behind. - RMDir "$PROGRAMFILES\SecondLifeViewer2" # will remove only if empty. +FunctionEnd - Call RestoreUserFiles - Call RemoveTempUserFiles -REMOVE_SLV2_DONE: +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Clobber user files - TEST ONLY +;; This is here for testing, DO NOT USE UNLESS YOU KNOW WHAT YOU ARE TESTING FOR! +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;Function ClobberUserFilesTESTONLY -SectionEnd +;Push $0 +;Push $1 +;Push $2 +; +; 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 +; +; RMDir /r "$2\Application Data\SecondLife\" +; +; CONTINUE: +; IntOp $0 $0 + 1 +; Goto LOOP +; DONE: +; +;Pop $2 +;Pop $1 +;Pop $0 +; +;# Copy 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 "$2\Application Data\SecondLife\" +;Pop $0 +; +;FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EOF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- cgit v1.2.3 From e9a7222ac3535ee027f0fc669832d1ecc797cc37 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Sat, 14 Feb 2015 10:12:23 -0800 Subject: Remove no longer used code; Combine calls to delete files on install into one call Functionality change: deletion of entire skins folder to prevent issues when an XML file is deleted from the installer, but left on the hard drive after upgrade --- .../installers/windows/installer_template.nsi | 80 ++++------------------ 1 file changed, 12 insertions(+), 68 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 36a8d7216b..22a7336858 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -175,7 +175,7 @@ lbl_build_menu: Abort StrCpy $LANGUAGE $0 -# save language in registry +# Save language in registry WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" $LANGUAGE lbl_return: Pop $0 @@ -253,24 +253,12 @@ Call CheckIfAlreadyCurrent # Make sure this version is not already installed Call CloseSecondLife # Make sure Second Life not currently running Call CheckNetworkConnection # Ping secondlife.com Call CheckWillUninstallV2 # Check if SecondLife is already installed -Call CheckOldExeName # Clean up a previous version of the exeicutable StrCmp $DO_UNINSTALL_V2 "" PRESERVE_DONE Call PreserveUserFiles PRESERVE_DONE: -# 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. - -# Need to clean out shader files from previous installs to fix DEV-5663 -Call RemoveOldShaders - -# Need to clean out old XUI files that predate skinning -Call RemoveOldXUI - -# Clear out old releasenotes.txt files. These are now on the public wiki. -Call RemoveOldReleaseNotes +Call RemoveProgFilesOnInst # Remove existing files to prevent certain errors when running the new version of the viewer # This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py %%INSTALL_FILES%% @@ -681,63 +669,27 @@ Pop $0 FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Function CheckOldExeName -;; Viewer versions < 3.6.12 used the name 'SecondLife.exe' -;; If that name is found in the install folder, delete it to invalidate any -;; old shortcuts to it that may be in non-standard locations. This is to prevent -;; the userpotentially getting caught in an infinite update loop). See MAINT-3575 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -Function CheckOldExeName - IfFileExists "$INSTDIR\SecondLife.exe" CHECKOLDEXE_FOUND CHECKOLDEXE_DONE - -CHECKOLDEXE_FOUND: - Delete "$INSTDIR\SecondLife.exe" -CHECKOLDEXE_DONE: - -FunctionEnd - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete the installed shader files -;; Since shaders are in active development, we'll likely need to shuffle them -;; around a bit from build to build. This ensures that shaders that were removed -;; or renamed don't get left behind in the install directory. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RemoveOldShaders - -;; Remove old shader files first so fallbacks will work. see DEV-5663 -RMDir /r "$INSTDIR\app_settings\shaders\*" - -FunctionEnd - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete the installed XUI files -;; We've changed the directory hierarchy for skins, putting all XUI and texture -;; files under a specific skin directory, i.e. skins/default/xui/en-us as opposed -;; to skins/xui/en-us. Need to clean up the old path when upgrading. +;; Delete files on install if previous isntall exsists to prevent undesiered behavior ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RemoveOldXUI +Function RemoveProgFilesOnInst -RmDir /r "$INSTDIR\skins\html" -RmDir /r "$INSTDIR\skins\xui" -RmDir /r "$INSTDIR\skins\textures" -Delete "$INSTDIR\skins\*.txt" +# Remove old SecondLife.exe to invalidate any old shortcuts to it that may be in non-standard locations. See MAINT-3575 +Delete "$INSTDIR\SecondLife.exe" -FunctionEnd +# Remove old shader files first so fallbacks will work. see DEV-5663 +RMDir /r "$INSTDIR\app_settings\shaders" -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Remove any release notes files. -;; We are no longer including release notes with the viewer, so remove them. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RemoveOldReleaseNotes +# Remove skins folder to clean up files removed during development +RMDir /r "$INSTDIR\skins" +# We are no longer including release notes with the viewer, so remove them. Delete "$SMPROGRAMS\$INSTSHORTCUT\SL Release Notes.lnk" Delete "$INSTDIR\releasenotes.txt" FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete files in \Users\\AppData\Roaming\SecondLife +;; Delete files in \Users\\AppData\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.DocumentsAndSettingsFolder @@ -786,11 +738,6 @@ Push $0 RMDir /r "$0\SecondLife" Pop $0 -# Delete files 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" - FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -816,9 +763,6 @@ FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.ProgramFiles -# Remove mozilla file first so recursive directory deletion doesn't get hung up -Delete "$INSTDIR\app_settings\mozilla\components" - # This placeholder is replaced by the complete list of files to uninstall by viewer_manifest.py %%DELETE_FILES%% -- cgit v1.2.3 From 96cc2770c646d5bdf68be2960c3f7893b296689f Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Sat, 14 Feb 2015 19:34:10 -0800 Subject: Add option to remove user settings and cache files at uninstall, with message Removed function to delete use stored password file Removed no longer used RemoveCacheFilesDP from language files Added message to English language file for prompt when asking to remove user files -Note: this needs translations in other languages added --- .../installers/windows/installer_template.nsi | 53 ++++++++------------- indra/newview/installers/windows/lang_da.nsi | Bin 8032 -> 7816 bytes indra/newview/installers/windows/lang_de.nsi | Bin 9352 -> 9090 bytes indra/newview/installers/windows/lang_en-us.nsi | Bin 8126 -> 8448 bytes indra/newview/installers/windows/lang_es.nsi | Bin 8770 -> 8458 bytes indra/newview/installers/windows/lang_fr.nsi | Bin 9036 -> 8748 bytes indra/newview/installers/windows/lang_it.nsi | Bin 8378 -> 8102 bytes indra/newview/installers/windows/lang_ja.nsi | Bin 7294 -> 7052 bytes indra/newview/installers/windows/lang_pl.nsi | Bin 8432 -> 8136 bytes indra/newview/installers/windows/lang_pt-br.nsi | Bin 8794 -> 8522 bytes indra/newview/installers/windows/lang_ru.nsi | Bin 8150 -> 7898 bytes indra/newview/installers/windows/lang_tr.nsi | Bin 8272 -> 8006 bytes indra/newview/installers/windows/lang_zh.nsi | Bin 6804 -> 6576 bytes 13 files changed, 21 insertions(+), 32 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 22a7336858..49500ab80d 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -363,14 +363,9 @@ Delete "$INSTDIR\$INSTSHORTCUT.lnk" Delete "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" # Clean up cache and log files, but leave them in-place for non AGNI installs. +Call un.UserSettingsFiles -!ifdef UNINSTALL_SETTINGS -Call un.DocumentsAndSettingsFolder -!endif - -# Remove stored password on uninstall -Call un.RemovePassword - +# Remove the main instalation directory Call un.ProgramFiles SectionEnd @@ -691,14 +686,17 @@ FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Delete files in \Users\\AppData\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function un.DocumentsAndSettingsFolder +Function un.UserSettingsFiles -# Delete files in \Users\\AppData\Roaming\SecondLife +# Ask if user wants to keep data files or not +MessageBox MB_YESNO|MB_ICONQUESTION $(RemoveDataFilesMB) IDYES Remove IDNO Keep + +Remove: Push $0 Push $1 Push $2 - DetailPrint "Deleting Second Life files" + DetailPrint "Deleting Second Life data files" StrCpy $0 0 # Index number used to iterate via EnumRegKey @@ -712,15 +710,18 @@ Push $2 # Required since ProfileImagePath is of type REG_EXPAND_SZ ExpandEnvStrings $2 $2 +# Delete files in \Users\\AppData\Roaming\SecondLife # Remove all settings files but leave any other .txt files to preserve the chat logs -; RMDir /r "$2\Application Data\SecondLife\logs" - RMDir /r "$2\Application Data\SecondLife\browser_profile" - RMDir /r "$2\Application Data\SecondLife\user_settings" - Delete "$2\Application Data\SecondLife\*.xml" - Delete "$2\Application Data\SecondLife\*.bmp" - Delete "$2\Application Data\SecondLife\search_history.txt" - Delete "$2\Application Data\SecondLife\plugin_cookies.txt" - Delete "$2\Application Data\SecondLife\typed_locations.txt" +; RMDir /r "$2\AppData\Roaming\SecondLife\logs" + RMDir /r "$2\AppData\Roaming\SecondLife\browser_profile" + RMDir /r "$2\AppData\Roaming\SecondLife\user_settings" + Delete "$2\AppData\Roaming\SecondLife\*.xml" + Delete "$2\AppData\Roaming\SecondLife\*.bmp" + Delete "$2\AppData\Roaming\SecondLife\search_history.txt" + Delete "$2\AppData\Roaming\SecondLife\plugin_cookies.txt" + Delete "$2\AppData\Roaming\SecondLife\typed_locations.txt" +# Delete files in \Users\\AppData\Local\SecondLife + RmDir /r "$2\AppData\Local\SecondLife" #Delete the cache folder CONTINUE: IntOp $0 $0 + 1 @@ -731,26 +732,14 @@ Pop $2 Pop $1 Pop $0 -# Delete files in Program Data folder +# Delete files in ProgramData\Secondlife Push $0 ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" StrCmp $0 "" +2 RMDir /r "$0\SecondLife" Pop $0 -FunctionEnd - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete the stored password for the current Windows user -;; DEV-10821 -- Unauthorised user can gain access to an SL account after a real user has uninstalled -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function un.RemovePassword - -DetailPrint "Removing Second Life password" - -SetShellVarContext current -Delete "$APPDATA\SecondLife\user_settings\password.dat" -SetShellVarContext all +Keep: FunctionEnd diff --git a/indra/newview/installers/windows/lang_da.nsi b/indra/newview/installers/windows/lang_da.nsi index 1080fd2e3d..83e1a3ea94 100755 Binary files a/indra/newview/installers/windows/lang_da.nsi and b/indra/newview/installers/windows/lang_da.nsi differ diff --git a/indra/newview/installers/windows/lang_de.nsi b/indra/newview/installers/windows/lang_de.nsi index fd59bf8f71..dbf4bc84bf 100755 Binary files a/indra/newview/installers/windows/lang_de.nsi and b/indra/newview/installers/windows/lang_de.nsi differ diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi index 4cf605e398..c06e5ac00d 100755 Binary files a/indra/newview/installers/windows/lang_en-us.nsi and b/indra/newview/installers/windows/lang_en-us.nsi differ diff --git a/indra/newview/installers/windows/lang_es.nsi b/indra/newview/installers/windows/lang_es.nsi index bfc1bf7248..f4f0786332 100755 Binary files a/indra/newview/installers/windows/lang_es.nsi and b/indra/newview/installers/windows/lang_es.nsi differ diff --git a/indra/newview/installers/windows/lang_fr.nsi b/indra/newview/installers/windows/lang_fr.nsi index c2ee17fbd4..1b5dbfc975 100755 Binary files a/indra/newview/installers/windows/lang_fr.nsi and b/indra/newview/installers/windows/lang_fr.nsi differ diff --git a/indra/newview/installers/windows/lang_it.nsi b/indra/newview/installers/windows/lang_it.nsi index cb97335488..a456e6e417 100755 Binary files a/indra/newview/installers/windows/lang_it.nsi and b/indra/newview/installers/windows/lang_it.nsi differ diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi index 3fbf434b6a..fc5f4fabca 100755 Binary files a/indra/newview/installers/windows/lang_ja.nsi and b/indra/newview/installers/windows/lang_ja.nsi differ diff --git a/indra/newview/installers/windows/lang_pl.nsi b/indra/newview/installers/windows/lang_pl.nsi index 1564c25293..a172f0cdeb 100755 Binary files a/indra/newview/installers/windows/lang_pl.nsi and b/indra/newview/installers/windows/lang_pl.nsi differ diff --git a/indra/newview/installers/windows/lang_pt-br.nsi b/indra/newview/installers/windows/lang_pt-br.nsi index 8e858c8742..9ef252d232 100755 Binary files a/indra/newview/installers/windows/lang_pt-br.nsi and b/indra/newview/installers/windows/lang_pt-br.nsi differ diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi index 8b98ed5032..d7c728d3e2 100755 Binary files a/indra/newview/installers/windows/lang_ru.nsi and b/indra/newview/installers/windows/lang_ru.nsi differ diff --git a/indra/newview/installers/windows/lang_tr.nsi b/indra/newview/installers/windows/lang_tr.nsi index 7c41811b30..97c602f4fc 100755 Binary files a/indra/newview/installers/windows/lang_tr.nsi and b/indra/newview/installers/windows/lang_tr.nsi differ diff --git a/indra/newview/installers/windows/lang_zh.nsi b/indra/newview/installers/windows/lang_zh.nsi index e89a1e7e51..39c005a683 100755 Binary files a/indra/newview/installers/windows/lang_zh.nsi and b/indra/newview/installers/windows/lang_zh.nsi differ -- cgit v1.2.3 From bee9166a80c9fd426bea66e1f893bd59aee9d83e Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Sat, 14 Feb 2015 19:42:18 -0800 Subject: Remove LicenseDescUpdate, LicenseDescSetup, and LicenseDescNext from Ja and De language files These are not present in any other file, including English --- indra/newview/installers/windows/lang_de.nsi | Bin 9090 -> 8420 bytes indra/newview/installers/windows/lang_ja.nsi | Bin 7052 -> 6514 bytes 2 files changed, 0 insertions(+), 0 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/lang_de.nsi b/indra/newview/installers/windows/lang_de.nsi index dbf4bc84bf..866accae99 100755 Binary files a/indra/newview/installers/windows/lang_de.nsi and b/indra/newview/installers/windows/lang_de.nsi differ diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi index fc5f4fabca..5b1c5f4ce9 100755 Binary files a/indra/newview/installers/windows/lang_ja.nsi and b/indra/newview/installers/windows/lang_ja.nsi differ -- cgit v1.2.3 From d2a373a58f001037e2d62c12fe55f7345ed4b19d Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Sat, 14 Feb 2015 23:09:36 -0800 Subject: =?UTF-8?q?Don=E2=80=99t=20delete=20user's=20settings=20with=20aut?= =?UTF-8?q?o=20install,=20removing=20the=20need=20to=20back=20them=20up=20?= =?UTF-8?q?and=20then=20restore=20them=20later=20This=20saves=20time=20and?= =?UTF-8?q?=20lowers=20the=20risk=20of=20something=20going=20wrong=20with?= =?UTF-8?q?=20the=20file=20copy=20process?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../installers/windows/installer_template.nsi | 134 +-------------------- 1 file changed, 2 insertions(+), 132 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 49500ab80d..574feb2099 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -255,7 +255,6 @@ Call CheckNetworkConnection # Ping secondlife.com Call CheckWillUninstallV2 # Check if SecondLife is already installed StrCmp $DO_UNINSTALL_V2 "" PRESERVE_DONE - Call PreserveUserFiles PRESERVE_DONE: Call RemoveProgFilesOnInst # Remove existing files to prevent certain errors when running the new version of the viewer @@ -325,8 +324,6 @@ StrCmp $DO_UNINSTALL_V2 "" REMOVE_SLV2_DONE Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" # with _? option above, uninst.exe will be left behind. RMDir "$PROGRAMFILES\SecondLifeViewer2" # will remove only if empty. - Call RestoreUserFiles - Call RemoveTempUserFiles REMOVE_SLV2_DONE: SectionEnd @@ -534,135 +531,6 @@ Function CheckNetworkConnection FunctionEnd -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Save user files to temp location -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function PreserveUserFiles - -Push $0 -Push $1 -Push $2 - - RMDir /r "$TEMP\SecondLifeSettingsBackup" # Clear out any old data that might be there - CreateDirectory "$TEMP\SecondLifeSettingsBackup" - 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 - - CreateDirectory "$TEMP\SecondLifeSettingsBackup\$0" - CopyFiles /SILENT "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\$0" - - CONTINUE: - IntOp $0 $0 + 1 - Goto LOOP - DONE: - -Pop $2 -Pop $1 -Pop $0 - -# Copy 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 - CreateDirectory "$TEMP\SecondLifeSettingsBackup\AllUsers\" - CopyFiles /SILENT "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\AllUsers\" -Pop $0 - -FunctionEnd - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Restore user files from temp location -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RestoreUserFiles - -Push $0 -Push $1 -Push $2 - - 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 - - CreateDirectory "$2\Application Data\SecondLife\" - CopyFiles /SILENT "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLife\" - - CONTINUE: - IntOp $0 $0 + 1 - Goto LOOP - DONE: - -Pop $2 -Pop $1 -Pop $0 - -# Copy 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 - CreateDirectory "$2\Application Data\SecondLife\" - CopyFiles /SILENT "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLife\" -Pop $0 - -FunctionEnd - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Remove temp directories -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RemoveTempUserFiles - -Push $0 -Push $1 -Push $2 - - 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 - - RMDir /r "$TEMP\SecondLifeSettingsBackup\$0\*" - - CONTINUE: - IntOp $0 $0 + 1 - Goto LOOP - DONE: - -Pop $2 -Pop $1 -Pop $0 - -# Copy 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 "$TEMP\SecondLifeSettingsBackup\AllUsers\*" -Pop $0 - -FunctionEnd - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Delete files on install if previous isntall exsists to prevent undesiered behavior ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -688,6 +556,8 @@ FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.UserSettingsFiles +StrCmp $DO_UNINSTALL_V2 "" Keep # don't remove user's settings files on auto upgrade + # Ask if user wants to keep data files or not MessageBox MB_YESNO|MB_ICONQUESTION $(RemoveDataFilesMB) IDYES Remove IDNO Keep -- cgit v1.2.3 From dce1339439417fe27b301f3fd727acb673fcd02b Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Sat, 14 Feb 2015 23:24:06 -0800 Subject: Add myself to contribution --- indra/newview/installers/windows/installer_template.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 574feb2099..ec97cff193 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -21,7 +21,7 @@ ;; NSIS Unicode 2.46.5 or higher required ;; http://www.scratchpaper.com/ ;; -;; Author: James Cook, Don Kjer, Callum Prentice +;; Author: James Cook, TankMaster Finesmith, Don Kjer, Callum Prentice ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- cgit v1.2.3 From 084575c037d62aaf396539d5e1dd2c6db44e3055 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Sun, 15 Feb 2015 08:43:35 -0800 Subject: Line ending fix --- indra/newview/installers/windows/installer_template.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index ec97cff193..e03ec8ee4e 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -543,7 +543,7 @@ Delete "$INSTDIR\SecondLife.exe" RMDir /r "$INSTDIR\app_settings\shaders" # Remove skins folder to clean up files removed during development -RMDir /r "$INSTDIR\skins" +RMDir /r "$INSTDIR\skins" # We are no longer including release notes with the viewer, so remove them. Delete "$SMPROGRAMS\$INSTSHORTCUT\SL Release Notes.lnk" -- cgit v1.2.3 From b204b0823951618228acc5ee38e2b3967ec4630f Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Mon, 16 Feb 2015 11:08:03 -0800 Subject: Simplify deleting Help folder, more comments format fixes --- .../installers/windows/installer_template.nsi | 23 +++++++--------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index e03ec8ee4e..d603975a9f 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -321,8 +321,8 @@ WriteUninstaller "$INSTDIR\uninst.exe" # Uninstall existing "Second Life Viewer 2" install if needed. StrCmp $DO_UNINSTALL_V2 "" REMOVE_SLV2_DONE ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S _?=$PROGRAMFILES\SecondLifeViewer2' - Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" # with _? option above, uninst.exe will be left behind. - RMDir "$PROGRAMFILES\SecondLifeViewer2" # will remove only if empty. + Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" # With _? option above, uninst.exe will be left behind. + RMDir "$PROGRAMFILES\SecondLifeViewer2" # Will remove only if empty. REMOVE_SLV2_DONE: @@ -512,7 +512,7 @@ Function CheckNetworkConnection StrCpy $2 "" ${GetOptions} $COMMANDLINE "/STUBTAG=" $2 GetTempFileName $0 - !define HTTP_TIMEOUT 5000 # milliseconds + !define HTTP_TIMEOUT 5000 # Milliseconds # Don't show secondary progress bar, this will be quick. NSISdl::download_quiet \ /TIMEOUT=${HTTP_TIMEOUT} \ @@ -523,7 +523,7 @@ Function CheckNetworkConnection ; Result ignored for now ; StrCmp $1 "success" +2 ; DetailPrint "Connection failed: $1" - Delete $0 # temporary file + Delete $0 # Temporary file Pop $2 Pop $1 Pop $0 @@ -539,7 +539,7 @@ Function RemoveProgFilesOnInst # Remove old SecondLife.exe to invalidate any old shortcuts to it that may be in non-standard locations. See MAINT-3575 Delete "$INSTDIR\SecondLife.exe" -# Remove old shader files first so fallbacks will work. see DEV-5663 +# Remove old shader files first so fallbacks will work. See DEV-5663 RMDir /r "$INSTDIR\app_settings\shaders" # Remove skins folder to clean up files removed during development @@ -556,7 +556,7 @@ FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.UserSettingsFiles -StrCmp $DO_UNINSTALL_V2 "" Keep # don't remove user's settings files on auto upgrade +StrCmp $DO_UNINSTALL_V2 "" Keep # Don't remove user's settings files on auto upgrade # Ask if user wants to keep data files or not MessageBox MB_YESNO|MB_ICONQUESTION $(RemoveDataFilesMB) IDYES Remove IDNO Keep @@ -572,7 +572,7 @@ Push $2 LOOP: EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 - StrCmp $1 "" DONE # no more users + 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 @@ -643,15 +643,6 @@ Delete "$INSTDIR\SecondLife.exe" Delete "$INSTDIR\VivoxVoiceService-*.log" # Remove entire help directory -Delete "$INSTDIR\help\Advanced\*" -RMDir "$INSTDIR\help\Advanced" -Delete "$INSTDIR\help\basics\*" -RMDir "$INSTDIR\help\basics" -Delete "$INSTDIR\help\Concepts\*" -RMDir "$INSTDIR\help\Concepts" -Delete "$INSTDIR\help\welcome\*" -RMDir "$INSTDIR\help\welcome" -Delete "$INSTDIR\help\*" RMDir "$INSTDIR\help" Delete "$INSTDIR\uninst.exe" -- cgit v1.2.3 From c90389184187ee448488320432eab01f982aef3b Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Mon, 16 Feb 2015 17:58:32 -0800 Subject: Fix speeling errors --- indra/newview/installers/windows/installer_template.nsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index d603975a9f..c78c0b539b 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -1,5 +1,5 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; secondlife setup.nsi +;; Second Life setup.nsi ;; Copyright 2004-2015, Linden Research, Inc. ;; ;; This library is free software; you can redistribute it and/or @@ -252,7 +252,7 @@ Call CheckIfAdministrator # Make sure the user can install/uninstall Call CheckIfAlreadyCurrent # Make sure this version is not already installed Call CloseSecondLife # Make sure Second Life not currently running Call CheckNetworkConnection # Ping secondlife.com -Call CheckWillUninstallV2 # Check if SecondLife is already installed +Call CheckWillUninstallV2 # Check if Second Life is already installed StrCmp $DO_UNINSTALL_V2 "" PRESERVE_DONE PRESERVE_DONE: @@ -362,7 +362,7 @@ Delete "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" # Clean up cache and log files, but leave them in-place for non AGNI installs. Call un.UserSettingsFiles -# Remove the main instalation directory +# Remove the main installation directory Call un.ProgramFiles SectionEnd @@ -532,7 +532,7 @@ Function CheckNetworkConnection FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete files on install if previous isntall exsists to prevent undesiered behavior +;; Delete files on install if previous install exists to prevent undesired behavior ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function RemoveProgFilesOnInst @@ -618,7 +618,7 @@ FunctionEnd ;; This deletes the uninstall executable, but it works because it is copied to temp directory before running ;; ;; Note: You must list all files here, because we only want to delete our files, -;; not things users left in the application directories. +;; not things users left in the program directory. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.ProgramFiles -- cgit v1.2.3 From a413e3adb39723e07bb85d526940b6857c1bca8c Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Mon, 16 Feb 2015 18:47:08 -0800 Subject: Get the normal uninstall process working again --- indra/newview/installers/windows/installer_template.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index c78c0b539b..9a69c97065 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -556,7 +556,7 @@ FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.UserSettingsFiles -StrCmp $DO_UNINSTALL_V2 "" Keep # Don't remove user's settings files on auto upgrade +StrCmp $DO_UNINSTALL_V2 "true" Keep # Don't remove user's settings files on auto upgrade # Ask if user wants to keep data files or not MessageBox MB_YESNO|MB_ICONQUESTION $(RemoveDataFilesMB) IDYES Remove IDNO Keep -- cgit v1.2.3 From 9204f238c4cc572149d31ec12862e417f7666623 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Mon, 16 Feb 2015 19:43:22 -0800 Subject: Launch SL as a user from the UAC elevated installer. Fixes BUG-8358 and others. --- indra/newview/installers/windows/installer_template.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 9a69c97065..db613a658a 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -681,7 +681,7 @@ label_ask_launch: label_launch: # Assumes SetOutPath $INSTDIR - Exec '"$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM' + Exec '"$WINDIR\explorer.exe" "$INSTDIR\$INSTEXE"' label_no_launch: Pop $R0 -- cgit v1.2.3 From 7fc88d040a8fce7ac5709ccc2a1fdd6ae3cb3086 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Mon, 16 Feb 2015 21:27:42 -0800 Subject: Add more info to the registry for display on Programs and Feature control panel --- indra/newview/installers/windows/installer_template.nsi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index db613a658a..3233a89950 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -298,8 +298,14 @@ WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$I WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}" WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT" WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE" -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG (remove only)" +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "Publisher" "Linden Research, Inc." +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "URLInfoAbout" "http://secondlife.com/whatis/" +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "URLUpdateInfo" "http://secondlife.com/support/downloads/" +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "HelpLink" "https://support.secondlife.com/contact-support/" +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe"' +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayVersion" "${VERSION_LONG}" +WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "EstimatedSize" "0x0001D500" ; 117 MB # Write URL registry info WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life" -- cgit v1.2.3 From 09238639e70a2c87e1e03eace2590dc6a22dced0 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Tue, 17 Feb 2015 09:20:58 -0800 Subject: BUG-2707; Disable SEHOP for installed binary via 'Image File Exection Options' during installation. With permission from Nicky Dasmijn --- indra/newview/installers/windows/installer_template.nsi | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 3233a89950..02f21e4187 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -38,6 +38,7 @@ RequestExecutionLevel admin # For when we write to Program Files ;; Project flags ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +# This placeholder is replaced by viewer_manifest.py %%VERSION%% ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -72,7 +73,7 @@ LangString LanguageCode ${LANG_RUSSIAN} "ru" LangString LanguageCode ${LANG_TURKISH} "tr" LangString LanguageCode ${LANG_TRADCHINESE} "zh" -# this placeholder is replaced by viewer_manifest.py +# This placeholder is replaced by viewer_manifest.py %%INST_VARS%% Name ${INSTNAME} @@ -305,7 +306,9 @@ WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninst WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe"' WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayVersion" "${VERSION_LONG}" -WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "EstimatedSize" "0x0001D500" ; 117 MB +WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "EstimatedSize" "0x0001D500" # ~117 MB +# BUG-2707 Disable SEHOP for installed viewer. +WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$INSTEXE" "DisableExceptionChainValidation" 1 # Write URL registry info WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life" @@ -356,6 +359,8 @@ Call un.CloseSecondLife # Clean up registry keys and subkeys (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" +# BUG-2707 Remove entry that disabled SEHOP +DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$INSTEXE" # Clean up shortcuts Delete "$SMPROGRAMS\$INSTSHORTCUT\*.*" -- cgit v1.2.3 From 727777eab6f70db86191263d2d84abd6973f352b Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Tue, 17 Feb 2015 09:23:32 -0800 Subject: Fix line endings --- indra/newview/installers/windows/installer_template.nsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 02f21e4187..83c364ff7e 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -299,16 +299,16 @@ WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$I WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}" WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT" WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE" -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "Publisher" "Linden Research, Inc." -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "URLInfoAbout" "http://secondlife.com/whatis/" -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "URLUpdateInfo" "http://secondlife.com/support/downloads/" -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "HelpLink" "https://support.secondlife.com/contact-support/" +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "Publisher" "Linden Research, Inc." +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "URLInfoAbout" "http://secondlife.com/whatis/" +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "URLUpdateInfo" "http://secondlife.com/support/downloads/" +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "HelpLink" "https://support.secondlife.com/contact-support/" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe"' -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayVersion" "${VERSION_LONG}" +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayVersion" "${VERSION_LONG}" WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "EstimatedSize" "0x0001D500" # ~117 MB -# BUG-2707 Disable SEHOP for installed viewer. -WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$INSTEXE" "DisableExceptionChainValidation" 1 +# BUG-2707 Disable SEHOP for installed viewer. +WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$INSTEXE" "DisableExceptionChainValidation" 1 # Write URL registry info WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life" -- cgit v1.2.3 From 5fef5f11ea3acb6936f9da21181dde3e5dfac6b7 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Tue, 17 Feb 2015 18:53:39 -0800 Subject: Made message asking to delete user data folder a little more clear. --- indra/newview/installers/windows/lang_en-us.nsi | Bin 8448 -> 8510 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi index c06e5ac00d..343c312ddc 100755 Binary files a/indra/newview/installers/windows/lang_en-us.nsi and b/indra/newview/installers/windows/lang_en-us.nsi differ -- cgit v1.2.3 From 65c130a9a803eb40ea5d7510faef86aacb556e53 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Tue, 17 Feb 2015 18:55:00 -0800 Subject: Move prompt and processing the deletion of user settings to end of uninstall. --- indra/newview/installers/windows/installer_template.nsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 83c364ff7e..1d6bde0052 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -348,7 +348,7 @@ StrCpy $INSTEXE "${INSTEXE}" StrCpy $INSTSHORTCUT "${SHORTCUT}" # Make sure the user can install/uninstall -Call un.CheckIfAdministrator +Call un.CheckIfAdministrator # Uninstall for all users (if you change this, change it in the install as well) SetShellVarContext all @@ -370,13 +370,13 @@ Delete "$DESKTOP\$INSTSHORTCUT.lnk" Delete "$INSTDIR\$INSTSHORTCUT.lnk" Delete "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" -# Clean up cache and log files, but leave them in-place for non AGNI installs. -Call un.UserSettingsFiles - # Remove the main installation directory Call un.ProgramFiles -SectionEnd +# Clean up cache and log files, but leave them in-place for non AGNI installs. +Call un.UserSettingsFiles + +SectionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Make sure the user can install @@ -734,7 +734,7 @@ FunctionEnd ; 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" +; 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 -- cgit v1.2.3 From 412bfd9edc3000a143f8757d1f97f9bac79f33fc Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Tue, 17 Feb 2015 18:55:56 -0800 Subject: opps, let's make the deletion of the help directory recursive --- indra/newview/installers/windows/installer_template.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 1d6bde0052..509b4f6d84 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -654,7 +654,7 @@ Delete "$INSTDIR\SecondLife.exe" Delete "$INSTDIR\VivoxVoiceService-*.log" # Remove entire help directory -RMDir "$INSTDIR\help" +RMDir /r "$INSTDIR\help" Delete "$INSTDIR\uninst.exe" RMDir "$INSTDIR" -- cgit v1.2.3 From d4a99c46a411aca038d8bccaf2098f8eeae3a267 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Wed, 8 Jan 2014 20:25:40 +0200 Subject: MAINT-3591 FIXED Remove "Start Second LIfe now?" dialogue in the installer --- indra/newview/installers/windows/installer_template.nsi | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 509b4f6d84..20623ced84 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -676,24 +676,9 @@ FunctionEnd Function .onInstSuccess Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. Push $R0 # Option value, unused - - StrCmp $SKIP_DIALOGS "true" label_launch - - ${GetOptions} $COMMANDLINE "/AUTOSTART" $R0 - # If parameter was there (no error) just launch - # Otherwise ask - IfErrors label_ask_launch label_launch - -label_ask_launch: - # Don't launch by default when silent - IfSilent label_no_launch - MessageBox MB_YESNO $(InstSuccesssQuestion) \ - IDYES label_launch IDNO label_no_launch -label_launch: # Assumes SetOutPath $INSTDIR Exec '"$WINDIR\explorer.exe" "$INSTDIR\$INSTEXE"' -label_no_launch: Pop $R0 FunctionEnd -- cgit v1.2.3 From 7555596c44a85ecbfe823fc8dea33cb01a7b89dd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 8 Apr 2014 16:01:46 -0700 Subject: added SKIP_AUTORUN command line flag to disable automatically running viewer after install --- indra/newview/installers/windows/installer_template.nsi | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 20623ced84..8c8b4971cf 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -105,8 +105,8 @@ Var INSTEXE Var INSTSHORTCUT Var COMMANDLINE # Command line passed to this installer, set in .onInit Var SHORTCUT_LANG_PARAM # "--set InstallLanguage de", Passes language to viewer -Var SKIP_DIALOGS # Set from command line in .onInit. autoinstall - # GUI and the defaults. +Var SKIP_DIALOGS # Set from command line in .onInit. autoinstall GUI and the defaults. +Var SKIP_AUTORUN # Skip automatic launch of the viewer after install Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation that will be uninstalled. # Function definitions should go before file includes, because calls to @@ -145,6 +145,10 @@ Call CheckWindowsVersion # Don't install On unsupported systems IfErrors +2 0 # If error jump past setting SKIP_DIALOGS StrCpy $SKIP_DIALOGS "true" + ${GetOptions} $COMMANDLINE "/SKIP_AUTORUN" $0 + IfErrors +2 0 ; If error jump past setting SKIP_AUTORUN + StrCpy $SKIP_AUTORUN "true" + ${GetOptions} $COMMANDLINE "/LANGID=" $0 # /LANGID=1033 implies US English # If no language (error), then proceed @@ -675,8 +679,8 @@ FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function .onInstSuccess Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. - Push $R0 # Option value, unused - + Push $R0 # Option value, unused + StrCmp $SKIP_AUTORUN "true" +2; # Assumes SetOutPath $INSTDIR Exec '"$WINDIR\explorer.exe" "$INSTDIR\$INSTEXE"' Pop $R0 -- cgit v1.2.3 From eb60de37ec15c7893acc12fcca5a3b16ec0d6869 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 13 Jan 2015 18:10:18 +0200 Subject: MAINT-4790 WIP XML changes --- indra/newview/skins/default/xui/en/panel_login.xml | 128 +++++++-------------- 1 file changed, 41 insertions(+), 87 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index a258a874b0..c69d5cdbca 100755 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -30,7 +30,7 @@ auto_resize="false" follows="left|right|top" name="ui_container" - width="960" + width="1000" left="0" top="0" height="172"> @@ -75,69 +75,28 @@ select_on_focus="true" commit_on_focus_lost="false" bottom_delta="0" - width="200" /> - - - Forgotten password - -