| | 19 | [=#Windows10Setup] |
| | 20 | === Windows 10 Setup === |
| | 21 | |
| | 22 | Download and install [https://www.visualstudio.com/downloads/visual-studio-2015-ctp-vs Microsoft Visual Studio 2015] and [http://blogs.windows.com/buildingapps/2015/03/23/windows-10-developer-tooling-preview-now-available-to-windows-insiders/ Windows 10 SDK] on a Windows 10 machine. |
| | 23 | |
| | 24 | Once the setup are completed, run the `reg query` command below to retrieve the '''Windows 10 SDK version''' to be used later. |
| | 25 | |
| | 26 | {{{ |
| | 27 | reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0" /v "ProductVersion" |
| | 28 | }}} |
| | 29 | |
| | 30 | In the example query result below, the installed Windows 10 SDK version is `10.0.10030`. This version is to be set as `UCRTSdkVer` environment variable when setting up FFmpeg build command prompt. |
| | 31 | |
| | 32 | {{{ |
| | 33 | HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0 |
| | 34 | ProductVersion REG_SZ 10.0.10030 |
| | 35 | }}} |
| | 36 | |
| | 37 | === Windows 8.1 Setup === |
| | 38 | |
| | 39 | Download and install [http://www.visualstudio.com/downloads/download-visual-studio-vs Microsoft Visual Studio 2013] on a Windows 8.1 machine |
| | 40 | |
| 88 | | To keep the source tree clean and the platforms separated, we will have the intermediate files go to the Output\<Platform>\<Architecture> folder under the FFmpeg source tree. We will also have the install files (the files necessary to link and use FFmpeg in your application) go to the Build\<Platform>\<Architecture> folder under the FFmpeg source tree. |
| 89 | | |
| 90 | | ---- |
| 91 | | |
| 92 | | == Windows Store 8.1 x86 (Windows 8.1 Win32 in Visual Studio) == |
| 93 | | |
| 94 | | Launch '''Developer Command Prompt for VS2013''' |
| 95 | | {{{ |
| 96 | | Start Menu > Visual Studio 2013 (Start Menu Folder) > Visual Studio Tools > Developer Command Prompt for VS2013 |
| 97 | | }}} |
| 98 | | |
| 99 | | Set the following environment variables in the launched command prompt above. These environment variables overwrite the default paths with correct target specific ones. |
| 100 | | {{{ |
| 101 | | SET LIB=%VSINSTALLDIR%VC\lib\store;%VSINSTALLDIR%VC\atlmfc\lib;%WindowsSdkDir%lib\winv6.3\um\x86;; |
| 102 | | SET LIBPATH=%WindowsSdkDir%References\CommonConfiguration\Neutral;;%VSINSTALLDIR%VC\atlmfc\lib;%VSINSTALLDIR%VC\lib; |
| 103 | | SET INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%WindowsSdkDir%Include\um;%WindowsSdkDir%Include\shared;%WindowsSdkDir%Include\winrt;; |
| 104 | | }}} |
| 105 | | |
| 106 | | Open MSYS2 shell from the command prompt above (use the correct drive and location of your MSYS2 installation). Note that the command shell above will close and it may take a while for the MSYS2 shell to launch. |
| 107 | | {{{ |
| 108 | | C:\msys64\msys2_shell.bat |
| 109 | | }}} |
| 110 | | |
| 111 | | In your MSYS2 shell navigate to your cloned `FFmpeg` folder |
| 112 | | |
| 113 | | Invoke the following make commands |
| 114 | | {{{ |
| 115 | | mkdir -p Output/Windows81/Win32 |
| 116 | | cd Output/Windows81/Win32 |
| | 111 | To keep the source tree clean and the platforms separated, we will have the intermediate files go to the `Output\<Platform>\<Architecture>` folder under the `FFmpeg` source tree. We will also have the install files (the files necessary to link and use FFmpeg in your application) go to the `Build\<Platform>\<Architecture>` folder under the `FFmpeg` source tree. |
| | 112 | |
| | 113 | ---- |
| | 114 | |
| | 115 | == Windows 10 x86 == |
| | 116 | |
| | 117 | Launch '''VS2015 x86 Native Tools Command Prompt'''. E.g. |
| | 118 | {{{ |
| | 119 | C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2015\Visual Studio Tools\Windows Desktop Command Prompts\VS2015 x86 Native Tools Command Prompt |
| | 120 | }}} |
| | 121 | |
| | 122 | Set the following environment variables in the launched command prompt above. Use the correct version of '''Windows 10 SDK version''' for `UCRTSdkVer` (see [#Windows10Setup Windows 10 Setup] on how to get the version) |
| | 123 | {{{ |
| | 124 | SET UCRTSdkVer=10.0.10030.0 |
| | 125 | SET LIB=%VSINSTALLDIR%VC\lib\store;%VSINSTALLDIR%VC\atlmfc\lib;%UniversalCRTSdkDir%lib\winv10.0\ucrt\x86;;%UniversalCRTSdkDir%lib\%UCRTSdkVer%\um\x86;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\lib\um\x86;;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Lib\um\x86 |
| | 126 | SET LIBPATH=%VSINSTALLDIR%VC\atlmfc\lib;%VSINSTALLDIR%VC\lib; |
| | 127 | SET INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%UniversalCRTSdkDir%Include\ucrt;;%UniversalCRTSdkDir%Include\%UCRTSdkVer%\um;%UniversalCRTSdkDir%Include\%UCRTSdkVer%\shared;%UniversalCRTSdkDir%Include\%UCRTSdkVer%\winrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Include\um; |
| | 128 | }}} |
| | 129 | |
| | 130 | Open '''MSYS2 Shell''' from the command prompt above (use the correct drive and location of your MSYS2 installation). Note that the command shell above will close and it may take a while for the MSYS2 shell to launch. |
| | 131 | {{{ |
| | 132 | C:\msys64\msys2_shell.bat |
| | 133 | }}} |
| | 134 | |
| | 135 | In your MSYS2 shell navigate to your cloned `FFmpeg` folder. E.g. |
| | 136 | {{{ |
| | 137 | cd /c/ffmpeg |
| | 138 | }}} |
| | 139 | |
| | 140 | Invoke the following make commands |
| | 141 | {{{ |
| | 142 | mkdir -p Output/Windows10/Win32 |
| | 143 | |
| | 144 | cd Output/Windows10/Win32 |
| | 145 | |
| 125 | | --extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -D_WIN32_WINNT=0x0603" \ |
| 126 | | --extra-ldflags="-winmd -appcontainer" \ |
| 127 | | --prefix=../../../Build/Windows81/Win32 |
| 128 | | |
| 129 | | make |
| 130 | | |
| 131 | | make install |
| 132 | | }}} |
| 133 | | |
| 134 | | Generated libraries can be found in `Build/Windows81/Win32` folder specified in `--prefix` option above |
| 135 | | |
| 136 | | ---- |
| 137 | | |
| 138 | | == Windows Store 8.1 x64 (Windows 8.1 x64 in Visual Studio) == |
| 139 | | |
| 140 | | Launch '''VS2013 x64 Cross Tools Command Prompt''' |
| 141 | | {{{ |
| 142 | | Start Menu > Visual Studio 2013 (Start Menu Folder) > Visual Studio Tools > VS2013 x64 Cross Tools Command Prompt |
| 143 | | }}} |
| 144 | | |
| 145 | | Set the following environment variables in the launched command prompt above. These environment variables overwrite the default paths with correct target specific ones. |
| 146 | | {{{ |
| 147 | | SET LIB=%VSINSTALLDIR%VC\lib\store\amd64;%VSINSTALLDIR%VC\atlmfc\lib\amd64;%WindowsSdkDir%lib\winv6.3\um\x64;; |
| 148 | | SET LIBPATH=%WindowsSdkDir%References\CommonConfiguration\Neutral;;%VSINSTALLDIR%VC\atlmfc\lib\amd64;%VSINSTALLDIR%VC\lib\amd64; |
| 149 | | SET INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%WindowsSdkDir%Include\um;%WindowsSdkDir%Include\shared;%WindowsSdkDir%Include\winrt;; |
| 150 | | }}} |
| 151 | | |
| 152 | | Open MSYS2 shell from the command prompt above (use the correct drive and location of your MSYS2 installation). Note that the command shell above will close and it may take a while for the MSYS2 shell to launch. |
| 153 | | {{{ |
| 154 | | C:\msys64\msys2_shell.bat |
| 155 | | }}} |
| 156 | | |
| 157 | | In your MSYS2 shell navigate to your cloned `FFmpeg` folder |
| 158 | | |
| 159 | | Invoke the following make commands |
| 160 | | {{{ |
| 161 | | mkdir -p Output/Windows81/x64 |
| 162 | | cd Output/Windows81/x64 |
| | 154 | --extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_WIN32_WINNT=0x0A00" \ |
| | 155 | --prefix=../../../Build/Windows10/Win32 |
| | 156 | |
| | 157 | make |
| | 158 | |
| | 159 | make install |
| | 160 | }}} |
| | 161 | |
| | 162 | Generated libraries can be found in `Build/Windows10/Win32` folder specified in `--prefix` option above |
| | 163 | |
| | 164 | ---- |
| | 165 | |
| | 166 | == Windows 10 x64 == |
| | 167 | |
| | 168 | Launch '''VS2015 x86 x64 Cross Tools Command Prompt'''. E.g. |
| | 169 | {{{ |
| | 170 | C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2015\Visual Studio Tools\Windows Desktop Command Prompts\VS2015 x86 x64 Cross Tools Command Prompt |
| | 171 | }}} |
| | 172 | |
| | 173 | Set the following environment variables in the launched command prompt above. Use the correct version of '''Windows 10 SDK version''' for `UCRTSdkVer` (see [#Windows10Setup Windows 10 Setup] on how to get the version) |
| | 174 | {{{ |
| | 175 | SET UCRTSdkVer=10.0.10030.0 |
| | 176 | SET LIB=%VSINSTALLDIR%VC\lib\store\amd64;%VSINSTALLDIR%VC\atlmfc\lib\amd64;%UniversalCRTSdkDir%lib\winv10.0\ucrt\x64;;%UniversalCRTSdkDir%lib\%UCRTSdkVer%\um\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\lib\um\x64;;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Lib\um\x64 |
| | 177 | SET LIBPATH=%VSINSTALLDIR%VC\atlmfc\lib\amd64;%VSINSTALLDIR%VC\lib\amd64; |
| | 178 | SET INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%UniversalCRTSdkDir%Include\ucrt;;%UniversalCRTSdkDir%Include\%UCRTSdkVer%\um;%UniversalCRTSdkDir%Include\%UCRTSdkVer%\shared;%UniversalCRTSdkDir%Include\%UCRTSdkVer%\winrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Include\um; |
| | 179 | }}} |
| | 180 | |
| | 181 | Open '''MSYS2 Shell''' from the command prompt above (use the correct drive and location of your MSYS2 installation). Note that the command shell above will close and it may take a while for the MSYS2 shell to launch. |
| | 182 | {{{ |
| | 183 | C:\msys64\msys2_shell.bat |
| | 184 | }}} |
| | 185 | |
| | 186 | In your MSYS2 shell navigate to your cloned `FFmpeg` folder. E.g. |
| | 187 | {{{ |
| | 188 | cd /c/ffmpeg |
| | 189 | }}} |
| | 190 | |
| | 191 | Invoke the following make commands |
| | 192 | {{{ |
| | 193 | mkdir -p Output/Windows10/x64 |
| | 194 | |
| | 195 | cd Output/Windows10/x64 |
| | 196 | |
| 171 | | --extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -D_WIN32_WINNT=0x0603" \ |
| 172 | | --extra-ldflags="-winmd -appcontainer" \ |
| 173 | | --prefix=../../../Build/Windows81/x64 |
| 174 | | |
| 175 | | make |
| 176 | | |
| 177 | | make install |
| 178 | | }}} |
| 179 | | |
| 180 | | Generated libraries can be found in `Build/Windows81/x64` folder specified in `--prefix` option above |
| 181 | | |
| 182 | | ---- |
| 183 | | |
| 184 | | == Windows Store 8.1 ARM (Windows 8.1 ARM in Visual Studio) == |
| 185 | | |
| 186 | | Launch '''VS2013 ARM Cross Tools Command Prompt''' |
| 187 | | {{{ |
| 188 | | Start Menu > Visual Studio 2013 (Start Menu Folder) > Visual Studio Tools > VS2013 ARM Cross Tools Command Prompt |
| 189 | | }}} |
| 190 | | |
| 191 | | Set the following environment variables in the launched command prompt above. These environment variables overwrite the default paths with correct target specific ones. |
| 192 | | {{{ |
| 193 | | SET LIB=%VSINSTALLDIR%VC\lib\store\ARM;%VSINSTALLDIR%VC\atlmfc\lib\ARM;%WindowsSdkDir%lib\winv6.3\um\arm;; |
| 194 | | SET LIBPATH=%WindowsSdkDir%References\CommonConfiguration\Neutral;;%VSINSTALLDIR%VC\atlmfc\lib\ARM;%VSINSTALLDIR%VC\lib\ARM; |
| 195 | | SET INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%WindowsSdkDir%Include\um;%WindowsSdkDir%Include\shared;%WindowsSdkDir%Include\winrt;; |
| 196 | | }}} |
| 197 | | |
| 198 | | Open MSYS2 shell from the command prompt above (use the correct drive and location of your MSYS2 installation). Note that the command shell above will close and it may take a while for the MSYS2 shell to launch. |
| 199 | | {{{ |
| 200 | | C:\msys64\msys2_shell.bat |
| 201 | | }}} |
| 202 | | |
| 203 | | In your MSYS2 shell navigate to your cloned `FFmpeg` folder |
| 204 | | |
| 205 | | Invoke the following make commands |
| 206 | | {{{ |
| 207 | | mkdir -p Output/Windows81/ARM |
| 208 | | cd Output/Windows81/ARM |
| | 205 | --extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_WIN32_WINNT=0x0A00" \ |
| | 206 | --prefix=../../../Build/Windows10/x64 |
| | 207 | |
| | 208 | make |
| | 209 | |
| | 210 | make install |
| | 211 | }}} |
| | 212 | |
| | 213 | Generated libraries can be found in `Build/Windows10/x64` folder specified in `--prefix` option above |
| | 214 | |
| | 215 | ---- |
| | 216 | |
| | 217 | == Windows 10 ARM == |
| | 218 | |
| | 219 | Launch '''VS2015 x86 ARM Cross Tools Command Prompt'''. E.g. |
| | 220 | {{{ |
| | 221 | C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2015\Visual Studio Tools\Windows Desktop Command Prompts\VS2015 x86 ARM Cross Tools Command Prompt |
| | 222 | }}} |
| | 223 | |
| | 224 | Set the following environment variables in the launched command prompt above. Use the correct version of '''Windows 10 SDK version''' for `UCRTSdkVer` (see [#Windows10Setup Windows 10 Setup] on how to get the version) |
| | 225 | {{{ |
| | 226 | SET UCRTSdkVer=10.0.10030.0 |
| | 227 | SET LIB=%VSINSTALLDIR%VC\lib\store\ARM;%VSINSTALLDIR%VC\atlmfc\lib\ARM;%UniversalCRTSdkDir%lib\winv10.0\ucrt\arm;;%UniversalCRTSdkDir%lib\%UCRTSdkVer%\um\arm;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\lib\um\arm;;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Lib\um\arm |
| | 228 | SET LIBPATH=%VSINSTALLDIR%VC\atlmfc\lib\ARM;%VSINSTALLDIR%VC\lib\ARM; |
| | 229 | SET INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%UniversalCRTSdkDir%Include\ucrt;;%UniversalCRTSdkDir%Include\%UCRTSdkVer%\um;%UniversalCRTSdkDir%Include\%UCRTSdkVer%\shared;%UniversalCRTSdkDir%Include\%UCRTSdkVer%\winrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Include\um; |
| | 230 | }}} |
| | 231 | |
| | 232 | Open '''MSYS2 Shell''' from the command prompt above (use the correct drive and location of your MSYS2 installation). Note that the command shell above will close and it may take a while for the MSYS2 shell to launch. |
| | 233 | {{{ |
| | 234 | C:\msys64\msys2_shell.bat |
| | 235 | }}} |
| | 236 | |
| | 237 | In your MSYS2 shell navigate to your cloned `FFmpeg` folder. E.g. |
| | 238 | {{{ |
| | 239 | cd /c/ffmpeg |
| | 240 | }}} |
| | 241 | |
| | 242 | Invoke the following make commands |
| | 243 | {{{ |
| | 244 | mkdir -p Output/Windows10/ARM |
| | 245 | |
| | 246 | cd Output/Windows10/ARM |
| | 247 | |
| 220 | | --extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -D_WIN32_WINNT=0x0603 -D__ARM_PCS_VFP" \ |
| 221 | | --extra-ldflags="-MACHINE:ARM -winmd -appcontainer" \ |
| 222 | | --prefix=../../../Build/Windows81/ARM |
| 223 | | |
| 224 | | make |
| 225 | | |
| 226 | | make install |
| 227 | | }}} |
| 228 | | |
| 229 | | Generated libraries can be found in `Build/Windows81/ARM` folder specified in `--prefix` option above |
| 230 | | |
| 231 | | ---- |
| 232 | | |
| 233 | | == Windows Phone 8.1 x86 (Windows Phone 8.1 Win32 Emulator in Visual Studio) == |
| | 259 | --extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_WIN32_WINNT=0x0A00 -D__ARM_PCS_VFP" \ |
| | 260 | --prefix=../../../Build/Windows10/ARM |
| | 261 | |
| | 262 | make |
| | 263 | |
| | 264 | make install |
| | 265 | }}} |
| | 266 | |
| | 267 | Generated libraries can be found in `Build/Windows10/ARM` folder specified in `--prefix` option above |
| | 268 | |
| | 269 | There is currently a bug on Visual Studio 2015 CTP 6 ARM compiler that prevent the mjpeg source code to be compiled. As a workaround, disable mjpeg by adding the following options to configure command above. |
| | 270 | {{{ |
| | 271 | --disable-decoder=avrn \ |
| | 272 | --disable-decoder=mjpeg \ |
| | 273 | --disable-encoder=mjpeg \ |
| | 274 | }}} |
| | 275 | |
| | 276 | ---- |
| | 277 | |
| | 278 | == Windows Store 8.1 x86 (Windows 8.1 Win32 in Visual Studio) == |
| 242 | | SET LIB=%VSINSTALLDIR%VC\lib\store;%VSINSTALLDIR%VC\atlmfc\lib;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\lib\x86;; |
| 243 | | SET LIBPATH=%VSINSTALLDIR%VC\atlmfc\lib;%VSINSTALLDIR%VC\lib |
| 244 | | SET INCLUDE=%VSINSTALLDIR%VC\INCLUDE;%VSINSTALLDIR%VC\ATLMFC\INCLUDE;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\abi;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\mincore;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\minwin;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\wrl; |
| 245 | | }}} |
| 246 | | |
| 247 | | Open MSYS2 shell from the command prompt above (use the correct drive and location of your MSYS2 installation). Note that the command shell above will close and it may take a while for the MSYS2 shell to launch. |
| 248 | | {{{ |
| 249 | | C:\msys64\msys2_shell.bat |
| 250 | | }}} |
| 251 | | |
| 252 | | In your MSYS2 shell navigate to your cloned `FFmpeg` folder |
| 253 | | |
| 254 | | Invoke the following make commands |
| 255 | | {{{ |
| 256 | | mkdir -p Output/WindowsPhone81/Win32 |
| 257 | | cd Output/WindowsPhone81/Win32 |
| | 287 | SET LIB=%VSINSTALLDIR%VC\lib\store;%VSINSTALLDIR%VC\atlmfc\lib;%WindowsSdkDir%lib\winv6.3\um\x86;; |
| | 288 | SET LIBPATH=%WindowsSdkDir%References\CommonConfiguration\Neutral;;%VSINSTALLDIR%VC\atlmfc\lib;%VSINSTALLDIR%VC\lib; |
| | 289 | SET INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%WindowsSdkDir%Include\um;%WindowsSdkDir%Include\shared;%WindowsSdkDir%Include\winrt;; |
| | 290 | }}} |
| | 291 | |
| | 292 | Open '''MSYS2 Shell''' from the command prompt above (use the correct drive and location of your MSYS2 installation). Note that the command shell above will close and it may take a while for the MSYS2 shell to launch. |
| | 293 | {{{ |
| | 294 | C:\msys64\msys2_shell.bat |
| | 295 | }}} |
| | 296 | |
| | 297 | In your MSYS2 shell navigate to your cloned `FFmpeg` folder. E.g. |
| | 298 | {{{ |
| | 299 | cd /c/ffmpeg |
| | 300 | }}} |
| | 301 | |
| | 302 | Invoke the following make commands |
| | 303 | {{{ |
| | 304 | mkdir -p Output/Windows81/Win32 |
| | 305 | cd Output/Windows81/Win32 |
| 266 | | --extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP -D_WIN32_WINNT=0x0603" \ |
| 267 | | --extra-ldflags="-subsystem:console -opt:ref WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib -NODEFAULTLIB:kernel32.lib -NODEFAULTLIB:ole32.lib" \ |
| 268 | | --prefix=../../../Build/WindowsPhone81/Win32 |
| 269 | | |
| 270 | | make |
| 271 | | |
| 272 | | make install |
| 273 | | }}} |
| 274 | | |
| 275 | | Generated libraries can be found in `Build/WindowsPhone81/Win32` folder specified in `--prefix` option above |
| 276 | | |
| 277 | | ---- |
| 278 | | |
| 279 | | == Windows Phone 8.1 ARM (Windows Phone 8.1 ARM Device in Visual Studio) == |
| | 314 | --extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -D_WIN32_WINNT=0x0603" \ |
| | 315 | --extra-ldflags="-winmd -appcontainer" \ |
| | 316 | --prefix=../../../Build/Windows81/Win32 |
| | 317 | |
| | 318 | make |
| | 319 | |
| | 320 | make install |
| | 321 | }}} |
| | 322 | |
| | 323 | Generated libraries can be found in `Build/Windows81/Win32` folder specified in `--prefix` option above |
| | 324 | |
| | 325 | ---- |
| | 326 | |
| | 327 | == Windows Store 8.1 x64 (Windows 8.1 x64 in Visual Studio) == |
| | 328 | |
| | 329 | Launch '''VS2013 x64 Cross Tools Command Prompt''' |
| | 330 | {{{ |
| | 331 | Start Menu > Visual Studio 2013 (Start Menu Folder) > Visual Studio Tools > VS2013 x64 Cross Tools Command Prompt |
| | 332 | }}} |
| | 333 | |
| | 334 | Set the following environment variables in the launched command prompt above. These environment variables overwrite the default paths with correct target specific ones. |
| | 335 | {{{ |
| | 336 | SET LIB=%VSINSTALLDIR%VC\lib\store\amd64;%VSINSTALLDIR%VC\atlmfc\lib\amd64;%WindowsSdkDir%lib\winv6.3\um\x64;; |
| | 337 | SET LIBPATH=%WindowsSdkDir%References\CommonConfiguration\Neutral;;%VSINSTALLDIR%VC\atlmfc\lib\amd64;%VSINSTALLDIR%VC\lib\amd64; |
| | 338 | SET INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%WindowsSdkDir%Include\um;%WindowsSdkDir%Include\shared;%WindowsSdkDir%Include\winrt;; |
| | 339 | }}} |
| | 340 | |
| | 341 | Open '''MSYS2 Shell''' from the command prompt above (use the correct drive and location of your MSYS2 installation). Note that the command shell above will close and it may take a while for the MSYS2 shell to launch. |
| | 342 | {{{ |
| | 343 | C:\msys64\msys2_shell.bat |
| | 344 | }}} |
| | 345 | |
| | 346 | In your MSYS2 shell navigate to your cloned `FFmpeg` folder. E.g. |
| | 347 | {{{ |
| | 348 | cd /c/ffmpeg |
| | 349 | }}} |
| | 350 | |
| | 351 | Invoke the following make commands |
| | 352 | {{{ |
| | 353 | mkdir -p Output/Windows81/x64 |
| | 354 | cd Output/Windows81/x64 |
| | 355 | ../../../configure \ |
| | 356 | --toolchain=msvc \ |
| | 357 | --disable-programs \ |
| | 358 | --disable-dxva2 \ |
| | 359 | --arch=x86_64 \ |
| | 360 | --enable-shared \ |
| | 361 | --enable-cross-compile \ |
| | 362 | --target-os=win32 \ |
| | 363 | --extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -D_WIN32_WINNT=0x0603" \ |
| | 364 | --extra-ldflags="-winmd -appcontainer" \ |
| | 365 | --prefix=../../../Build/Windows81/x64 |
| | 366 | |
| | 367 | make |
| | 368 | |
| | 369 | make install |
| | 370 | }}} |
| | 371 | |
| | 372 | Generated libraries can be found in `Build/Windows81/x64` folder specified in `--prefix` option above |
| | 373 | |
| | 374 | ---- |
| | 375 | |
| | 376 | == Windows Store 8.1 ARM (Windows 8.1 ARM in Visual Studio) == |
| 288 | | SET LIB=%VSINSTALLDIR%VC\lib\store\ARM;%VSINSTALLDIR%VC\atlmfc\lib\ARM;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\lib\arm;; |
| 289 | | SET LIBPATH=%VSINSTALLDIR%VC\atlmfc\lib\ARM;%VSINSTALLDIR%VC\lib\ARM |
| 290 | | SET INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\abi;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\mincore;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\minwin;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\wrl; |
| 291 | | }}} |
| 292 | | |
| 293 | | Open MSYS2 shell from the command prompt above (use the correct drive and location of your MSYS2 installation). Note that the command shell above will close and it may take a while for the MSYS2 shell to launch. |
| 294 | | {{{ |
| 295 | | C:\msys64\msys2_shell.bat |
| 296 | | }}} |
| 297 | | |
| 298 | | In your MSYS2 shell navigate to your cloned `FFmpeg` folder |
| 299 | | |
| 300 | | Invoke the following make commands |
| 301 | | {{{ |
| 302 | | mkdir -p Output/WindowsPhone81/ARM |
| 303 | | cd Output/WindowsPhone81/ARM |
| | 385 | SET LIB=%VSINSTALLDIR%VC\lib\store\ARM;%VSINSTALLDIR%VC\atlmfc\lib\ARM;%WindowsSdkDir%lib\winv6.3\um\arm;; |
| | 386 | SET LIBPATH=%WindowsSdkDir%References\CommonConfiguration\Neutral;;%VSINSTALLDIR%VC\atlmfc\lib\ARM;%VSINSTALLDIR%VC\lib\ARM; |
| | 387 | SET INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%WindowsSdkDir%Include\um;%WindowsSdkDir%Include\shared;%WindowsSdkDir%Include\winrt;; |
| | 388 | }}} |
| | 389 | |
| | 390 | Open '''MSYS2 Shell''' from the command prompt above (use the correct drive and location of your MSYS2 installation). Note that the command shell above will close and it may take a while for the MSYS2 shell to launch. |
| | 391 | {{{ |
| | 392 | C:\msys64\msys2_shell.bat |
| | 393 | }}} |
| | 394 | |
| | 395 | In your MSYS2 shell navigate to your cloned `FFmpeg` folder. E.g. |
| | 396 | {{{ |
| | 397 | cd /c/ffmpeg |
| | 398 | }}} |
| | 399 | |
| | 400 | Invoke the following make commands |
| | 401 | {{{ |
| | 402 | mkdir -p Output/Windows81/ARM |
| | 403 | cd Output/Windows81/ARM |
| | 415 | --extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -D_WIN32_WINNT=0x0603 -D__ARM_PCS_VFP" \ |
| | 416 | --extra-ldflags="-MACHINE:ARM -winmd -appcontainer" \ |
| | 417 | --prefix=../../../Build/Windows81/ARM |
| | 418 | |
| | 419 | make |
| | 420 | |
| | 421 | make install |
| | 422 | }}} |
| | 423 | |
| | 424 | Generated libraries can be found in `Build/Windows81/ARM` folder specified in `--prefix` option above |
| | 425 | |
| | 426 | ---- |
| | 427 | |
| | 428 | == Windows Phone 8.1 x86 (Windows Phone 8.1 Win32 Emulator in Visual Studio) == |
| | 429 | |
| | 430 | Launch '''Developer Command Prompt for VS2013''' |
| | 431 | {{{ |
| | 432 | Start Menu > Visual Studio 2013 (Start Menu Folder) > Visual Studio Tools > Developer Command Prompt for VS2013 |
| | 433 | }}} |
| | 434 | |
| | 435 | Set the following environment variables in the launched command prompt above. These environment variables overwrite the default paths with correct target specific ones. |
| | 436 | {{{ |
| | 437 | SET LIB=%VSINSTALLDIR%VC\lib\store;%VSINSTALLDIR%VC\atlmfc\lib;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\lib\x86;; |
| | 438 | SET LIBPATH=%VSINSTALLDIR%VC\atlmfc\lib;%VSINSTALLDIR%VC\lib |
| | 439 | SET INCLUDE=%VSINSTALLDIR%VC\INCLUDE;%VSINSTALLDIR%VC\ATLMFC\INCLUDE;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\abi;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\mincore;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\minwin;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\wrl; |
| | 440 | }}} |
| | 441 | |
| | 442 | Open '''MSYS2 Shell''' from the command prompt above (use the correct drive and location of your MSYS2 installation). Note that the command shell above will close and it may take a while for the MSYS2 shell to launch. |
| | 443 | {{{ |
| | 444 | C:\msys64\msys2_shell.bat |
| | 445 | }}} |
| | 446 | |
| | 447 | In your MSYS2 shell navigate to your cloned `FFmpeg` folder. E.g. |
| | 448 | {{{ |
| | 449 | cd /c/ffmpeg |
| | 450 | }}} |
| | 451 | |
| | 452 | Invoke the following make commands |
| | 453 | {{{ |
| | 454 | mkdir -p Output/WindowsPhone81/Win32 |
| | 455 | cd Output/WindowsPhone81/Win32 |
| | 456 | ../../../configure \ |
| | 457 | --toolchain=msvc \ |
| | 458 | --disable-programs \ |
| | 459 | --disable-dxva2 \ |
| | 460 | --arch=x86 \ |
| | 461 | --enable-shared \ |
| | 462 | --enable-cross-compile \ |
| | 463 | --target-os=win32 \ |
| | 464 | --extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP -D_WIN32_WINNT=0x0603" \ |
| | 465 | --extra-ldflags="-subsystem:console -opt:ref WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib -NODEFAULTLIB:kernel32.lib -NODEFAULTLIB:ole32.lib" \ |
| | 466 | --prefix=../../../Build/WindowsPhone81/Win32 |
| | 467 | |
| | 468 | make |
| | 469 | |
| | 470 | make install |
| | 471 | }}} |
| | 472 | |
| | 473 | Generated libraries can be found in `Build/WindowsPhone81/Win32` folder specified in `--prefix` option above |
| | 474 | |
| | 475 | ---- |
| | 476 | |
| | 477 | == Windows Phone 8.1 ARM (Windows Phone 8.1 ARM Device in Visual Studio) == |
| | 478 | |
| | 479 | Launch '''VS2013 ARM Cross Tools Command Prompt''' |
| | 480 | {{{ |
| | 481 | Start Menu > Visual Studio 2013 (Start Menu Folder) > Visual Studio Tools > VS2013 ARM Cross Tools Command Prompt |
| | 482 | }}} |
| | 483 | |
| | 484 | Set the following environment variables in the launched command prompt above. These environment variables overwrite the default paths with correct target specific ones. |
| | 485 | {{{ |
| | 486 | SET LIB=%VSINSTALLDIR%VC\lib\store\ARM;%VSINSTALLDIR%VC\atlmfc\lib\ARM;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\lib\arm;; |
| | 487 | SET LIBPATH=%VSINSTALLDIR%VC\atlmfc\lib\ARM;%VSINSTALLDIR%VC\lib\ARM |
| | 488 | SET INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\abi;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\mincore;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\minwin;%WindowsSdkDir%..\..\Windows Phone Kits\8.1\Include\wrl; |
| | 489 | }}} |
| | 490 | |
| | 491 | Open '''MSYS2 Shell''' from the command prompt above (use the correct drive and location of your MSYS2 installation). Note that the command shell above will close and it may take a while for the MSYS2 shell to launch. |
| | 492 | {{{ |
| | 493 | C:\msys64\msys2_shell.bat |
| | 494 | }}} |
| | 495 | |
| | 496 | In your MSYS2 shell navigate to your cloned `FFmpeg` folder. E.g. |
| | 497 | {{{ |
| | 498 | cd /c/ffmpeg |
| | 499 | }}} |
| | 500 | |
| | 501 | Invoke the following make commands |
| | 502 | {{{ |
| | 503 | mkdir -p Output/WindowsPhone81/ARM |
| | 504 | cd Output/WindowsPhone81/ARM |
| | 505 | ../../../configure \ |
| | 506 | --toolchain=msvc \ |
| | 507 | --disable-programs \ |
| | 508 | --disable-dxva2 \ |
| | 509 | --arch=arm \ |
| | 510 | --as=armasm \ |
| | 511 | --cpu=armv7 \ |
| | 512 | --enable-thumb \ |
| | 513 | --enable-shared \ |
| | 514 | --enable-cross-compile \ |
| | 515 | --target-os=win32 \ |
| 334 | | You will also need to supply a custom file I/O context to any `AVFormatContext` rather than relying on `avio_xxx` functions, because the standard I/O functions utilize CRT I/O that is not supported in WinRT. (You won't fail certification, but your app will be unable to access the file specified in the `AVFormatContext.filename` member, unless potentially it is located in the app's local storage). The file I/O context needs to be initialized to point to your `read`, `write`, and `seek` functions, with the `opaque` member pointing to a `struct` containing an `IRandomAccessStream^` that you obtain when opening a file using proper WinRT IO calls in the `Windows::Storage` namespace. (You need a `struct` to hold the `IRandomAccessStream^`, since you cannot cast a `void*` to a ref handle). Your `read`, `write`, and `seek` functions should cast the `void* opaque` argument to the `struct*` you define, and then use the `IRandomAccessStream^` for all I/O. |
| | 536 | You will also need to supply a custom file I/O context to any `AVFormatContext` rather than relying on `avio_xxx` functions, because the standard I/O functions utilize CRT I/O that is not supported in WinRT. (You won't fail certification, but your app will be unable to access the file specified in the `AVFormatContext.filename` member, unless potentially it is located in the app's local storage). The file I/O context needs to be initialized to point to your `read`, `write`, and `seek` functions, with the `opaque` member pointing to a `struct` containing an `IRandomAccessStream^` that you obtain when opening a file using proper WinRT IO calls in the `Windows::Storage` namespace. (You need a `struct` to hold the `IRandomAccessStream^`, since you cannot cast a `void*` to a ref handle). Your `read`, `write`, and `seek` functions should cast the `void* opaque` argument to the `struct*` you define, and then use the `IRandomAccessStream^` for all I/O. |