to teem

Teem on Windows

teem

Using Teem:

On Windows all the teem libraries are built into one monolithic DLL and an import library that teem users can link against. The teem command-line utilities are also built together with these libraries.

You can download precompiled binaries with the compression encodings enabled or not. For both, you'll need to copy lib/teem.dll to somewhere within the Windows path, typically %SystemRoot%/system32. For the compression encodings, you'll need to copy the provided DLLs lib/zlib.dll and lib/libbz2.dll to the same directory in case you do not have them yet.

Note that the precompiled binaries are linked against the multithreaded DLL version of the Windows C runtime library MSVCRT.lib. This means that you have to link against the same library in your project by setting the appropriate compiler flag (/MD), which is unfortunately not the default setting in Visual Studio. Linking against a different version will result in unexpected crashes of your program.


Building Teem:

  1. Download the teem distribution
  2. Untar it.
    Throughout this and all other teem documentation, the directory just created will be referred to as "teem", even though it will actually be called "teem-1.XblahN" or something similar.
  3. Go into this directory.
  4. Go into the win32/make directory.

Visual Studio 6.0 users

  1. Go into the vc6 directory.
  2. Open the Visual Studio 6.0 workspace file teem.dsw.
  3. Select the configuration you want to build using the "Build" menu's "Set"%__bdest%" Active Configuration" item. You have four choices: Release, Debug, Release Compression, and Debug Compression.
  4. Select all projects by shift-clicking on them in the workspace file-view window.
  5. Right click on the selection and hit "Build" in the pop-up menu.

Visual Studio .NET users

  1. Go into the vc7 directory.
  2. Open the Visual Studio .NET solution file teem.sln.
  3. Select the configuration you want to build using the "Build" menu's "Configuration Manager" item. You have four choices: Release, Debug, Release + Compression, and Debug + Compression.
  4. In the solution explorer window right click on "Solution teem" and hit "Build Solution" in the pop-up menu.
The libraries and executables are compiled in the win32/lib and win32/bin subdirectories. By default these files and the public headers are copied into the bin, lib, and include subdirectories of the teem root directory during the build. Optionally, you can set the %TEEM_DEST% environment variable to customize the installation. Note that the installation script will create bin, lib, and include subdirectories in the directory %TEEM_DEST% is set to.

For example, if you want to install teem into c:\teem, open up the "System Properties" control panel, a.k.a. the "Control Panel System icon", click on the "Advanced" tab and select "Environment Variables...". Add the TEEM_DEST variable with value c:\teem and add c:\teem\lib to the Path environment variable.

Alternatively, you can set the %TEEM_INSTALL_SYSTEM% environment variable to 1 to tell the script to install teem in the Visual Studio directories, which are %SystemDrive%\Program Files\Microsoft Visual Studio\Vc98\{include,lib} for 6.0 and $(VCInstallDir)\PlatformSDK\{include,lib} for .NET, and to copy teem.dll to %SystemRoot%/system32.

You can also copy the DLL and the executables manually to a directory in the Windows path %PATH%. In this case, the import library teem.lib usually goes into one of the Visual Studio library directories, e.g. 'path to visual studio'\Vc98\lib. Likewise, the headers can be placed in one of the Visual Studio include directories.

To uninstall teem you have to delete the installed files manually. Note that the Visual Studio .NET project file provides an alternative to manual deinstallation. You simply have to build teem after running clean and stop the build after the pre-build script is executed. This script is run to make sure the installation targets are cleaned up before the build.

The compression options require the zlib and bzip2 libraries, which are available in source or precompiled Windows binary form at http://www.gzip.org/zlib/ and http://sources.redhat.com/bzip2/. These libraries must be available to the compiler, e.g. by copying the import libraries and headers to the Visual Studio library and include subdirectories, otherwise the build will fail.

No teem development is currently done on Windows. Using the Visual Studio files is simply the path-of-least-borg-resistance for distributing sources in a form that facilitates easy building on Windows.