PREREQUISITES

1. Visual Studio 2005.  The free Express Edition will do, but you'll have to
install Platform SDK.  The instructions for integrating the Platform SDK
into Visual Studio 2005 Express Edition can be found here:
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
Note: you can avoid downloading hundreds of megs of PSDK if you do
a custom install and unselect everything except:
Microsoft Windows Core SDK -> Build Environment -> Build Environment (x86 32-bit)

2. CMake >= 2.4.7        http://www.cmake.org/

3. NSIS >= 2.0.6         http://nsis.sourceforge.net/  

3. wxWidgets >= 2.8.0    http://wxwidgets.org/
Download the zip version, not the installer.

4. ACE >= 5.5            http://www.cs.wustl.edu/~schmidt/ACE.html

5. libsigc++ 2.0.x       ftp://ftp.gnome.org/pub/gnome/sources/libsigc++/2.0

6. zlib (any version)    http://www.zlib.net/


INSTRUCTIONS

1. Install CMake and NSIS.  I assume you already have Visual Studio installed.

2. Create a build directory so that there are no spaces in its path.
Example: C:\builddir

3. Unpack wxWidgets, ACE, libsigc++ and zlib to this directory.
Unpack BFilter's sources there as well.
You should get a directory structure like that:
C:\builddir
  | ACE_wrappers
  | bfilter-1.1.1
  | libsigc++-2.0.17
  | wxMSW-2.8.4
  | zlib-1.2.3

Now create two additional subdirectories: bfilter-build and bfilter-deps-build.

4. Launch CMake and specify the following:
Source directory: C:\builddir\bfilter-1.1.1\packaging\windows\build_deps
Binary directory: C:\builddir\bfilter-deps-build

Click "Configure".  Select build tool "Visual Studio 8".
If any directories were not found, enter them manually, then click
"Configure" again.  If everything went as it should, "OK" button will
become clickable.  Click it.

5. Launch Visual Studio and open C:\builddir\bfilter-deps-build\deps.sln
Select the correct build type (I use MinSizeRel for releases) and click
Build -> Build Solution

6. Now you may delete the "bfilter-deps-build" directory as it's no longer
necessary.

7. Launch CMake and specify the following:
Source directory: C:\builddir\bfilter-1.1.1\
Binary directory: C:\builddir\bfilter-build

Click "Configure".  Select build tool "Visual Studio 8".
At this point you may specify a path to upx.exe, if you want
to compress BFilter's executable.
If any directories were not found, enter them manually, then click
"Configure" again.  If everything went as it should, "OK" button will
become clickable.  Click it.

8. Launch Visual Studio and open C:\builddir\bfilter-build\bfilter.sln
Select the correct build type (I use MinSizeRel for releases) and click
Build -> Build Solution

When the build completes, you should have an installer created in
C:\builddir\bfilter-build

To build a Win9x version, restart with step 7 and set WIN9x_COMPATIBILITY
to ON.  Proceed through the rest of step 7 to step 8, where you should
use Build -> Rebuild Solution.