2013-07-11 12:23:50 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
BASE=$(readlink -f $0)
|
|
|
|
BASE=$(dirname $BASE) # up one
|
|
|
|
BASE=$(dirname $BASE) # up one more
|
|
|
|
BASE=$(dirname $BASE) # up one more
|
|
|
|
|
2013-07-15 13:44:11 -04:00
|
|
|
HOST=i686-w64-mingw32
|
2013-07-11 12:23:50 -04:00
|
|
|
MINGW_ROOT=/usr/$HOST/sys-root/mingw
|
|
|
|
|
|
|
|
export PKG_CONFIG_PREFIX=$MINGW_ROOT
|
|
|
|
export PKG_CONFIG_LIBDIR=$MINGW_ROOT/lib/pkgconfig
|
2013-07-15 13:44:11 -04:00
|
|
|
export PKGCONFIG=pkg-config
|
2013-07-11 12:23:50 -04:00
|
|
|
export AR=$HOST-ar
|
|
|
|
export RANLIB=$HOST-ranlib
|
|
|
|
export CC=$HOST-gcc
|
|
|
|
export CPP=$HOST-g++
|
|
|
|
export CXX=$HOST-g++
|
|
|
|
export AS=$HOST-as
|
|
|
|
export LINK_CC=$HOST-gcc
|
|
|
|
export LINK_CXX=$HOST-g++
|
|
|
|
export WINRC=$HOST-windres
|
|
|
|
export STRIP=$HOST-strip
|
|
|
|
|
|
|
|
BUILD_DIR=$BASE/build
|
|
|
|
BUILD_CACHE_FILE=$BUILD_DIR/c4che/_cache.py
|
|
|
|
TOOLS_DIR=$BASE/tools/windows_packaging
|
|
|
|
|
2013-07-19 04:35:42 -04:00
|
|
|
. ../define_versions.sh
|
|
|
|
|
2013-07-11 12:23:50 -04:00
|
|
|
APPNAME=`grep -m 1 '^APPNAME' $BASE/wscript | awk '{print $3}' | sed "s/'//g"`
|
|
|
|
|
|
|
|
# These are only relevant after a build
|
|
|
|
if test -f $BUILD_CACHE_FILE
|
|
|
|
then
|
|
|
|
# Figure out the Build Type
|
|
|
|
if grep -q "DEBUG = True" $BUILD_CACHE_FILE; then
|
|
|
|
DEBUG=1
|
2013-07-19 04:35:42 -04:00
|
|
|
PACKAGE_DIR="$APPNAME-${version}-win32-dbg"
|
2013-07-11 12:23:50 -04:00
|
|
|
else
|
2013-07-19 04:35:42 -04:00
|
|
|
PACKAGE_DIR="$APPNAME-${version}-win32"
|
2013-07-11 12:23:50 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
if grep -q "BUILD_TESTS = True" $BUILD_CACHE_FILE; then
|
|
|
|
WITH_TESTS=1
|
|
|
|
fi
|
|
|
|
|
|
|
|
ARDOUR_DATA_DIR=$PACKAGE_DIR/share/ardour3
|
|
|
|
fi
|
|
|
|
|
|
|
|
# put this somewhere better...
|
2013-07-19 20:33:48 -04:00
|
|
|
VIRT_IMAGE_PATH=$HOME/Data/virt-images/winxp.raw
|