Page 1 of 1

BZFlag Portable App?

Posted: Mon Mar 03, 2008 10:07 pm
by Booch
No, I'm not referring to code portability, but rather the ability to run BZflag from a flash drive such that it is a "portable app" that can be run from any computer you plug your flash drive into. The idea is that everything you need is on the flash drive and that no "footprint" is left on the host computer whatsoever. I'm actually already doing this with my 8Gb flash drive and the menu suite from, but it's not exactly a "clean" solution.

Currently, the only way to kick off BZFlag on Windows without it using the "My BZFlag Files" directory on the local computer is to use the "-config config.file", "-configdir config.dir" and "-dir data.dir" command line options. The first problem with this is that the PortableApps menu suite doesn't support passing command line switches (currently). So, as a work around, I made a basic exe launcher that invokes BZFlag with the correct parameters to look for its config and data directories on the flash drive. The second problem is that even with this workaround, BZFlag still puts its cache files in "My BZFlag Files" on the local hard disk. There doesn't seem to be any way to overide this location.

What I'd like to suggest is to have the option of putting a properties file in the same directory as the bzflag.exe that would tell the exe where to find its config, data AND cache directories (and perhaps the ability to completely disable caching). This would allow the app to be fully "portable" and leave no trace on the local computer after exit. Seems like it would be an easy fix and would be a great addition to the growing number of flash based portable apps out there.

What say ye?

Posted: Tue Mar 04, 2008 3:16 am
by blast
The -config and -configdir paramaters are a bit buggy. I was trying to do something like this as well, and found that I had to include the trailing / at the end, and that I could not use spaces in the path. I still don't think I ever got it working right... it wouldn't use or save the config file on the USB drive.

Your best bet would be to compile your own BZFlag and hard-code in relative paths for those files/directories.