summaryrefslogtreecommitdiff
path: root/scripts/setenv-mingw-xbuild.sh
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-08-13 19:57:16 (GMT)
committerMarius Kintel <marius@kintel.net>2012-08-13 19:57:16 (GMT)
commit7ef48a28ff7353d90165af43de095c806852ab43 (patch)
tree048130c499a1ae45eeb57bc925e66b3f13068ab6 /scripts/setenv-mingw-xbuild.sh
parentfaeebb18e46b8c08b7ff8dec15e991fee0e0e276 (diff)
parent8318c672a821e329dfb3b9eaec886ed3b28c550d (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.sh43
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
+
+
contact: Jan Huwald // Impressum