summaryrefslogtreecommitdiff
path: root/scripts/setenv-mingw-xbuild.sh
diff options
context:
space:
mode:
authorDon Bright <hugh.m.bright@gmail.com>2013-05-16 11:54:34 (GMT)
committerDon Bright <hugh.m.bright@gmail.com>2013-05-16 11:54:34 (GMT)
commit293f3cc7c9c6dfec76120714b33a458f54792545 (patch)
tree27c7fe37bd7967b6588916009fad93667a0e1da6 /scripts/setenv-mingw-xbuild.sh
parent26df5c446647aec19fa8a8615e61702950691746 (diff)
enable mingw64 cross build (alpha stage)
Diffstat (limited to 'scripts/setenv-mingw-xbuild.sh')
-rw-r--r--scripts/setenv-mingw-xbuild.sh31
1 files changed, 24 insertions, 7 deletions
diff --git a/scripts/setenv-mingw-xbuild.sh b/scripts/setenv-mingw-xbuild.sh
index e31534e..b6fa156 100644
--- a/scripts/setenv-mingw-xbuild.sh
+++ b/scripts/setenv-mingw-xbuild.sh
@@ -2,7 +2,10 @@
#
# set environment variables for mingw/mxe cross-build
#
-# Usage: source ./scripts/setenv-mingw-xbuild.sh
+# Usage:
+#
+# source ./scripts/setenv-mingw-xbuild.sh # 32 bit build
+# source ./scripts/setenv-mingw-xbuild.sh 64 # 64 bit build
#
# Prerequisites:
#
@@ -18,11 +21,20 @@ if [ ! $BASEDIR ]; then
fi
if [ ! $DEPLOYDIR ]; then
- export DEPLOYDIR=$OPENSCADDIR/mingw32
+ if [ `echo $* | grep 64 ` ]; then
+ DEPLOYDIR=$OPENSCADDIR/mingw64
+ else
+ DEPLOYDIR=$OPENSCADDIR/mingw32
+ fi
+ export DEPLOYDIR
fi
if [ ! $MXEDIR ]; then
- export MXEDIR=$BASEDIR/mxe
+ if [ `echo $* | grep 64 ` ]; then
+ export MXEDIR=$BASEDIR/mxe-w64
+ else
+ export MXEDIR=$BASEDIR/mxe
+ fi
fi
export PATH=$MXEDIR/usr/bin:$PATH
@@ -31,16 +43,21 @@ if [ ! -e $DEPLOYDIR ]; then
mkdir -p $DEPLOYDIR
fi
-echo linking $MXEDIR/usr/i686-pc-mingw32/ to $DEPLOYDIR/mingw-cross-env
+if [ `echo $* | grep 64 ` ]; then
+ MXETARGETDIR=$MXEDIR/usr/x86_64-w64-mingw32
+else
+ MXETARGETDIR=$MXEDIR/usr/i686-pc-mingw32
+fi
+echo linking $MXETARGETDIR to $DEPLOYDIR/mingw-cross-env
rm -f $DEPLOYDIR/mingw-cross-env
-ln -s $MXEDIR/usr/i686-pc-mingw32/ $DEPLOYDIR/mingw-cross-env
-export PATH=$MXEDIR/usr/i686-pc-mingw32/qt/bin:$PATH
+ln -s $MXETARGETDIR $DEPLOYDIR/mingw-cross-env
+export PATH=$MXETARGETDIR/qt/bin:$PATH
echo BASEDIR: $BASEDIR
echo MXEDIR: $MXEDIR
echo DEPLOYDIR: $DEPLOYDIR
echo PATH modified: $MXEDIR/usr/bin
-echo PATH modified: $MXEDIR/usr/i686-pc-mingw32/qt/bin
+echo PATH modified: $MXETARGETDIR/qt/bin
contact: Jan Huwald // Impressum