Working on a new project, I need some Java help

Open discussion forum. For topics that do not fit anywhere else.
Post Reply
Poi
Grandmaster Poster
Posts: 298
Joined: Fri Apr 14, 2006 9:36 am

Working on a new project, I need some Java help

Post by Poi »

I'm hoping to find someone willing to help with a project of mine

I'm working on a program to automatically update files for uo, for example:
Server says its version is 2, client says its version is 1
client downloads files from server and replaces the ones in their uo directory with them

This is going to be for hues and map files so players won't need to download them on their own, just run this program and it will be kept up to date.

I have all of this done, it works very well, however I'm looking for someone to help me make it more "user friendly".

I'm fairly new to Java, and my problem is the script runs through the entire script before updating the gui, I need to find someone who is good enough and willing to make this so the gui is updating while the program is checking with the server and downloading files(Big files right now just make the program appear to be frozen until the download is done, then it updates the gui)

So if your interested in this let me know, I don't really want to release the source code to the public quite yet, I want to get a good looking and running version first, so shoot me a pm or reply here and we will go from there

This is a screenshot of the program so far:
Untitled.png
Poi
Grandmaster Poster
Posts: 298
Joined: Fri Apr 14, 2006 9:36 am

Re: Working on a new project, I need some Java help

Post by Poi »

Update:

I resolved the single thread issue, it now seems to run very smoothly, I'm not searching for input on what features people would like to see if they were to use this?

Capabilities:
Updating any files and file types directly to the UO directory

Possible future features:
Let uses choose what files type to allow to download(for user security).

Current features:
Users choose where their uo directory is(Or if they feel unsafe, they can choose any directory and move the files themselves afterwords)
Connects to any website and downloads files just the same as the user would manually.
Setting server version and what files to download couldn't be simpler
Untitled.png
So, please give me input on what else to implement!
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Re: Working on a new project, I need some Java help

Post by Yukiko »

I like this idea.

File types I would want it to handle include *.mul, *.idx and *.def. You would probably want to include cliloc.* files and any other multi-language files, Professn.* for example. I'm not familiar with the *.uop files or if POL can use those but if so you probably want to include those as well. Shards that include custom music would probably like the inclusion of *.mp3 file types. Ofcourse *.mp3 files would have to be saved in the music directory. It probably wouldn't hurt to include *.txt, *.rtf, *.doc and the open document file type as well. I can't remember the extension for open document files. I suppose you wouldn't want to leave out common archive file types.

Would it be easier to just have the updater read the various file types from a configuration file provided by each shard? The filespecs could be specific files or filespecs with wild cards. For example freds_decrypted_client.exe, map*.mul or *.def.
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: Working on a new project, I need some Java help

Post by RusseL »

it must be a great tool.
i think it must be configured with conf file which file type could be updated.
for example sometimes i must update client, some injection dll's and configs...
Poi
Grandmaster Poster
Posts: 298
Joined: Fri Apr 14, 2006 9:36 am

Re: Working on a new project, I need some Java help

Post by Poi »

I like the config file idea, that would be a really great addition.

A few new features I added:
-You can start Razor or AssistUO after updating is finished
-I made it so users can choose what file types(extensions) they want to allow to download


When I get home later ill start work on the config file if I can figure xml out haha.

edit: And just to clarify, I want the users to be able to choose which file extensions to allow, not the server owners(for added security, you never know when a shard owner might get angry and try to mess everything up =/)


..Hmm maybe an option for automatic file backups of old files before the new ones are put in place?
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: Working on a new project, I need some Java help

Post by RusseL »

Poi wrote: edit: And just to clarify, I want the users to be able to choose which file extensions to allow, not the server owners(for added security, you never know when a shard owner might get angry and try to mess everything up =/)
bad idea, i can't explain to my players how to use a Razor... so... configuring file extensions is impossible job for them :D
Poi
Grandmaster Poster
Posts: 298
Joined: Fri Apr 14, 2006 9:36 am

Re: Working on a new project, I need some Java help

Post by Poi »

