2012-08-02 08:06:19 +04:00
|
|
|
#!/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
|
|
|
|
|
2012-08-02 08:14:34 +04:00
|
|
|
echo "entering $DEPLOYDIR"
|
|
|
|
cd $DEPLOYDIR
|
|
|
|
i686-pc-mingw32-qmake CONFIG+=mingw-cross-env ../openscad.pro
|
|
|
|
#"make -j$NUMCPU" # causes parser_yacc.hpp errors
|
|
|
|
make
|
|
|
|
echo "leaving $DEPLOYDIR"
|
|
|
|
|
|
|
|
echo "entering $OPENSCADDIR"
|
|
|
|
cd $OPENSCADDIR
|
2012-08-02 08:06:19 +04:00
|
|
|
|
|
|
|
OPENSCAD_EXE=$DEPLOYDIR/release/openscad.exe
|
|
|
|
|
|
|
|
if [ -e $OPENSCAD_EXE ] ; then
|
2012-08-02 09:05:27 +04:00
|
|
|
echo Build finished. Executable file ready:
|
|
|
|
echo " " $OPENSCAD_EXE
|
2012-08-02 08:06:19 +04:00
|
|
|
else
|
|
|
|
echo Cannot find $OPENSCAD_EXE. The build appears to have had an error.
|
|
|
|
fi
|
|
|
|
|