Modding, Mission Design, and Coding > Cross-Platform Development

cfileextractor

(1/1)

taylor:
Added to CVS today was a cmdline VP extraction tool for Linux/OSX.  Working source was needed over the weekend and the only other available tool was binary only.  This is mostly work from Sunday and a good bit of cleanup today.  I had intended to work on this over the week and put in in CVS this weekend after it had matured a little bit more but I have other projects which deserve attention this week.  So, I decided to just go ahead and get what I have into CVS.

The basics are there, it will list files in an archive as well as extract them.

--- Code: ---[taylor@dragon fs2_open]$ ./cfileextractor --help
VP file extractor - version 0.01

Usage:  cfileextractor [-x | -l] [-L]

 Commands (only one at the time):
  -x | --extract        Extract all files into current directory.
  -l | --list           List all files in VP archive.
  -h | --help           Show this help text.

 Options:
  -L | --lowercase      Force all filenames to be lower case.

  (No command specified will list all files in the VP archive.)
--- End code ---

The VP filename must be specified last on the cmdline but the order of the other options isn't that strict.

All directories will automatically be made lower case but the -L option will set filenames to lower case as well.  Otherwise, filenames are the same as they were stored.  The -x option will extract all files into the current directory so please be aware of that.  There is no sorting of the file list so the output is only ordered by how it's stored.  To build just get a fresh CVS checkout and type "make cfileextractor" to build just cfileextractor or "make tools" to build all cmdline tools, including cfilearchiver, which makes VPs.

This hasn't received much testing so if there are any problems please report them.  When time allows to actually add the code it will also be able to extract individual files and have filter based extraction (ie. *.tga or data/maps/* to get only those types of files).  A GUI version will also probably show up at some point in the future.  For now it's not really Windows compatible but will be in the near future (doubt anyone cares though).

Navigation

[0] Message Index

Go to full version