Media-Transport-Library

Media Transport Library compilation and build Guide on Windows OS (MSYS2)

Note: Support for Windows has been discontinued. If you want to run MTL on Windows, it may be possible, but no guaranties.

1. Introduction

This document contains instructions for installing and configuring the Media Transport Library for Windows Operation System in MSYS2 environment.

2. Prerequisites

3. Install MSYS2 environment

pacman -Syuu

4. Install dependencies

pacman -S git base-devel unzip pactoys
pacboy -S gcc:p meson:p pkgconf:p openssl:p json-c:p libpcap:p dlfcn:p SDL2:p SDL2_ttf:p gtest:p

4. Install tools

wget https://nmap.org/npcap/dist/npcap-sdk-1.12.zip
unzip -d npcap-sdk npcap-sdk-1.12.zip
cp npcap-sdk/Lib/x64/* $MSYSTEM_PREFIX/lib/
git clone https://github.com/alitrack/mman-win32
cd mman-win32
./configure --prefix=$MSYSTEM_PREFIX
make && make install

5. Build DPDK

Note: DPDK 23.11 was the last version to which DPDK patches were ported.

git clone https://github.com/OpenVisualCloud/Media-Transport-Library.git
export mtl_source_code=${PWD}/Media-Transport-Library
cd $mtl_source_code/patches/dpdk/23.11
ls *.patch | xargs -I{} bash -c 'if [[ $(sed -n '1p' "{}") =~ ^../.*\.patch$ ]]; then cp "$(cat "{}")" "{}"; fi'
cd windows
ls *.patch | xargs -I{} bash -c 'if [[ $(sed -n '1p' "{}") =~ ^../.*\.patch$ ]]; then cp "$(cat "{}")" "{}"; fi'
cd $mtl_source_code
git clone https://github.com/DPDK/dpdk.git
cd dpdk
git checkout v23.11
git switch -c v23.11

git config user.name "Your Name"        # config if not
git config user.email "you@example.com" # config if not
git am $mtl_source_code/patches/dpdk/23.11/*.patch
git am $mtl_source_code/patches/dpdk/23.11/windows/*.patch
meson setup build
meson install -C build

6. Build Media Transport Library and app

cd $mtl_source_code
./build.sh

7. Add MSYS2 binary PATH to system environment variables (Optional)

The MSYS2 path is not in Windows system environment variables by default, if you want to run MTL apps in PowerShell/CMD, you need to add the paths first. For example, MSYS2 is installed in C:\msys64.