diff options
author | Marius Kintel <marius@kintel.net> | 2012-08-13 19:57:16 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-08-13 19:57:16 (GMT) |
commit | 7ef48a28ff7353d90165af43de095c806852ab43 (patch) | |
tree | 048130c499a1ae45eeb57bc925e66b3f13068ab6 /scripts/setenv-mingw-xbuild.sh | |
parent | faeebb18e46b8c08b7ff8dec15e991fee0e0e276 (diff) | |
parent | 8318c672a821e329dfb3b9eaec886ed3b28c550d (diff) |
Merge pull request #170 from openscad/mingw_installer2
Mingw installer2
Diffstat (limited to 'scripts/setenv-mingw-xbuild.sh')
-rw-r--r-- | scripts/setenv-mingw-xbuild.sh | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/scripts/setenv-mingw-xbuild.sh b/scripts/setenv-mingw-xbuild.sh new file mode 100644 index 0000000..e8976b7 --- /dev/null +++ b/scripts/setenv-mingw-xbuild.sh @@ -0,0 +1,43 @@ +#!/bin/sh -e +# +# set environment variables for mingw/mxe cross-build +# +# Usage: source ./scripts/setenv-mingw-xbuild.sh +# +# Prerequisites: +# +# Please see http://mxe.cc/#requirements +# +# Also see http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Cross-compiling_for_Windows_on_Linux_or_Mac_OS_X +# + +export OPENSCADDIR=$PWD + +if [ ! $BASEDIR ]; then + export BASEDIR=$HOME/openscad_deps +fi + +if [ ! $DEPLOYDIR ]; then + export DEPLOYDIR=$OPENSCADDIR/mingw32 +fi + +if [ ! $MXEDIR ]; then + export MXEDIR=$BASEDIR/mxe +fi + +export PATH=$MXEDIR/usr/bin:$PATH + +echo BASEDIR: $BASEDIR +echo MXEDIR: $MXEDIR +echo DEPLOYDIR: $DEPLOYDIR +echo PATH modified with $MXEDIR/usr/bin + +if [ ! -e $DEPLOYDIR ]; then + mkdir -p $DEPLOYDIR +fi + +echo linking $MXEDIR/usr/i686-pc-mingw32/ to $DEPLOYDIR/mingw-cross-env +rm -f $DEPLOYDIR/mingw-cross-env +ln -s $MXEDIR/usr/i686-pc-mingw32/ $DEPLOYDIR/mingw-cross-env + + |