diff options
author | Chris Wilson <chris+github@qwirx.com> | 2015-08-23 15:04:44 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2015-08-23 15:04:44 +0000 |
commit | e10432c99c17b589b7d87a9f9e0d61bc1f86045e (patch) | |
tree | 5c7d408ba05715579a2d4515fefb31a0037586c8 | |
parent | 753fd7f5cf888cedf95befc88600239b61958bd5 (diff) |
Add script to compile Box Backup and dependencies on Windows (Cygwin).
Automates the instructions found in docs/api-notes/win32_build_on_cygwin_using_mingw.txt.
-rwxr-xr-x | infrastructure/mingw/compile-boxbackup-cygwin.sh | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/infrastructure/mingw/compile-boxbackup-cygwin.sh b/infrastructure/mingw/compile-boxbackup-cygwin.sh new file mode 100755 index 00000000..12afa120 --- /dev/null +++ b/infrastructure/mingw/compile-boxbackup-cygwin.sh @@ -0,0 +1,55 @@ +#!/bin/sh + +set -e +set -x + +wget -c https://cygwin.com/setup-x86_64.exe \ +|| powershell wget https://cygwin.com/setup-x86_64.exe -UseBasicParsing -outfile setup-x86_64.exe + +./setup-x86_64.exe --quiet-mode --packages \ + "autoconf,automake,gdb,make,mingw64-x86_64-gcc,mingw64-x86_64-gcc-g++, + ,mingw64-x86_64-zlib,libxml2,libxslt,perl,subversion,unzip,vim,wget" + +install_prefix=/usr/x86_64-w64-mingw32 +compiler_prefix=x86_64-w64-mingw32 + +openssl_source=https://www.openssl.org/source/ +latest_openssl=`wget -O- -q $openssl_source \ +| grep '<td><a href="openssl-1.0.*.tar.gz">' \ +| sed -e 's/.tar.gz">.*//' -e 's/.*"//' | sort | tail -1` + +wget -c $openssl_source/$latest_openssl.tar.gz +tar xzf $latest_openssl.tar.gz +( + cd $latest_openssl + [ -r Makefile ] || \ + ./Configure --prefix=$install_prefix mingw64 \ + --cross-compile-prefix=$compiler_prefix- + make + make install_sw +) + +pcre_url=`wget -O- -q ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ \ +| grep 'pcre-8.*.tar.bz2"' | sed -e 's/">pcre-.*//' | sed -e 's/.*<a href="//' \ +| tail -1` +pcre_version=`basename $pcre_url .tar.bz2` +wget -c $pcre_url +tar xjf `basename $pcre_url` +( + cd $pcre_version + ./configure --prefix=$install_prefix --disable-shared \ + --host=$compiler_prefix + make + make install +) + +svn co https://www.boxbackup.org/svn/box/trunk/ bb-trunk +( + cd bb-trunk + ./infrastructure/mingw/configure.sh + make + ./runtest ALL + ./runtest ALL release +) + + |