Skip to content

Commit fd85e25

Browse files
committed
Fix 4.x build
1 parent 026b361 commit fd85e25

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ jobs:
7676
uses: softprops/action-gh-release@v2
7777
with:
7878
body_path: changelog
79+
prerelease: ${{contains(github.ref_name,'dev')}}
7980
files: |
8081
${{env.name}}.zip
8182
${{env.name}}.tar.gz

build.sh

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,29 @@
44
# This software is released under the MIT License.
55
# https://opensource.org/licenses/MIT
66

7-
# build.sh [x86,amd64,arm,arm64] [static|shared] [gpl|lgpl] ...FF_ARGS
7+
HELP_MSG="Usage: build.sh <x86,amd64,arm,arm64> [static,shared] [gpl,lgpl] ...FF_ARGS"
88
set -e
99
source ./env.sh
1010

1111
export BUILD_ARCH=${1:-$VSCMD_ARG_TGT_ARCH}
1212
export BUILD_TYPE=${2:-shared}
1313
export BUILD_LICENSE=${3:-gpl}
14-
shift 3
14+
15+
if [ -z $BUILD_ARCH ]; then
16+
echo "$HELP_MSG" >&2
17+
exit 1
18+
fi
19+
20+
shift 3 || true
1521
FF_ARGS=$@
1622

23+
for dep in libharfbuzz libfreetype sdl libjxl; do
24+
if grep -q "enable-${dep}" FFmpeg/configure; then
25+
export ENABLE_${dep^^}=1
26+
FF_ARGS="$FF_ARGS --enable-$dep"
27+
fi
28+
done
29+
1730
echo BUILD_ARCH=$BUILD_ARCH
1831
echo BUILD_TYPE=$BUILD_TYPE
1932
echo BUILD_LICENSE=$BUILD_LICENSE
@@ -29,12 +42,22 @@ git -C FFmpeg apply ../ffmpeg.patch || true
2942
./build-make-dep.sh nv-codec-headers
3043

3144
CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ./build-cmake-dep.sh zlib
32-
./build-cmake-dep.sh freetype
33-
./build-cmake-dep.sh harfbuzz -DHB_HAVE_FREETYPE=ON
3445

35-
./build-cmake-dep.sh SDL
46+
if [ -n "$ENABLE_LIBFREETYPE" ]; then
47+
./build-cmake-dep.sh freetype
48+
fi
49+
50+
if [ -n "$ENABLE_LIBHARFBUZZ" ]; then
51+
./build-cmake-dep.sh harfbuzz -DHB_HAVE_FREETYPE=ON
52+
fi
53+
54+
if [ -n "$ENABLE_SDL" ]; then
55+
./build-cmake-dep.sh SDL
56+
fi
3657

37-
./build-cmake-dep.sh openexr -DOPENEXR_INSTALL_TOOLS=OFF
38-
./build-cmake-dep.sh libjxl -DBUILD_TESTING=OFF -DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_JNI=OFF -DJPEGXL_BUNDLE_LIBPNG=OFF -DJPEGXL_ENABLE_TOOLS=OFF -DJPEGXL_ENABLE_EXAMPLES=OFF #-DJPEGXL_STATIC=ON
58+
if [ -n "$ENABLE_LIBJXL" ]; then
59+
./build-cmake-dep.sh openexr -DOPENEXR_INSTALL_TOOLS=OFF
60+
./build-cmake-dep.sh libjxl -DBUILD_TESTING=OFF -DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_JNI=OFF -DJPEGXL_BUNDLE_LIBPNG=OFF -DJPEGXL_ENABLE_TOOLS=OFF -DJPEGXL_ENABLE_EXAMPLES=OFF #-DJPEGXL_STATIC=ON
61+
fi
3962

40-
./build-ffmpeg.sh FFmpeg --enable-libfreetype --enable-libharfbuzz --enable-sdl --enable-libjxl $FF_ARGS
63+
./build-ffmpeg.sh FFmpeg $FF_ARGS

0 commit comments

Comments
 (0)