windows msys build script

git-svn-id: http://svn.clifford.at/openscad/trunk@321 b57f626f-c46c-0410-a088-ec61d464b74c
stl_dim
meta 2010-01-15 21:08:18 +00:00
parent f97f0258a4
commit f2926d6630
3 changed files with 137 additions and 0 deletions

View File

@ -13,6 +13,10 @@ else {
TARGET = openscad
}
win32 {
RC_FILE = openscad_win32.rc
}
CONFIG += qt
QT += opengl

37
openscad_win32.rc Normal file
View File

@ -0,0 +1,37 @@
# if defined(UNDER_CE)
# include <winbase.h>
# else
# include <winver.h>
# endif
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,0,0
PRODUCTVERSION 0,0,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "0409"
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "OpenSCAD Executable\0"
VALUE "FileVersion", "development build\0"
VALUE "LegalCopyright", "Copyright (C) 2009 Clifford Wolf\0"
VALUE "OriginalFilename", "openscad.exe\0"
VALUE "ProductName", "OpenSCAD\0"
END
END
END
/* End of Version info */
IDI_ICON1 ICON DISCARDABLE "openscad.ico"

96
release-win32.sh Normal file
View File

@ -0,0 +1,96 @@
#!/bin/sh
#
# This script creates a binary release of OpenSCAD for Mac OS X.
# The script will create a file called openscad-<versionstring>.zip
# in the current directory.
#
# Usage: release-win32.sh [-v <versionstring>]
# -v Version string (e.g. -v 2010.01)
#
# If no version string is given, todays date will be used (YYYY-MM-DD)
#
#used for windows
ZIP="/c/Program Files/7-Zip/7z.exe"
ZIPARGS="a -tzip"
printUsage()
{
echo "Usage: $0 -v <versionstring> -t <buildtarget>"
echo
echo " Example: $0 -v 2010.01 -t release"
}
OS=OSX
if test "`uname -o`" == "Msys"; then
OS=WIN
fi
echo "detected OS= $OS"
while getopts 'v:' c
do
case $c in
v) VERSION=$OPTARG;;
b) TARGET=$OPTARG;;
esac
done
if test -z "$VERSION"; then
VERSION=`date "+%Y.%m.%d"`
fi
if test -z "$TARGET"; then
TARGET=release
fi
echo "Building openscad-$VERSION $CONFIGURATION..."
case $OS in
OSX)
CONFIG = mdi;;
WIN)
unset CONFIG
export QTDIR=/c/devmingw/qt2009.03
export QTMAKESPEC=win32-g++
export PATH=$PATH:/c/devmingw/qt2009.03/bin:/c/devmingw/qt2009.03/qt/bin
;;
esac
qmake VERSION=$VERSION CONFIG+=$CONFIG
make clean
if test $OS == WIN; then
#if the following files are missing their tried removal stops the build process on msys
touch -t 200012121010 parser_yacc.h parser_yacc.cpp lexer_lex.cpp
fi
make -j2 $TARGET
echo "Preparing executable..."
echo "Creating directory structure..."
rm -rf openscad-$VERSION
rm -f openscad-$VERSION.zip
mkdir -p openscad-$VERSION/examples
cp examples/* openscad-$VERSION/examples/
case $OS in
OSX) ;;
WIN)
#package
cp win32deps/* openscad-$VERSION
cp $TARGET/openscad.exe openscad-$VERSION
;;
esac
echo "Creating directory structure..."
case $OS in
OSX) ;;
WIN)
"$ZIP" $ZIPARGS openscad-$VERSION.zip openscad-$VERSION
;;
esac
rm -rf openscad-$VERSION
echo "binary created: openscad-$VERSION.zip"