summaryrefslogtreecommitdiff
path: root/scripts/release-common.sh
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2012-08-03 02:52:47 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2012-08-03 02:52:47 (GMT)
commit08b07769859ef4905a72b54c58e2e7891d3ac0a5 (patch)
tree913174255145de285c2b1303560cfff46fc1f0ca /scripts/release-common.sh
parentc29d8a370fea0477cb9bed2143823c596a2d3e76 (diff)
integrate mingw-xxxx scripts with release-common.sh
Diffstat (limited to 'scripts/release-common.sh')
-rwxr-xr-xscripts/release-common.sh63
1 files changed, 53 insertions, 10 deletions
diff --git a/scripts/release-common.sh b/scripts/release-common.sh
index 94a8634..7bf1c07 100755
--- a/scripts/release-common.sh
+++ b/scripts/release-common.sh
@@ -5,7 +5,7 @@
# 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.
+# in the current directory (or in the $DEPLOYDIR of a mingw cross build)
#
# Usage: release-common.sh [-v <versionstring>] [-c]
# -v Version string (e.g. -v 2010.01)
@@ -24,6 +24,16 @@ printUsage()
echo " Example: $0 -v 2010.01
}
+OPENSCADDIR=$PWD
+if [ ! -f $OPENSCADDIR/openscad.pro ]; then
+ echo "Must be run from the OpenSCAD source root directory"
+ exit 0
+fi
+
+if [ $OS == "LINXWIN" ]; then
+ OSTYPE=mingw-cross-env
+fi
+
if [[ "$OSTYPE" =~ "darwin" ]]; then
OS=MACOSX
elif [[ $OSTYPE == "msys" ]]; then
@@ -72,22 +82,34 @@ case $OS in
;;
LINXWIN)
unset CONFIG
+ . ./scripts/setenv-mingw-xbuild.sh
TARGET=release
ZIP="zip"
ZIPARGS="-r"
;;
esac
+
case $OS in
LINXWIN)
- i686-pc-mingw32-qmake VERSION=$VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT CONFIG+=$CONFIG CONFIG+=mingw-cross-env CONFIG-=debug openscad.pro
+ cd $DEPLOYDIR && i686-pc-mingw32-qmake VERSION=$VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT CONFIG+=$CONFIG CONFIG+=mingw-cross-env CONFIG-=debug ../openscad.pro
+ cd $OPENSCADDIR
;;
*)
qmake VERSION=$VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT CONFIG+=$CONFIG CONFIG-=debug openscad.pro
;;
esac
-make -s clean
+case $OS in
+ LINXWIN)
+# cd $DEPLOYDIR && make -s clean
+ cd $OPENSCADDIR
+ ;;
+ *)
+ make -s clean
+ ;;
+esac
+
case $OS in
MACOSX)
rm -rf OpenSCAD.app
@@ -98,7 +120,16 @@ case $OS in
;;
esac
-make -j2 $TARGET
+case $OS in
+ LINXWIN)
+ # make -j2 sometimes has problems with parser_yacc
+ cd $DEPLOYDIR && make $TARGET
+ cd $OPENSCADDIR
+ ;;
+ *)
+ make -j2 $TARGET
+ ;;
+esac
if [[ $? != 0 ]]; then
echo "Error building OpenSCAD. Aborting."
@@ -112,6 +143,12 @@ case $OS in
EXAMPLESDIR=OpenSCAD.app/Contents/Resources/examples
LIBRARYDIR=OpenSCAD.app/Contents/Resources/libraries
;;
+ LINXWIN)
+ EXAMPLESDIR=$DEPLOYDIR/openscad-$VERSION/examples/
+ LIBRARYDIR=$DEPLOYDIR/openscad-$VERSION/libraries/
+ rm -rf $DEPLOYDIR/openscad-$VERSION
+ mkdir $DEPLOYDIR/openscad-$VERSION
+ ;;
*)
EXAMPLESDIR=openscad-$VERSION/examples/
LIBRARYDIR=openscad-$VERSION/libraries/
@@ -158,15 +195,21 @@ case $OS in
;;
LINXWIN)
#package
+ echo "Creating binary package"
+ cd $DEPLOYDIR
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"
+ rm -rf ./openscad-$VERSION
+ cd $OPENSCADDIR
+
+ echo "Creating installer"
+ ./scripts/mingw-x-build-installer.sh
+ cp $DEPLOYDIR/openscad_setup.exe $DEPLOYDIR/OpenSCAD-$VERSION-Installer.exe
+ echo
+ echo "Binary created: $DEPLOYDIR/OpenSCAD-$VERSION.zip"
+ echo "Installer created: $DEPLOYDIR/OpenSCAD-$VERSION-Installer.exe"
+ echo
;;
LINUX)
# Do stuff from release-linux.sh
contact: Jan Huwald // Impressum