Installing from Source Under Windows

Below is an explanation on building libavg from source under windows. As an alternative, you can download a release installer: ReleaseInstall.

We test libavg under 64 bit versions of Win8 and Win10.

Build Environment

As build environment, you need:

  • Visual Studio 2013 or higher (The free edition will work. You can download it from MS). Make sure to install support for Visual C++ and the Windows SDK components. For VS 2015, the Windows SDK components are under "Windows and Web Development -> Windows 8.1 ... -> Tools and Windows SDKs".
  • Python 2.7, 32 bit from http://www.python.org. libavg does not work with Python 3.x, and the build doesn't support 64 bit versions of Python currently.

Make sure python.exe is in the PATH.

Dependency archive

Download and extract the dependency archive to libavg/. For current git, you need windependencies-1.8.0.4.zip.

The resulting directory structure should be:

libavg
  bin
  etc
  include
  lib
  share

Checkout libavg

Check out libavg:

1> cd libavg
2libavg> git clone https://github.com/libavg/libavg.git

Your directory structure should now be:

 1libavg
 2  bin
 3  include
 4    boost
 5    ...
 6  lib
 7  libavg
 8    src
 9    win
10    ...

Build libavg

Open libavg\libavg\win\libavg.sln in visual studio.

If you have Visual Studio > 2013, you need to update the project files (Right-click on solution, 'Retarget solution' if it doesn't prompt you to do that).

Start a release build.

Run the tests

Add libavg\bin to the PATH environment variable, then:

1> cd libavg\libavg\src\test
2libavg\libavg\src\test> Test.py

Tell us if anything breaks while running the tests.

Non-standard Builds

(!) Note: (!)
Unless you need updated versions of the dependent packages or want to compile for a different python version, you can use the prebuilt dependencies available for download instead and ignore this section completely.

Finding the Python Libraries

By default, the solution expects to find Python in C:\Python27. This will fit the majority of Python 2.7 users.

If you want to use a different version and/or have a custom installation path, the solution settings need to be changed before compiling libavg. When you've opened the solution:

  • Open View->Property Manager
  • Expand one of the projects, e.g: base and Release
  • Double click on the libavg entry.
  • Under User macros, change the path of the macro PYTHON_ROOT to your installation path.

If there is no Property Manager menu entry, make sure Tools->Settings->Expert Settings is checked.

Notes on building the dependencies

  • Download the gtk+ All-in-one bundle from http://www.gtk.org/download/win32.php. Copy bin, include, lib, etc. subdirs into corresponding subdirs under devel. The include file hierarchy isn't the one libavg needs, so lots of files need to be shuffled around.
  • Download SDL-1.2.15 development libraries from http://www.libsdl.org/, move files to lib, bin and include dirs.
  • Download and install ffmpeg development libraries from http://ffmpeg.zeranoe.com/builds/.
  • Boost:
    • Download VC-specific 32 bit versions from http://sourceforge.net/projects/boost/files/boost-binaries/1.xx/
    • Copy libs from lib32-* to libavg\lib: chrono, date_time, python, regex, system, thread*.lib
    • Copy dlls from lib32-* to libavg\bin: chrono, date_time, python, regex, system, thread.
    • Copy boost to include (so there's a libavg\include\boost dir containing the header files).

Boost Libraries

If you're not using Python 2.7, you need to compile the boost libraries. Note that libavg isn't ready for Python 3.x yet.

  • Download from http://www.boost.org, extract archive to libavg\deps.
  • Make sure python.exe and the Visual C compiler (e.g. C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin) are in the path.
  • Compile boost:

At a command prompt (Use cmd.exe, not (e.g.) cygwin):

1libavg\deps\boost_1_58_0> bootstrap.bat
2libavg\deps\boost_1_58_0> bjam -j8 link=shared
  • j8 determines the number of processor cores that bjam will use.
  • Copy boost_1_58_0\boost to libavg\include.
  • Of the files in boost_1_58_0\stage\lib:
    • Copy boost_date_time-*.lib, boost_python-*.lib and boost_thread-*.lib to libavg\lib
    • Copy boost_date_time-*.dll, boost_python-*.dll and boost_thread-*.dll to libavg\bin.

windependencies-1.8.0.zip (43.6 MB) coder, 29/04/2015 16:41

windependencies-1.8.0.2.zip (44.6 MB) coder, 05/09/2015 19:43

windependencies-1.8.0.3.zip (44 MB) coder, 26/04/2016 23:50

windependencies-1.8.0.4.zip (44.4 MB) coder, 02/05/2016 18:07

windependencies-1.7.0.zip (29.2 MB) coder, 27/03/2017 13:56