VirtualDub source code - build notes

This file automatically displays the first time you attempt to build VirtualDub, in order to warn you of possible pitfalls. It won't auto-display. Look in the Docs project for this file and other documentation.

Quickstart

Build requirements

You need the following tools to build VirtualDub out of the box:

General notes

Version 1.5.0 has a significantly different build setup than the 1.4.x series. As of 1.5.0, mapconv and verinc are included with the main source archive, and NekoAmp 2.0 (Priss) and Sylia are statically linked into the application. Building VirtualDub.exe should be as simple as selecting VirtualDub as the active project and starting a build. Special project directories:

lib/<build>/ static libraries
h/ interface-level include files
obj/<build>/ object files
out/<build>/ executables and link output

Make sure you're not releasing debug builds!

Tools

Three build tools are included in the workspace:

disasm
Compiles and checks the IA-32 architecture disassembly data module. This is not built or run by default, since the disassembly module rarely changes.
Asuka
General build tool, which has two primary functions:
  • Parses the map output from the Microsoft linker and produces an address-to-function symbol lookup table. This is built and run automatically as part of the build process and combines the virtualdub.map and ia32.vdi to produce virtualdub.vdi.
  • Performs build number incrementing. Build information is held in version2.bin and reflected into version.bin for mapconv compatibility. Build counts are tracked by hostname, so development can occur on multiple machines and the source code control system in use can merge the version2.bin files to maintain the cumulative build count.
  • Lina
    A HTML compiler required to build the help file.

    Building under Microsoft Visual C++ 6.0 (primary compiler)

    In order to compile VirtualDub with Visual C++ 6.0, you must have the following updates from Microsoft:

    You will also need updated include files from the Platform SDK. You do not need the import libraries as VirtualDub dynamically links to functions not available in the retail version of Windows 95.

    MASM 6.15 or later (ML.EXE) is required to compile the assembly modules. You should already have this from the Processor Pack.

    Newer versions of the DirectX SDK are not compatible with Visual C++ 6.0, so you will need an older version to link. The Summer 2004 version is recommended, which is available as of this date from:

    http://www.microsoft.com/downloads/details.aspx?FamilyID=fd044a42-9912-42a3-9a9e-d857199f888e&DisplayLang=en

    Building under Microsoft Visual Studio .NET (2002)

    Building VirtualDub under Microsoft Visual Studio .NET (2002) is not supported.

    Building under Microsoft Visual Studio .NET (2003)

    Visual Studio .NET automatically installs MASM 7.10, so you do not need to manually install an assembler.

    After importing the VC6 .dsp and .dsw files, you should make the following changes to the imported project files:

    Building under Microsoft Visual Studio 2005

    After importing the VC6 .dsp and .dsw files, you should make the following changes to the imported project files:

    If you are using Standard or Express, then you will need to find a version of the Microsoft Macro Assembler (MASM) to use. Either MASM 6.15 from the VC6 Processor Pack or MASM 7.10 from VS.NET 2003 will work fine.

    If you are using the Professional version, you already have MASM 8.0. However, a few changes need to be made to the assembly language files in order to assemble with MASM 8 — namely, MOVD and MOVQ instructions need to be changed as follows:

    MOVD mmreg, mem32MOVD mmreg, DWORD PTR mem32
    MOVD mem32, mmregMOVD DWORD PTR mem32, mmreg
    MOVQ xmmreg, mem64MOVQ xmmreg, QWORD PTR mem64
    MOVQ mem64, xmmregMOVQ QWORD PTR mem64, xmmreg

    Finally, a couple of locations may assert in the debug build due to technically incorrect usage of the Standard Template Library (STL). To fix these, replace expressions of the form (&myVector[0]) with (myVector.empty() ? NULL : &myVector[0]).

    Final notes

    Good luck!

    -- Avery Lee <phaeron@virtualdub.org>