Commit Graph

363 Commits (b3a549b8b5e01809b2dd2006d6bf92a7a4d6baf7)

Author SHA1 Message Date
Rider Linden 225612ea77 Updater to coroutines. 2015-05-18 11:48:50 -07:00
Oz Linden 5c6cf3e7fb restore the ll[io]fstream because we need them as wrappers on Windows for wide char paths; on other platforms they are now just typedefs to the std classes 2015-04-10 11:02:37 -04:00
Oz Linden 8b42c7898e replace llifstream and llofstream with std::ifstream and std::ofstream respectively 2015-04-07 17:59:28 -04:00
Oz Linden 3a57b18896 convert llifstream and llofstream to std::ifstream and std::ofstream respectively 2015-04-07 17:28:05 -04:00
Nat Goodspeed 897ad8842c Reorder Boost libraries for Linux linker 2015-01-19 14:38:03 +00:00
callum_linden 745151936e Update to build on Xcode 6.0 (fix unit tests): fix up Boost linker errors 2014-10-22 10:09:24 -07:00
Monty Brandenberg 903729d5c9 Merge. Refresh from viewer-release after 3.7.9 release. 2014-06-16 16:41:52 -04:00
Monty Brandenberg 060c728970 Merge. Pull in viewer-release after release of 3.7.8 2014-05-22 22:08:54 +00:00
Brad Payne (Vir Linden) 7b9708a2e3 sunshine-external merge WIP 2014-05-13 10:02:26 -04:00
Monty Brandenberg 1422f89612 Linux: Finish new Boost dependencies to get Linux building again. 2014-04-04 21:59:15 +00:00
Monty Brandenberg 469438707d Library updates and switch to 3d-llqtwebkit2 build products.
SDL to 1.2.15, c-ares to latest 1.10.0 build, Boost to 1.55.0
with coroutine updates/fixes, curl to 7.34.0, libpng to 1.6.8,
openssl to 1.0.1e, zlib to latest 1.2.8 build, llqtwebkit
built from 4.7.1 sources refactored and tested in 3p-llqtwebkit2
repository.

