Commit Graph

293 Commits

Author SHA1 Message Date
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 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 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 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
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
Michael Bayne 1eaa058fa8 Some interface deconcretization, and changed config parsing so that we only
complain if you actually provide an unparseable rect or color. If you don't
provide one at all, we'll use the default.

I want people to be able to configure Getdown with just:

ui.name = My Project

and get a no-frills, but usable interface that displays download and
installation progress. Previously, this resulted in a bunch of warnings when
they tried to generate their digest.txt because they failed to supply cryptic
things like "ui.progress = 17, 321, 458, 22". I'd rather that be optional.

I may add some sort of "spurious config" warning, so that if you provide
"ui.progres = 17, 321, 458, 22" and you're wondering why things aren't working,
you don't spend hours pulling your hair out.
2011-02-11 18:40:26 +00:00
Michael Bayne 2f29c77cdf Report the underlying error message when failing due to paths that jar: URLs
can't handle.
2011-01-31 18:16:47 +00:00
Andrzej Kapolka 86f580c175 To be safe, if we had a version file before and the latest version is
newer, overwrite with the newer version.
2011-01-06 21:09:59 +00:00
Andrzej Kapolka 9577c2127c To be safe, let's be sure that the "latest" version isn't less than the
one in version.txt.
2011-01-05 00:15:27 +00:00
Andrzej Kapolka c7e7da830a Allow specifying a "latest" attribute containing the URL of the latest
getdown.txt (from which we retrieve the most recent version).
2011-01-05 00:09:52 +00:00
Michael Bayne 4c6f1f95b8 Use the renamed method. 2010-12-02 23:07:35 +00:00
Dave Hoover 33e0c7a975 Bring back multi-icon goodness.
Added a util in samskivert to do the song & dance with reflection to
find it for us.
2010-12-02 01:24:15 +00:00
Dave Hoover f73333d951 Damn, setIconImages is new in 1.6.
When I'm feeling more up to it, I'll potentially rejigger this to
allow its use if it's available, but for now just simplify it so
folks can set a single icon.
2010-11-30 01:06:34 +00:00
Dave Hoover dbc08da57c Speeling 2010-11-30 01:06:28 +00:00
Dave Hoover da3d23a973 Whitespace 2010-11-30 01:06:20 +00:00
Dave Hoover 11b2317d2a Don't worry about java 1.4 any more. 2010-11-30 01:06:13 +00:00
Dave Hoover b484d0aad3 Let folks set the icon for the getdown window.
Not to imply that the default mug o' coffee isn't the pinnacle of style, but...
2010-11-29 23:00:10 +00:00
Dave Hoover 182809ec58 Whitespace 2010-11-29 19:55:21 +00:00
Dave Hoover 6862c99db5 Update getdown's source header to be like the rest of the OOO ones. 2010-11-29 19:54:53 +00:00
Michael Bayne d999592401 Find our depends in M2_REPO. 2010-11-16 23:50:06 +00:00
Ray Greenwell a5499d8cb8 Patch from Andrzej:
Getdown is currently failing to create patch files because JarDiff is closing the outputstream. The attached patch comments it out, which seems to work.
2010-10-02 03:36:19 +00:00
Michael Bayne b4dae3be33 If we get valid values once we start downloading, use those to provide
moderately more sane progress indication.

It's still non-ideal, because, for example, we'll start out assuming everything
is length 1. So we'd have a queue like (1, 1, 1, 1). Then we start downloading
the first resource and see that we actually have (1500000, 1, 1, 1), so we
climb up to 99% downloading that first resource, and then we find out that we
have (1500000, 450000, 1, 1) and we pop back down to 70% or so, and so on as we
discover in turn that the web server lied to us about each file.

The alternative is to just sit at 25% for ages, then sit at 50% for ages, then
75%, etc. Maybe that's better... I guess I just like to see some sort of smooth
upward progress.

This is only a problem for me since I'm hosting a Getdown client on Github
which lies about Content-size in a HEAD request. So OOO projects will continue
to give accurate progress reports.
2010-09-23 00:15:20 +00:00
Michael Bayne 9d6f3e32ee Track the reported size of each resource and its download progress
individually. Cap the actual download size at the reported size to ensure that
we don't end up borking our progress calculations if a web server returns a
"clever" value for content-size like 1 or 0, but then sends back real data.
Also sanitize the returned content-size in case the web server says something
awesome like -42. No one can be trusted on the Interwebs, least of all web
servers.
2010-09-22 21:36:01 +00:00
Michael Bayne 241c68ab72 Put our resources in src/main/resources. 2010-09-22 17:29:31 +00:00
Michael Bayne f5a70f3116 Let's not fail if a tautology. 2010-09-22 17:17:47 +00:00
Michael Bayne 15619e4dd1 Extracted the digester into a command-line callable task. 2010-09-21 06:52:09 +00:00
Michael Bayne 1bb6dec1a2 Import and whitespace pruning. 2010-09-21 06:47:26 +00:00
Michael Bayne 646dc2bdf0 More javadoc fixes. 2010-09-21 06:17:47 +00:00
Michael Bayne ac3fd45c8a Javadoc improvements. 2010-09-21 06:12:19 +00:00
Michael Bayne bdec128b6c The aforementioned shared constants. 2010-09-20 18:44:41 +00:00
Michael Bayne 487c594e06 Factor shared constants back out. 2010-09-20 18:44:29 +00:00
Michael Bayne 89229b16cd Now that the JDK is open source, we can just fork JarDiff and eliminate our
annoying dependency on javaws.jar (which no longer even includes JarDiff, now
that lives in $JAVA_HOME/samples/jnlp/servlet/jardiff.jar). We had already
forked JarDiffPatcher, so this completes the circle. Now I can also directly
fix some of the annoying JarDiff bugs we were working around, which I'll do at
some point.
2010-09-20 18:42:41 +00:00
Michael Bayne 6a46f7ed3c Reheadered to get proper blank line between the license header and the package
statement.
2010-09-20 17:55:35 +00:00