2010-01-30 20:43:14 +03:00
|
|
|
##
|
|
|
|
## Deprecated! Use release-common.sh instead
|
|
|
|
##
|
|
|
|
|
2009-10-25 23:35:03 +03:00
|
|
|
#!/bin/sh
|
2010-01-09 13:13:26 +03:00
|
|
|
#
|
|
|
|
# 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: makedmg.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)
|
|
|
|
#
|
|
|
|
printUsage()
|
|
|
|
{
|
|
|
|
echo "Usage: $0 -v <versionstring>"
|
|
|
|
echo
|
|
|
|
echo " Example: $0 -v 2010.01"
|
|
|
|
}
|
2009-10-25 23:35:03 +03:00
|
|
|
|
2010-01-09 13:13:26 +03:00
|
|
|
while getopts 'v:' c
|
|
|
|
do
|
|
|
|
case $c in
|
|
|
|
v) VERSION=$OPTARG;;
|
|
|
|
esac
|
|
|
|
done
|
2009-10-25 23:35:03 +03:00
|
|
|
|
2010-01-09 13:13:26 +03:00
|
|
|
if test -z "$VERSION"; then
|
|
|
|
VERSION=`date "+%Y.%m.%d"`
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Building openscad-$VERSION..."
|
2010-01-03 03:10:55 +03:00
|
|
|
export OPENCSGDIR=$PWD/../OpenCSG-1.2.0
|
2010-01-22 16:22:16 +03:00
|
|
|
qmake VERSION=$VERSION CONFIG+=mdi openscad.pro
|
2009-12-13 03:22:07 +03:00
|
|
|
make clean
|
|
|
|
make -j2
|
2009-12-01 22:56:22 +03:00
|
|
|
echo "Preparing executable.."
|
|
|
|
mkdir OpenSCAD.app/Contents/Frameworks
|
2010-01-03 03:10:55 +03:00
|
|
|
cp $OPENCSGDIR/lib/libopencsg.dylib OpenSCAD.app/Contents/Frameworks
|
2009-12-01 22:56:22 +03:00
|
|
|
cp /opt/local/lib/libGLEW.1.5.1.dylib OpenSCAD.app/Contents/Frameworks
|
|
|
|
cp /Library/Frameworks/QtOpenGL.framework/Versions/4/QtOpenGL OpenSCAD.app/Contents/Frameworks
|
|
|
|
cp /Library/Frameworks/QtGui.framework/Versions/4/QtGui OpenSCAD.app/Contents/Frameworks
|
|
|
|
cp /Library/Frameworks/QtCore.framework/Versions/4/QtCore OpenSCAD.app/Contents/Frameworks
|
|
|
|
install_name_tool -change libopencsg.1.dylib @executable_path/../Frameworks/libopencsg.dylib OpenSCAD.app/Contents/MacOS/openscad
|
|
|
|
install_name_tool -change QtOpenGL.framework/Versions/4/QtOpenGL @executable_path/../Frameworks/QtOpenGL OpenSCAD.app/Contents/MacOS/openscad
|
|
|
|
install_name_tool -change QtGui.framework/Versions/4/QtGui @executable_path/../Frameworks/QtGui OpenSCAD.app/Contents/MacOS/openscad
|
|
|
|
install_name_tool -change QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore OpenSCAD.app/Contents/MacOS/openscad
|
|
|
|
install_name_tool -change QtGui.framework/Versions/4/QtGui @executable_path/../Frameworks/QtGui OpenSCAD.app/Contents/Frameworks/QtOpenGL
|
|
|
|
install_name_tool -change QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore OpenSCAD.app/Contents/Frameworks/QtOpenGL
|
|
|
|
install_name_tool -change QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore OpenSCAD.app/Contents/Frameworks/QtGui
|
2009-12-13 03:22:07 +03:00
|
|
|
install_name_tool -change /opt/local/lib/libGLEW.1.5.1.dylib @executable_path/../Frameworks/libGLEW.1.5.1.dylib OpenSCAD.app/Contents/MacOS/openscad
|
|
|
|
install_name_tool -id libopencsg.dylib OpenSCAD.app/Contents/Frameworks/libopencsg.dylib
|
2009-12-01 22:56:22 +03:00
|
|
|
install_name_tool -change /opt/local/lib/libGLEW.1.5.1.dylib @executable_path/../Frameworks/libGLEW.1.5.1.dylib OpenSCAD.app/Contents/Frameworks/libopencsg.dylib
|
2009-12-12 23:22:41 +03:00
|
|
|
install_name_tool -change QtGui.framework/Versions/4/QtGui @executable_path/../Frameworks/QtGui OpenSCAD.app/Contents/Frameworks/libopencsg.dylib
|
|
|
|
install_name_tool -change QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore OpenSCAD.app/Contents/Frameworks/libopencsg.dylib
|
2009-12-13 03:22:07 +03:00
|
|
|
install_name_tool -id libGLEW.1.5.1.dylib OpenSCAD.app/Contents/Frameworks/libGLEW.1.5.1.dylib
|
2009-10-25 23:35:03 +03:00
|
|
|
|
2009-12-01 22:56:22 +03:00
|
|
|
echo "Creating directory structure.."
|
|
|
|
rm -rf openscad-$VERSION
|
|
|
|
mkdir -p openscad-$VERSION/examples
|
|
|
|
cp examples/* openscad-$VERSION/examples/
|
|
|
|
chmod -R 644 openscad-$VERSION/examples/*
|
|
|
|
mv OpenSCAD.app openscad-$VERSION
|
|
|
|
|
|
|
|
echo "Creating archive.."
|
|
|
|
zip -qr openscad-$VERSION.zip openscad-$VERSION
|
|
|
|
echo "Mac OS X binary created: openscad-$VERSION.zip"
|