Skip to content

Commit

Permalink
Update msys2 build script to use ffmpeg build from source with patch …
Browse files Browse the repository at this point in the history
…for nvidida 30 series gpus for vulkan hwdeecoder
  • Loading branch information
streetpea committed May 12, 2024
1 parent b38443e commit a76c19d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 50 deletions.
53 changes: 6 additions & 47 deletions .github/workflows/build-msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
json-c:p
lcms2:p
libdovi:p
libplacebo:p
meson:p
miniupnpc:p
nasm:p
Expand Down Expand Up @@ -74,10 +75,12 @@ jobs:
- name: Configure Chiaki4deck
run: |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
cmake -S . -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCHIAKI_ENABLE_CLI=OFF
- name: Build Chiaki4deck
run: |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
cmake --build build --config Release --clean-first --target chiaki
- name: Deploy qt6-base:p
Expand All @@ -88,68 +91,38 @@ jobs:
cp /mingw64/bin/libcrypto-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libssl-*.dll Chiaki4deck-Win/
cp /mingw64/bin/SDL2.dll Chiaki4deck-Win/
cp /mingw64/bin/swresample-*.dll Chiaki4deck-Win/
cp /mingw64/bin/avcodec-*.dll Chiaki4deck-Win/
cp /mingw64/bin/avutil-*.dll Chiaki4deck-Win/
cp /mingw64/bin/avformat-*.dll Chiaki4deck-Win/
cp /usr/local/bin/avcodec-*.dll Chiaki4deck-Win/
cp /usr/local/bin/avutil-*.dll Chiaki4deck-Win/
cp /usr/local/bin/avformat-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libgcc_s_seh-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libopus-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libfftw3-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libplacebo-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libbluray-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libspeexdsp-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libstdc++-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libbz2-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libgme.dll Chiaki4deck-Win/
cp /mingw64/bin/libgnutls-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libiconv-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libmodplug-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libhidapi-*.dll Chiaki4deck-Win/
cp /mingw64/bin/librtmp-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libsrt.dll Chiaki4deck-Win/
cp /mingw64/bin/libssh.dll Chiaki4deck-Win/
cp /mingw64/bin/libxml2-*.dll Chiaki4deck-Win/
cp /mingw64/bin/zlib1.dll Chiaki4deck-Win/
cp /mingw64/bin/libaom.dll Chiaki4deck-Win/
cp /mingw64/bin/libcairo-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libdav1d-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libglib-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libgsm.dll Chiaki4deck-Win/
cp /mingw64/bin/libgobject-*.dll Chiaki4deck-Win/
cp /mingw64/bin/liblzma-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libintl-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libmp3lame-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libwinpthread-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libva.dll Chiaki4deck-Win/
cp /mingw64/bin/libva_win32.dll Chiaki4deck-Win/
cp /mingw64/bin/libvpl.dll Chiaki4deck-Win/
cp /mingw64/bin/libopencore-amrnb-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libopenjp2-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libopencore-amrwb-*.dll Chiaki4deck-Win/
cp /mingw64/bin/rav1e.dll Chiaki4deck-Win/
cp /mingw64/bin/librsvg-*.dll Chiaki4deck-Win/
cp /mingw64/bin/liblcms2-*.dll Chiaki4deck-Win/
cp /mingw64/bin/dovi.dll Chiaki4deck-Win/
cp /mingw64/bin/libspeex-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libshaderc_shared.dll Chiaki4deck-Win/
cp /mingw64/bin/libtheoradec-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libSvtAv1Enc*.dll Chiaki4deck-Win/
cp /mingw64/bin/libtheoraenc-1.dll Chiaki4deck-Win/
cp /mingw64/bin/libvorbis-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libspirv-cross-c-shared.dll Chiaki4deck-Win/
cp /mingw64/bin/libvorbisenc-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libvpx-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libwebp-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libx265.dll Chiaki4deck-Win/
cp /mingw64/bin/libwebpmux-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libx264-*.dll Chiaki4deck-Win/
cp /mingw64/bin/xvidcore.dll Chiaki4deck-Win/
cp /mingw64/bin/libbrotlienc.dll Chiaki4deck-Win/
cp /mingw64/bin/libbrotlidec.dll Chiaki4deck-Win/
cp /mingw64/bin/libfreetype-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libgmp-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libhogweed-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libnettle-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libidn2-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libpng*.dll Chiaki4deck-Win/
cp /mingw64/bin/libharfbuzz-*.dll Chiaki4deck-Win/
Expand All @@ -164,30 +137,16 @@ jobs:
cp /mingw64/bin/libtasn1-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libunistring-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libfontconfig-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libpixman-1-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libffi-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libgdk_pixbuf-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libpango-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libcairo-gobject-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libgio-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libpangocairo-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libogg-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libsharpyuv-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libsoxr.dll Chiaki4deck-Win/
cp /mingw64/bin/libbrotlicommon.dll Chiaki4deck-Win/
cp /mingw64/bin/libicudt*.dll Chiaki4deck-Win/
cp /mingw64/bin/libgraphite*.dll Chiaki4deck-Win/
cp /mingw64/bin/libexpat*.dll Chiaki4deck-Win/
cp /mingw64/bin/libfribidi-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libthai-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libgmodule-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libpangoft2-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libpangowin32-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libgomp-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libdatrie-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libjxl*.dll Chiaki4deck-Win/
cp /mingw64/bin/libzvbi-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libhwy*.dll Chiaki4deck-Win/
cp /mingw64/bin/libminiupnpc.dll Chiaki4deck-Win/
cp /mingw64/bin/libpsl-*.dll Chiaki4deck-Win/
cp /mingw64/bin/libssh2-*.dll Chiaki4deck-Win/
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-ffmpeg-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ TAG=n7.0

