1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

4-space-aligned windows/bootstrap.sh

This commit is contained in:
rku 2015-06-25 20:55:10 +03:00
parent 4984450925
commit 13bc58ccc6

View File

@ -20,19 +20,19 @@ cd $QTOX_DIR/libs
## toxcore ## toxcore
if [ ! -f "libtoxcore-win32-i686.zip" ]; then if [ ! -f "libtoxcore-win32-i686.zip" ]; then
wget --no-check-certificate http://jenkins.libtoxcore.so/job/libtoxcore-win32-i686/lastSuccessfulBuild/artifact/libtoxcore-win32-i686.zip wget --no-check-certificate http://jenkins.libtoxcore.so/job/libtoxcore-win32-i686/lastSuccessfulBuild/artifact/libtoxcore-win32-i686.zip
rm -rf include/tox rm -rf include/tox
fi fi
if [ ! -d "include/tox" ]; then if [ ! -d "include/tox" ]; then
$QTOX_DIR/tools/unzip -o libtoxcore-win32-i686.zip -d ./ $QTOX_DIR/tools/unzip -o libtoxcore-win32-i686.zip -d ./
fi fi
## filter_audio ## filter_audio
if [ ! -d $QTOX_DIR/libs/filter_audio ]; then if [ ! -d $QTOX_DIR/libs/filter_audio ]; then
git clone https://github.com/irungentoo/filter_audio.git $QTOX_DIR/libs/filter_audio git clone https://github.com/irungentoo/filter_audio.git $QTOX_DIR/libs/filter_audio
rm bin/libfilteraudio.dll rm bin/libfilteraudio.dll
else else
pushd $QTOX_DIR/libs/filter_audio pushd $QTOX_DIR/libs/filter_audio
git pull git pull
@ -42,130 +42,130 @@ fi
if [ ! -f "bin/libfilteraudio.dll" ]; then if [ ! -f "bin/libfilteraudio.dll" ]; then
pushd $QTOX_DIR/libs/filter_audio pushd $QTOX_DIR/libs/filter_audio
PREFIX="$QTOX_DIR/libs" CC="gcc.exe" make install PREFIX="$QTOX_DIR/libs" CC="gcc.exe" make install
mv libfilteraudio.dll.a $QTOX_DIR/libs/lib mv libfilteraudio.dll.a $QTOX_DIR/libs/lib
popd popd
if [ -f "lib/libfilteraudio.dll" ]; then if [ -f "lib/libfilteraudio.dll" ]; then
mv lib/libfilteraudio.dll bin/ mv lib/libfilteraudio.dll bin/
fi fi
fi fi
## qrencode ## qrencode
if [ ! -f "qrencode-3.4.4.tar.gz" ]; then if [ ! -f "qrencode-3.4.4.tar.gz" ]; then
wget http://fukuchi.org/works/qrencode/qrencode-3.4.4.tar.gz wget http://fukuchi.org/works/qrencode/qrencode-3.4.4.tar.gz
fi fi
if [ ! -d "$QTOX_DIR/libs/qrencode-3.4.4" ]; then if [ ! -d "$QTOX_DIR/libs/qrencode-3.4.4" ]; then
tar -xvf qrencode-3.4.4.tar.gz tar -xvf qrencode-3.4.4.tar.gz
rm -rf lib/qrcodelib.dll rm -rf lib/qrcodelib.dll
fi fi
if [ ! -f "lib/libqrencode.a" ]; then if [ ! -f "lib/libqrencode.a" ]; then
pushd $QTOX_DIR/libs/qrencode-3.4.4 pushd $QTOX_DIR/libs/qrencode-3.4.4
./autogen.sh ./autogen.sh
./configure --prefix=$QTOX_DIR/libs --without-tests --without-libiconv-prefix --without-tools ./configure --prefix=$QTOX_DIR/libs --without-tests --without-libiconv-prefix --without-tools
make make
make install make install
popd popd
fi fi
## OpenAL ## OpenAL
if [ ! -f "openal-soft-1.16.0.tar.bz2" ]; then if [ ! -f "openal-soft-1.16.0.tar.bz2" ]; then
wget http://kcat.strangesoft.net/openal-releases/openal-soft-1.16.0.tar.bz2 wget http://kcat.strangesoft.net/openal-releases/openal-soft-1.16.0.tar.bz2
rm -rf openal-soft-1.16.0 rm -rf openal-soft-1.16.0
fi fi
if [ ! -d "openal-soft-1.16.0" ]; then if [ ! -d "openal-soft-1.16.0" ]; then
tar -xvf openal-soft-1.16.0.tar.bz2 tar -xvf openal-soft-1.16.0.tar.bz2
rm bin/OpenAL32.dll rm bin/OpenAL32.dll
fi fi
if [ ! -f "bin/OpenAL32.dll" ]; then if [ ! -f "bin/OpenAL32.dll" ]; then
pushd openal-soft-1.16.0/build 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 .. cmake -G "MSYS Makefiles" -DQT_QMAKE_EXECUTABLE=NOTFOUND -DCMAKE_BUILD_TYPE=Release -DALSOFT_REQUIRE_DSOUND=NO -DCMAKE_INSTALL_PREFIX=$QTOX_DIR/libs ..
make make
make install make install
popd popd
fi fi
## opencv ## opencv
if [ ! -f "opencv-2.4.9.tar.gz" ]; then if [ ! -f "opencv-2.4.9.tar.gz" ]; then
wget --no-check-certificate https://github.com/Itseez/opencv/archive/2.4.9.tar.gz -O opencv-2.4.9.tar.gz wget --no-check-certificate https://github.com/Itseez/opencv/archive/2.4.9.tar.gz -O opencv-2.4.9.tar.gz
rm -rf opencv-2.4.9 rm -rf opencv-2.4.9
fi fi
if [ ! -d "opencv-2.4.9" ]; then if [ ! -d "opencv-2.4.9" ]; then
tar -xvf opencv-2.4.9.tar.gz tar -xvf opencv-2.4.9.tar.gz
rm bin/libopencv_core249.dll rm bin/libopencv_core249.dll
fi fi
if [ ! -f "bin/libopencv_core249.dll" ]; then if [ ! -f "bin/libopencv_core249.dll" ]; then
mkdir opencv-2.4.9/build mkdir opencv-2.4.9/build
pushd opencv-2.4.9/build pushd opencv-2.4.9/build
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$QTOX_DIR/libs \ cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$QTOX_DIR/libs \
-DBUILD_opencv_apps=NO \ -DBUILD_opencv_apps=NO \
-DBUILD_opencv_calib3d=NO \ -DBUILD_opencv_calib3d=NO \
-DBUILD_opencv_contrib=NO \ -DBUILD_opencv_contrib=NO \
-DBUILD_opencv_core=YES \ -DBUILD_opencv_core=YES \
-DBUILD_opencv_features2d=NO \ -DBUILD_opencv_features2d=NO \
-DBUILD_opencv_flann=NO \ -DBUILD_opencv_flann=NO \
-DBUILD_opencv_gpu=NO \ -DBUILD_opencv_gpu=NO \
-DBUILD_opencv_highgui=YES \ -DBUILD_opencv_highgui=YES \
-DBUILD_opencv_imgproc=YES \ -DBUILD_opencv_imgproc=YES \
-DBUILD_opencv_legacy=NO \ -DBUILD_opencv_legacy=NO \
-DBUILD_opencv_ml=NO \ -DBUILD_opencv_ml=NO \
-DBUILD_opencv_nonfree=NO \ -DBUILD_opencv_nonfree=NO \
-DBUILD_opencv_objdetect=NO \ -DBUILD_opencv_objdetect=NO \
-DBUILD_opencv_ocl=NO \ -DBUILD_opencv_ocl=NO \
-DBUILD_opencv_photo=NO \ -DBUILD_opencv_photo=NO \
-DBUILD_opencv_stiching=NO \ -DBUILD_opencv_stiching=NO \
-DBUILD_opencv_superres=NO \ -DBUILD_opencv_superres=NO \
-DBUILD_opencv_ts=NO \ -DBUILD_opencv_ts=NO \
-DBUILD_opencv_video=NO \ -DBUILD_opencv_video=NO \
-DBUILD_opencv_videostab=NO \ -DBUILD_opencv_videostab=NO \
-DBUILD_opencv_world=NO \ -DBUILD_opencv_world=NO \
-DWITH_QT=NO \ -DWITH_QT=NO \
-DBUILD_EXAMPLES=NO \ -DBUILD_EXAMPLES=NO \
.. ..
make make
make install make install
for arch in x86 x64 for arch in x86 x64
do do
if [ -d $QTOX_DIR/libs/$arch/mingw ]; then if [ -d $QTOX_DIR/libs/$arch/mingw ]; then
mv $QTOX_DIR/libs/$arch/mingw/bin/* $QTOX_DIR/libs/bin/ mv $QTOX_DIR/libs/$arch/mingw/bin/* $QTOX_DIR/libs/bin/
mv $QTOX_DIR/libs/$arch/mingw/lib/* $QTOX_DIR/libs/lib/ mv $QTOX_DIR/libs/$arch/mingw/lib/* $QTOX_DIR/libs/lib/
rm -rf $QTOX_DIR/libs/$arch rm -rf $QTOX_DIR/libs/$arch
fi fi
done done
popd popd
fi fi
## ffmpeg ## ffmpeg
if [ ! -f "ffmpeg-2.7.tar.bz2" ]; then if [ ! -f "ffmpeg-2.7.tar.bz2" ]; then
wget http://ffmpeg.org/releases/ffmpeg-2.7.tar.bz2 -O ffmpeg-2.7.tar.bz2 wget http://ffmpeg.org/releases/ffmpeg-2.7.tar.bz2 -O ffmpeg-2.7.tar.bz2
rm -rf ffmpeg-2.7 rm -rf ffmpeg-2.7
fi fi
if [ ! -d "ffmpeg-2.7" ]; then if [ ! -d "ffmpeg-2.7" ]; then
tar -xvf ffmpeg-2.7.tar.bz2 tar -xvf ffmpeg-2.7.tar.bz2
rm bin/avcodec-56.dll rm bin/avcodec-56.dll
pushd ffmpeg-2.7 pushd ffmpeg-2.7
patch -p1 < $QTOX_DIR/windows/ffmpeg-2.7-mingw.diff patch -p1 < $QTOX_DIR/windows/ffmpeg-2.7-mingw.diff
popd popd
fi fi
if [ ! -f "bin/avcodec-56.dll" ]; then if [ ! -f "bin/avcodec-56.dll" ]; then
pushd ffmpeg-2.7 pushd ffmpeg-2.7
./configure --target-os=mingw32 --prefix=$QTOX_DIR/libs \ ./configure --target-os=mingw32 --prefix=$QTOX_DIR/libs \
--enable-memalign-hack --disable-swscale-alpha --disable-programs --disable-doc --disable-postproc \ --enable-memalign-hack --disable-swscale-alpha --disable-programs --disable-doc --disable-postproc \
--disable-avfilter --disable-avresample --disable-swresample --disable-protocols --disable-filters \ --disable-avfilter --disable-avresample --disable-swresample --disable-protocols --disable-filters \
--disable-network --disable-muxers --disable-sdl --disable-iconv --disable-bzlib --disable-lzma \ --disable-network --disable-muxers --disable-sdl --disable-iconv --disable-bzlib --disable-lzma \
--disable-zlib --disable-xlib --disable-encoders --enable-shared --disable-static --disable-yasm --disable-zlib --disable-xlib --disable-encoders --enable-shared --disable-static --disable-yasm
make make
make install make install
popd popd
fi fi
echo **Done** echo **Done**