blob: ac60d9e05c599c08285a08980a9a2a9d3684f46b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
#!/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.
#
# This script must be run from the OpenSCAD source root directory
#
# Usage: ./scripts/mingw-x-build-dependencies.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
#
OPENSCADDIR=$PWD
if [ ! -f $OPENSCADDIR/openscad.pro ]; then
echo "Must be run from the OpenSCAD source root directory"
exit 0
fi
. ./scripts/setenv-mingw-xbuild.sh
if [ ! -e $BASEDIR ]; then
mkdir -p $BASEDIR
fi
if [ ! -e $DEPLOYDIR ]; then
mkdir -p $DEPLOYDIR
fi
cd $BASEDIR
if [ ! -e mxe ]; then
echo "Downloading MXE into " $MXEDIR
git clone git://github.com/mxe/mxe.git
fi
echo "entering" $MXEDIR
cd $MXEDIR
echo "make mpfr eigen opencsg cgal qt -j $NUMCPU JOBS=$NUMJOBS"
make mpfr eigen opencsg cgal qt -j $NUMCPU JOBS=$NUMJOBS
#make mpfr -j $NUMCPU JOBS=$NUMJOBS # for testing
echo "leaving" $MXEDIR
echo "entering $OPENSCADDIR"
cd $OPENSCADDIR
if [ -e $DEPLOYDIR/mingw-cross-env ]; then
rm $DEPLOYDIR/mingw-cross-env
fi
echo "linking mxe to" $DEPLOYDIR/mingw-cross-env
ln -s $MXEDIR/usr/i686-pc-mingw32/ $DEPLOYDIR/mingw-cross-env
echo
echo "now copy/paste the following to cross-build openscad"
echo
echo cd $DEPLOYDIR
echo "i686-pc-mingw32-qmake CONFIG+=mingw-cross-env ../openscad.pro"
#echo "make -j$NUMCPU" # causes parser_yacc.hpp errors
echo "make"
echo
|