2015-01-05 19:25:32 +08:00
|
|
|
#!/bin/sh
|
|
|
|
QTOX_DIR=`pwd`/..
|
|
|
|
|
|
|
|
if [ -d $QTOX_DIR/libs ]; then
|
|
|
|
echo "Remove ./libs and redownload/recompile dependencies?"
|
|
|
|
read -p "m/a/N (missing/all/no): " yn
|
|
|
|
yn=$(echo $yn | tr "[:upper:]" "[:lower:]")
|
|
|
|
if [ "$yn" == "a" ]; then
|
|
|
|
rm -rf $QTOX_DIR/libs
|
|
|
|
elif [ "$yn" == "n" ]; then
|
|
|
|
exit -1
|
|
|
|
elif [ "$yn" != "m" ]; then
|
|
|
|
exit -1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p $QTOX_DIR/libs
|
|
|
|
cd $QTOX_DIR/libs
|
|
|
|
|
|
|
|
|
|
|
|
## toxcore
|
2015-08-05 20:40:06 +08:00
|
|
|
if [ ! -f "libtoxcore_build_windows_x86_shared_release.zip" ]; then
|
|
|
|
wget --no-check-certificate https://build.tox.chat/view/libtoxcore/job/libtoxcore_build_windows_x86_shared_release/lastSuccessfulBuild/artifact/libtoxcore_build_windows_x86_shared_release.zip
|
2015-06-26 01:55:10 +08:00
|
|
|
rm -rf include/tox
|
2015-01-05 19:25:32 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d "include/tox" ]; then
|
2016-04-21 14:21:21 +08:00
|
|
|
unzip -o libtoxcore_build_windows_x86_shared_release.zip -d ./
|
2015-01-05 19:25:32 +08:00
|
|
|
fi
|
|
|
|
|
2015-02-19 23:49:58 +08:00
|
|
|
|
2015-04-29 00:14:50 +08:00
|
|
|
## qrencode
|
|
|
|
if [ ! -f "qrencode-3.4.4.tar.gz" ]; then
|
2015-06-26 01:55:10 +08:00
|
|
|
wget http://fukuchi.org/works/qrencode/qrencode-3.4.4.tar.gz
|
2015-04-29 00:14:50 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d "$QTOX_DIR/libs/qrencode-3.4.4" ]; then
|
2015-06-26 01:55:10 +08:00
|
|
|
tar -xvf qrencode-3.4.4.tar.gz
|
|
|
|
rm -rf lib/qrcodelib.dll
|
2015-04-29 00:14:50 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -f "lib/libqrencode.a" ]; then
|
|
|
|
pushd $QTOX_DIR/libs/qrencode-3.4.4
|
2015-06-26 01:55:10 +08:00
|
|
|
./autogen.sh
|
|
|
|
./configure --prefix=$QTOX_DIR/libs --without-tests --without-libiconv-prefix --without-tools
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
popd
|
2015-01-05 19:25:32 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
## OpenAL
|
|
|
|
if [ ! -f "openal-soft-1.16.0.tar.bz2" ]; then
|
2015-06-26 01:55:10 +08:00
|
|
|
wget http://kcat.strangesoft.net/openal-releases/openal-soft-1.16.0.tar.bz2
|
|
|
|
rm -rf openal-soft-1.16.0
|
2015-01-05 19:25:32 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d "openal-soft-1.16.0" ]; then
|
2015-06-26 01:55:10 +08:00
|
|
|
tar -xvf openal-soft-1.16.0.tar.bz2
|
|
|
|
rm bin/OpenAL32.dll
|
2015-01-05 19:25:32 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -f "bin/OpenAL32.dll" ]; then
|
2015-06-26 01:55:10 +08:00
|
|
|
pushd openal-soft-1.16.0/build
|
|
|
|
cmake -G "MSYS Makefiles" -DQT_QMAKE_EXECUTABLE=NOTFOUND -DCMAKE_BUILD_TYPE=Release -DALSOFT_REQUIRE_DSOUND=NO -DCMAKE_INSTALL_PREFIX=$QTOX_DIR/libs ..
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
popd
|
2015-01-05 19:25:32 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2015-06-26 01:41:10 +08:00
|
|
|
## ffmpeg
|
|
|
|
if [ ! -f "ffmpeg-2.7.tar.bz2" ]; then
|
2015-06-26 01:55:10 +08:00
|
|
|
wget http://ffmpeg.org/releases/ffmpeg-2.7.tar.bz2 -O ffmpeg-2.7.tar.bz2
|
|
|
|
rm -rf ffmpeg-2.7
|
2015-06-26 01:41:10 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d "ffmpeg-2.7" ]; then
|
2015-06-26 01:55:10 +08:00
|
|
|
tar -xvf ffmpeg-2.7.tar.bz2
|
|
|
|
rm bin/avcodec-56.dll
|
|
|
|
pushd ffmpeg-2.7
|
|
|
|
patch -p1 < $QTOX_DIR/windows/ffmpeg-2.7-mingw.diff
|
|
|
|
popd
|
2015-06-26 01:41:10 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -f "bin/avcodec-56.dll" ]; then
|
2015-06-26 01:55:10 +08:00
|
|
|
pushd ffmpeg-2.7
|
|
|
|
./configure --target-os=mingw32 --prefix=$QTOX_DIR/libs \
|
|
|
|
--enable-memalign-hack --disable-swscale-alpha --disable-programs --disable-doc --disable-postproc \
|
|
|
|
--disable-avfilter --disable-avresample --disable-swresample --disable-protocols --disable-filters \
|
|
|
|
--disable-network --disable-muxers --disable-sdl --disable-iconv --disable-bzlib --disable-lzma \
|
|
|
|
--disable-zlib --disable-xlib --disable-encoders --enable-shared --disable-static --disable-yasm
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
popd
|
2015-06-26 01:41:10 +08:00
|
|
|
fi
|
|
|
|
|
2015-01-05 19:25:32 +08:00
|
|
|
echo **Done**
|