summaryrefslogtreecommitdiff
path: root/scripts/release-common.sh
diff options
context:
space:
mode:
authorDon Bright <hugh.m.bright@gmail.com>2013-05-16 11:54:34 (GMT)
committerDon Bright <hugh.m.bright@gmail.com>2013-05-16 11:54:34 (GMT)
commit293f3cc7c9c6dfec76120714b33a458f54792545 (patch)
tree27c7fe37bd7967b6588916009fad93667a0e1da6 /scripts/release-common.sh
parent26df5c446647aec19fa8a8615e61702950691746 (diff)
enable mingw64 cross build (alpha stage)
Diffstat (limited to 'scripts/release-common.sh')
-rwxr-xr-xscripts/release-common.sh35
1 files changed, 21 insertions, 14 deletions
diff --git a/scripts/release-common.sh b/scripts/release-common.sh
index 02b276b..035fa3f 100755
--- a/scripts/release-common.sh
+++ b/scripts/release-common.sh
@@ -7,11 +7,12 @@
# The script will create a file called openscad-<versionstring>.<extension> in
# the current directory (or under ./mingw32)
#
-# Usage: release-common.sh [-v <versionstring>] [-c] [-x32]
+# Usage: release-common.sh [-v <versionstring>] [-c] [-mingw[32|64]]
# -v Version string (e.g. -v 2010.01)
# -d Version date (e.g. -d 2010.01.23)
# -c Build with commit info
# -mingw32 Cross-compile for win32 using MXE
+# -mingw64 Cross-compile for win64 using MXE
#
# If no version string or version date is given, todays date will be used (YYYY-MM-DD)
# If only verion date is given, it will be used also as version string.
@@ -20,7 +21,7 @@
# The commit info will extracted from git and be passed to qmake as OPENSCAD_COMMIT
# to identify a build in the about box.
#
-# The mingw32 cross compile depends on the MXE cross-build tools. Please
+# The mingw cross compile depends on the MXE cross-build tools. Please
# see the README.md file on how to install these dependencies.
printUsage()
@@ -52,6 +53,12 @@ fi
if [ "`echo $* | grep mingw32`" ]; then
OS=LINXWIN
+ ARCH=32
+fi
+
+if [ "`echo $* | grep mingw64`" ]; then
+ OS=LINXWIN
+ ARCH=64
fi
if [ $OS ]; then
@@ -83,7 +90,6 @@ echo "Checking pre-requisites..."
case $OS in
LINXWIN)
MAKENSIS=
-
if [ "`command -v makensis`" ]; then
MAKENSIS=makensis
elif [ "`command -v i686-pc-mingw32-makensis`" ]; then
@@ -124,7 +130,7 @@ case $OS in
TARGET=release
;;
LINXWIN)
- . ./scripts/setenv-mingw-xbuild.sh
+ . ./scripts/setenv-mingw-xbuild.sh $ARCH
TARGET=release
ZIP="zip"
ZIPARGS="-r"
@@ -170,13 +176,12 @@ fi
case $OS in
LINXWIN)
- # dont use paralell builds, it can error-out on parser_yacc.
-
+ # make || make enables paralell builds, thanks Tony Theodore
# make main openscad.exe
cd $DEPLOYDIR
- make $TARGET ## comment out for test-run
+ make $TARGET -j$NUMCPU || make $TARGET -j $NUMCPU ## comment 4 test
if [ ! -e $TARGET/openscad.exe ]; then
- echo 'build failed. stopping.'
+ echo "cant find $TARGET/openscad.exe. build failed. stopping."
exit
fi
# make console pipe-able openscad.com - see winconsole.pri for info
@@ -271,8 +276,11 @@ case $OS in
echo "Creating installer"
echo "Copying NSIS files to $DEPLOYDIR/openscad-$VERSION"
- cp ./scripts/installer.nsi $DEPLOYDIR/openscad-$VERSION
- cp ./scripts/mingw-file-association.nsh $DEPLOYDIR/openscad-$VERSION
+ cp ./scripts/installer$ARCH.nsi $DEPLOYDIR/openscad-$VERSION/installer_arch.nsi
+ cp ./scripts/installer.nsi $DEPLOYDIR/openscad-$VERSION/
+ cp ./scripts/mingw-file-association.nsh $DEPLOYDIR/openscad-$VERSION/
+ cp ./scripts/x64.nsh $DEPLOYDIR/openscad-$VERSION/
+ cp ./scripts/LogicLib.nsh $DEPLOYDIR/openscad-$VERSION/
cd $DEPLOYDIR/openscad-$VERSION
NSISDEBUG=-V2
# NSISDEBUG= # leave blank for full log
@@ -288,12 +296,11 @@ case $OS in
echo "Installer created:" $INSTFILE
echo
else
- echo "Build failed. Cannot find" $INSTFILE
- exit 1
+ echo "Build failed. Cannot find" $INSTFILE
fi
else
- echo "Build failed. Cannot find" $BINFILE
- exit 1
+ echo "Build failed. Cannot find" $BINFILE
+ exit 1
fi
;;
LINUX)
contact: Jan Huwald // Impressum