Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 2.38 KB

windows-setup.md

File metadata and controls

43 lines (28 loc) · 2.38 KB

Windows Setup

Dependencies

The project was tested on Windows 10 with Visual Studio 2017. Currently only s3d_decklink has not been implemented for Windows and is replaced by a fake capture device that does nothing.

OpenCV

cd opencv
mkdir build
cd build
cmake .. -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules -G "Visual Studio 15 2017" :: use the compiler you wish to use here

Build OpenCV using Visual Studio in Debug + Release.

Building INSTALL project will create an install folder which you can copy directly to <OpenS3D>/src/deps/opencv.

FFmpeg

The procedure was inspired from this one.

  1. Download the "dev" and "shared" x86 versions from here.
  2. Create a <OpenS3D>/src/deps/ffmpeg/x86 folder.
  3. Copy the bin folder from the "shared" FFMPEG into <OpenS3D>/src/deps/ffmpeg/x86.
  4. Copy the include and lib folder from the "dev" FFMPEG into <OpenS3D>/src/deps/ffmpeg/x86.
  5. In <OpenS3D>/src/deps/ffmpeg/x86/lib, create the appropriate MSVC .lib to load the .dll from the .def using lib /machine:i386 /def:thedllname.def (FFmpeg was built with MinGW and we want to load the .dll with Visual Studio) See: this and that.
  6. Replace the original FFmpeg .lib with the generated ones for Visual Studio (i.e: delete swscale.lib, rename swscale-5.lib -> swscale.lib)

Qt

  1. Download Qt
  2. Install Qt from downloaded executable for your compiler (to C:/Qt)

Generate Visual Studio Solution

Navigate to <OpenS3D>/src/scripts and run generate-project.bat which will set the appropriate environment variables and generate the Visual Studio Project using CMake (default is "Visual Studio 15 2017").

For now, to run the built code, FFmpeg and OpenCV .dll have to be added to the path (see /src/scripts/set-environment.bat). Alternatively, you may run set-environment.bat from the command line before running the program from the same command line. Eventually, these .dll should be copied to the build directory.