Commit Graph

982 Commits

Author SHA1 Message Date
Charlie Groves 497de6e850 Switch to using a file lock on gettingdown.lock in the app's dir to keep multiple instances of getdown from running at the same time instead of monitoring getdown.txt's modtime. The modtime is still used to see if another getdown ran while this one waited. 2008-01-24 00:59:24 +00:00
Michael Bayne f168142c05 Look for javaws.jar in libs.dir in case we don't have it in java.home. 2008-01-17 00:31:47 +00:00
Michael Bayne 6b3ad3ae5d Using IOException to communicate a desire to abort the download is a little
pesky and pushes annoying requirements on users of the Getdown download
services (like Yohoho and ToyBox).

Instead we'll allow Downloader.download() to return false to indicate that the
download was aborted by an observer, and the observers will simply return false
to indicate that they wish the download to be aborted.

While I was in there, I moved the Downloader and its concrete implementations
into a getdown.net package because it annoyed me that they were in
getdown.launcher.
2007-12-14 21:09:10 +00:00
Charlie Groves abcf99251f Whoops, getdown is used as a downloading library elsewhere, so Downloader needs to stay a Thread for that usage 2007-12-14 20:51:50 +00:00
Michael Bayne 67c46834e6 Let's copy the child's stderr to our own in both cases. 2007-12-14 20:33:45 +00:00
Charlie Groves 1f37906da8 allow the silent property to specify if getdown should launch its application after it finishes installing silently 2007-12-11 23:00:50 +00:00
Charlie Groves e972eaad37 Use the modtime on getdown.txt as a crude locking mechanism to keep multiple
instances of getdown from stepping on each others toes.  Getdown now checks the
modtime of getdown.txt when it starts, during its downloading, and before
launching the real app.  If at any of these points the modtime has changed from
when it was last checked, getdown assumes that means another instance is
running and bails to let the other instance do its magic.

