liushuyu
7 years ago
No known key found for this signature in database
GPG Key ID: 23D1CE4534419437
1 changed files with
6 additions and
11 deletions
-
linux-mingw/mingw-setup.sh
|
|
|
@ -2,18 +2,13 @@ |
|
|
|
# install pefile |
|
|
|
pip3 install pefile |
|
|
|
|
|
|
|
# ffmpeg |
|
|
|
FFMPEG_VER='4.1' |
|
|
|
for i in 'shared' 'dev'; do |
|
|
|
echo "Downloading ffmpeg (${i})..." |
|
|
|
wget -q -c "https://ffmpeg.zeranoe.com/builds/win64/${i}/ffmpeg-${FFMPEG_VER}-win64-${i}.zip" |
|
|
|
7z x "ffmpeg-${FFMPEG_VER}-win64-${i}.zip" > /dev/null |
|
|
|
done |
|
|
|
MINGW_URL='https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z/download' |
|
|
|
TARGET_DIR='mingw64/x86_64-w64-mingw32/lib/' |
|
|
|
|
|
|
|
echo "Copying ffmpeg ${FFMPEG_VER} files to sysroot..." |
|
|
|
cp -v "ffmpeg-${FFMPEG_VER}-win64-shared"/bin/*.dll /usr/x86_64-w64-mingw32/lib/ |
|
|
|
cp -vr "ffmpeg-${FFMPEG_VER}-win64-dev"/include /usr/x86_64-w64-mingw32/ |
|
|
|
cp -v "ffmpeg-${FFMPEG_VER}-win64-dev"/lib/*.{a,def} /usr/x86_64-w64-mingw32/lib/ |
|
|
|
echo 'Downloading MinGW replacement binaries...' |
|
|
|
wget -q "${MINGW_URL}" -O 'mingw.7z' |
|
|
|
7z x 'mingw.7z' "${TARGET_DIR}"lib{mf,mfplat,mfuuid}.a |
|
|
|
cp -rv "${TARGET_DIR}"/* '/usr/x86_64-w64-mingw32/lib/' |
|
|
|
|
|
|
|
# remove the directory |
|
|
|
ABS_PATH="$(readlink -f $0)" |
|
|
|
|