MSYS/MinGW
From MythTV Official Wiki
Summary
In order to build FFmpeg using Visual Studio, we must still run FFmpeg's configure and make from a bash shell. This requires us to install MSYS/MinGW.
Here are a few details to note:
- It is preferred that you use an installer so we can auto-locate the install from the mythtv build. (if not you will have to set the MINGW_INSTALLDIR environment variable
- Need to select "MSYS Basic System" and "MinGW Developer ToolKit" options
- Need to rename msys version of link.exe so that the visual studio link.exe is used.
Installing MinGW
This guide used the latest build of mingw-get-setup.exe from the following site:
Defaults were used except the following:
On the Select Components screen, make sure to select MSYS Basic System and MinGW Developer ToolKit
Post Install Steps
Once the installation is finished, we must make some changes to the environment.
- 1 - Open a '“Visual Studio Command Prompt (2010)” command prompt.
- We need to have the Visual Studio environment setup.
- 2 - Launch msys.bat
- You need to specify the complete path to it (i.e. c:\MinGW\msys\1.0\msys.bat )
- This will start a mingw shell with the environment setup to use visual studio.
- 3 - Then execute the following commands:
- Find where mingw is getting link.exe from:
- which link
- Find where mingw is getting link.exe from:
- Change to the directory that it’s located in (should be /bin)
- cd /bin
- Change to the directory that it’s located in (should be /bin)
- Rename link.exe to something else:
- mv link.exe link-mingw.exe
- Rename link.exe to something else:
- You can verify that you are getting Visual Studios version by running which again (Your path will vary based on where you have visual studio installed.
- 4 - Set the environment variable MINGW_INSTALLDIR to your MinGW install directory (in this example, c:\MinGW).