summaryrefslogtreecommitdiff
path: root/scripts/release-common.sh
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2012-08-05 00:47:36 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2012-08-05 00:47:36 (GMT)
commit58db7a9d19f707c72a3f16bdf6275c0e4671f362 (patch)
treea6721c7c719daf6a756936bb5d8c30a3a6e91a69 /scripts/release-common.sh
parent06d48a47f8a2e7899b4edb3fae75a34479453e19 (diff)
move functionality from build-installer script to release-common.
mostly this means 1. detect NSIS and fail with error message if its not there 2. remove mingw-build-installer and mingw-build-openscad as they are nowredundant. running publish-mingw-x does exactly the same thing, only better because it builds from a clean source tree.
Diffstat (limited to 'scripts/release-common.sh')
-rwxr-xr-xscripts/release-common.sh51
1 files changed, 40 insertions, 11 deletions
diff --git a/scripts/release-common.sh b/scripts/release-common.sh
index dfd057a..dfebe13 100755
--- a/scripts/release-common.sh
+++ b/scripts/release-common.sh
@@ -60,6 +60,31 @@ if test -z "$VERSION"; then
VERSION=`date "+%Y.%m.%d"`
fi
+
+echo "Checking pre-requisitie..."
+
+case $OS in
+ LINXWIN)
+ MAKENSIS=
+
+ if [ ! "`command -v makensis`" ]; then
+ MAKENSIS=makensis
+ elif [ ! "`command -v i686-pc-mingw32-makensis`" ]; then
+ MAKENSIS=i686-pc-mingw32-makensis
+ else
+ echo "makensis not found. please install nsis"
+ exit 1
+ fi
+ ;;
+esac
+
+if [ ! -e $OPENSCADDIR/libraries/MCAD/__init__.py ]; then
+ echo "Downloading MCAD"
+ git submodule init
+ git submodule update
+fi
+
+
echo "Building openscad-$VERSION $CONFIGURATION..."
case $OS in
@@ -134,12 +159,6 @@ fi
echo "Creating directory structure..."
-if [ ! -e $OPENSCADDIR/libraries/MCAD/__init__.py ]; then
- echo "Downloading MCAD"
- git submodule init
- git submodule update
-fi
-
case $OS in
MACOSX)
EXAMPLESDIR=OpenSCAD.app/Contents/Resources/examples
@@ -168,8 +187,12 @@ fi
if [ -n $LIBRARYDIR ]; then
echo $LIBRARYDIR
mkdir -p $LIBRARYDIR
- tar cf libraries.tar --exclude=.git*
- cd $LIBRARYDIR && tar xf $OPENSCADDIR/libraries.tar && cd $OPENSCADDIR
+ # exclude the .git stuff from MCAD which is a git submodule.
+ # tar is a relatively portable way to do exclusion
+ rm libraries.tar
+ tar cf libraries.tar --exclude=.git* libraries
+ cd $LIBRARYDIR/.. && tar xf $OPENSCADDIR/libraries.tar && cd $OPENSCADDIR
+ rm libraries.tar
chmod -R u=rwx,go=r,+X $LIBRARYDIR/*
fi
@@ -198,13 +221,19 @@ case $OS in
cp $TARGET/openscad.exe openscad-$VERSION
rm -f OpenSCAD-$VERSION.zip
"$ZIP" $ZIPARGS OpenSCAD-$VERSION.zip openscad-$VERSION
- rm -rf ./openscad-$VERSION
cd $OPENSCADDIR
echo "Binary package created"
echo "Creating installer"
- ./scripts/mingw-x-build-installer.sh
- cp $DEPLOYDIR/openscad_setup.exe $DEPLOYDIR/OpenSCAD-$VERSION-Installer.exe
+ cp ./scripts/installer.nsi $DEPLOYDIR/openscad-$VERSION
+ cp ./scripts/mingw-file-association.nsh $DEPLOYDIR/openscad-$VERSION
+ cd $DEPLOYDIR/openscad-$VERSION
+ NSISDEBUG=-V2
+ # NSISDEBUG= # leave blank for full log
+ $MAKENSIS $NSISDEBUG installer.nsi
+ cd $OPENSCADDIR
+ cp $DEPLOYDIR/openscad-$VERSION/openscad_setup.exe $DEPLOYDIR/OpenSCAD-$VERSION-Installer.exe
+
echo
echo "Binary created: $DEPLOYDIR/OpenSCAD-$VERSION.zip"
echo "Installer created: $DEPLOYDIR/OpenSCAD-$VERSION-Installer.exe"
contact: Jan Huwald // Impressum