Windows is functional with a good number of warning messages
at runtime from libpng and KDU.  MoaP/slplugin functioning.
2014-04-04 16:30:50 -04:00
Brad Payne (Vir Linden) e896c19cc1 merge 2013-12-10 10:12:01 -05:00
Richard Linden 24b7fd1c7f merge with release 2013-12-09 11:55:02 -08:00
Brad Payne (Vir Linden) 744cf6be8d merge 2013-12-05 10:39:35 -05:00
Nat Goodspeed a55f88109f MAINT-3489: Gracefully handle missing downloaded installer file.
If a marker file indicates that an installer has been downloaded and verified
and is ready to install, but that installer file does not exist, log it and
revert to checking for update.
Also add logging to every code path that can remove the installer explicitly,
in case the missing installer is actually being killed off by some weird
sequence of state-machine transitions.
2013-11-26 17:18:28 -05:00
Nat Goodspeed 9e986201ba MAINT-3489: Make Mac updater script detect prematurely deleted .dmg.
Also, delete it when done.
2013-11-26 09:25:10 -05:00
Richard Linden 17e9c872ad Automated merge with http://bitbucket.org/lindenlab/viewer-release 2013-11-11 19:17:49 -08:00
Richard Linden fe518bde8e merge with release 2013-11-06 17:22:04 -08:00
Don Kjer 7866356d77 Merge viewer-release => sunshine-internal 2013-10-29 13:20:18 +00:00
Nat Goodspeed 57040ea70e Automated merge with http://bitbucket.org/nat_linden/viewer-maint-3331 2013-10-28 20:06:18 -04:00
Nat Goodspeed 8881b47d22 MAINT-3331: On update, remove com.secondlife.indra.viewer.savedState. 2013-10-22 01:35:01 -04:00
Oz Linden 9c313aea13 merge changes for DRTVWR-336 2013-10-15 17:47:37 -04:00
Brad Payne (Vir Linden) e6a68e1f09 merge 2013-09-10 15:30:13 -04:00
Richard Linden 52da9f5f49 merge with viewer-release 2013-09-09 18:58:41 -07:00
Brad Payne (Vir Linden) 144eb1912d merge 2013-09-04 13:41:51 -04:00
Oz Linden a359d9d80c merge changes for 3.6.4-release 2013-08-27 10:37:02 -04:00
Oz Linden a4e7444985 correct merge error in llupdatechecker.cpp 2013-08-26 16:43:03 -04:00
Oz Linden 7ca10e5161 merge changes for 3.6.4-release 2013-08-26 15:14:12 -04:00
Nyx Linden 5ae117aff6 merge with viewer-release 2013-08-16 19:31:16 -04: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
Oz Linden d0432d4d4c CHOP-975: Remove fallback to v1.0 update query when the v1.1 gets a 404 response 2013-07-30 11:53:47 -04:00
Oz Linden 2be8585baa merge changes for DRTVWR-325 2013-07-15 16:55:27 -04:00
Oz Linden 3e6ce2dbad add some validation of update response before starting download 2013-07-13 15:04:18 -04:00
Oz Linden 34c77159f7 CHOP-963: Make update service query url depend on the grid rather than settings 2013-07-09 08:39:22 -07:00
Geenz 9c83d4b5b8 Merge with viewer-release. 2013-06-19 15:47:57 -04:00
Nat Goodspeed aa8abe5e1c Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2013-06-19 12:43:50 -04:00
Geenz 0af636e632 Merged with viewer-release 2013-06-17 04:39:47 -04:00
Nat Goodspeed 2b8cd2fccf MAINT-2333: Use bouncing progress bar for Linux updater message.
This eliminates the user expectation that s/he must click OK before the
updater will begin installing the new viewer.
2013-06-11 19:23:38 -04:00
Graham Madarasz 50689a13ba BOOG2707 uncomment cleared suspects 2013-06-05 06:14:27 -07:00
Graham Madarasz ea24612561 BUG-2707 make use of OsOutputDebugString _DEBUG only on Windows to avoid throwing unhandlable exceptions in coroutines in RelWithDebInfo builds 2013-06-04 07:51:27 -07:00
Graham Madarasz 842a6c6e46 BUG-2707 disable more login/update-sequence specific logging 2013-06-02 14:41:57 -07:00
Brad Payne (Vir Linden) b0303445f1 more merge fixing 2013-05-21 16:56:45 -04:00
Brad Payne (Vir Linden) a04a706c1b merge 2013-05-21 16:18:48 -04:00
Geenz 3779e51bfc Merged with https://bitbucket.org/lindenlab/viewer-beta 2013-05-13 22:22:51 -04:00
Oz Linden fc4a6431c9 CHOP-942: fix crash if update check times out 2013-05-13 16:28:50 -04:00
Oz Linden 545e033d1e merge changes for DRTVWR-299 2013-05-07 15:11:55 -04:00
Oz Linden 3bb708d706 merge up to latest viewer-development for merge to 3.5.2 2013-04-19 14:42:56 -04:00
Oz Linden ddd5659f81 merge changes for DRTVWR-294 2013-04-19 10:11:29 -04:00
Oz Linden 327c99cadb merge up to 3.5.2 development 2013-04-16 16:01:32 -04:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Don Kjer 662d67e3b5 Merging LLCURL::Responder changes with CHUI changes. Fixed gcc 4.6 compile failures 2013-03-13 08:46:59 +00:00
Don Kjer f945415210 Large changes to the LLCurl::Responder API, as well as pulling in some changes to common libraries from the server codebase:
* Additional error checking in http handlers.
* Uniform log spam for http errors.
* Switch to using constants for http heads and status codes.
* Fixed bugs in incorrectly checking if parsing LLSD xml resulted in an error.
* Reduced spam regarding LLSD parsing errors in the default completedRaw http handler.  It should not longer be necessary to short-circuit completedRaw to avoid spam.
* Ported over a few bug fixes from the server code.
* Switch mode http status codes to use S32 instead of U32.
* Ported LLSD::asStringRef from server code; avoids copying strings all over the place.
* Ported server change to LLSD::asBinary; this always returns a reference now instead of copying the entire binary blob.
* Ported server pretty notation format (and pretty binary format) to llsd serialization.

