Commit Graph

146 Commits

Author SHA1 Message Date
Michael Bayne be56b50801 Strip \r as well as \n when "one-lining" auth blob. Fixes #28. 2013-04-16 08:22:21 -07:00
Michael Bayne e74c71aa6b Added support for configuring a connect timeout when downloading metafiles. 2013-04-10 13:24:23 -07:00
Michael Bayne cfe51b4439 We need to chmod on Mac too. Err on the side of trying it. 2013-04-09 06:57:35 -07:00
Michael Bayne 07e0ba1081 Added support for java_exact_version_required. 2013-03-14 17:06:05 -07:00
Michael Bayne 7b785fa8f2 Update header with new copyright and link to LICENSE. 2013-01-29 10:36:30 -08:00
Michael Bayne 406657ff43 Extract our myriad system properties into one place.
This makes it easier to see all the secret configuration tweaks that one can
supply to Getdown if you have the esoteric knowledge.
2013-01-29 10:33:53 -08:00
Michael Bayne 431e35d3e2 Change name to getAllActiveResources for future comprehensibility. 2013-01-10 16:39:46 -08:00
Michael Bayne f4ee206516 We need all active code resources here. 2013-01-10 16:38:42 -08:00
Michael Bayne ce171faa47 Add support for code resources in auxgroups.
Usage is as you might expect:

auxgroups = foo
foo.code = foo-code.jar
foo.resource = foo-wontbeunpacked.jar
foo.uresource = foo-willbeunpacked.jar
2013-01-09 22:15:16 -08:00
Jamie Doornbos bfb23911f0 Added support for username:password@ prefix on URLs. 2012-12-19 11:11:48 -08:00
Mark Johnson 557dcca4ac The check_unpacked setting will now to version checks so that unpacking can occur if an update is
done by an external source outside of getdown.
2012-12-10 13:05:22 -08:00
Mark Johnson 6b85340ed4 You can now override the scheme and domain of the appbase and latest URLs specified in your
getdown.txt by setting the appbase_domain system property when launching getdown as an application
2012-12-07 18:20:25 -08:00
Mark Johnson c483b1dc64 - Let StatusPanel handle asyncronous loading of background images (ie: when in applet mode) 2012-06-01 22:47:00 +00:00
Mark Johnson b022c03321 - reinit the play again button before displaying since the image could have been a downloaded
resource
2012-03-30 22:35:27 +00:00
Mark Johnson 73d5bcb605 - Some tweaks to the play again button handling
- Removed the very naughty interrupt swallowing used to detect if the process started correctly
under optimal arguments, replaced it with a busy-wait loop so the thread can still be used to
launch the application multiple times
2012-03-30 03:33:51 +00:00
Mark Johnson ba86664122 - Added an optional play again button for the applet after getdown has launched the application 2012-03-29 23:13:51 +00:00
Ray Greenwell 6727e01625 Whoops, Throttle's reinit() is for changing the throttle parameters,
not clearing the history of operations.
2012-03-21 21:48:40 +00:00
Ray Greenwell 268c327ebd Parse a background color from getdown.txt, or figure out a sensible one.
Always fill the component with that, in case there's trouble with the
background image.
2012-03-16 14:10:00 +00:00
Ray Greenwell dba65488f3 Clarify that we're trying to block div-by-0 by checking the totalsize.
The elementSize can be 0, that's fine. It's when ALL the elements are 0....
2012-03-16 14:08:10 +00:00
Ray Greenwell eb2fee6b7c - Right before we exit let's set the progress to 100%
(launching normally stops at 99%)
- In the applet version's exit() we stop the 'throbber'.
2012-03-15 22:47:49 +00:00
Ray Greenwell 828a4638b0 This might be causing a divide by 0 error because all the sizes are 0... 2012-03-15 21:34:32 +00:00
Ray Greenwell 5695bfdf9a Allow the arbitrary step percentages to be specified in getdown.txt. 2012-03-12 23:50:21 +00:00
Ray Greenwell 57242277c1 Start displaying progress at 0%, rather than 1%. 2012-03-12 22:56:03 +00:00
Ray Greenwell 2d89d7acf4 And fix this javadoc comment. 2012-03-12 22:41:29 +00:00
Ray Greenwell 19fa9b298e Revert to reporting global percent to setStatus().
The Getdown class can be extended with that method overridden,
so move the step->global calculation outside of it.
2012-03-12 22:38:12 +00:00
Ray Greenwell a07bb6066b A hopefully kosher edit.
This little chunk of code has been tweaked and cargo'd forward for years
with no documentation as to what's going on.

What I object to is the blatent disregarding of the width specified in
getdown.txt with something calculated internally. (width - x*2)

GIGO; fix your fucking getdown.txt.

- If we are not granted privileges, reading the metadata breaks, which
is why the fallback was first added.
- Later it was tweaked because getWidth() can sometimes report 0 and
that would cause the fallback width to be negative.
2012-03-12 22:17:41 +00:00
Ray Greenwell 16017037e8 - Nixed the START step.
- Allow multiple percentages to be specified for a step. The lowest one that's
  higher than the current percentage is used.
- It seems sometimes the UI is shown after some progress is made. Track
  the percentage we're at when the UI is shown and reset that to be the new
  0, scaling subsequent progress to fill the remainder.
  I added this convinced I needed it, but now I'm seeing that it's always
  at 0 when the UI is shown...
  Perhaps I'll revisit that after I do some other stuff...
