EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   EQ2MAP (https://www.eq2interface.com/forums/forumdisplay.php?f=34)
-   -   Progress on Auto Updater (https://www.eq2interface.com/forums/showthread.php?t=1631)

taco-man 02-26-2005 01:54 AM

Progress on Auto Updater
 
As some of you may know i am working on writing a visual basic .net program that downloads the newest versions of the map mod automaticly. I wasnt sure if i could do it or not, but apparently i can. i have gotten past everything i wasnt sure i could do, so i hope to have it finished by next week, however i cant promise that because of school and me possibly getting another job :)

Newest Image:

Quib 02-26-2005 02:21 AM

If you'd like any help debugging (mostly making sure it works properly on any machine and has consistent results), that's my specialty. Although most of my experience is with C++, C# and Delphi, I've worked with VB.

Also, your source code is obviously your own; if you don't want anyone to see it, that's cool.

I don't have any way of compiling VB code at the moment, but I'm sure I could spot problems (if any) by reading over the code a couple times in a text editor.

I'm really really excited about this. I've got the XML (I'm pretty sure) 100% ready to accept the stuff generated by the EQ2MAP website.

Also, can you spare some details on how this'll work? What directory the user will run the updater from, etc.?

Quib

taco-man 02-26-2005 02:30 AM

here is my plan:
at first it will be run in your custom ui folder (where you want the xml files)

eventually i was hoping to have it run in your eq2 directory and make it read your eq2.ini file and just put the files into whatever directory the eq2.ini file is set up to, and if eq2.ini doesnt exist create it and make a folder for the custom ui directory in the eq2.ini file that it made. depending on how hard this is and how important people think this is will determine when i do this, if i do this.

the way it works is it goes to the webserver, downloads an xml file with all the file names of the maps and their md5 checksums, and then generates md5 checksums for all the files in your custom ui folder that you have that are in the file list. if the checksums dont match or the file does not exist, it downloads that file. It sounds simple but it took me a long time because i dont have much experience with vb .net.

Quib 02-26-2005 02:44 AM

Quote:

Originally Posted by taco-man
here is my plan:
at first it will be run in your custom ui folder (where you want the xml files)

eventually i was hoping to have it run in your eq2 directory and make it read your eq2.ini file and just put the files into whatever directory the eq2.ini file is set up to, and if eq2.ini doesnt exist create it and make a folder for the custom ui directory in the eq2.ini file that it made. depending on how hard this is and how important people think this is will determine when i do this, if i do this.

the way it works is it goes to the webserver, downloads an xml file with all the file names of the maps and their md5 checksums, and then generates md5 checksums for all the files in your custom ui folder that you have that are in the file list. if the checksums dont match or the file does not exist, it downloads that file. It sounds simple but it took me a long time because i dont have much experience with vb .net.

Awesome, and it sounds like you've covered all the bases on functionality. Personally, I'd suggest staying with running it from their custom UI folder; eventually SOE will fix /loadui and we won't use eq2.ini anymore and some people will have a custom UI folder per character. It'll be a little wasteful, but they'd have a copy of the auto-updater in each of their custom UI folders...
or maybe we can move the eq2map folder to the default UI folder so it's consistent regardless of custom UI folder.

Your thoughts?

Quib

taco-man 02-26-2005 03:13 AM

sounds good to me :) i always like less work

by the way, you dont happen to know how to check if a file exists or not on a webserver do you? i tried using IO.File.Exists(url) but it didnt work, which is not suprising.

Deathbane27 02-26-2005 03:29 AM

As a user, I'd prefer to have one program copy that checks eq2.ini, and gives a prompt asking if the target folder is correct, with an option to change it. If you get bored. :p

Putting the eq2map folder in the Default folder... an interesting concept.

taco-man 02-26-2005 03:46 AM

if i get bored i will do that, first i have to "get done" with the updater. :P

Eloa 02-26-2005 09:57 AM

Could we put the eq2map folder in its own folder?

I mean as it sits now there can only be one custom UI loaded correct? So if someone wanted another one....Wait...maybe I dont follow...confusing myself...I'm done....

Killarny 02-26-2005 03:01 PM

Quote:

Originally Posted by taco-man
sounds good to me :) i always like less work

by the way, you dont happen to know how to check if a file exists or not on a webserver do you? i tried using IO.File.Exists(url) but it didnt work, which is not suprising.

