Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
amazingfate committed Jan 18, 2015
1 parent 244d980 commit 406bb22
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 0 deletions.
43 changes: 43 additions & 0 deletions bakamplayer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

# Build script for bakamplayer for native msys2/mingw-w64 by FrankHB.
# based on official scripts.
# Usage: ./baka-mplayer.sh $arch /e/Source/baka-mplayer
# The 3rd argument is optional, using number of CPU cores if not preset.

if [[ $1 == 'x86_64' ]]; then
arch=x86_64
elif [[ $1 == 'i686' ]]; then
arch=i686
else
echo "Please specify either x86_64 or i686 architecture."
exit;
fi

if [[ $arch == 'x86_64' ]]; then
PREFIX=/mingw64
else
PREFIX=/mingw32
fi

if [[ $2 == '' ]]; then
echo "Please specify mpv source directory."
exit
else
baka_src="$2"
fi

if [[ $3 != '' ]]; then
JOBS="$3"
else
JOBS=-j`grep -c ^processor /proc/cpuinfo`
fi

#pacman -S mingw-w64-$arch-ffmpeg mingw-w64-i686-libass \
#mingw-w64-i686-libbluray mingw-w64-$arch-qt5 --needed

# build baka
pushd "$baka_src"

QMAKE=$PREFIX/bin/qmake ./configure CONFIG+=embed_translations lupdate=$PREFIX/bin/lupdate lrelease=$PREFIX/bin/lrelease
make $JOBS
63 changes: 63 additions & 0 deletions mpv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/bin/bash

# Build script for bakamplayer for native msys2/mingw-w64 by FrankHB.
# based on official scripts.
# Usage: ./mpv.sh $arch /e/Source/mpv
# The 3rd argument is optional, using number of CPU cores if not preset.

if [[ $1 == 'x86_64' ]]; then
arch=x86_64
elif [[ $1 == 'i686' ]]; then
arch=i686
else
echo "Please specify either x86_64 or i686 architecture."
exit;
fi

if [[ $arch == 'x86_64' ]]; then
PREFIX=/mingw64
else
PREFIX=/mingw32
fi

if [[ $2 == '' ]]; then
echo "Please specify mpv source directory."
exit
else
mpv_src="$2"
fi

if [[ $3 != '' ]]; then
JOBS="$3"
else
JOBS=-j`grep -c ^processor /proc/cpuinfo`
fi

#pacman -S mingw-w64-$arch-ffmpeg mingw-w64-$arch-libass \
#mingw-w64-$arch-libbluray mingw-w64-$arch-qt5-static --needed

# build mpv
pushd "$mpv_src"
python3.3 bootstrap.py
export PATH=$PREFIX/bin:$PATH
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
DEST_OS=win32 TARGET=$arch-w64-mingw32 PKG_CONFIG=/usr/bin/pkg-config CC=gcc PERL=$PREFIX/bin/perl AR=$PREFIX/bin/ar \
python3.3 waf configure --check-c-compiler=gcc --prefix=$PREFIX \
--enable-libmpv-shared --disable-client-api-examples
python3.3 waf build $JOBS
python3.3 waf install

instroot=$PREFIX
mv $instroot/bin/libmpv.dll.a $instroot/lib
mv $instroot/bin/pkgconfig/mpv.pc $instroot/lib/pkgconfig
sed -i 's_/instroot/bin_/$instroot/lib_' $instroot/lib/pkgconfig/mpv.pc
rmdir $instroot/bin/pkgconfig
popd

# build baka-mplayer
#QMAKE="$PREFIX/bin/qmake" \
#./configure \
#"CONFIG+=embed_translations" \
#"lupdate=$PREFIX/bin/lupdate" \
#"lrelease=$PREFIX/bin/lrelease"
#make $JOBS

0 comments on commit 406bb22

Please sign in to comment.