-
Notifications
You must be signed in to change notification settings - Fork 0
/
idiot_proof.sh
executable file
·140 lines (133 loc) · 3.32 KB
/
idiot_proof.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#!/bin/bash
default="./configure \
--disable-ffplay \
--disable-doc \
--disable-debug\
--enable-static \
--enable-cuda-nvcc \
--enable-nonfree \
--enable-libnpp \
--enable-gpl \
--enable-version3 \
--enable-small \
--enable-chromaprint \
--enable-frei0r \
--enable-gmp \
--enable-gnutls \
--enable-ladspa \
--enable-libaom \
--enable-libass \
--enable-libcaca \
--enable-libcdio \
--enable-libcodec2 \
--enable-libfdk-aac \
--enable-libfontconfig \
--enable-libfreetype \
--enable-libfribidi \
--enable-libgme \
--enable-libgsm \
--enable-libjack \
--enable-libmp3lame \
--enable-libopencore-amrnb \
--enable-libopencore-amrwb \
--enable-libopencore-amrwb \
--enable-libopenjpeg \
--enable-libopenmpt \
--enable-libopus \
--enable-libpulse \
--enable-librsvg \
--enable-librubberband \
--enable-librtmp \
--enable-libshine \
--enable-libsnappy \
--enable-libsoxr \
--enable-libspeex \
--enable-libssh \
--enable-libtesseract \
--enable-libtheora \
--enable-libtwolame \
--enable-libv4l2 \
--enable-libvo-amrwbenc \
--enable-libvorbis \
--enable-libvpx \
--enable-libwavpack \
--enable-libwebp \
--enable-libx264 \
--enable-libx265 \
--enable-libxvid \
--enable-libxml2 \
--enable-libzmq \
--enable-libzvbi \
--enable-lv2 \
--enable-libmysofa \
--enable-openal \
--enable-opencl \
--enable-opengl \
--enable-vulkan \
--enable-libdrm \
"
helper() {
echo "Usage: idiot_proof [platform]"
echo
echo "A script to build the ffmpeg static binaries for JumpCutter"
echo
echo " -p: -p <mac|win32|linux|all> Sets the platform for the static build"
echo " --platform: --platform=<mac|win32|linux|all> Sets the platform for the static build"
echo " -h: -h Shows this page"
echo " --help: --help Shows this page"
}
win_configure() {
eval "$default --arch=x86_64 \
--target-os=mingw32 \
--cross-prefix=x86_64-w64-mingw32- \
--pkg-config=pkg-config \
--extra-cflags=-I/usr/local/include \
--extra-ldflags=-L/usr/local/cuda/v10.0/lib/x64/
"
}
mac_configure() {
eval "$default --enable-videotoolbox"
}
linux_configure() {
eval "$default"
}
while [[ $# -gt 0 ]]; do
case "$1" in
-p) if [[ -z $2 ]]; then
echo "e must have an input value"
exit 1
else
EXTENSION="$2"
shift 2
fi
;;
--platform=*) EXTENSION="${i#*=}"
shift
;;
-h|--help) helper; exit;;
*) echo "unknown input $1"; exit 2;;
esac
done
if [[ -z $EXTENSION ]]; then
echo need to specify platform
exit 2
fi
case "$EXTENSION" in
win32)
echo "windows lame"
win_configure
;;
mac)
echo "mac is lame"
mac_configure
;;
linux)
echo "Linux master race"
linux_configure
;;
all)
echo "oh god get ready for the compile time"
;;
*)
echo "Usage: ./idiot_proof.sh -p <mac|win32|linux|all>"
esac