git clone https://git.ffmpeg.org/ffmpeg.git --depth 1 -b $TAG && cd ffmpeg || exit 1
git apply ${SCRIPT_DIR}/flatpak/0001-vulkan-ignore-frames-without-hw-context.patch || exit 1
./configure --disable-all --enable-static --enable-avformat --enable-avcodec --enable-decoder=h264 --enable-decoder=hevc --enable-hwaccel=h264_vulkan --enable-hwaccel=hevc_vulkan --prefix=/usr/local "$@" || exit 1
./configure --disable-all --enable-shared --enable-avformat --enable-avcodec --enable-decoder=h264 --enable-decoder=hevc --enable-hwaccel=h264_vulkan --enable-hwaccel=hevc_vulkan --prefix=/usr/local "$@" || exit 1
make -j4 || exit 1
make install || exit 1
5 changes: 3 additions & 2 deletions scripts/ffmpeg-port/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ endif()
set(OPTIONS "--enable-pic --disable-doc --enable-debug --enable-runtime-cpudetect --disable-autodetect")

if(VCPKG_HOST_IS_WINDOWS)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES automake1.16)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES automake1.16 vulkan)
set(SHELL "${MSYS_ROOT}/usr/bin/bash.exe")
vcpkg_add_to_path("${MSYS_ROOT}/usr/share/automake-1.16")
vcpkg_add_to_path("${MSYS_ROOT}/usr/share/vulkan")
string(APPEND OPTIONS " --pkg-config=${CURRENT_HOST_INSTALLED_DIR}/tools/pkgconf/pkgconf${VCPKG_HOST_EXECUTABLE_SUFFIX}")
else()
find_program(SHELL bash)
Expand All @@ -54,7 +55,7 @@ elseif(VCPKG_TARGET_IS_LINUX)
elseif(VCPKG_TARGET_IS_UWP)
string(APPEND OPTIONS " --target-os=win32 --enable-w32threads --enable-d3d11va --enable-mediafoundation")
elseif(VCPKG_TARGET_IS_WINDOWS)
string(APPEND OPTIONS " --target-os=win32 --enable-w32threads --enable-d3d11va --enable-vulkan --enable-dxva2 --enable-mediafoundation")
string(APPEND OPTIONS " --target-os=win32 --enable-w32threads --enable-d3d11va --enable-dxva2 --enable-mediafoundation")
elseif(VCPKG_TARGET_IS_OSX)
string(APPEND OPTIONS " --target-os=darwin --enable-appkit --enable-avfoundation --enable-coreimage --enable-audiotoolbox --enable-videotoolbox")
elseif(VCPKG_TARGET_IS_IOS)
Expand Down

0 comments on commit a76c19d

Please sign in to comment.