Commit Graph

104 Commits (fff9fdf9ba5c1e37c4946219b3ca4bc375376c1d)

Author SHA1 Message Date
Ansariel 23473b4585 Merge viewer-bugsplat 2018-08-22 14:22:22 +02:00
Nat Goodspeed db970c1a5f Don't compare rbegin() iterators, use LLStringUtil::endsWith().
I think the intention of (sDumpDir.rbegin() == mDirDelimiter.rbegin()) was to
test whether sDumpDir endsWith(mDirDelimiter). But those iterators will never
be equal. Instead, use LLStringUtil::endsWith().
2018-08-21 19:23:33 -04:00
Ansariel 799309f890 Merge viewer-64 2018-01-04 13:09:03 +01:00
Nat Goodspeed 5002bf5660 MAINT-8087: Use env vars from VMP for AppData\Roaming and Local.
On Windows, when logged in with a non-ASCII username, every one of the three
documented APIs -- SHGetSpecialFolderPath(), SHGetFolderPath() and
SHGetKnownFolderPath() -- fails to retrieve any pathname at all. We cannot
account for the fact that the oldest of these continues to work with the
release viewer and within a Python script (though not, curiously, from a
Python interactive session). With a non-ASCII username, they consistently fail
when called from an Alex Ivy viewer build: "The filename, directory name, or
volume label syntax is incorrect."

Empirically, with a non-ASCII username, the preset APPDATA and LOCALAPPDATA
environment variables are also useless, e.g. c:\Users\??????\AppData\Roaming
where those are, yup, actual question marks.

Empirically, the VMP is able to successfully call SHGetFolderPath() to
retrieve both AppData\Roaming and AppData\Local. Therefore, we make the VMP
set the APPDATA and LOCALAPPDATA environment variables to the UTF-8 encoded
correct pathnames. Instead of calling SHGetSomethingFolderPath() at all, make
LLDir_Win32 retrieve those environment variables.

Make LLFile::mkdir() treat "directory already exists" as a success case. Every
single call fell into one of two categories: either it didn't check success at
all, or it tested specially to exempt errno == EEXIST. Migrate that test into
mkdir(); eliminate it from call sites.