Well I started work on the config file, you will be able to set the file extensions from the config file, but if the users still want to edit them, they can. Meaning for most users they will just use the config file, more advanced users can change them. If someone messes something up just tell them to re download the config file :)
Poi
Grandmaster Poster
Posts: 298
Joined: Fri Apr 14, 2006 9:36 am

Re: Working on a new project, I need some Java help

Post by Poi »

UPDATE:

Finished the config system, allows users to override their settings by selecting a config file(distributed by shards), and return to default.

The config file allows the option of disabling razor or assistuo all together so users can't use the open to auto start it.

If any of you want to help me test, please send me a pm so we can get started!
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: Working on a new project, I need some Java help

Post by RusseL »

and what is on the server side? how it works there? linux support?
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Re: Working on a new project, I need some Java help

Post by Yukiko »

Poi, I assume it is using ftp, ftps, http or https type requests to get the files, right? In other words there won't be any server side code necessary? If so how will it be able to determine if an update is required?

Could it be made to query the POL webserver somehow to check if updates are available? Aux services would be preferable to using the built-in webserver I assume. Maybe that would be an option you could add later once you get the initial bugs worked out.

Since it's in Java the client should run on Linux and Windows I presume.
Poi
Grandmaster Poster
Posts: 298
Joined: Fri Apr 14, 2006 9:36 am

Re: Working on a new project, I need some Java help

Post by Poi »

I'm not 100% sure if it will run on linux because I use registry entries, and It wouldn't be able to run razor/auo from linux.

It checks versions with any webserver, right now I'm using PHP because I'm familiar with it, but it could be done with basic text files or html files, so in theory the pol server should work fine, but to use that ill have to enable an option to choose the port, right now it runs on 80.
This is essentially what happens:
Webserver:
home dir/UOAU/:
update.php -> updater checks version against this version
if update(5) > client(1)

client + 1(2)
check UOAU/verions/2/info.php -> this file sends back a list of files
for each file in the list download it from UOAU/versions/2/files/file_name recieved from server

After its done updating to two, it starts updating from 3, so on and so forth until its at the same version as the server
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: Working on a new project, I need some Java help

Post by RusseL »

first of all - it must backup updated file, then download a new file and check if it was downloaded correctly (md5 or something else), then replace our target file (if that wasn't a completely new file)

then 2nd thing:
it'll be better if you use localization files (utf-8), so we can translate your software for our countries... it's not so difficult in java :)
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Re: Working on a new project, I need some Java help

Post by Yukiko »

You could add a port option to the config file. I assume that's where the developer or user will enter the web address of the website to query.
Poi
Grandmaster Poster
Posts: 298
Joined: Fri Apr 14, 2006 9:36 am

Re: Working on a new project, I need some Java help

Post by Poi »

Russel: I have no interest in doing separate language files, however I am willing to add languages built in, if you would be so willing to tell me what language you are interested in and translate the following for me:

1 Attempting to launch
2 Failed to launch
3 launched
4 Checking for updates
5 Failed to load config file
6 You client files are up to date with the server
7 Server version
8 Client version
9 There are a total of
10 files to update to version
11 Downloading file
12 downloaded
13 Skipping file
14 because it is not on your allowed list
15 Couldn't download file for update.
16 Updating finished.
17 Updating failed, please try again.
18 There was an error downloading



Yukiko: I have checked and confirmed that all you need to do to customize a port is change the address from http://yoursite.com to http://yoursite.com:80, or whatever port you want
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: Working on a new project, I need some Java help

Post by RusseL »

Poi wrote:Russel: I have no interest in doing separate language files
no, i mean you can just create 1 lang file in english, so everyone can edit it, without digging in sources
Poi
Grandmaster Poster
Posts: 298
Joined: Fri Apr 14, 2006 9:36 am

Re: Working on a new project, I need some Java help

Post by Poi »

RusseL wrote:
Poi wrote:Russel: I have no interest in doing separate language files
no, i mean you can just create 1 lang file in english, so everyone can edit it, without digging in sources

Yes, however I am trying to keep this as a single file application
Post Reply