If VB can easily parse HTML, you could check for a 404 ... I imagine you'd end up writing a text parsing routine for this, as I doubt VB comes with HTML classes. But, it should be fairly easy to check for a standard 404 result.

Deathbane27 02-26-2005 04:27 PM

Quote:

Originally Posted by Killarny
If VB can easily parse HTML, you could check for a 404 ... I imagine you'd end up writing a text parsing routine for this, as I doubt VB comes with HTML classes. But, it should be fairly easy to check for a standard 404 result.

Or at least the one specific to maps.eq2interface.com. :D

taco-man 02-26-2005 05:08 PM

1 Attachment(s)
i figured out how to do waht i was stuck on, its so simple, i just can't work very well when i'm real tired (and believe me i was REALLY tired, yesterday after i got home from school i worked on the updater thing for about 10 hours)
Code:

        Try
            Ds.ReadXml("http://maps.eq2interface.com/POI_files/file_list.xml")
        Catch ex As Exception
            'show message box with error connecting, and the error on the next line
            MessageBox.Show("Error Connecting to EQ2MAP Update Server:" & vbCrLf & ex.Message)
            'then exit sub because the dataset is empty so i cant do anything to it
            Exit Sub
        End Try

For anyone who is interested here is about what the updater is going to look like:

Drumstix42 02-26-2005 06:38 PM

Nice job :cool:

taco-man 02-26-2005 07:42 PM

thanks, we will just have to wait and see how it works though first.
I used threading for the downloading so that it should go fast, i think the longest part will be generating the md5 checksums for all the files on the clients machine. no promises but i wouldn't be suprised if this is done tomorrow or monday.

Dolby 02-26-2005 07:56 PM

2 Attachment(s)
I dont know if you can load graphics but here is a logo and button you could use in the patcher...

Quib 02-26-2005 07:58 PM

It's been a while since I played with MD5 and it was always for really really huge files. There's currently 58 icon page XML files (well, that's how many I have, the website will eventually match then surpass that number). Average size is 4KB, with the largest being 13KB. How long does it take to generate MD5s for such small files?

Quib

taco-man 02-26-2005 08:11 PM

Quote:

Originally Posted by Quib
It's been a while since I played with MD5 and it was always for really really huge files. There's currently 58 icon page XML files (well, that's how many I have, the website will eventually match then surpass that number). Average size is 4KB, with the largest being 13KB. How long does it take to generate MD5s for such small files?

Quib

oh dont worry, its not gonna be too long, just not instant.

taco-man 02-26-2005 08:11 PM

Quote:

Originally Posted by Dolby
I dont know if you can load graphics but here is a logo and button you could use in the patcher...

thanks i will use those!

taco-man 02-26-2005 09:16 PM

1 Attachment(s)
here is what it looks like now, thanks for making that logo and button. :D
hey dolby, any chance of getting the psd for the button that says interface author, i was thinking it would look good as the text box?

Humudce 02-26-2005 09:47 PM

Hey it looks good... :) I like the Logo and Button :)

Eloa 02-26-2005 10:49 PM

Its pretty! And thanks Dolby for the images!

taco-man 02-26-2005 11:21 PM

quib, can you outline how the directory stucture is going to be an where the files should be going. Example should some files be going in customui/
or should they be going in customui/eqmap/

hopefully that makes sense. where customui is whatever the name of your custom ui folder is.

Dolby 02-26-2005 11:37 PM

2 Attachment(s)
Something like this?

Quib 02-26-2005 11:51 PM

This is our last chance to decide on structure.

Right now, it's slated to be customui\eq2map for all the icons_*.xml files. Only eq2ui_mainhud_map.xml is in the customui folder, all other XML files related to EQ2MAP are in customui\eq2map.

We COULD put all map files in Default\eq2map so there'd only be 1 place needing updates, but I'd prefer we not touch the Default folder since, well, it's default.

Anyone else have an opinion about this? When we can one-day have 1 UI per character (I personally won't, but I know a lot of people will) they'd have to patch EQ2MAP for each one of their custom UI folders if we did it the first way. The second way would prevent that, but would make the install way more complicated for those users not particularly UI savvy.

Quib

taco-man 02-26-2005 11:53 PM

Quote:

Originally Posted by Dolby
Something like this?

yea something like that :)

taco-man 02-27-2005 12:31 AM

Quote:

