From 86c67ad2563fbafa345d976737693b4601c56d4a Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 15 Apr 2022 11:13:15 +0200 Subject: [PATCH] (Windows) Updated FFmpeg to 5.0 and SDL to 2.0.20. --- CMakeLists.txt | 16 ++++---- es-app/CMakeLists.txt | 28 ++++++------- tools/Windows_dependencies_setup_MSVC.bat | 50 +++++++++++------------ tools/Windows_dependencies_setup_MinGW.sh | 28 ++++++------- 4 files changed, 61 insertions(+), 61 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fd4990bc2..3a140b388 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -354,11 +354,11 @@ elseif(WIN32) set(COMMON_INCLUDE_DIRS ${COMMON_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/external/curl-7.80.0-win64-mingw/include ${CMAKE_CURRENT_SOURCE_DIR}/external/glew-2.1.0/include - ${CMAKE_CURRENT_SOURCE_DIR}/external/ffmpeg-n4.4-latest-win64-gpl-shared-4.4/include + ${CMAKE_CURRENT_SOURCE_DIR}/external/ffmpeg-n5.0-latest-win64-gpl-shared-5.0/include ${CMAKE_CURRENT_SOURCE_DIR}/external/FreeImage/Dist/x64 ${CMAKE_CURRENT_SOURCE_DIR}/external/freetype/include ${CMAKE_CURRENT_SOURCE_DIR}/external/pugixml/src - ${CMAKE_CURRENT_SOURCE_DIR}/external/SDL2-2.0.18) + ${CMAKE_CURRENT_SOURCE_DIR}/external/SDL2-2.0.20) elseif(EMSCRIPTEN) set(COMMON_INCLUDE_DIRS ${COMMON_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/external/curl/include @@ -426,12 +426,12 @@ elseif(WIN32) ${PROJECT_SOURCE_DIR}/SDL2.lib Winmm.dll) else() - set(COMMON_LIBRARIES ${PROJECT_SOURCE_DIR}/avcodec-58.dll - ${PROJECT_SOURCE_DIR}/avfilter-7.dll - ${PROJECT_SOURCE_DIR}/avformat-58.dll - ${PROJECT_SOURCE_DIR}/avutil-56.dll - ${PROJECT_SOURCE_DIR}/swresample-3.dll - ${PROJECT_SOURCE_DIR}/swscale-5.dll + set(COMMON_LIBRARIES ${PROJECT_SOURCE_DIR}/avcodec-59.dll + ${PROJECT_SOURCE_DIR}/avfilter-8.dll + ${PROJECT_SOURCE_DIR}/avformat-59.dll + ${PROJECT_SOURCE_DIR}/avutil-57.dll + ${PROJECT_SOURCE_DIR}/swresample-4.dll + ${PROJECT_SOURCE_DIR}/swscale-6.dll ${PROJECT_SOURCE_DIR}/FreeImage.dll ${PROJECT_SOURCE_DIR}/glew32.dll ${PROJECT_SOURCE_DIR}/libcurl-x64.dll diff --git a/es-app/CMakeLists.txt b/es-app/CMakeLists.txt index 6491e7885..f6a211b43 100644 --- a/es-app/CMakeLists.txt +++ b/es-app/CMakeLists.txt @@ -126,13 +126,13 @@ endif() if(WIN32) install(TARGETS EmulationStation RUNTIME DESTINATION .) if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - install(FILES ../avcodec-58.dll - ../avfilter-7.dll - ../avformat-58.dll - ../avutil-56.dll - ../postproc-55.dll - ../swresample-3.dll - ../swscale-5.dll + install(FILES ../avcodec-59.dll + ../avfilter-8.dll + ../avformat-59.dll + ../avutil-57.dll + ../postproc-56.dll + ../swresample-4.dll + ../swscale-6.dll ../FreeImage.dll ../freetype.dll ../glew32.dll @@ -148,13 +148,13 @@ if(WIN32) ../VCRUNTIME140_1.dll DESTINATION .) else() - install(FILES ../avcodec-58.dll - ../avfilter-7.dll - ../avformat-58.dll - ../avutil-56.dll - ../postproc-55.dll - ../swresample-3.dll - ../swscale-5.dll + install(FILES ../avcodec-59.dll + ../avfilter-8.dll + ../avformat-59.dll + ../avutil-57.dll + ../postproc-56.dll + ../swresample-4.dll + ../swscale-6.dll ../FreeImage.dll ../glew32.dll ../libcrypto-1_1-x64.dll diff --git a/tools/Windows_dependencies_setup_MSVC.bat b/tools/Windows_dependencies_setup_MSVC.bat index 57a75ca6b..fdef621e2 100644 --- a/tools/Windows_dependencies_setup_MSVC.bat +++ b/tools/Windows_dependencies_setup_MSVC.bat @@ -105,41 +105,41 @@ cd .. echo: echo Setting up SDL -if exist SDL2-2.0.18\ ( - rmdir /S /Q SDL2-2.0.18 +if exist SDL2-2.0.20\ ( + rmdir /S /Q SDL2-2.0.20 ) -curl -O https://www.libsdl.org/release/SDL2-devel-2.0.18-VC.zip -7z x SDL2-devel-2.0.18-VC.zip -cd SDL2-2.0.18 +curl -O https://www.libsdl.org/release/SDL2-devel-2.0.20-VC.zip +7z x SDL2-devel-2.0.20-VC.zip +cd SDL2-2.0.20 rename include SDL2 cd .. -copy /Y SDL2-2.0.18\lib\x64\SDL2.dll .. -copy /Y SDL2-2.0.18\lib\x64\SDL2.lib .. -copy /Y SDL2-2.0.18\lib\x64\SDL2main.lib .. +copy /Y SDL2-2.0.20\lib\x64\SDL2.dll .. +copy /Y SDL2-2.0.20\lib\x64\SDL2.lib .. +copy /Y SDL2-2.0.20\lib\x64\SDL2main.lib .. echo: echo Setting up FFmpeg -if exist ffmpeg-n4.4-latest-win64-gpl-shared-4.4\ ( - rmdir /S /Q ffmpeg-n4.4-latest-win64-gpl-shared-4.4 +if exist ffmpeg-n5.0-latest-win64-gpl-shared-5.0\ ( + rmdir /S /Q ffmpeg-n5.0-latest-win64-gpl-shared-5.0 ) -curl -LO https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-n4.4-latest-win64-gpl-shared-4.4.zip -7z x ffmpeg-n4.4-latest-win64-gpl-shared-4.4.zip -copy /Y ffmpeg-n4.4-latest-win64-gpl-shared-4.4\bin\avcodec-58.dll .. -copy /Y ffmpeg-n4.4-latest-win64-gpl-shared-4.4\bin\avfilter-7.dll .. -copy /Y ffmpeg-n4.4-latest-win64-gpl-shared-4.4\bin\avformat-58.dll .. -copy /Y ffmpeg-n4.4-latest-win64-gpl-shared-4.4\bin\avutil-56.dll .. -copy /Y ffmpeg-n4.4-latest-win64-gpl-shared-4.4\bin\postproc-55.dll .. -copy /Y ffmpeg-n4.4-latest-win64-gpl-shared-4.4\bin\swresample-3.dll .. -copy /Y ffmpeg-n4.4-latest-win64-gpl-shared-4.4\bin\swscale-5.dll .. -copy /Y ffmpeg-n4.4-latest-win64-gpl-shared-4.4\lib\avcodec.lib .. -copy /Y ffmpeg-n4.4-latest-win64-gpl-shared-4.4\lib\avfilter.lib .. -copy /Y ffmpeg-n4.4-latest-win64-gpl-shared-4.4\lib\avformat.lib .. -copy /Y ffmpeg-n4.4-latest-win64-gpl-shared-4.4\lib\avutil.lib .. -copy /Y ffmpeg-n4.4-latest-win64-gpl-shared-4.4\lib\swresample.lib .. -copy /Y ffmpeg-n4.4-latest-win64-gpl-shared-4.4\lib\swscale.lib .. +curl -LO https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-n5.0-latest-win64-gpl-shared-5.0.zip +7z x ffmpeg-n5.0-latest-win64-gpl-shared-5.0.zip +copy /Y ffmpeg-n5.0-latest-win64-gpl-shared-5.0\bin\avcodec-59.dll .. +copy /Y ffmpeg-n5.0-latest-win64-gpl-shared-5.0\bin\avfilter-8.dll .. +copy /Y ffmpeg-n5.0-latest-win64-gpl-shared-5.0\bin\avformat-59.dll .. +copy /Y ffmpeg-n5.0-latest-win64-gpl-shared-5.0\bin\avutil-57.dll .. +copy /Y ffmpeg-n5.0-latest-win64-gpl-shared-5.0\bin\postproc-56.dll .. +copy /Y ffmpeg-n5.0-latest-win64-gpl-shared-5.0\bin\swresample-4.dll .. +copy /Y ffmpeg-n5.0-latest-win64-gpl-shared-5.0\bin\swscale-6.dll .. +copy /Y ffmpeg-n5.0-latest-win64-gpl-shared-5.0\lib\avcodec.lib .. +copy /Y ffmpeg-n5.0-latest-win64-gpl-shared-5.0\lib\avfilter.lib .. +copy /Y ffmpeg-n5.0-latest-win64-gpl-shared-5.0\lib\avformat.lib .. +copy /Y ffmpeg-n5.0-latest-win64-gpl-shared-5.0\lib\avutil.lib .. +copy /Y ffmpeg-n5.0-latest-win64-gpl-shared-5.0\lib\swresample.lib .. +copy /Y ffmpeg-n5.0-latest-win64-gpl-shared-5.0\lib\swscale.lib .. echo: echo Setting up OpenSSL diff --git a/tools/Windows_dependencies_setup_MinGW.sh b/tools/Windows_dependencies_setup_MinGW.sh index aea62c5fc..0be3255b1 100644 --- a/tools/Windows_dependencies_setup_MinGW.sh +++ b/tools/Windows_dependencies_setup_MinGW.sh @@ -59,26 +59,26 @@ cd .. echo -e "\nSetting up SDL" rm -rf SDL2-* -curl -O https://www.libsdl.org/release/SDL2-devel-2.0.18-mingw.tar.gz -tar xvzf SDL2-devel-2.0.18-mingw.tar.gz +curl -O https://www.libsdl.org/release/SDL2-devel-2.0.20-mingw.tar.gz +tar xvzf SDL2-devel-2.0.20-mingw.tar.gz # Needed due to some kind of file system race condition that sometimes occurs on Windows. sleep 1 -mv SDL2-2.0.18/x86_64-w64-mingw32/include/SDL2 SDL2-2.0.18/ -cp -p SDL2-2.0.18/x86_64-w64-mingw32/lib/libSDL2main.a .. -cp -p SDL2-2.0.18/x86_64-w64-mingw32/bin/SDL2.dll .. +mv SDL2-2.0.20/x86_64-w64-mingw32/include/SDL2 SDL2-2.0.20/ +cp -p SDL2-2.0.20/x86_64-w64-mingw32/lib/libSDL2main.a .. +cp -p SDL2-2.0.20/x86_64-w64-mingw32/bin/SDL2.dll .. echo -e "\nSetting up FFmpeg" rm -rf ffmpeg-* -curl -LO https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-n4.4-latest-win64-gpl-shared-4.4.zip -unzip ffmpeg-n4.4-latest-win64-gpl-shared-4.4.zip -cp -p ffmpeg-n4.4-latest-win64-gpl-shared-4.4/bin/avcodec-58.dll .. -cp -p ffmpeg-n4.4-latest-win64-gpl-shared-4.4/bin/avfilter-7.dll .. -cp -p ffmpeg-n4.4-latest-win64-gpl-shared-4.4/bin/avformat-58.dll .. -cp -p ffmpeg-n4.4-latest-win64-gpl-shared-4.4/bin/avutil-56.dll .. -cp -p ffmpeg-n4.4-latest-win64-gpl-shared-4.4/bin/postproc-55.dll .. -cp -p ffmpeg-n4.4-latest-win64-gpl-shared-4.4/bin/swresample-3.dll .. -cp -p ffmpeg-n4.4-latest-win64-gpl-shared-4.4/bin/swscale-5.dll .. +curl -LO https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-n5.0-latest-win64-gpl-shared-5.0.zip +unzip ffmpeg-n5.0-latest-win64-gpl-shared-5.0.zip +cp -p ffmpeg-n5.0-latest-win64-gpl-shared-5.0/bin/avcodec-59.dll .. +cp -p ffmpeg-n5.0-latest-win64-gpl-shared-5.0/bin/avfilter-8.dll .. +cp -p ffmpeg-n5.0-latest-win64-gpl-shared-5.0/bin/avformat-59.dll .. +cp -p ffmpeg-n5.0-latest-win64-gpl-shared-5.0/bin/avutil-57.dll .. +cp -p ffmpeg-n5.0-latest-win64-gpl-shared-5.0/bin/postproc-56.dll .. +cp -p ffmpeg-n5.0-latest-win64-gpl-shared-5.0/bin/swresample-4.dll .. +cp -p ffmpeg-n5.0-latest-win64-gpl-shared-5.0/bin/swscale-6.dll .. echo -e "\nSetting up OpenSSL"