Make LLDir::append() and add() convenience functions accept variadic
arguments. Replace add(add()...) constructs, as well as clumsy concatenations
of directory names and getDirDelimiter(), with simple variadic add() calls.
2017-12-20 22:51:26 -05:00
Ansariel c47b8c27ba Merge Firestorm LGPL 2017-08-23 17:53:48 +02:00
andreykproductengine 0fe28a7a03 MAINT-7691 Fixed cache not clearing correctly and incapability to find dump files in case of unicode path 2017-08-18 20:23:06 +03:00
Nicky c4d7f25bac Merge with phoenix-firestorm-lgpl. 2017-05-23 14:09:46 +02:00
Ansariel dcac0dce59 Merge viewer-bear 2017-05-07 13:11:50 +02:00
AndreyL ProductEngine d4d56f004a MAINT-7074 Fixed ability to escape from skin directory with <icon> 2017-04-19 21:19:04 +03:00
andreykproductengine 83e7b7a939 MAINT-7691 Fixed cache not clearing correctly and incapability to find dump files in case of unicode path 2017-08-18 20:23:06 +03:00
Nicky 688bf1e547 Synchronize with viewer64 source. 2017-01-11 15:36:33 +01:00
Ansariel 8a611ab6a2 Merge viewer-bear 2016-07-13 11:03:15 +02:00
andreykproductengine 4b29e9869c MAINT-5388 File "conversation.log" created in users' root directory on Windows 2016-07-05 17:52:01 +03:00
Ansariel 3192fe832f Merge viewer-quickgraphics 2016-03-08 01:41:31 +01:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Ansariel d0417d3494 Remove extra line that sneaked in 2014-07-18 12:29:26 +02:00
Ansariel 9d25ba2b99 Add a constant for the app name to prevent duplication of strings all over the place 2014-07-18 12:21:09 +02:00
Tank_Master 8863d9beaf Compile fixes 2014-06-09 23:27:05 -07:00
Tank_Master 6babf8abd2 Merge LL 3.7.7 2014-06-09 11:29:57 -07:00
Nicky 381287b3eb Merge lgpl with LL breakpad changes. 2014-05-02 17:09:26 +02:00
Richard Linden 98aabdc176 merge with release 2014-04-07 19:09:40 -07:00
Ansariel 70218d0ac2 FIRE-13385: Added option to separate cached sounds from default cache; Originally implemented by Skills Hak with permission to use under LGPL, rewritten for Firestorm 2014-04-05 15:23:15 +02:00
Aura Linden d2bb4dae98 Fixes for crash reporter startup race condition, crash reporter CPU use, Secondlife.log filehandle, XP Crash. 2014-03-07 14:58:22 -08:00
Aura Linden 6809348125 Creating a cleaner branch 2013-12-03 17:06:06 -08:00
Richard Linden e340009fc5 second phase summer cleaning
replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc.
2013-08-09 17:11:19 -07:00
Richard Linden a2e22732f1 Summer cleaning - removed a lot of llcommon dependencies to speed up build times
consolidated most indra-specific constants in llcommon under indra_constants.h
fixed issues with operations on mixed unit types (implicit and explicit)
made LL_INFOS() style macros variadic in order to subsume other logging methods
such as ll_infos
added optional tag output to error recorders
2013-07-30 19:13:45 -07:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Gilbert Gonzales 05f4e8a105 CHUI-778 (Saving preferences updates text in all open message panels in conversation floater to show as old messages) Now changing the log/transcripts file location actually moves the files to the new location. Prior behavior just started a new history at that location. Also a fix was made so that if the user changed the log/transcripts path then after pressing the Preferences 'OK' button the new location will be saved to the corresponding .xml file. 2013-02-22 18:53:40 -08:00
maksymsproductengine 2ac99f55f9 CHUI-578 FIXED Move preferences for conversation logs/transcripts to chat tab 2013-01-24 19:56:13 +02:00
Nicky ed4c40a7ab Merge with -lgpl 2013-10-14 20:57:33 +02:00
Nicky 52458f627a Don't test each skin skir for existance of certain files each frame by expensive IO calls. 2013-10-09 12:08:21 +02:00
Nicky 0addf213ed Merge with FS tip. First pass. 2013-08-02 00:40:48 +02:00
Nicky 9a3b72267f Move cache directory into Firestorm_x64 for 64 bit builds. 2013-08-01 23:45:50 +02:00
Cinders ce73bbe4cc FIRE-8226: Separate caches between Havok and OpenSim versions, clean up old code in lldir_mac.cpp 2013-07-11 19:40:56 -06:00
Tank_Master d4640277d0 Merge LL 3.5.3 release. 2013-07-09 16:24:58 -07:00
Cinders fdc006be1e More merge fixing to lldir.cpp 2013-06-26 16:56:19 -06:00
Cinders 51f6ec90a2 Fix building lldir.cpp 2013-06-26 14:53:57 -06:00
Tank_Master 14001c54df Gastly CHUI merge pass 1, don't count on anything to work. 2013-06-26 12:14:54 -07:00
Nat Goodspeed a9ea410035 Allow user to override either English, or localized, skinned file.
Original LLDir::findSkinnedFilenames() implementation used a tricky rule: a
given skin directory was only considered if it provided a default-language
override for the sought filename, regardless of whether it also provided
localizations for that filename. Discussion with Richard clarifies that we
want to allow the user to override neither, either or both. Change
findSkinnedFilenames() accordingly; update unit tests to verify new semantics.
2012-10-23 16:06:03 -04:00
Nat Goodspeed 543b7ee9f7 Fix LLUI::locateSkin() failure case; clarify lldir.cpp static init.
Per code review:
Previous refactoring of LLUI::locateSkin() preserved odd failure behavior: it
would return last-considered pathname, whether or not it exists. Changed to
emit LL_WARNS log message and return empty string.
Use Boost.Assign to simplify initialization of a couple static containers in
lldir.cpp.
2012-10-12 11:09:25 -04:00
Nat Goodspeed 730d13a76a Change LLDir::findSkinnedFilenames() to use enum instead of bool.
At Richard's suggestion, changed the bool merge parameter to new enum
ESkinConstraint with values CURRENT_SKIN and ALL_SKINS. This clarifies what
we're requesting at the point of the call.
2012-10-11 19:51:07 -04:00
Nat Goodspeed 3653727e7f Introduce new LLDir::findSkinnedFilenames() method. Use as needed.
In a number of different places, for different reasons, the viewer wants to
load a UI-related file that might be overridden by a non-default skin; and
within that skin, might further be overridden by a non-default language.
Apparently, for each of those use cases, every individual developer approached
it as an entirely new problem, solving it idiosyncratically for that one case.
Not only is this a maintenance problem, but it rubs one's nose in the fact
that most such solutions consider only a subset of the relevant skin
directories.
Richard and I evolved an API intended to address all such cases: a central
LLDir method returning a list of relevant pathnames, from most general to most
localized, filtered to present only existing files; plus a couple of
convenience methods to specifically obtain the most general and most localized
available file.
There were several load-skinned-file methods (LLFloater::buildFromFile(),
LLPanel::buildFromFile() and LLUICtrlFactory::createFromFile() -- apparently
cloned-and-modified from each other) that contained funky bolted-on logic to
output the loaded data to an optional passed LLXMLNodePtr param. The trouble
is that passing that param forced each of these methods to subvert its normal
search: specifically for that case, it needed to find the baseline XML file
instead of the localized one. Richard agreed that for the intended usage
(reformatting XML files) we should use XML schema instead, and that the hacky
functionality should be removed. Remove it. Also remove
LLUICtrlFactory::getLocalizedXMLNode(), only used for those three special cases.
Some callers explicitly passed the optional LLXMLNodePtr param as NULL. Remove
that.
Remove LLFloaterUIPreview::displayFloater(save) param, which relied on the
optional output LLXMLNodePtr param. Make onClickSaveFloater() and
onClickSaveAll() emit popupAndPrintWarning() about discontinued functionality.
Recast LLFloater::buildFromFile(), LLPanel::buildFromFile(),
LLUICtrlFactory::createFromFile(), LLNotifications::loadTemplates(),
LLUI::locateSkin(), LLFontRegistry::parseFontInfo(),
LLUIColorTable::loadFromSettings(), LLUICtrlFactory::loadWidgetTemplate(),
LLUICtrlFactory::getLayeredXMLNode(), LLUIImageList::initFromFile(),
LLAppViewer::launchUpdater() and LLMediaCtrl::navigateToLocalPage() to use
findSkinnedFilenames(). (Is LLAppViewer::launchUpdater() ever called any more?
Apparently so -- though the linux-updater.bin logic to process the relevant
command-line switch has been disabled. Shrug.) (Is
LLMediaCtrl::navigateToLocalPage() ever used?? If so, why?)
Remove LLUI::setupPaths(), getXUIPaths(), getSkinPath() and
getLocalizedSkinPath(). Remove the skins/paths.xml file read by setupPaths().
The only configuration it contained was the pair of partial paths "xui/en" and
"xui/[LANGUAGE]" -- hardly likely to change. getSkinPath() specifically
returned the first of these, while getLocalizedSkinPath() specifically
returned the second. This knowledge is now embedded in findSkinnedFilenames().
Also remove paths.xml from viewer_manifest.py.
Remove injected xui_paths from LLFontGL::initClass() and
LLFontRegistry::LLFontRegistry(). These are no longer needed since
LLFontRegistry can now directly consult LLDir for its path search. Stop
passing LLUI::getXUIPaths() to LLFontGL::initClass() in LLViewerWindow's
constructor and initFonts() method.
Add LLDir::append() and add() methods for the simple task of combining two
path components separated by getDirDelimiter() -- but only if they're both
non-empty. Amazing how often that logic is replicated. Replace some existing
concatenations with add() or append().
New LLDir::findSkinnedFilenames() method must know current language. Allow
injecting current language by adding an LLDir::setSkinFolder(language) param,
and pass it where LLAppViewer::init() and initConfiguration() currently call
setSkinFolder(). Also add LLDir::getSkinFolder() and getLanguage() methods.
Change LLFLoaterUIPreview's LLLocalizationResetForcer helper to "forcibly
reset language" using LLDir::setSkinFolder() instead of LLUI::setupPaths().
Update LLDir stubs in lldir_stub.cpp and llupdaterservice_test.cpp.
Add LLDir::getUserDefaultSkinDir() to obtain often-overlooked possible skin
directory -- like getUserSkinDir() but with "default" in place of the current
skin name as the last path component. (However, we hope findSkinnedFilenames()
obviates most explicit use of such individual skin directory pathnames.)
Add LLDir unit tests for new findSkinnedFilenames() and add() methods -- the
latter exercises append() as well.
Tweak indra/integration_tests/llui_libtest/llui_libtest.cpp for all the above.
Notably, comment out its export_test_floaters() function, since the essential
LLFloater::buildFromFile(optional LLXMLNodePtr) functionality has been
removed. This may mean that llui_libtest.cpp has little remaining value, not
sure.
2012-10-10 14:57:43 -04:00
Cinders 2c9e821188 Rename HAS_OPENSIM_SUPPORT switch to OPENSIM 2013-02-18 21:24:20 -07:00
Kitty Barnett 86ed867f4d Sync'ed Viewer-Skins patch with latest for SL-3.4 (missing commit) 2013-01-03 22:15:08 +01:00
Kitty Barnett e35d4ca2cb Sync'ed Viewer-Skins patch with latest for SL-3.4 (2df0eacc7058) 2013-01-03 11:28:26 +01:00
Tank_Master 781386abba merge lgpl 2012-12-20 15:48:32 -08:00
Cinders 7ae9b5b5f5 Never append second_life to a settings or log directory 2012-12-20 12:11:18 -07:00
Cinders 6b42562cfd Separate user settings and chat logs by grid (appending .gridlabel to the directory) in OS builds, Settings and directories in Havok build remain the same (firstname lastname) Remove option to append. We assume OS build users connect to more than one grid. 2012-12-20 10:28:45 -07:00
Tank_Master cc44316aed Merge LL 3.4.3,
Note: aligned some of our code with LL's, spcifically feature table, gpu table, texture fetching, and some rendering defaults behavior.
2012-12-18 00:36:35 -08:00
Cinders 0b2d220a2c FIRE-7343: Seperate chat logs per grid 2012-11-02 07:34:14 -06:00