Originally Posted by Quib
It's been a while since I played with MD5 and it was always for really really huge files. There's currently 58 icon page XML files (well, that's how many I have, the website will eventually match then surpass that number). Average size is 4KB, with the largest being 13KB. How long does it take to generate MD5s for such small files?

Quib

this will definately not be a problem, even when it just checked 34 different files it was still basicly instant.

causas 02-27-2005 12:39 AM

Quote:

Originally Posted by taco-man
sounds good to me :) i always like less work

by the way, you dont happen to know how to check if a file exists or not on a webserver do you? i tried using IO.File.Exists(url) but it didnt work, which is not suprising.

I am not sure if .NET would support this, but if it does use an xmlhttp request(this was done in JavaScript):

Quote:

xmlhttp.open("HEAD", "URL_TO_CHECK",true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) {
if (xmlhttp.status==200) alert("URL Exists!")
else if (xmlhttp.status==404) alert("URL doesn't exist!")
else alert("Status is "+xmlhttp.status)
}
}
xmlhttp.send(null)
more information can be found here: http://jibbering.com/2002/4/httprequest.html

Humudce 02-27-2005 12:53 AM

Can the Autoupdater be controled by a user customizable INI file. So if the person put the map mod into their own custom folder, they can edit the INI file for the Locatoin of the Maps folder.

taco-man 02-27-2005 01:50 AM

Quote:

Originally Posted by Humudce
Can the Autoupdater be controled by a user customizable INI file. So if the person put the map mod into their own custom folder, they can edit the INI file for the Locatoin of the Maps folder.

the updater is run from wherever your custom directory is so that the files will always be in the right place. and then once it finishes downloading it launches EQ2.exe from 2 directory levels lower.

taco-man 02-27-2005 01:55 AM

1 Attachment(s)
More updates, i couldnt get it to look exactly how i wanted because visual studio doesnt let you change the style of the scrollbar, and for some reason text boxes can't have a background image (but of course almost everything else can, like labels, buttons, ect.) :mad: so it just made a frame to go around the text box and set the text box's background to a better color.

Quib 02-27-2005 02:30 AM

Quote:

Originally Posted by taco-man
More updates, i couldnt get it to look exactly how i wanted because visual studio doesnt let you change...

Still, it's SO beautiful. I might suggest moving the main EQ2MAP logo down about 7 or 8 pixels so there's the same space from elft edge to logo as there is from top to logo and so the space between the logo and progress bar is about the same distance as from progress bar to the "New or Updated Zones" label; but that's just me nitpicking.

I rethought it over, and how you have it set up now is probably best. Throw it in custom UI folder, it downloads stuff to an eq2map subfolder, launches EQ2 sounds perfect.

Quib

taco-man 02-27-2005 03:02 AM

1 Attachment(s)
Is that better? :)
I also added the border thing around the scrollbar and it makes the scrollbar look like it actually belongs there :eek:


Quib 02-27-2005 03:31 AM

1 Attachment(s)
I think that looks much nicer (the scrollbar change). Don't hurt me, but I found a graphical oddity; circled it really clearly.

Quib

Humudce 02-27-2005 04:25 AM

Looks awesome, and eliminates the need for any INI modificaiton putting it in the users Custom Mod folder. This is going to be awesome. :)

Eloa 02-27-2005 11:26 AM

We could use probably a controlled release to test it. Taco, post it on the website and just use a username check to view the page if you'd like.

Eloa 02-27-2005 11:42 AM

hehe, I just thought of a (probably bad) idea for the updator.

OnUpdateClick
if user has submitted a POI in the last 15 days.
>Download new POI files.
else
>Delete all POI files and send them to the submit page.


lol, just a thought

Kosmos 02-27-2005 11:45 AM

Very Very impressive!

Howcome 02-27-2005 11:51 AM

When will this be available for download?
 
This looks great!

When will this be available for download?

Eloa 02-27-2005 12:28 PM

When it gets finished, tested, and proved to work.
Should be within a week.

taco-man 02-27-2005 01:26 PM

eloa/quib, right now it only downloads the map icon files, should it be downloading anything else liek a eq2ui_mainhud_map.xml file or will that be seperate so that people can change it?

Killarny 02-27-2005 01:39 PM

This tool looks great taco-man! The only suggestion I have right now is perhaps a checkbox to disable launching EQ2. I personally prefer to launch via the launchpad, and some people (such as us involved with the mod) might be updating quite a bit, without actually wanting to go play EQ2 right then.


All times are GMT -5. The time now is 03:04 AM.

vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI