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
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.?
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.
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.
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.
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.
Putting the eq2map folder in the Default folder... an interesting concept.
__________________ If it ain't broke, it needs more features!
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....
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.
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.
__________________ If it ain't broke, it needs more features!
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:
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.
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?
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.
here is what it looks like now, thanks for making that logo and button.
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?
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.
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.
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.