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.


All times are GMT -5. The time now is 05:26 PM.

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