Commit Graph

612 Commits

Author SHA1 Message Date
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 0a6a46898a Remove ellipsis from the text for the Patch Notes button.
Ellipses on buttons/menu items typically means "pressing this
will not invoke an action directly because more information/customization
is needed". For example the ubiquitous "Print..." displays a
printing dialog, it doesn't actually start printing.
2012-03-08 22:05:30 +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 cb995489b6 Remove ellipses from the translations for our steps, as that's now "throbbed".
Japanese was using the unicode character for an ellipsis, that was removed too.
2012-03-08 20:36:14 +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
Mark Johnson 953769b143 Preparing for 1.3-SNAPSHOT development. 2012-02-22 06:24:48 +00:00
Mark Johnson 2e1ae1a74f Preparing for getdown-1.2 release 2012-02-22 06:14:08 +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
Michael Bayne 748f6828b8 We have plugin.jar in the POM classpath. 2011-10-07 17:52:17 +00:00
Andrzej Kapolka 2fc6dc4fe5 German translation for "Patch notes." 2011-10-05 20:33:53 +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 4687e45596 Nine yards are apparently not enough. We need ten! 2011-09-19 17:51:42 +00:00
Michael Bayne 71d3abddf1 Revamped the Maven build to use the Maven Proguard plugin (PITA!) instead of
calling out to Ant to do the Proguard build.

Running Ant from within Maven (which then runs Maven from within Ant) no longer
works as of Maven 3.

While I was in here, I changed the build to use the Proguard-ed artifact as the
primary artifact, and changed the POM to reflect that none of the dependencies
are transitive.
2011-09-17 17:39:23 +00:00
Michael Bayne f1f6b26bb0 This is also no longer used. 2011-09-14 18:16:33 +00:00
Michael Bayne 7ccfdb57e4 This is no longer used. 2011-09-14 18:15:49 +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
Michael Bayne f7fa27884e Added support from Elias Naur for loading a bundled signing certificate instead
of using the signers on the jar file. Also tidied up the code that passes
certificates around so that we get rid of that wonderful Object[] as early as
possible.
2011-07-26 17:17:54 +00:00
Michael Bayne 84ebe33396 Use the latest Maven Ant tasks (2.1.1 has disappeared from the Interwebs). 2011-07-26 16:46:48 +00:00
Michael Bayne e3e566efb5 Change the variable names in the JVM version calculation code to reflect the
nomenclature used by Java.

Run the application with _appdir as the cwd like we claim to in the docs.
2011-07-26 16:46:24 +00:00
Charlie Groves 40de11fa15 Remove and ignore Eclipse files in favor of letting people generate their own using m2eclipse 2011-06-27 20:52:00 +00:00
Michael Bayne 4b739cd74f Nix the building of the getdown-tools.jar. We can just include everything in
getdown-pro.jar and it's only 10% larger (109k -> 121k), and it vastly
simplifies life for users.

Just use getdown-pro.jar for all of your Getdown-related needs:

- use it to install your application
- use it in your build scripts for the various Getdown tasks
- link against it in your app to use LaunchUtil or to embed Getdown

We'll even ship this on the website as simply getdown.jar. I'm tempted to ship
this in Maven and modify the main Getdown POM to not export any of its
dependencies. However, that will require a bunch of build file tweaking, which
I'd rather save for another day.
2011-06-22 00:52:56 +00:00
Michael Bayne 296d3ca210 Disable URLConnection caches when downloading control files. 2011-06-21 21:32:10 +00:00
Andrzej Kapolka 686c1f1a3a Added support for a "check_unpacked" flag that causes resources to be
unpacked on initial install (even though the resources are already
validated).
2011-06-10 01:56:09 +00:00
Andrzej Kapolka 35245d4d44 Adding a flag to prevent unpacking (for building Steam depots). 2011-06-10 00:50:35 +00:00
Ray Greenwell e44931a433 Allow the 'appid' to be specified as a system property. 2011-04-25 23:06:48 +00:00
Andrzej Kapolka 9ed9d93623 Not sure if opening another connection here was intentional; I'm assuming not.
At any rate, this was apparently what was causing some users' downloads to
stall.  Special thanks to Natalie B. for helping me track down the issue.
2011-04-12 22:51:27 +00:00
Michael Bayne 90edcdf571 Some tidying. 2011-04-07 21:07:23 +00:00
Michael Bayne 14bb4f0f9b I later realized we don't need quotes here, since we pass arguments as an array
to Runtime.exec.
2011-04-07 21:06:59 +00:00
Michael Bayne 6c3abf3597 Added sane systems for augmenting jvmargs and appargs from getdown.txt instead
of inconsistent-with-one-another-and-with-getdown.txt-and-limitation-ridden
'properties' and 'app_properties' mechanisms from ancient history.

Unfortunately, Sun in their infinite wisdom decided that being able to
enumerate applet parameters was "not doing it right" and provided no mechanism
for doing so. So we have to use annoying increasing int suffixes.

Use like so:

<object ..>
  <param name="jvmarg0" value="-Xmx256M"/>
  <param name="jvmarg1" value="-Danswer=42"/>
  <param name="jvmarg2" value="-Dtrix=for kids"/>
  <param name="jvmarg3" value="-Dfoodir=%APPDIR%"/>
  <param name="apparg0" value="--username"/>
  <param name="apparg1" value="elvis"/>
</object>
2011-04-07 20:57:13 +00:00
Michael Bayne 86657244e1 Truth in commenting, studliness in variable naming (since all the neighbors are
studly).
2011-02-11 23:06:02 +00:00
Michael Bayne 3f94853bb2 Allow a blank app_id so that when calling Getdown via:
java -jar getdown.jar app_dir [app_id] [app_arg ...]

we could conceivably supply '""' for app_id and pass arguments to the default
application.
2011-02-11 22:59:27 +00:00