« || »

Using the Quake Injector with locally stored screenshots

We can already use a local “database” and zip files. What’s left for a real offline mode? Right, the screenshots. That looked like a good small task for me, so I forked it and went for a dive into the source code.

The screenshot is displayed in a PackageDetailPanel. The URL was hardcoded in PackageDetailPanel.java. Configuration values are handled in Configuration.java. The PackageDetailPanel is created in QuakeInjector.java.

I wanted to make a more detailed write-up about this but now I already forgot a lot of the process’ trail’n'error so I just added a few comments to my commit diff view.

The first working build was easy but then megaman noted that my setup was re-reading the config file on each new map selection. I had simply created a Configuration object before the URL construction in PackageDetailPanel.java. Hey, it worked! :-)

A huge headache was that the PackageDetailPanel was created before the configuration had been read. This was done with a method way outside my capatibilities.

A logical next step would be to add fields in the “Engine Configuration” dialog in the Injector to let the user easily set RepositoryDatabasePath and ScreenshotRepositoryPath. Maybe a task for YOU? Or how about making it cache the screenshots locally, much like the zip files? megaman is ready for your questions and feedback. I am not that knowledgeable about programming so you better don’t ask me for help.

Wrapping up: You can use this to point the Injector to a local mirror of the screenshots (which you have to download yourself). You can checkout and compile my fork to get a fully offline-capable Injector. Be aware that the repository includes a partially working implementation of caching the database locally and other new bugsthings.

24.01.2011 in Quake Injector | 1 Comment »

One Response to “Using the Quake Injector with locally stored screenshots”

  1. How to make the Quake Injector partially work offline Says:
    01.02.2011 20:37

    [...] Tronyn reviews: RemakeQuake SP Demo2 by Remake Quake Team || Using the Quake Injector with locally stored screenshots [...]

Leave a Reply