                Last Updated: 18 October 2016

This file describes how to build TSK using Visual Studio 2015 (see
README_win32.txt for instructions on building the win32 libraries and
executables from Linux). 


Installing Visual Studio

If you do not have a copy of Visual Studio, you can use the free
Community Edition:

    http://www.microsoft.com/express/vc/

When installing it, choose to do a custom installation to ensure
that Visual C++ is added.  You will also need to choose support to make
XP executables. 


Building

There are four build targets: 
    - Debug_NoLibs and Release_NoLibs do not depend on any third-party libraries. 
    - Debug and Release depend on libewf, libvmdk, libvhdi, and zlib to be built so that E01 images as well as VMDK and VHD virtual machine formats are supported. 


Note: The following instructions are for 64 bit versions to TSK only.

------------------------------------------------------------------------
Debug and Release Targets


The steps below outline the process required to compile the Debug and
Release targets.

1) Download libewf from https://github.com/sleuthkit/libewf_64bit. This repository contains a version of libewf updated by us to build a 64 bit library. 
For 32 bit and bleeding edge versions see the official releases at: https://github.com/libyal/libewf

2) Open archive file and follow the README instructions in libewf to
build libewf_dll (at the time of this writing, that includes downloading the zlib dll). Note that TSK will use only the Release version of libewf_dll. Later steps also depend on the zlib dll being built inside of libewf.

3) Set the LIBEWF_HOME environment variable to point to the libewf folder that you created and built in step 2.

4) Download libvhdi from https://github.com/sleuthkit/libvhdi_64bit. This repository contains a version of libvhdi updated by us to build a 64 bit library.
For 32 bit and bleeding edge versions see the official releases at: https://github.com/libyal/libvhdi

Open the solution file and build the libvhdi project.

5) Set the LIBVHDI_HOME environment variable to point to the libvhdi folder that you created and built in step 4. 

The LIBVHDI_HOME environment variable should look something like this: C:\cygwin64\home\user_name\libvhdi_64bit

6) Download libvmdk from https://github.com/sleuthkit/libvmdk_64bit. This repository contains a version of libvmdk updated by us to build a 64 bit library.
For 32 bit and bleeding edge versions see the official releases at: https://github.com/libyal/libvhdi

At the time of writing this, libvmdk requires zlib source code in order to build the Visual Studio project. Our upgraded version includes the zlib source code.

7) Set the LIBVMDK_HOME environment variable to point to the libvmdk folder that you created and built in step 6. 

The LIBVMDK_HOME environment variable should look something like this: C:\cygwin64\home\user_name\libvmdk_64bit\libvmdk

8) Download OpenSSL from https://slproweb.com/products/Win32OpenSSL.html and install.  Set the OPENSSL_HOME environment variable to the installed location.

The OPENSSL_HOME environment variable should look something like this: C:\Program Files\OpenSSL-Win64

9) If you want to build libtsk_jni for the Java JNI bindings, then set the JDK_HOME environment variable to point to the top directory of your Java SDK.

10) Open the TSK Visual Studio Solution file, tsk-win.sln, in the win32 directory.

11) Compile a Debug, Debug_NoLibs, or Release version of the libraries and executables. The resulting libraries and executables on a 32-bit build will be put in win32/Debug, win32/Debug_NoLibs, or win32/Release as appropriate. A 64-bit build will put them into the win32/x64 folders. You can change the type of build using the pulldown in Visual Studio and switching between Win32 and x64.

12) Note that the libraries and executables will depend on the libewf, libvmdk, libvhdi, and zlib DLL files (which are copied to the TSK build directories).


-------------------------------------------------------------------
carrier <at> sleuthkit <dot> org 
Brian Carrier

