-----      bfs2pack by Karok, release 1.5    -----
-----  "smart mode" with template by GulBroz -----

- GUI Mode -

-- Unpacks new bfs archives from flatout2 --

1. copy the content of this archive to some directory
2. start bfs2pack_gui.exe
3. drag and drop any bfs archive onto the bfs2pack window
4. choose a directory, where extracted files should be placed

-- Packs files into an bfs archive --

1. copy the content of this archive to some directory
2. start bfs2pack_gui.exe
3. drag and drop a directory onto the bfs2pack window (should contain the same structure like the flatout2-data-dir)
4. choose a filename (.bfs is added automatically)

5. edit file: filesystem, change it, so it looks like:
fo2a.bfs
fo2b.bfs
fo2c.bfs
<YOURNEWBFSHERE>.bfs
6. Notice: There MUST NOT be an empty last line!
7. Start flatout2, have fun!

- Console Mode -

* Use bfs2pack_con.exe --help for some help. It basically works like any other
  archiver program (zip, tar, ...).

* You can now add file filters after bfs name when extracting, only files that
  match the filter(s) will be extracted (works also when listing bfs content)
  Syntax for this is:
     bfs2pack_smart_con.exe <x|l> [options] <foobar.bfs> [files...]

  <files> can have joker chararcters, using a pseudo-MSDOS syntax:
      "*" => Any number of characters (or none)
      "?" => One character
  Filters MUST match a whole file name in bfs, as there is no directory in bfs
  (only files), you must add "/*" at the end of a dir. name you want to extract:
        bfs2pack_smart_con.exe x fo2a.bfs data/tracks/*
  will extract all data/tracks/ content from bfs, but if you put only
  "data/tracks" or "data/tracks/", nothing will be extracted as it does
  not match any file name in bfs

-- Note --

* Every file is overwritten, WITHOUT any remark! 

* "Smart mode": the program now reads a template file (bfs2pack.ini in same
  directory as executable by default) to learn what to compress and what to
  store in bfs files.

* If the GUI version cannot load the template file, then it behaves as previous
  version (ask for global compress/no compress)

* To create a template file from bfs, you can use the console version, and list
  the content of the bfs in verbose mode, providing the name of a template file
       bfs2pack_con.exe l patch1.bfs -v -t patch1.ini

----- History -----
07-06-24: V1.5 - GulBroz -
  - fixed console: erroneous "crc error" messages when extracting stored file
  - added extraction file filters in console mode (no need to extract all files
    from bfs when you wants only a subset)

07-06-23: V1.4 - GulBroz -
  - fixed smart mode when root directory is not "data"
  - fixed GUI: last read directory was locked by program when packing bfs

07-03-01: V1.3 - GulBroz -
  - added "smart mode"
  - zlib1.dll is not needed anymore

06-09-08: V1.2
  - added console application

06-09-01:
  - http://sourceforge.net/projects/bfs2pack
  - small fixes

06-08-31:
  - included gfx by jelbo (www.flatoutjoint.com)
  - bugfixes

06-08-21:
  - new gui, with drag and drop support
  - packing original fo2a-data dir into a new bfs archive using the secure mode, creates a compatible archive!

06-08-19:
  - finally found the correct filename hashing algorithm (thx Pavcules)
  - now packing files with new filenames WORKS

06-08-16:
  - fixed some serious bugs (0 byte files and several problems with encrypting filenames)
  - extracted filename list to lua script (look at filenames.lua)
  - included two mods (fullroam and instantaction) to show usage and to prove functionality

06-07-18:
  - some fixes

06-07-17:
  - 3rd release
  - unpacking checks checksum (crc32)
  - packing, first test ;-)
  
06-07-13:
  - 2nd public release, now its c++
  
06-07-11:
  - 1. public release

----- Contact me -----

icq: #111595069