* The new LLCurl::Responder API no longer has two error handlers to choose from.  Overriding the following methods have been deprecated:
** error - use httpFailure
** errorWithContent - use httpFailure
** result - use httpSuccess
** completed - use httpCompleted
** completedHeader - no longer necessary; call getResponseHeaders() from a completion method to obtain these headers.

* In order to 'catch' a completed http request, override one of these methods:
** httpSuccess - Called for any 2xx status code.
** httpFailure - Called for any non-2xx status code.
** httpComplete - Called for all status codes.  Default implementation is to call either httpSuccess or httpFailure.
* It is recommended to keep these methods protected/private in order to avoid triggering of these methods without using a 'push' method (see below).

* Uniform error handling should followed whenever possible by calling a variant of this during httpFailure:
** llwarns << dumpResponse() << llendl;
* Be sure to include LOG_CLASS(your_class_name) in your class in order for the log entry to give more context.

* In order to 'push' a result into the responder, you should no longer call error, errorWithContent, result, or completed.
* Nor should you directly call httpSuccess/Failure/Completed (unless passing a message up to a parent class).
* Instead, you can set the internal content of a responder and trigger a corresponding method using the following methods:
** successResult - Sets results and calls httpSuccess
** failureResult - Sets results and calls httpFailure
** completedResult - Sets results and calls httpCompleted

* To obtain information about a the response from a reponder method, use the following getters:
** getStatus - HTTP status code
** getReason - Reason string
** getContent - Content (Parsed body LLSD)
** getResponseHeaders - Response Headers (LLSD map)
** getHTTPMethod - HTTP method of the request
** getURL - URL of the request

* It is still possible to override completeRaw if you want to manipulate data directly out of LLPumpIO.

