-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path9b-build-mpv.sh
87 lines (62 loc) · 2.35 KB
/
9b-build-mpv.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/bash
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
source $SCRIPT_DIR/functions.sh
#clear && echo_info $0 $@
echo_info $0 $@
BUILD64=~/mpv-winbuild-cmake/build64
cd $BUILD64
cp -v --preserve=timestamps $SCRIPT_DIR/Patch/opus_data-735117b.tar.gz ../src_packages/opus-dnn/
StartTime=$(date '+%H:%M:%S')
#set -x #echo on
#{ set +x; } 2>/dev/null # echo off
echo_build luajit
echo_build vulkan
#FILE=$BUILD64/install/x86_64-w64-mingw32/lib/pkgconfig/vulkan.pc
#if [ ! -f "$FILE" ]; then
# sed -i "s/if(PKG_CONFIG_FOUND)/if(TRUE)/" $BUILD64/packages/vulkan-prefix/src/vulkan/loader/CMakeLists.txt
# rm $BUILD64/packages/vulkan-prefix/src/vulkan-stamp/vulkan-build
# ninja vulkan
#fi
#echo_info "+ ninja libssh"
#ninja libssh -j 1
echo_build libssh -j 1
echo_build shaderc
#FILE=$BUILD64/install/x86_64-w64-mingw32/lib/pkgconfig/shaderc.pc
#if [ ! -f "$FILE" ]; then
# cp $BUILD64/packages/shaderc-prefix/src/shaderc-build/shaderc.pc $FILE
#fi
#echo_build spirv-cross
echo_build libplacebo
#rm $FILE
echo_build libarchive
echo_build libass
lsb_release -a &> /dev/null
if [ $? -ne 127 ]; then
rm -rf packages/vulkan-prefix/src/vulkan/
rm -rf packages/vulkan-header-prefix/src/vulkan-header/
rm -rf packages/shaderc-prefix/src/shaderc/
rm -rf packages/spirv-tools-prefix/src/spirv-tools/
rm -rf packages/spirv-headers-prefix/src/spirv-headers/
rm -rf packages/glslang-prefix/src/glslang/
rm -rf packages/libplacebo-prefix/src/libplacebo/
rm -rf packages/zlib-prefix/src/zlib/
rm -rf packages/libjpeg-prefix/src/libjpeg/
rm -rf packages/spirv-cross-prefix/src/spirv-cross/
rm -rf packages/libarchive-prefix/src/libarchive/
rm -rf packages/bzip2-prefix/src/bzip2/
rm -rf packages/expat-prefix/src/expat/
rm -rf packages/lzo-prefix/src/lzo/
rm -rf packages/xz-prefix/src/xz/
rm -rf packages/zlib-prefix/src/zlib/
rm -rf packages/nettle-prefix/src/nettle/
rm -rf packages/libass-prefix/src/libass/
rm -rf packages/harfbuzz-prefix/src/harfbuzz/
rm -rf packages/freetype2-prefix/src/freetype2/
rm -rf packages/fribidi-prefix/src/fribidi/
rm -rf packages/libiconv-prefix/src/libiconv/
rm -rf packages/fontconfig-prefix/src/fontconfig/
fi
echo_build mpv
cd mpv-x86_64* && ls -g -o --time-style=iso *.exe
cd ../mpv-dev-x86_64-* && ls -g -o --time-style=iso *.dll
echo 'MPV Build: ' $StartTime '->' $(date '+%H:%M:%S') >> $HOME/build_time.txt