Skip to content

Commit

Permalink
Configuration - update FFmpeg building scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
gkv311 committed Jan 24, 2025
1 parent 3f9c0b2 commit ff65851
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 3rdparty/FFmpeg/ffmpeg-rebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ configArguments="\
--disable-doc \
--enable-runtime-cpudetect"

# enable AV1 decoder
configArguments="$configArguments --enable-libdav1d"

if [ "$aSystem" == "Darwin" ]; then
export MACOSX_DEPLOYMENT_TARGET=10.10
anExtraCFlags="$anExtraCFlags -mmacosx-version-min=10.10"
Expand Down
28 changes: 28 additions & 0 deletions 3rdparty/FFmpeg/sview_dav1d_build_mingw.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

# Small help to build dav1d for MinGW [for sView project]
# https://code.videolan.org/videolan/dav1d

# go to the script directory
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
aSrcRoot=$aScriptPath

buildProject () {
aPrefix=$1
aBuildRoot="$aSrcRoot/build"
aBuildPath="$aBuildRoot/dav1d-${aPrefix}-make"
aDistPath="$aBuildRoot/dav1d-${aPrefix}"
rm -f -r "$aBuildPath"
rm -f -r "$aDistPath"
rm -f -r "$aBuildRoot/dav1d-${aPrefix}.7z"

meson setup "${aBuildPath}" --cross-file=package/crossfiles/${aPrefix}.meson --default-library=static --prefix=$aDistPath
pushd "${aBuildPath}"
ninja
ninja install
popd
}

set -o pipefail
buildProject "i686-w64-mingw32"
buildProject "x86_64-w64-mingw32"
36 changes: 36 additions & 0 deletions 3rdparty/FFmpeg/sview_openjpeg_build_mingw.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

# Small help to build libopenjpeg for MinGW [for sView project]
# https://www.openjpeg.org/

# go to the script directory
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
aSrcRoot=$aScriptPath

buildProject () {
aPrefix=$1
aBuildRoot="$aSrcRoot/build"
aBuildPath="$aBuildRoot/openjpeg-${aPrefix}-make"
aDistPath="$aBuildRoot/openjpeg-${aPrefix}"
rm -f -r "$aBuildPath"
rm -f -r "$aDistPath"
rm -f -r "$aBuildRoot/openjpeg-${aPrefix}.7z"
cmake -G "Ninja" \
-D CMAKE_TOOLCHAIN_FILE="~/develop/${aPrefix}.cmake" \
-D CMAKE_BUILD_TYPE:STRING="Release" \
-D CMAKE_INSTALL_PREFIX:PATH="$aDistPath" \
-D BUILD_SHARED_LIBS:BOOL="OFF" \
-B "$aBuildPath" -S "$aSrcRoot"

cmake --build "$aBuildPath" --config Release --target clean
cmake --build "$aBuildPath" --config Release
cmake --build "$aBuildPath" --config Release --target install

cp -f "$aSrcRoot/LICENSE" "$aDistPath"
cp -f "$aSrcRoot/README.md" "$aDistPath"
7za a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on "$aBuildRoot/openjpeg-${aPrefix}.7z" "$aDistPath"
}

set -o pipefail
buildProject "i686-w64-mingw32"
buildProject "x86_64-w64-mingw32"

0 comments on commit ff65851

Please sign in to comment.