summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cgal.pri1
-rwxr-xr-xscripts/release-common.sh32
-rwxr-xr-xscripts/update-web.sh22
-rw-r--r--src/CSGTermEvaluator.h4
4 files changed, 53 insertions, 6 deletions
diff --git a/cgal.pri b/cgal.pri
index 1d9ef22..96cd2ba 100644
--- a/cgal.pri
+++ b/cgal.pri
@@ -1,5 +1,6 @@
cgal {
DEFINES += ENABLE_CGAL
+ CONFIG(mingw-cross-env):DEFINES += BOOST_STATIC BOOST_THREAD_USE_LIB Boost_USE_STATIC_LIBS
isEmpty(DEPLOYDIR) {
# Optionally specify location of CGAL using the
diff --git a/scripts/release-common.sh b/scripts/release-common.sh
index 9261d7a..e12cd9d 100755
--- a/scripts/release-common.sh
+++ b/scripts/release-common.sh
@@ -1,7 +1,9 @@
#!/bin/sh
#
# This script creates a binary release of OpenSCAD.
-# This should work under Mac OS X and Windows (msys). Linux support pending.
+# This should work under Mac OS X, Windows (msys), and Linux cross-compiling
+# for windows using mingw-cross-env (use like: OS=LINXWIN release-common.sh).
+# Linux support pending.
# The script will create a file called openscad-<versionstring>.zip
# in the current directory.
#
@@ -54,9 +56,23 @@ case $OS in
ZIPARGS="a -tzip"
TARGET=release
;;
+ LINXWIN)
+ unset CONFIG
+ TARGET=release
+ ZIP="zip"
+ ZIPARGS="-r"
+ ;;
+esac
+
+case $OS in
+ LINXWIN)
+ i686-pc-mingw32-qmake VERSION=$VERSION CONFIG+=$CONFIG CONFIG+=mingw-cross-env CONFIG-=debug openscad.pro
+ ;;
+ *)
+ qmake VERSION=$VERSION CONFIG+=$CONFIG CONFIG-=debug openscad.pro
+ ;;
esac
-qmake VERSION=$VERSION CONFIG+=$CONFIG CONFIG-=debug openscad.pro
make -s clean
case $OS in
MACOSX)
@@ -122,4 +138,16 @@ case $OS in
rm -rf openscad-$VERSION
echo "Binary created: openscad-$VERSION.zip"
;;
+ LINXWIN)
+ #package
+ cp $TARGET/openscad.exe openscad-$VERSION
+ rm -f OpenSCAD-$VERSION.zip
+ "$ZIP" $ZIPARGS OpenSCAD-$VERSION.zip openscad-$VERSION
+ cp scripts/installer.nsi openscad-$VERSION/
+ cd openscad-$VERSION && makensis installer.nsi && cd ..
+ cp openscad-$VERSION/openscad_setup.exe OpenSCAD-$VERSION-Installer.exe
+ rm -rf openscad-$VERSION
+ echo "Binary created: OpenSCAD-$VERSION.zip"
+ echo "Installer created: OpenSCAD-$VERSION-Installer.exe"
+ ;;
esac
diff --git a/scripts/update-web.sh b/scripts/update-web.sh
index 4180d01..9036d9b 100755
--- a/scripts/update-web.sh
+++ b/scripts/update-web.sh
@@ -1,13 +1,27 @@
#!/bin/bash
-dmgfile=$1
-if [ -z "$dmgfile" ]; then
- echo "Usage: $0 <dmgfile>"
+# Works with Mac OS X and Linux cross-compiling for windows using
+# mingw-cross-env (use like: OS=LINXWIN update-web.sh file1.zip file2.exe).
+
+file1=$1
+if [ -z "$file1" ]; then
+ echo "Usage: $0 <file1> [<file2>]"
exit 1
fi
+
+if [[ $OSTYPE =~ "darwin" ]]; then
+ OS=MACOSX
+fi
+
indexfile=../openscad.github.com/index.html
if [ -f $indexfile ]; then
- sed -i .backup -e "s/^\(.*mac-snapshot.*\)\(OpenSCAD-.*\.dmg\)\(.*\)\(OpenSCAD-.*dmg\)\(.*$\)/\\1$dmgfile\\3$dmgfile\\5/" $indexfile
+ if [ $OS == MACOSX ]; then
+ sed -i .backup -e "s/^\(.*mac-snapshot.*\)\(OpenSCAD-.*\.dmg\)\(.*\)\(OpenSCAD-.*dmg\)\(.*$\)/\\1$file1\\3$file1\\5/" $indexfile
+ elif [ $OS == LINXWIN ]; then
+ file2=$2
+ sed -i .backup -e "s/^\(.*win-snapshot-zip.*\)\(OpenSCAD-.*\.zip\)\(.*\)\(OpenSCAD-.*zip\)\(.*$\)/\\1$file1\\3$file1\\5/" $indexfile
+ sed -i .backup -e "s/^\(.*win-snapshot-exe.*\)\(OpenSCAD-.*-Installer\.exe\)\(.*\)\(OpenSCAD-.*-Installer.exe\)\(.*$\)/\\1$file2\\3$file2\\5/" $indexfile
+ fi
echo "Web page updated. Remember to commit and push openscad.github.com"
else
echo "Web page not found at $indexfile"
diff --git a/src/CSGTermEvaluator.h b/src/CSGTermEvaluator.h
index 3a8122b..9d1fabe 100644
--- a/src/CSGTermEvaluator.h
+++ b/src/CSGTermEvaluator.h
@@ -7,6 +7,10 @@
#include <cstddef>
#include "visitor.h"
+#if defined __WIN32__ && ! defined _MSC_VER
+#include <cstddef>
+#endif
+
class CSGTermEvaluator : public Visitor
{
public:
contact: Jan Huwald // Impressum