Desktop Integration

Work goes on very well. After improving the newly written trigger editor module loading trigger data and strings became really annoying when testing the latest version.

Of course I just could have written some command line arguments or automatic scripts but since selecting valid sources like MPQ archives or simple directories is a major part of the editor module it had to be checked why it still was not working.

The concept itself is to provide a list of sources (directories/archives) with specific priorities for a module or the World Editor. Whenever a file has to be loaded like “UI/TriggerData.txt” it goes through all source entries (ordered by their priority) and appends the path to the directory or archive path to load the file. This should be the same way Warcraft III does it when loading any data from the MPQ archive. For example, the War3Patch.mpq archive should always have the highest priority because it contains the latest valid files.

Unfortunately, neither saving the sources list nor reading from MPQ files via KDE slaves did work until then.

Initial attempts implementing a KIO slave failed when I tried to derive from KArchive since it doesn’t seem to exist for any plugin extension. Finally, I decided to use “SMPQ”‘s example, a great tool which does exactly the same my own slave should do except it uses StormLib’s API. Thanks to the authors work I did not have to spend much time in becoming familiar with KIO slaves or implementing some parsing functions ;).

So this is the latest work’s result:


The file manager dolphin using my own “mpq” protocol slave which itself uses wc3lib’s MPQ API to load all files. As you can see some directory entries exist two times. That’s because actually they’re case insensitive (defined by the hash algorithm of MPQ) but (listfile) contains different cases. By now I’ve fixed that. The invalid date occurs because now “(attributes)” file could have been loaded which would contain the time stamps which is optional for MPQ.

There’s one other great thing about desktop integration in wc3lib:


The Qt image plugin qblp has been out there for a while but I finally fixed some bugs AND wrote a “.desktop” file which allows you to use BLP images as normal image files in KDE.

For Gentoo Linux you could use my custom ebuilds to install wc3lib.


For the future I try to write more Unit Tests and improve the debugging process to get things more usable since I used much time for API revisions and core implementations in the past.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: