WotLK mirror

Monday, 25. August 2008 11:33 - daniel - Other - 0 Comments

I'm going to be away for the next 6 months, leaving me without internet access during the weekdays and sometimes on the weekends too. To keep my WotLK mirror up to date during this time, I created a collections of scripts to automatically download the patches and update the mirror site.

In order to do this, you have to know how Blizzard updates World of Warcraft. The analysis on Network Uptime helped me quite a bit here. Basically, the WoW Launcer checks a .txt file on the Blizzard server if there is a update available for the current version. If that's the case, it downloads a compressed archive containing the update downloader, a file with instructions and 2 more files.

The file is compressed with Blizzards mpq format and that's where my problems started. I tested the mpq-tools from babelize.org on my local box and everything was fine. But on the server (running Debian) I wasn't able to compile them. Using the latest revision from svn worked to compile the libmpq. But the mpq-tools failed while creating the configure script because there was a package missing. Anyway, thanks to the guys on #mpq-tools @ irc.freenode.net.

Well, after the downloader was extracted from the file it is pretty easy to get the .torrent file from it. I use the perl script from  Matt Francis for this.

Downloading the torrents is a bit more difficult. The rtorrent version in debian stable can watch a directory for new torrent files and start the automatically. But it can't move the files to a different location afterwards, nor show the download status. Downloading to the patch mirrors directory and making incomplete files available didn't sound like a good idea. Because of this I had to compile the latest version of rtorrent and libtorrent.

Well, all of this took quite some time, but now the mirror should stay up to date even without me :D.