X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=tools%2Fwindows_packaging%2Fmingw-env.sh;h=f4c0a375ca99a06d0716f9fcc86336d7b56a9a7a;hb=b9ba91ac1d20fb57eb19a6639080ae45244436b8;hp=c6747ae03bebe5263254ddec046b75237a022616;hpb=3b8f2e82f27215d5c24e964b88ff7784164dc2ca;p=ardour.git diff --git a/tools/windows_packaging/mingw-env.sh b/tools/windows_packaging/mingw-env.sh old mode 100644 new mode 100755 index c6747ae03b..f4c0a375ca --- a/tools/windows_packaging/mingw-env.sh +++ b/tools/windows_packaging/mingw-env.sh @@ -1,16 +1,28 @@ #!/bin/bash -BASE=$(readlink -f $0) -BASE=$(dirname $BASE) # up one -BASE=$(dirname $BASE) # up one more -BASE=$(dirname $BASE) # up one more +if [ -z "$ARCH" ]; then + echo "ARCH not set defaulting to win32" + ARCH=win32 +elif [ "$ARCH" == "win32" ]; then + echo "ARCH set to win32" +elif [ "$ARCH" == "win64" ]; then + echo "ARCH set to win64" +else + echo "ARCH set invalid value aborting..." + exit 1 +fi + +if [ "$ARCH" == "win32" ]; then + HOST=i686-w64-mingw32 +else + HOST=x86_64-w64-mingw32 +fi -HOST=i686-pc-mingw32 MINGW_ROOT=/usr/$HOST/sys-root/mingw export PKG_CONFIG_PREFIX=$MINGW_ROOT export PKG_CONFIG_LIBDIR=$MINGW_ROOT/lib/pkgconfig -export PKGCONFIG=mingw32-pkg-config +export PKGCONFIG=pkg-config export AR=$HOST-ar export RANLIB=$HOST-ranlib export CC=$HOST-gcc @@ -22,22 +34,27 @@ export LINK_CXX=$HOST-g++ export WINRC=$HOST-windres export STRIP=$HOST-strip +BASE=$(readlink -f $0) +BASE=$(dirname $BASE) # up one +BASE=$(dirname $BASE) # up one more +BASE=$(dirname $BASE) # up one more + BUILD_DIR=$BASE/build BUILD_CACHE_FILE=$BUILD_DIR/c4che/_cache.py TOOLS_DIR=$BASE/tools/windows_packaging -APPNAME=`grep -m 1 '^APPNAME' $BASE/wscript | awk '{print $3}' | sed "s/'//g"` -VERSION=`grep -m 1 '^VERSION' $BASE/wscript | awk '{print $3}' | sed "s/'//g"` +APPNAME=Ardour # These are only relevant after a build if test -f $BUILD_CACHE_FILE then + . ../define_versions.sh + # Figure out the Build Type - if grep -q "DEBUG = True" $BUILD_CACHE_FILE; then - DEBUG=1 - PACKAGE_DIR="$APPNAME-$VERSION-win32-dbg" + if [ x$DEBUG = xT ]; then + PACKAGE_DIR="$APPNAME-${release_version}-$ARCH-dbg" else - PACKAGE_DIR="$APPNAME-$VERSION-win32" + PACKAGE_DIR="$APPNAME-${release_version}-$ARCH" fi if grep -q "BUILD_TESTS = True" $BUILD_CACHE_FILE; then @@ -46,6 +63,3 @@ then ARDOUR_DATA_DIR=$PACKAGE_DIR/share/ardour3 fi - -# put this somewhere better... -VIRT_IMAGE_PATH=$HOME/virt-images/winxp.raw