summaryrefslogtreecommitdiff
path: root/scripts/mingw-x-build-openscad.sh
blob: 5f27960722b41c7ca7c8c1d78fad4d4ab9661d97 (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
#!/bin/sh -e
#
# This script builds Openscad.exe for windows using the MXE cross build system.
#
# This script must be run from the OpenSCAD source root directory
#
# You must have already run the mingw-x-build-dependencies.sh script
#
# Usage:
#
# ./scripts/mingw-x-build-openscad.sh
#

OPENSCADDIR=$PWD
if [ ! -f $OPENSCADDIR/openscad.pro ]; then
  echo "Must be run from the OpenSCAD source root directory"
  exit 0
fi
echo OPENSCADDIR: $OPENSCADDIR

. ./scripts/setenv-mingw-xbuild.sh

if [ ! -e $BASEDIR/lib ]; then
	echo "please run the mingw-x-build-dependencies.sh script first"
fi

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"

OPENSCAD_EXE=$DEPLOYDIR/release/openscad.exe

if [ -e $OPENSCAD_EXE ] ; then
	echo
	echo $OPENSCAD_EXE built in $DEPLOYDIR/release
	echo
else
	echo Cannot find $OPENSCAD_EXE. The build appears to have had an error.
fi

echo cd $OPENSCADDIR
contact: Jan Huwald // Impressum