* See indra/llmessage/llcurl.h for more information.
2013-03-13 06:26:25 +00:00
prep 207d9fd767 Viewer-chui merge 2013-03-11 14:45:53 -04:00
Graham Madarasz (Graham Linden) 98e02a5d76 Merge new boost and add OS X 10.8 mods 2013-02-22 09:49:58 -08:00
Nat Goodspeed d8ce2ec0a0 MAINT-2389: Tell CMake viewer_components/login depends on Boost.Context
This addresses a Linux link failure due to the Linux linker making a single
left-to-right pass through libraries.
2013-02-21 18:57:24 -05:00
Nat Goodspeed 54e2d2b000 MAINT-2389: Change viewer to Boost package without ucontext.h.
In autobuild.xml, specify today's build of the Boost package that includes the
Boost.Context library, and whose boost::dcoroutines library uses Boost.Context
exclusively instead of its previous context-switching underpinnings (source of
the ucontext.h dependency).
Add BOOST_CONTEXT_LIBRARY to Boost.cmake and Copy3rdPartyLibs.cmake. Link it
with the viewer and with the lllogin.cpp test executable.
Track new Boost package convention that our (early, unofficial) Boost.Coroutine
library is now accessed as boost/dcoroutine/etc.h and boost::dcoroutines::etc.
Remove #include <boost/coroutine/coroutine.hpp> from
llviewerprecompiledheaders.h and lllogin.cpp: old rule that Boost.Coroutine
header must be #included before anything else that might use ucontext.h is
gone now that we no longer depend on ucontext.h. In fact remove
-D_XOPEN_SOURCE in 00-Common.cmake because that was inserted specifically to
work around a known problem with the ucontext.h facilities.
2013-02-21 01:13:24 -05:00
prep 11d12f1a99 Merge from viewer-beta 2013-02-13 11:30:36 -05:00
Merov Linden faae38daaa Pull merge from lindenlab/viewer-developement 2013-01-30 20:01:03 -08:00
Merov Linden af96927099 Fix test failure 2013-01-28 15:41:01 -08:00
Nyx Linden 11fe124ae9 merging in viewer-beta.
Most of the merge was clean, a couple conflicts.
Brought over a couple patches manually for llpolymesh.
2013-01-24 16:22:49 -05:00
Nat Goodspeed 22db60ed0d MAINT-1481: use 'mktemp -d' to generate tempdir.
Responding to Lex's code-review comments.
2013-01-11 15:58:50 -05:00
Nat Goodspeed 9e755ee98d MAINT-1481: Clean up update_install UI, including error output.
Capture actual error output from mkdir and mv; display it to user.
Introduce mysudo function used by sudo_mv function for graphical sudo command.
Since update_install actually only displays a single status message, just use
zenity --info instead of a zenity progress box: need not update its message.
Borrow semantics for clear_message and status functions from xmenity script.
Introduce errorbox function so we only have to make zenity/xmessage test once.
Move cleanup, onexit to top so we can use for clear_message.
2013-01-11 12:36:03 -05:00
Nat Goodspeed 83f625445b MAINT-1481: Remove xmenity script and viewer_manifest.py references. 2013-01-11 12:24:44 -05:00
Nat Goodspeed 6e9782f79f MAINT-1481: minor bug fix plus incomplete UI tweaks.
Test for existence of target name using -e rather than -f. (-d would work too,
but in this case we must respond to any name collision, whether file or
directory.)
Instead of terminating on failure, make sudo_mv return rc of the [sudo] mv
command to its caller. If the attempt to move new install to actual viewer
directory fails, restore previous viewer before failing.
When redirecting the script's stderr to updater.log, first save existing
stderr to another file descriptor, and restore it when we launch viewer.
Otherwise updater.log ends up collecting the viewer's duplicate stderr log
output!
The construct 'exec ... | program' doesn't work. In fact it causes any other
redirections on that command to fail too. Remove it -- real fix pending.
2013-01-10 09:40:20 -05:00
Nat Goodspeed 34f231cc66 MAINT-1481: remove linux-updater; move logic to Linux update_install
Now that the viewer's own background updater logic is responsible for
downloading a new installer, the only functionality we still use in
linux-updater that couldn't be expressed more simply in bash is the UI. But
since most Linux distros capable of running SL at all have zenity, and all
will have xmessage, we can handle even the UI part. Add xmenity wrapper script
so update_install doesn't have to care which is present, and make the bash
script that used to launch linux-updater do the real work.
2013-01-09 20:39:06 -05:00
Aura Linden e85e6ca410 Merged from viewer-release 2012-12-11 16:01:35 -08:00
prep e0432f98ee SH-3563. Pull and merge from viewer-development. Modest code changes to fix alignment issue in llAppearance. 2012-11-28 16:36:34 -05:00
Aura Linden eca6199852 Ported slplugin and some other missing components for cocoa. 2012-11-12 18:06:32 -08:00
Oz Linden c17db85e73 add platform and platform version to login request parameters for new version manager query 2013-03-27 13:20:48 -04:00
Oz Linden 8154621527 log any error code and text received as an llsd body in a failure response 2013-03-26 18:01:20 -04:00
Oz Linden a7f02a3e51 merge changes for 3.5.0-beta2 2013-03-08 10:10:59 -05:00
Oz Linden 4de02b0614 more cosmetic logging improvements 2013-03-06 17:39:03 -05:00
Oz Linden c70b0a9de6 merge changes for DRTVWR-278 2013-03-06 16:39:48 -05:00
Oz Linden ce73cc392c cosmetic logging fix 2013-03-06 15:50:54 -05:00
Oz Linden 1676dae754 remove old hack for legacy mac updates (no system that needed that will run this version anyway) 2013-03-05 16:47:03 -05:00
Oz Linden 49ed1a4e32 finish changes to update handling, including notices of channel changes 2013-02-27 17:40:39 -05:00
Nat Goodspeed fbb9bf89c0 MAINT-2155, DRTVWR-278: Make Mac updater honor app bundle name in .dmg.
If you run "/Applications/Second Life Beta Materials.app", and the version
manager directs you to update to a .dmg containing a release candidate whose
app bundle name is "Second Life Viewer.app", update_install.py used to copy
the contents of "Second Life Viewer.app" into "/Applications/Second Life Beta
Materials.app". Changed it so that if the application bundle name differs, we
leave the running app bundle alone, installing instead to the app bundle name
from the .dmg.
2013-02-25 16:26:40 -05:00
Nat Goodspeed f76e7cce5f MAINT-2328: Mac updater should not clear (part of) viewer cache.
Remove the offending code.
2013-02-22 21:06:38 -05:00
Oz Linden cf1019859d add use of v1.1 update request protocol, with fallback to v1.0 2013-02-21 16:47:52 -05:00
Oz Linden c8a588836a remove regeneration control where not needed in updater service 2013-02-12 16:33:24 -05:00
Oz Linden 72b4a1962f correct dependencies for forcing version number recompilations 2013-02-12 12:42:14 -05:00
Oz Linden d7e90f4160 derive version number from indra/VIEWER_VERSION.txt 2013-02-07 11:56:57 -05:00
Nat Goodspeed 4ca04bd89c MAINT-2155: Match window title of mac-updater.app's message window 2013-01-08 22:24:07 -05:00
Nat Goodspeed c3542b5e46 MAINT-2155: when permitting missing old logfile, check for ENOENT
instead of errno.EEXIST. Sigh.
2013-01-08 14:50:34 -05:00
Nat Goodspeed 840cb864a3 MAINT-2155: replace embedded mac-updater.app with a Python script.
Remove mac-updater subtree from viewer source, along with the
update_install bash script that invoked it. Remove all mention of mac-updater
in CMakeLists.txt files and in viewer_manifest.py.
Change Mac update_install bash script references in viewer_manifest.py and in
llupdaterservice.cpp (which invokes it) to new Python update_install.py.
Add update_install.py, messageframe.py (which puts up some Tkinter UI) and
janitor.py (cloned from vita, it's exactly what we need here).
2013-01-05 09:17:51 -05:00
Don Kjer c06c35609c Updating linux build to gcc4.6 2012-10-11 00:09:04 +00:00
Dave Parks 374f20edf0 Fix non-thread-safe refcounting of LLHTTPClient::Responder and fix out-of-order deletion of LLTextureFetch on shutdown 2012-10-03 14:30:21 -05:00
Nat Goodspeed 852e608599 Automated merge with http://hg.secondlife.com/viewer-development 2012-11-14 14:37:38 -05:00
Nat Goodspeed 55a812ca77 Automated merge with http://hg.secondlife.com/viewer-development 2012-11-06 16:37:51 -05: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
Aura Linden b0c683344f 10.5 macs will begin looking for mac_legacy rather than mac 2012-08-15 12:49:42 -07:00
Nicky dec4f9b4be Gracefully handle 'Started' status. Ignore it and continue login. 2012-08-26 12:56:13 +02:00
Nat Goodspeed a5b0147df4 Automated merge with http://hg.secondlife.com/viewer-release 2012-05-09 22:33:04 -04:00
Nat Goodspeed d29f920c22 CHOP-900: Use new apr_procattr_constrain_handle_set() extension.
Now LLProcess explicitly requests APR to limit the handles passed to any child
process, instead of wantonly passing whatever happens to be lying around the
parent process at the time.
This requires the latest APR build.
Also revert LLUpdateDownloader::Implementation::mDownloadStream to llofstream
(as in rev 1878a57aebd7) instead of apr_file_t*. Using APR for that file was a
Band-Aid -- a single whacked mole -- for the problem more systemically
addressed by apr_procattr_constrain_handle_set().
2012-05-09 19:55:26 -04:00
Nat Goodspeed 7079513c23 IQA-463: Add apr_file_open(APR_CREATE) flag for downloaded installer.
This handles the case when the target file doesn't exist, just as APR_TRUNCATE
handles the case when it does.
Strengthen error checks concerning downloaded installer file from
ll_apr_warn_status() to ll_apr_assert_status(). Failing to recognize (e.g.)
failure to open that file only leads to mysterious crashes down the road; this
removes the mystery.
2012-04-23 14:49:32 -04:00
Nat Goodspeed 78816bb156 IQA-463: Use APR file I/O for downloaded viewer installer .exe.
On Windows, calling CreateProcess(bInheritHandles=FALSE) is the wrong idea. In
that case, CreateProcess() passes NO handles -- even the files you've
explicitly designated as the child's stdin, stdout, stderr in the STARTUPINFO
struct! Remove LLProcess code to tweak bInheritHandles; we should also remove
the corresponding (useless) APR extension.
Instead, given that the Windows file-locking problem we've observed is
specific to the viewer installer .exe file downloaded by the background
updater logic, use APR file I/O for that specific file. Empirically, both
llofstream and std::ofstream seem to make the open file handle inheritable;
but apr_file_open() documentation says: "By default, the returned file
descriptor will not be inherited by child processes created by
apr_proc_create()." And indeed, it does appear to sidestep the locking problem.
2012-04-23 12:01:15 -04:00
Nat Goodspeed 6da3f0907c Automated merge with ssh://hg.lindenlab.com/nat/viewer-new-apr 2012-02-12 21:59:51 -05:00
Richard Linden 2ed1de224a Automated merge with http://hg.secondlife.com/viewer-development 2012-02-06 15:28:45 -08:00
Richard Linden 5a14a67e06 converted a bunch of narrowing implicit conversions to explicit 2012-02-01 13:03:46 -08:00
Nat Goodspeed 47d9475707 Convert LLProcess consumers from LLSD to LLProcess::Params block.
Using a Params block gives compile-time checking against attribute typos. One
might inadvertently set myLLSD["autofill"] = false and only discover it when
things behave strangely at runtime; but trying to set myParams.autofill will
produce a compile error.
However, it's excellent that the same LLProcess::create() method can accept
either LLProcess::Params or a properly-constructed LLSD block.
2012-01-21 11:45:15 -05:00
Nat Goodspeed f0dbb87833 Per Richard, replace LLProcessLauncher with LLProcess.
LLProcessLauncher had the somewhat fuzzy mandate of (1) accumulating
parameters with which to launch a child process and (2) sometimes tracking the
lifespan of the ensuing child process. But a valid LLProcessLauncher object
might or might not have ever been associated with an actual child process.
LLProcess specifically tracks a child process. In effect, it's a fairly thin
wrapper around a process HANDLE (on Windows) or pid_t (elsewhere), with
lifespan management thrown in. A static LLProcess::create() method launches a
new child; create() accepts an LLSD bundle with child parameters. So building
up a parameter bundle is deferred to LLSD rather than conflated with the
process management object.
Reconcile all known LLProcessLauncher consumers in the viewer code base,
notably the class unit tests.
2012-01-20 18:10:40 -05:00
Nat Goodspeed c0731c1c05 Add log message if LLProcessLauncher child fails to execv().
On a Posix platform (vfork()/execv() implementation), if for any reason the
execv() failed (e.g. executable not on PATH), the viewer would never know, nor
the user: the vfork() child produced no output, and terminated with rc 0! Add
logging, make child terminate with nonzero rc.
Remove pointless addArgument(const char*) overload: this does nothing for you
that the compiler won't do implicitly.
In llupdateinstaller.cpp, remove pointless c_str() call in addArgument() arg:
we were starting with a std::string, then extracting its c_str(), only to
construct a whole new std::string from it!
2012-01-17 18:55:42 -05:00
Xiaohong Bao f082de03ff fix for SH-2845, SH-2846, SH-2847, SH-2851: curl crashes and out-of-memory crashes. 2012-01-12 16:36:56 -07:00
Dave Parks cfb666e9d9 merge 2011-11-15 17:04:37 -06:00
Brad Payne (Vir Linden) 1f17228145 merge 2011-10-18 16:24:23 -04:00
Brad Payne (Vir Linden) 47a4ce19c7 SH-2515 WIP - changed app name in linux updater, dir name in windows installer 2011-09-30 13:16:29 -04:00
Brad Payne (Vir Linden) 41d9ad5cd3 SH-2515 WIP - changed app name in mac-updater 2011-09-30 11:06:12 -04:00
Xiaohong Bao 749d9ebadc Merge 2011-08-31 10:48:56 -06:00
Oz Linden f0bc8a0f71 convert tabs to spaces where they are forbidden 2011-08-17 12:33:23 -04:00
Xiaohong Bao d951267467 Merge from viewer-development 2011-07-15 12:14:34 -06:00
Nat Goodspeed 7a7a0f0c1b EXP-772: If URIs returned by SRV fail, fall back on original URI. 2011-05-26 17:25:26 -04:00
Dave Parks 8a92612fd9 merge 2011-05-16 12:34:15 -05:00
Dave Parks 93696ac019 merge 2011-05-12 17:39:08 -05:00
Seth ProductEngine e213a36f70 STORM-477 Restored the backed out changeset: b62b260aa04d 2011-05-11 18:12:23 +03:00
Nat Goodspeed 343ffb9d51 Remove Pth library from viewer build.
This library was only needed on the Mac, and only with the OS X 10.4 SDK. As
of October 2010, we no longer build the viewer with that SDK. The 10.5 SDK
we're currently using directly supports the functionality for which we
originally brought in Pth.
2011-05-05 19:23:55 -04:00
Aleric Inglewood ef490e308c Introduces a LLThreadLocalData class that can be
accessed through the static LLThread::tldata().
Currently this object contains two (public) thread-local
objects: a LLAPRRootPool and a LLVolatileAPRPool.

The first is the general memory pool used by this thread
(and this thread alone), while the second is intended
for short lived memory allocations (needed for APR).
The advantages of not mixing those two is that the latter
is used most frequently, and as a result of it's nature
can be destroyed and reconstructed on a "regular" basis.

This patch adds LLAPRPool (completely replacing the old one),
which is a wrapper around apr_pool_t* and has complete
thread-safity checking.

Whenever an apr call requires memory for some resource,
a memory pool in the form of an LLAPRPool object can
be created with the same life-time as this resource;
assuring clean up of the memory no sooner, but also
not much later than the life-time of the resource
that needs the memory.

Many, many function calls and constructors had the
pool parameter simply removed (it is no longer the
concern of the developer, if you don't write code
that actually does an libapr call then you are no
longer bothered with memory pools at all).

However, I kept the notion of short-lived and
long-lived allocations alive (see my remark in
the jira here: https://jira.secondlife.com/browse/STORM-864?focusedCommentId=235356&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-235356
which requires that the LLAPRFile API needs
to allow the user to specify how long they
think a file will stay open. By choosing
'short_lived' as default for the constructor
that immediately opens a file, the number of
instances where this needs to be specified is
drastically reduced however (obviously, any
automatic LLAPRFile is short lived).

***

Addressed Boroondas remarks in https://codereview.secondlife.com/r/99/
regarding (doxygen) comments. This patch effectively only changes comments.

Includes some 'merge' stuff that ended up in llvocache.cpp
(while starting as a bug fix, now only resulting in a cleanup).

***

Added comment 'The use of apr_pool_t is OK here'.

Added this comment on every line where apr_pool_t
is correctly being used.

This should make it easier to spot (future) errors
where someone started to use apr_pool_t; you can
just grep all sources for 'apr_pool_t' and immediately
see where it's being used while LLAPRPool should
have been used.

Note that merging this patch is very easy:
If there are no other uses of apr_pool_t in the code
(one grep) and it compiles, then it will work.

***

Second Merge (needed to remove 'delete mCreationMutex'
from LLImageDecodeThread::~LLImageDecodeThread).

***

Added back #include <apr_pools.h>.

Apparently that is needed on libapr version 1.2.8.,
the version used by Linden Lab, for calls to
apr_queue_*. This is a bug in libapr (we also
include <apr_queue.h>, that is fixed in (at least) 1.3.7.

Note that 1.2.8 is VERY old. Even 1.3.x is old.

***

License fixes (GPL -> LGPL). And typo in comments.
Addresses merov's comments on the review board.

***

Added Merov's compile fixes for windows.
2011-02-05 15:58:07 +01:00
Loren Shih fbc6e5d639 Automated merge up from viewer-development into mesh-development 2011-02-01 11:28:22 -05:00
Oz Linden f0074f1002 merge changes back from beta branch 2011-02-01 07:22:32 -05:00
Andrew A. de Laix 9fa947ef74 a less brain dead fix for CHOP-369 2011-01-24 14:58:10 -08:00
Andrew A. de Laix 14042f631d fix CHOP-369: catch case of synchronous download failure. 2011-01-24 10:54:08 -08:00
Loren Shih 38f4bad925 Automated merge up from viewer-development 2011-01-21 10:36:29 -05:00
Oz Linden 4f3953763d merge changes from viewer-beta 2011-01-20 20:48:16 -05:00
Andrew A. de Laix 8e4d6bb1ac fix CHOP-366, on temporary errors (e.g. version manager returns other than 200) show error dialog instructing the user to manually install the latest viewer. 2011-01-14 12:59:42 -08:00
Merov Linden 804495ad41 STORM-477 : backout changeset 6f5cb303d3e2 2011-01-13 11:15:47 -08:00
Seth ProductEngine 4af9db7b79 STORM-477 FIXED Re-implemented LLDir::getNextFileInDir() as an iterator object.
- Replaced all existing usages of LLDir::getNextFileInDir() with the new directory iterator object.
- Removed platform specific LLDir::getNextFileInDir() implementation.
2011-01-11 19:50:58 +02:00
Loren Shih fdf19a5268 Automated merge up from viewer-development 2011-01-10 11:20:39 -05:00
Oz Linden a4d5e38535 STORM-826 (workaround): correct mixed and dos-style line endings 2011-01-06 11:06:20 -05:00
Loren Shih 5f99331f4a Automated merge up from viewer-development 2010-12-29 13:23:02 -05:00
Andrew A. de Laix 2c68cb2c69 fix windows build? 2010-12-20 10:38:36 -08:00
brad kittenbrink f95effdacf Better fix for CHOP-286 - reenabled bandwidth limits on linux now that we've fixed the freeze. 2010-12-17 15:59:51 -08:00
brad kittenbrink 63dec2a9b9 Temporary workaround for CHOP-286: bandwidth limits freeze the downloader thread on linux 2010-12-17 14:26:55 -08:00
Andrew A. de Laix 3c3c9a0d49 Automated merge with https://bitbucket.org/mani_linden/viewer-development 2010-12-17 12:07:22 -08:00
Andrew A. de Laix 67a543aa6c ich bin stupid; this should actually fix the windows build. 2010-12-17 12:07:09 -08:00
Andrew A. de Laix 6a6757cab4 don't rely on stream cast to bool behavior; use explicit fail call. 2010-12-17 11:35:26 -08:00
Andrew A. de Laix 049815bd52 and don't break other builds. 2010-12-17 10:55:09 -08:00
Andrew A. de Laix b707048fdf fix windows build (suppress warning from lexical_cast) 2010-12-17 10:53:02 -08:00
Andrew A. de Laix 1774489ef8 Vary install failed message depending on whether it was required or not. 2010-12-16 09:34:19 -08:00
Loren Shih ee0055f5af Automated merge up from viewer-development 2010-12-16 11:12:15 -05:00
Oz Linden 33f745b237 pulling fixes back from viewer-beta 2010-12-15 10:12:49 -05:00
brad kittenbrink 3641d012e3 Merge 2010-12-14 16:19:20 -08:00
Andrew A. de Laix 5b5d2c428c Record update version in download marker so it can be recalled if resumed in another viewer session. 2010-12-14 09:54:28 -08:00
brad kittenbrink 4f9e6ff2ff Defensive coding for linux updater script for consistency with alain's work on the mac script.
Should be safer if the user is installing to a path with spaces in it.
2010-12-10 17:27:17 -08:00
Andrew A. de Laix ac2253abc4 fix quoting in script to work with spaces in directory names. 2010-12-10 16:11:16 -08:00
Andrew A. de Laix 8ab943f470 fix working directory in install script and remove dependency on open option --args which is 10.6 only. Also fix erroneous check in process launcher which was mistakenly reporting a failed execution of the new updater script. 2010-12-10 15:41:14 -08:00
Andrew A. de Laix 1924f1bbca no bandwidth limit for required downloads. 2010-12-10 11:26:23 -08:00
Andrew A. de Laix b89b41991e ui improvements to more closely match UX design. 2010-12-10 09:43:01 -08:00
Andrew A. de Laix 3c3683b884 limit dowload bandwidth to 'Maximum bandwidth' setting 2010-12-07 15:41:31 -08:00
Andrew A. de Laix 4d861ef022 push required flag into download data for later use. 2010-12-07 14:32:37 -08:00
brad kittenbrink f705453823 Fix for coding standard violations and build error on windows. 2010-12-03 17:12:35 -08:00
Andrew A. de Laix c767276ce6 expose update available method. 2010-12-02 11:37:26 -08:00