diff options
Diffstat (limited to 'scripts/mingw-x-build-dependencies.sh')
-rwxr-xr-x | scripts/mingw-x-build-dependencies.sh | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/scripts/mingw-x-build-dependencies.sh b/scripts/mingw-x-build-dependencies.sh index 7a16530..e9f124b 100755 --- a/scripts/mingw-x-build-dependencies.sh +++ b/scripts/mingw-x-build-dependencies.sh @@ -1,11 +1,13 @@ #!/bin/sh -e # # This script builds all library dependencies of OpenSCAD for cross-compilation -# from linux to mingw32 for windows, using the MXE cross build system. +# from linux to mingw32/64 for windows, using the MXE cross build system. # # This script must be run from the OpenSCAD source root directory # -# Usage: ./scripts/mingw-x-build-dependencies.sh +# Usage: +# ./scripts/mingw-x-build-dependencies.sh # 32 bit +# ./scripts/mingw-x-build-dependencies.sh 64 # 64 bit # # Prerequisites: # @@ -13,6 +15,8 @@ # # Also see http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Cross-compiling_for_Windows_on_Linux_or_Mac_OS_X # +# Also note the 64 bit is built on the branch of mxe by Tony Theodore +# which hasnt been merged to official mxe as of writing OPENSCADDIR=$PWD if [ ! -f $OPENSCADDIR/openscad.pro ]; then @@ -34,7 +38,7 @@ if [ ! $NUMJOBS ]; then fi fi -. ./scripts/setenv-mingw-xbuild.sh +. ./scripts/setenv-mingw-xbuild.sh $* if [ ! -e $BASEDIR ]; then mkdir -p $BASEDIR @@ -44,14 +48,24 @@ if [ ! -e $MXEDIR ]; then mkdir -p $MXEDIR cd $MXEDIR/.. echo "Downloading MXE into " $PWD - git clone git://github.com/mxe/mxe.git + if [ "`echo $* | grep 64`" ]; then + git clone -b multi-rebase git://github.com/tonytheodore/mxe.git $MXEDIR + else + git clone git://github.com/mxe/mxe.git $MXEDIR + fi fi echo "entering" $MXEDIR cd $MXEDIR -echo "make mpfr eigen opencsg cgal qt nsis -j $NUMCPU JOBS=$NUMJOBS" -make mpfr eigen opencsg cgal qt nsis -j $NUMCPU JOBS=$NUMJOBS -#make mpfr -j $NUMCPU JOBS=$NUMJOBS # for testing +if [ "`echo $* | grep 64`" ]; then + MXE_TARGETS='x86_64-w64-mingw32' + PACKAGES='mpfr eigen opencsg cgal qt' +else + MXE_TARGETS= + PACKAGES='mpfr eigen opencsg cgal qt nsis' +fi +echo make $PACKAGES MXE_TARGETS=$MXE_TARGETS -j $NUMCPU JOBS=$NUMJOBS +make $PACKAGES MXE_TARGETS=$MXE_TARGETS -j $NUMCPU JOBS=$NUMJOBS echo "leaving" $MXEDIR |