summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-11-07 01:04:12 (GMT)
committerMarius Kintel <marius@kintel.net>2011-11-07 01:04:12 (GMT)
commitc05ee4e3127d3b7d91f9185256e5dcff9e30c580 (patch)
tree56e9ee36be6d2c3fc3cd2e80b59a31dd375ded45 /scripts
parentba5b0ffc4e7d8f04f0899c3ba8986abb1baddcb7 (diff)
parente29ba42d591a6bf24f38fecc4409af1e597732db (diff)
Merge branch 'win32' of https://github.com/brad/openscad into brad-win32
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/release-common.sh32
-rwxr-xr-xscripts/update-web.sh22
2 files changed, 48 insertions, 6 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
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"
contact: Jan Huwald // Impressum