Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Eclipse Updater


unknown
 Share

Recommended Posts

![](http://www.openorpg.com/eclipse/updater/eclipseupdater.PNG)
[Test it out](http://www.openorpg.com/eclipse/updater/EclipseUpdater.jnlp)
[Download the source](http://www.openorpg.com/eclipse/updater/eclipseupdater_src.zip)

I know what your probably thinking… Do we really need another updater? I was thinking the same thing before I started my project.

Here are some key problems with most updaters:
- BMP files take an incredibly long time to download, but its ideal to update graphics without redownloading the entire client.
- There's not a lot of great ways to customize the GUI on most updaters.
- A lot of updaters aren't open source, so you can't really change anything.
- In most updaters you have to keep track of versions.. thats annoying, I just want to upload my files & be done with it.

I spent a little time today working on a updater in Java and the results fixed all these problems.

- If you create a zip file (for graphics) it will automatically extract it into a folder.
- The GUI is swing, to customize it you can use Synth which takes in an XML format or better yet [Substance](http://substance.dev.net) a very good looking LAF
- There's no need to keep track of versions, the list.txt file looks like
```
File1.txt
File2.txt
File3.zip

```When a file is modified on the server, an update is detected on the updater.
- Works on every operating system.
- You can update the updater using JNLP's.

**How to use**
So there isn't really a configuration file for this.. I may make one in the future but for now you just have to edit the code. The code edits are simple at least.

**Step 1.** Get a Java IDE, to make things easier. I use netbeans but eclipse is good as well.

**Step 2.** Download the source files, and create a new project. Put the files in the project, and make sure the packages are named correctly.

**Step 3.** Edit Updater.java with the path to your update files
Change
```
private static final String UPDATE_PATH = "";
```
**Step 4.** Create your list.txt and news.txt files
news.txt is simple, you can put anything in it..
```
this is my news file. It's displayed in the textbox while downloading updates.
```list.txt has to contain all of your update files. Its case sensitive.
```
Client.exe
GFX.zip
```
**Step 5.** Upload your update files along with news.txt and list.txt to your web directory.

**Step 6.** Build and distribute.

If you have any questions feel free to ask.

Zetta made an updater based off of this (a couple posts down), and I'm in the progress of rewriting mine to include some of it's awesome features.
Download his updater [Here](http://www.touchofdeathforums.com/smf/index.php?action=dlattach;topic=56101.0;attach=12461)
Link to comment
Share on other sites

Do it then… seriously.

It is a little rude. Make a progress bar update with the actual status when downloading files, even in vb 2008 its not that easy. That is one of the easy features I implemented. This can do all the same things as Marsh's updater + more.

All of these features could not possibly be coded in 15 lines in ANY language. Prove it.
Link to comment
Share on other sites

@Ice:

> I like it i was just saying it is easy i have integrated the 15 line code into my source edit and into my vb 2008 projects but i will not denie that it is something good i was trying to be polite about it.

You could do something **like this** in 15 lines.. It obviously wouldn't be as good. You couldn't do this in 15 lines in any language, it's just not possible.

Thanks for the kind words =) It was fun & interesting to make. I hope it serves a purpose to someone.
Link to comment
Share on other sites

I changed some things in the source and re-wrote practically the whole thing. But essentially, it is this auto-updater.

The main differences are that this version uses SE's core to handle a few of the operations. Also, it does not require recompilation since you specify the locations within the parameters. UI is also changed.

accepted parameters:
```
-updatepath %url%

```Specifies where to download the content

```
-newspath %url%

```Specifies where to download the news.

```
-listpath %url%

```Specifies where to download the list.

```
-launch %command%

```Specifies a command/application to run when the "Launch" button is pressed.

```
-versionpath %url%

```Specifies where to download the version number

```
-version %value%

```Specifies the current version.

An example in batch and shell form is attached as well as the source.

Edit:
I guess if you wanted to, you can use a jnlp file instead of the batch/shell file. However that would download to a temp folder.
Link to comment
Share on other sites

Great job, unknown. Thank you in the first place.
(Also, if you can make something better than a previous application with the same goal. Go for it. This is really good. :) )

Also great job, Zetta Monkey for his modification. Now it's even better (In my opinion) and easier to use. :)

I'm sure gonna use this with my game, and it will really comes in handy.

Adr990
Link to comment
Share on other sites

I didn't read the whole entire topic but I went through it quickly.

First thing : OF COURSE IT WORK ON WINDOW 7! lol Sorry, but people really need to know what Java can do. Java can basically work on any computer and OS as long as it have the VM(I think.. or Run Time something like that) installed on the computer. And I'm pretty all computer have it.

Second : I love this updater. Like seriously. It coded in Java so I don't have to say anything else but there is another thing special about Java in here. Solar Eclipse is coded in Java. This updater will be able to integrate into Solar Eclipse easily.

And to everyone that said they can code it in VB in 15 lines. Good luck. I'm sure you won't be able to make it work with Solar Eclipse. I guess you guys love the VB Eclipse(EE 2.7). =]

Sincerely,
Rithy
Link to comment
Share on other sites

That is impressive and very clean.. I like it a lot.

What is IOTools? heh. Definitely makes the code much nicer. That being said, I noticed you changed a few features to fit IOTools (like the progress indicator) which is fine it works great for your already written class.

I didn't know you could show text on the progress label, that's very cool. I'm going to work on a hybrid solution between our two projects, where everything is open source. Your code is definitely a lot cleaner, and I'm going to strive for that in v2\. I still think theres a few more features that should be added. I'm going to update the main post to include yours.

THIS is how great code gets developed!
Link to comment
Share on other sites

@Godlord:

> @[TE:
>
> > Captain evilbunnie link=topic=56101.msg594398#msg594398 date=1262417544]
> > Works on Linux, Great Job Unknown!!!!!
>
> Should work everywhere where JVM is supported.
>
> Regards,
>   Godlord.

Obvious statement was exceedingly obvious.
Should work on:
Linux 2.x, Solaris, Windows (98 to 7), FreeBSD, and Mac.

if jogl is used instead of swing, then it would work on Windows Mobile and Symbian also.

if awt is used instead of swing then it would work on Amiga
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...