February 28, 2003

My apologies to anybody who downloaded the Blog 7.1 build before my announcement on this blog yesterday. About an hour after my announcement, I learnt from a user that the archive table of content generation code had a bug in the build I had put up. I had originally worked on that code to fix the very first entry range not showing up in the archive table of contents and got it working fine but then had decided to optimize the code so that I could drop a few extra lines and maybe save a few CPU cycles … and didn’t test it after that :p Turns out that I forgot to use NOT where it was supposed to be used and the whole archive table of contents generation loop was being bypassed and you ended up with a blank archive TOC. I fixed that yesterday within an hour of learning of the problem and uploaded a new build which incidentally also contains the new ActionBar based menu system with the Windows XP look – let me know what you think about it as well as if it works for all of you under all flavours of Windows.

Once I got that quick fix behind me, I began looking into the whole auto-update thing. I was first thinking of using an existing component but out of all the components that I looked at, I liked only a few and my final choices were a freeware component and a shareware one. I liked the Pro version of the shareware one since it supported updating multiple files as opposed to the single file update approach taken by the freeware one and the non-Pro version of the shareware component. Since I am also thinking of splitting the Blog code into an executable and several DLLs (both to make the auto-updating easier and to make code management easier), neither of the components (except for the Pro version for which I’d have had to pay) was going to work for me. So I decided to write my own :p

I’ve been working on that code most of yesterday evening. I got the basic structure in place and the code to access a given URL, read an info file and then either redirect to a different location (in case the download needs to be moved …) or get the latest build info from the file and give the user the option to update. Since this requires quite a bit of UI prompting, my first idea was to build in the UI stuff into the component but then I realized that would: a) add to the final component size b) not allow the end-user to customize the UI the way s/he wants. So I’m doing the whole thing on an event based architecture. There are a ton of events for everything you can think of and then the user can handle the events to display information such as a list of changes as well as the files to be downloaded etc.

At the moment, the component still supports only one file to be downloaded but I intend to extend it to support multiple files once I get the basic code working. I also want to add support for both optional and mandatory downloads so that the user can select whether s/he wants to download the optional components or not. Of course, that too is in the future since I still haven’t even settled on the update info file format except for a fairly nebulous idea as to the general structure. This probably will take me a few days to get working correctly and once I get that done, I guess I can go back to Blog and look into either merging in BlogMan or splitting up the code into an executable and DLL before doing the merging in.

Tags:
Posted by Fahim at 6:38 am  |  12 Comments