2012-03-12 21:52:15 +00:00
Ray Greenwell e025be1079 Scratch that. 2012-03-12 21:44:33 +00:00
Ray Greenwell be1385d634 Reinstate not bothering the parent observer if the size of the current
element is 0.
2012-03-12 21:30:07 +00:00
Ray Greenwell 40b593677b Let's start/stop the timer when the panel is added/removed. 2012-03-08 22:01:17 +00:00
Ray Greenwell 9fc677949a Add a bit of "throbbing" to the display by displaying 1, 2, or 3 dots
after the status, incrementing every second.

Even if the status or percentage doesn't update for a while, the user
will know that the updater is still "working".
2012-03-08 20:11:13 +00:00
Ray Greenwell c8e3318705 Another bugfix: There is code to smooth-out the reported time values,
however nothing was reset between different phases reporting their
own independent time-remaining values.
2012-03-08 19:04:52 +00:00
Ray Greenwell 4c94356981 Move the time-remaining display to the status area.
This could cause problems but I believe that any time we display the
time remaining we are also showing a short status string.

Hand-massaged the translations, hopefully everything still makes sense
in each language.
2012-03-08 18:57:54 +00:00
Ray Greenwell 42f14f9747 Rebalance the "final percentages" for the steps.
In the end I may allow these to be specified in one's getdown.txt.
2012-03-08 17:58:53 +00:00
Ray Greenwell 0d7cf4f67f I have no idea what the heck the MetaProgressObserver was doing,
but it wasn't doing the right thing. Fixed it.

I honestly have no idea how this was working. Maybe it just wasn't.
Maybe we never noticed before because with the per-step progress
bars we weren't seeing it exceed 100 percent.

And then use that instead of the UnifiedProgressObserver I wrote,
before I saw MetaProgressObserver.
2012-03-08 15:21:12 +00:00
Ray Greenwell b5fd81f963 Clarification / possible threading happiness. 2012-03-08 00:56:11 +00:00
Ray Greenwell 8acb1ee6dd Unified progress bar.
Part 1: the unification.

Two things actually:
- If there are auxiliary groups, the resources from all groups were
  downloaded all together, but patched individually. So each patcher
  would restart the progress bar from 0-100%. Created a unified
  progress observer that merely gives each patching phase an even
  division of the percentage.
- I enumerated the major steps involved in getting down, and assigned
  a completely arbitrary max progress percentage to each.
  All percent progress reports are now bounded to the range of
  the max for the current step and previous step's max reported
  progress. Backwards progress is ignored, so if getdown goes
  back and re-does some steps the bar may "stall".

  If a step is skipped, the progress bar doesn't jump ahead, rather
  it will use the range of any skipped steps to more fully
  report the 0-100% progress of the current step.

I'm going to try this out and make adjustments.

This feature isn't done, part 2 is moving any time estimate
up to the "status" label (instead of the "progress" label).
2012-03-08 00:53:17 +00:00
Ray Greenwell 7456d77bbe Use var-args, autoboxing. 2012-03-07 22:21:06 +00:00
Michael Bayne 66f4c878e2 Hide our UI (in non-applet mode) before launching direct. 2012-03-06 17:39:28 +00:00
Andrzej Kapolka 7baaa1bbdd If we use javaw.exe on Windows, we get a pop-up error when the JVM fails to
initialize.  Use java.exe instead when we try the optimum arguments.
2011-11-10 00:20:19 +00:00
Andrzej Kapolka f6ee755b97 The Getdown.this is redundant. 2011-11-09 23:30:34 +00:00
Andrzej Kapolka 824ff33c69 Allow the definition of "optimum" JVM arguments. When launching,
Getdown first tries with the optimum arguments included.  If the
process starts successfully, it continues as normal; otherwise, it
tries again without the optimum arguments.  The arguments in
"extra.txt" are included after the optimum arguments, so that they can
override them (for instance, if you have both -mx256m and -mx1g on the
command line, the JVM will use whichever comes last).
2011-11-09 23:26:35 +00:00
Michael Bayne ef8a160e2d When parsing env.txt and extra.txt, don't introduce am = if one wasn't there to
begin with.
2011-11-02 18:46:14 +00:00
Andrzej Kapolka 6f3f59de78 Allow customizing the install error/patch notes URLs by language. 2011-10-05 02:19:25 +00:00
Ray Greenwell f3b33ab0cb The patch notes button looks funny to me with the non-bold font.
Use the same bold font we use for the status panel.
Untested.
2011-10-05 01:22:36 +00:00
Andrzej Kapolka 9dde9d119a Added the ability to specify a patch notes URL. When Getdown needs to
patch, it will provide a button to access the URL if it's non-empty.
2011-09-23 01:03:23 +00:00
Andrzej Kapolka 0ee1cd1b99 Expect/send close messages when the connection is (to be) closed. 2011-09-13 23:39:34 +00:00
Andrzej Kapolka 8fedfd9640 Added some additional logging. 2011-09-12 18:20:53 +00:00
Andrzej Kapolka a641c3c23d Provide a means of exchanging messages between the JavaScript context of the
page hosting the applet and the launched application through a simple server
socket bound to the loopback address on any available port (where the port
is passed to the application as a system property).  Not tested yet, but it
shouldn't affect any deployments that don't specifically enable it.
2011-09-12 05:29:53 +00:00
Michael Bayne 9611b988e0 Turn a null list into an empty list as various other application constructors
still pass null and making them all pass an empty list would be a PITA.
2011-07-26 20:29:37 +00:00