mirror of
https://github.com/mpv-player/mpv
synced 2025-04-11 04:01:31 +00:00
ci: add d3d11 to mingw build
This commit is contained in:
parent
ace249acc5
commit
8fbc4b1737
16
.travis.yml
16
.travis.yml
@ -7,6 +7,11 @@ _macbase:
|
|||||||
env:
|
env:
|
||||||
- HOMEBREW_NO_AUTO_UPDATE=1
|
- HOMEBREW_NO_AUTO_UPDATE=1
|
||||||
- HOMEBREW_NO_INSTALL_CLEANUP=1
|
- HOMEBREW_NO_INSTALL_CLEANUP=1
|
||||||
|
before_cache:
|
||||||
|
- brew cleanup -s
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/Library/Caches/Homebrew
|
||||||
- &macNew
|
- &macNew
|
||||||
<<: *macOld
|
<<: *macOld
|
||||||
addons:
|
addons:
|
||||||
@ -22,7 +27,11 @@ _mingwbase:
|
|||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages: ['autoconf', 'automake', 'pkg-config', 'gcc-mingw-w64',
|
packages: ['autoconf', 'automake', 'pkg-config', 'gcc-mingw-w64',
|
||||||
'nasm', 'yasm']
|
'gcc-multilib', 'nasm', 'yasm']
|
||||||
|
before_install: |
|
||||||
|
# upgrade MinGW CRT to the one from Ubuntu 20.04 (required for D3D11):
|
||||||
|
wget "http://archive.ubuntu.com/ubuntu/pool/universe/m/mingw-w64/"mingw-w64-{common,i686-dev,x86-64-dev}_7.0.0-2_all.deb
|
||||||
|
sudo apt-get install -y ./mingw-w64-*.deb
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- mingw_prefix/
|
- mingw_prefix/
|
||||||
@ -131,12 +140,7 @@ before_install:
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
before_cache:
|
|
||||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew cleanup -s ; fi
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- $HOME/Library/Caches/Homebrew
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- ./bootstrap.py
|
- ./bootstrap.py
|
||||||
|
@ -12,8 +12,9 @@ commonflags="--disable-static --enable-shared"
|
|||||||
export PKG_CONFIG_SYSROOT_DIR="$prefix_dir"
|
export PKG_CONFIG_SYSROOT_DIR="$prefix_dir"
|
||||||
export PKG_CONFIG_LIBDIR="$PKG_CONFIG_SYSROOT_DIR/lib/pkgconfig"
|
export PKG_CONFIG_LIBDIR="$PKG_CONFIG_SYSROOT_DIR/lib/pkgconfig"
|
||||||
|
|
||||||
export CC=$TARGET-gcc
|
# -posix is Ubuntu's variant with pthreads support
|
||||||
export CXX=$TARGET-g++
|
export CC=$TARGET-gcc-posix
|
||||||
|
export CXX=$TARGET-g++-posix
|
||||||
export AR=$TARGET-ar
|
export AR=$TARGET-ar
|
||||||
export NM=$TARGET-nm
|
export NM=$TARGET-nm
|
||||||
export RANLIB=$TARGET-ranlib
|
export RANLIB=$TARGET-ranlib
|
||||||
@ -72,6 +73,25 @@ if [ ! -e "$prefix_dir/lib/libavcodec.dll.a" ]; then
|
|||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
## shaderc + spirv-cross
|
||||||
|
if [ ! -e "$prefix_dir/lib/libspirv-cross-c-shared.dll.a" ]; then
|
||||||
|
if [ ! -d shaderc ]; then
|
||||||
|
$gitclone https://github.com/google/shaderc.git
|
||||||
|
(cd shaderc && ./utils/git-sync-deps)
|
||||||
|
fi
|
||||||
|
builddir shaderc
|
||||||
|
cmake .. -DCMAKE_SYSTEM_NAME=Windows \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF \
|
||||||
|
-DSHADERC_SKIP_TESTS=ON -DCMAKE_INSTALL_PREFIX=/
|
||||||
|
makeplusinstall
|
||||||
|
popd
|
||||||
|
builddir shaderc/third_party/spirv-cross
|
||||||
|
cmake .. -DCMAKE_SYSTEM_NAME=Windows \
|
||||||
|
-DSPIRV_CROSS_SHARED=ON -DSPIRV_CROSS_{CLI,STATIC}=OFF
|
||||||
|
makeplusinstall
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
|
||||||
## freetype2
|
## freetype2
|
||||||
if [ ! -e "$prefix_dir/lib/libfreetype.dll.a" ]; then
|
if [ ! -e "$prefix_dir/lib/libfreetype.dll.a" ]; then
|
||||||
ver=2.10.2
|
ver=2.10.2
|
||||||
@ -104,22 +124,23 @@ if [ ! -e "$prefix_dir/lib/libass.dll.a" ]; then
|
|||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## lua
|
## luajit
|
||||||
if [ ! -e "$prefix_dir/lib/liblua.a" ]; then
|
if [ ! -e "$prefix_dir/lib/libluajit-5.1.a" ]; then
|
||||||
ver=5.2.4
|
ver=2.0.5
|
||||||
gettar "https://www.lua.org/ftp/lua-${ver}.tar.gz"
|
gettar "http://luajit.org/download/LuaJIT-${ver}.tar.gz"
|
||||||
pushd lua-${ver}
|
pushd LuaJIT-${ver}
|
||||||
make PLAT=mingw INSTALL_TOP="$prefix_dir" TO_BIN=/dev/null \
|
hostcc=gcc
|
||||||
CC="$CC" AR="$AR r" all install
|
[[ "$TARGET" == "i686-"* ]] && hostcc="$hostcc -m32"
|
||||||
make INSTALL_TOP="$prefix_dir" pc >"$prefix_dir/lib/pkgconfig/lua.pc"
|
make HOST_CC="$hostcc" CROSS=$TARGET- TARGET_SYS=Windows \
|
||||||
printf 'Name: Lua\nDescription:\nVersion: ${version}\nLibs: -L${libdir} -llua\nCflags: -I${includedir}\n' \
|
BUILDMODE=static amalg
|
||||||
>>"$prefix_dir/lib/pkgconfig/lua.pc"
|
make DESTDIR="$prefix_dir" INSTALL_DEP= FILE_T=luajit.exe install
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## mpv
|
## mpv
|
||||||
PKG_CONFIG=pkg-config CFLAGS="-I'$prefix_dir/include'" LDFLAGS="-L'$prefix_dir/lib'" \
|
PKG_CONFIG=pkg-config CFLAGS="-I'$prefix_dir/include'" LDFLAGS="-L'$prefix_dir/lib'" \
|
||||||
python3 ./waf configure \
|
python3 ./waf configure \
|
||||||
--enable-libmpv-shared --lua=52
|
--enable-libmpv-shared --lua=luajit \
|
||||||
|
--enable-{shaderc,spirv-cross,d3d11}
|
||||||
|
|
||||||
python3 ./waf build --verbose
|
python3 ./waf build --verbose
|
||||||
|
Loading…
Reference in New Issue
Block a user