Last active
May 14, 2016 08:38
-
-
Save abakum/2d8448ba69162f4a12e598fab5c7c07f to your computer and use it in GitHub Desktop.
Build back-end (CLI) of mkvtoolnix from git on MSYS2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
update-core | |
pacman -Suu | |
if [ "$MSYSTEM" == "MSYS" ] ; then | |
pacman -S git | |
pacman -S base-devel | |
pacman -S ruby | |
else | |
cd ~ | |
if [ -d mkvtoolnix ] ; then | |
cd mkvtoolnix | |
git pull | |
else | |
[ "$MSYSTEM" == "MINGW32" ] && b=i686 | |
[ "$MSYSTEM" == "MINGW64" ] && b=x86_64 | |
mb=mingw-w64-$b | |
echo $mb | |
pacman -S $mb-toolchain | |
pacman -S $mb-libebml | |
pacman -S $mb-libmatroska | |
pacman -S $mb-libogg | |
pacman -S $mb-libvorbis | |
pacman -S $mb-zlib | |
pacman -S $mb-boost | |
pacman -S $mb-flac | |
pacman -S $mb-curl | |
git clone git://github.com/mbunkus/mkvtoolnix.git | |
cd mkvtoolnix | |
fi | |
grep -q ${MSYSTEM,,} build-config || { | |
./autogen.sh | |
./configure --with-boost=/${MSYSTEM,,} | |
./drake clean | |
} | |
./drake | |
mv -f src/*.exe /${MSYSTEM,,}/bin | |
mv -f src/tools/*.exe /${MSYSTEM,,}/bin | |
fi |
Tested only:
mkvmerge.exe
mkvextract.exe
mkvpropedit.exe
mkvinfo.exe
ebml_validator.exe
All with shared libraries
Building with a mingw (shared libraries) on windows with MSYS2.
- MSYS2 installation.
- a MSYS2 from https://sourceforge.net/projects/msys2/
- roughly 5 GB of free space available.
The rest of this guide assumes that you've installed MSYS2
into the directory c:\msys64. - Build script.
- Load mkvtoolnix.sh to ~
- MSYS2 preparations.
- Fist run from windows:
c:\msys64\msys2_shell.bat
- From the ~ run:
./mkvtoolnix.sh
exit
- Execution for 64 bit binaries.
- For 64bit binaries run from windows:
c:\msys64\mingw64_shell.bat
- From the ~ run:
./mkvtoolnix.sh
If everything works fine you'll end up with a configured MKVToolNix
source tree, build binares and copied it to c:\msys64\mingw64\bin
Use it on windows from c:\msys64\mingw64\bin. - Execution for 32 bit binaries.
- For 32bit binaries run from windows:
c:\msys64\mingw32_shell.bat
- From the ~ run:
./mkvtoolnix.sh
If everything works fine you'll end up with a configured MKVToolNix
source tree, build binares and copied it to c:\msys64\mingw32\bin.
Use it on windows from c:\msys64\mingw32\bin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
set bit=32
cd c:\msys%bit%
msys2_shell.bat
./mkvtoolnix.sh
exit
mingw%bit%_shell.bat
./mkvtoolnix.sh