Commit Graph

30 Commits

Author SHA1 Message Date
Michael Bayne d35e7b8180 Change the default resource directory to .narya so that we can leave the
code in that blows away .naryarsrc without having it constantly conflict
with the tools that we run.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2626 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-29 16:35:59 +00:00
Michael Bayne 79715e61a4 Screw unpacking our bundles on the fly. Just unpack them once when they
are downloaded and leave them be until the bundle is updated.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2612 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-27 07:52:45 +00:00
Michael Bayne 456dc57129 Moved the creation of the shutdown hook into the same static block that
creates the temp cache directory so that it is only registered once even
if multiple resource managers are created by the JVM (which happens in ant
builds).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2544 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-05 18:02:37 +00:00
Ray Greenwell 7f8ef8f01e Use FileUtil's deleteRecursive()
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2540 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-03 00:51:13 +00:00
Ray Greenwell c3737ca73f Register a shutdown hook to destroy the resource cache directory when
the JVM exits.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2539 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-03 00:45:36 +00:00
Michael Bayne 3962a0fa77 Allow our resource cache directory to be configured.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2472 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-27 03:27:33 +00:00
Ray Greenwell 5d6e746b88 Wire up the magic so that data in resource bundles can be acquired via
URLs.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2449 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-24 07:23:47 +00:00
Michael Bayne 24b6d1fcec Activate our bundles before turning our download observers loose.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2277 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-12 18:11:33 +00:00
Michael Bayne 162f0836d9 Don't delay access to our resources unless we're specifically told that we
should wait.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2246 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-06 19:13:49 +00:00
Michael Bayne 5414507e3a Don't allow the resource bundles to attempt to access their resource jar
files until they are known to be safely updated and ready to go.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2185 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-18 19:56:45 +00:00
Michael Bayne 0ad5e615b7 Provide means by which resource resolution and download observers can be
notified on the AWT thread rather than the download thread.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2167 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-16 22:50:29 +00:00
Michael Bayne e400ba5be6 Resources are unpacked and cached in a temporary directory on the
filesystem. This should speed up subsequent loads as they won't have to be
decompressed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2117 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-13 22:50:36 +00:00
Michael Bayne 2293cae094 Added getResource() which searches the bundles in a resource set for the
resources.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1965 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-20 02:00:36 +00:00
Michael Bayne fd44620d57 Incorporate a hash of the resource URL into the cache directory so that
bundles from one client installation don't overwrite bundles from another.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1827 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-25 17:21:00 +00:00
Walter Korman d08589d88a Provide an estimate of the download time remaining when downloading
bundles.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1763 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-30 09:36:22 +00:00
Walter Korman 7d7624fc67 Need to synchronize on the lock object before calling download() so that
we don't accidentally notify ourselves nigh-immediately (e.g., if things
are already entirely up to date) before we've begun waiting on the lock
object on the calling thread.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1601 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-22 23:19:23 +00:00
Walter Korman 9f641c5796 Download resource bundles asynchronously and provide facilities for
observing bundle downloading progress.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1595 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-19 20:12:23 +00:00
Michael Bayne 76aaa7722a Report that we're downloading a bundle when we set out to do so.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1169 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-01 20:47:28 +00:00
Michael Bayne 4afaa186eb Track some repackaging in the Jakarta libs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1168 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-01 16:49:26 +00:00
Michael Bayne eb52607162 Adjust the last modified time of our cached files to match that of the
server so that we properly report our last modified times when
subsequently doing an If-Modified-Since request.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1125 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-15 19:12:16 +00:00
Michael Bayne 105812725c Allow the specification of the directory in which the resource manager
caches bundle files.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1123 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-15 02:18:18 +00:00
Michael Bayne 2dc3c95b8b Added code to avoid downloading new copies of the resource bundles unless
they've changed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1073 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-26 05:28:02 +00:00
Michael Bayne 3042e9c2ad Removed debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@943 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-06 01:47:08 +00:00
Michael Bayne d4e2058ea6 Modified the resource manager to load resource sets not from the file
system but from a URL into a local cache. It presently loads all of the
resources every time the application starts. This will eventually be made
to be more sophisticated.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@862 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-16 03:00:06 +00:00
Michael Bayne c25741d8e6 Bundles! Have component bundles largely working. Wrote test code and ANT
tasks and XML parsing rule sets all the good stuff. Rewired up all the
cast code to be amenable to bundling and did some other revamping.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@640 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-27 08:09:35 +00:00
Michael Bayne d733a429a9 Don't choke if we throw a security exception trying to get the app root.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@638 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-26 23:48:04 +00:00
Michael Bayne a8359efde9 Provide the ability to obtain named resource sets.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@626 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-20 00:23:32 +00:00
Michael Bayne 21ed644984 Added support for loading resources from named resource bundles which are
configured relative to an application root which must be provided to the
resource manager at construct time or via the application.root system
property.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@625 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-20 00:21:41 +00:00
Michael Bayne 5feef4694b Load resources from the classpath rather than from a base URL.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@251 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-15 02:12:46 +00:00
Michael Bayne 89632aecbd Initial skeleton implementation of the resource manager.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@59 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-07-18 21:16:12 +00:00