summaryrefslogtreecommitdiff
path: root/scripts/release-common.sh
diff options
context:
space:
mode:
authorBrad Pitcher <bradpitcher@gmail.com>2011-10-16 07:39:17 (GMT)
committerBrad Pitcher <bradpitcher@gmail.com>2011-10-16 07:39:17 (GMT)
commit6acf0b5019d8b68d81f6c1facd6f889c1f468b53 (patch)
tree3a2e63047e6a281178aa7ee0169db5fa7c3ba2e8 /scripts/release-common.sh
parent45060878b56070fa12e6f0bb85bad1f6e1687b71 (diff)
support mingw win32 builds
Diffstat (limited to 'scripts/release-common.sh')
-rwxr-xr-xscripts/release-common.sh32
1 files changed, 30 insertions, 2 deletions
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
contact: Jan Huwald // Impressum