Mainly this is for a delayed, silent installer that wants to launch after its
delay, but not if getdown has been run manually after it was launched. Also, if
someone manages to get a little click happy on their installer, this will keep
multiple instances from fighting for the bandwidth to download the same file
simultaneously.
2007-12-11 22:30:40 +00:00
Charlie Groves 511eaccc2e Retroweaver isn't smart enough to take care of this Java 5 method 2007-12-03 19:00:07 +00:00
Charlie Groves 7341ac96f3 If a param 'redirect_on_finish' is given to the applet, redirect to that URL when we've finished getting down. This allows us to have some javascript on that redirected page close the window getdown was in. I'd prefer to do this with the javascript bridge from the applet into the browser, but calling window.close() from the applet doesn't seem to do anything 2007-11-20 21:36:24 +00:00
Charlie Groves c62eb8a6f5 Actually replace _background when creating the interface again in case a new getdown.txt specifies new background images. If the new getdown.txt set a background but the images aren't already available as part of the existing install as indicated by there being no images in the newly created RotatingBackgrounds, just use the RotatingBackgrounds from the first time. 2007-11-07 00:32:07 +00:00
Michael Bayne dba663e259 Let's not choke while we're trying to recover from a security exception. 2007-11-06 22:56:24 +00:00
Charlie Groves e7d38b13bc Turns out keeping com.samskivert.util.** is only needed in my little mac corner of the universe, and others can build getdown just fine without it. It's no good to actually leave the names in for samskivert.util since other things that build with getdown-retro-pro in their classpath are confused to find them with their proper names but already weaved. Moral of the story is that I'm not allowed to build getdown. 2007-11-01 23:55:46 +00:00
Charlie Groves 5a6bb9fbed Don't rename samskivert.util.* since something about renaming StringUtil was confusing retroweaver and leading to a ClassFormatError. Upgrading to retroweaver 2 fixes that, but doing so adds backported versions of the Java 5 concurrent libraries which more than doubles the size of getdown-retro-pro.jar. This feels like the lesser evil. 2007-11-01 17:45:20 +00:00
Michael Bayne 3b18e77805 Some small tidying. 2007-10-22 06:39:26 +00:00
Charlie Groves a22d5c3707 Allow more than one background image to be specified, and if there are
multiple, rotate through them as things are downloaded.
2007-10-12 18:46:40 +00:00
Charlie Groves b8f3333124 Only launch if we aren't in silent mode 2007-10-02 20:49:54 +00:00
Charlie Groves d2b3baf1d1 Add a delay mode where getdown will wait a specified number of minutes before doing any downloading. This will be useful if, say, getdown is invoked from someone else's installer and we don't want to monopolize network resources immediately. Enabled with -Ddelay=<minutes> 2007-10-02 18:55:08 +00:00
Charlie Groves c31e05eb3a Added a silent mode where getdown will only log its actions instead of popping up a gui. It's enabled with -Dsilent=true. 2007-10-02 18:19:45 +00:00
Michael Bayne fa67a45d85 Another Elias patch to work around an -Xdock:name bug. 2007-08-07 23:54:25 +00:00
Michael Bayne df9bdfa931 Allow the Mac dock icon path to be customized. 2007-08-07 23:46:32 +00:00
Michael Bayne 189cabfa5e As the comment says, allow passing -Ddirect=true to force direct invocation
(direct meaning we don't fork off a new JVM).
2007-08-07 23:36:06 +00:00
Michael Bayne 201c5b03c7 Another patch from Elias: avoid CME when setting pass-through properties. 2007-08-06 18:50:57 +00:00
Michael Bayne f7e0726a5c Patch from Elias to close stdin and stdout of our launched process. If we had a
Win98 machine around we could test whether closing stderr prevents the buffer
fill-up deadlock that necessitates leaving the Getdown process around to read
stderr on that platform, but I vaguely recall having tried that and having it
not work.
2007-08-04 23:57:57 +00:00
Mike Thomas 92d61bca41 Japanese getdown translations. 2007-07-25 20:30:16 +00:00
Michael Bayne 1e4f8fdcab Added LaunchUtil.updateVersionAndRelaunch() to give external Getdown users some
idea of how to actually do that. Widened. Changed logging to standard Java
style.
2007-04-20 00:21:38 +00:00
Michael Bayne a2eeb0e769 The new signature validating code was failing to close its files properly which
was causing some freakout.
2007-04-13 20:50:39 +00:00
Michael Bayne 3b6e48e7a9 Reinstate the "move the old file out of the way then move the new file in
place" Windows-friendly rename and try that before falling back to the brute
force copy (which risks failing due to a full disk and leaving us with a
corrupt file rather than just an out of date one).
2007-04-13 20:50:12 +00:00
Michael Bayne 573314875b Widened. 2007-04-13 20:47:04 +00:00
Michael Bayne 424aa5cd24 Fall back to renames by copying if normal renaming fails as Windows XP decided
today that renaming is no longer allowed (at least in the directory in which
we're installing our games). Also nixed the old JavaScript bridge stuff which
we no longer use and was flaky in the first place.
2007-04-13 18:48:23 +00:00
Dave Hoover f62ebb1bfa Keyword substitution. 2007-04-07 00:19:43 +00:00
Michael Bayne 707d36aac7 Modified Getdown to use a signature on the digest.txt file instead of a
signature on the applet parameters, to verify that the signed applet version is
not being misused.
2007-04-05 02:10:21 +00:00
Mike Thomas 19013958c6 m.init_error only takes two args, and they're supposed to be the error description and the installation help URL. This was resulting in confusing error messages when getdown fails to do its update on Vista. 2007-03-28 00:08:53 +00:00
Mike Thomas fd9834d051 Allow specification of a tracking URL suffix to be added after the event name. 2007-03-25 07:28:31 +00:00
Michael Bayne 782d3e4e84 A bit of rearrangement. Let's have all the actual tracking logic take place in
the launcher and let the Application continue to serve largely as an interface
to our configuration information.
2007-03-23 21:46:54 +00:00
Mike Thomas 849c119227 Allow the specification of a cookie name and property to fetch its value from for tracking URLs. Clientstep needs this so we can identify the user and correlate with their other events. 2007-03-23 16:57:04 +00:00
Michael Bayne 29b8e875de Progress reporting fixes. 2007-03-14 19:09:00 +00:00
Michael Bayne 7e61bbdf90 Added support for requesting external tracking URLs during the download
process. This will replace the flaky Applet -> JavaScript bridge but first
needs some testing.
2007-03-14 02:05:22 +00:00
Michael Bayne e5f8d8478a Minor tweaks. 2007-02-22 23:59:17 +00:00
Mike Thomas d12e85bea6 Fix path for Vista's use so the security manager doesn't bite us. 2007-02-22 23:48:49 +00:00
Michael Bayne 4341710e18 Ignore cruft at the end of the version string. 2007-02-22 19:21:52 +00:00
Michael Bayne cd622bee95 Whoops, wrong path. 2007-02-21 22:32:02 +00:00
Michael Bayne 5bb65c42fe Specifically enumerate what we need rather than slurping in all the games adn
all the puzzles and then freaking out when they depend on something we don't
have.
2007-02-21 22:08:57 +00:00
Michael Bayne 66eea86039 Handle versions of the form 1.5.0 as well as 1.5.0_05. 2007-02-09 20:09:14 +00:00
Michael Bayne ed74fd67ee We may be having problems where we know about one JSException class and the VM
is throwing another and they don't end up matching. Let's just catch any
exception thrown when trying to propagate status to JavaScript and log it.
2007-02-07 21:30:13 +00:00
Michael Bayne 371f680ba0 Prevent digester from freaking out on java_location. 2007-02-04 00:54:46 +00:00
Michael Bayne 4c3324752d Specifically include what we need from tools and exclude everything else. 2007-02-04 00:24:08 +00:00
Michael Bayne 47e3bec864 Created ant task for generating signed applet parameters. 2007-02-04 00:16:29 +00:00
Michael Bayne 67ed6fea56 If any of our signatures match, then we're good to go. Further investigation is
needed to make sure this isn't badness but for whatever reason all of a sudden
it started trying to check our applet signature against Thawte's cert signing
cert which did not work.
2007-02-01 03:23:09 +00:00
Michael Bayne 5aa5de0aa0 Regenerate the classes.jsa file so that our locally installed Java can launch
with the same (emacs-like) fastness as a standard Java install.
2007-02-01 02:23:47 +00:00
Michael Bayne a2adc382a3 Provide support for automatically downloading and installing a local Java
version from within Getdown if the user does not have the desired version for
the application.

This does not yet support upgrading a locally installed version of Java, right
now it assumes that if we have a locally installed version, it's good enough.
We can make that do the right thing too, later.
2007-02-01 01:41:58 +00:00