summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/macosx-build-dependencies.sh25
-rwxr-xr-xscripts/macosx-sanity-check.py3
-rwxr-xr-xscripts/publish-macosx.sh23
-rwxr-xr-xscripts/release-common.sh17
4 files changed, 60 insertions, 8 deletions
diff --git a/scripts/macosx-build-dependencies.sh b/scripts/macosx-build-dependencies.sh
index bfe0ede..57dd3bf 100755
--- a/scripts/macosx-build-dependencies.sh
+++ b/scripts/macosx-build-dependencies.sh
@@ -325,6 +325,30 @@ build_eigen()
make install
}
+build_sparkle()
+{
+ # Let Sparkle use the default compiler
+ unset CC
+ unset CXX
+ version=$1
+ echo "Building Sparkle" $version "..."
+ cd $BASEDIR/src
+ rm -rf Sparkle-$version
+ if [ ! -f Sparkle-$version.zip ]; then
+ curl -o Sparkle-$version.zip https://nodeload.github.com/andymatuschak/Sparkle/zip/$version
+ fi
+ unzip -q Sparkle-$version.zip
+ cd Sparkle-$version
+ patch -p1 < $OPENSCADDIR/patches/sparkle.patch
+ if $OPTION_32BIT; then
+ SPARKLE_EXTRA_FLAGS="-arch i386"
+ fi
+ xcodebuild -project Sparkle.xcodeproj -scheme Sparkle -configuration Release -arch x86_64 $SPARKLE_EXTRA_FLAGS
+ rm -r $DEPLOYDIR/lib/Sparkle.framework
+ cp -Rf build/Release/Sparkle.framework $DEPLOYDIR/lib/
+ install_name_tool -id $DEPLOYDIR/lib/Sparkle.framework/Versions/A/Sparkle $DEPLOYDIR/lib/Sparkle.framework/Sparkle
+}
+
if [ ! -f $OPENSCADDIR/openscad.pro ]; then
echo "Must be run from the OpenSCAD source root directory"
exit 0
@@ -391,3 +415,4 @@ build_boost 1.51.0
build_cgal 4.1
build_glew 1.9.0
build_opencsg 1.3.2
+build_sparkle 0ed83cf9f2eeb425d4fdd141c01a29d843970c20 \ No newline at end of file
diff --git a/scripts/macosx-sanity-check.py b/scripts/macosx-sanity-check.py
index 3938d74..4927de9 100755
--- a/scripts/macosx-sanity-check.py
+++ b/scripts/macosx-sanity-check.py
@@ -108,6 +108,9 @@ if __name__ == '__main__':
assert(deps)
for d in deps:
absfile = lookup_library(d)
+ if not re.match(executable_path, absfile):
+ print "Error: External dependency " + d
+ sys.exit(1)
if absfile == None:
print "Not found: " + d
print " ..required by " + str(processed[dep])
diff --git a/scripts/publish-macosx.sh b/scripts/publish-macosx.sh
index e22e5bd..3aeeaf9 100755
--- a/scripts/publish-macosx.sh
+++ b/scripts/publish-macosx.sh
@@ -1,10 +1,13 @@
#!/bin/sh
-# NB! To build a release build, the VERSION environment variable needs to be set.
+# NB! To build a release build, the VERSION and VERSIONDATE environment variables needs to be set.
# See doc/release-checklist.txt
+if test -z "$VERSIONDATE"; then
+ VERSIONDATE=`date "+%Y.%m.%d"`
+fi
if test -z "$VERSION"; then
- VERSION=`date "+%Y.%m.%d"`
+ VERSION=$VERSIONDATE
COMMIT=-c
SNAPSHOT=true
fi
@@ -29,10 +32,24 @@ if [[ $? != 0 ]]; then
exit 1
fi
+SIGNATURE=$(openssl dgst -sha1 -binary < OpenSCAD-$VERSION.dmg | openssl dgst -dss1 -sign dsa_priv.pem | openssl enc -base64)
+
+if [[ $VERSION == $VERSIONDATE ]]; then
+ APPCASTFILE=appcast-snapshots.xml
+else
+ APPCASTFILE=appcast.xml
+fi
+echo "Creating appcast $APPCASTFILE..."
+sed -e "s,@VERSION@,$VERSION,g" -e "s,@VERSIONDATE@,$VERSIONDATE,g" -e "s,@DSASIGNATURE@,$SIGNATURE,g" -e "s,@FILESIZE@,$(stat -f "%z" OpenSCAD-$VERSION.dmg),g" $APPCASTFILE.in > $APPCASTFILE
+cp $APPCASTFILE ../openscad.github.com
+if [[ $VERSION == $VERSIONDATE ]]; then
+ cp $APPCASTFILE ../openscad.github.com/appcast-snapshots.xml
+fi
+
echo "Uploading..."
LABELS=OpSys-OSX,Type-Executable
if ! $SNAPSHOT; then LABELS=$LABELS,Featured; fi
`dirname $0`/googlecode_upload.py -s 'Mac OS X Snapshot' -p openscad OpenSCAD-$VERSION.dmg -l $LABELS
-# Update snapshot filename on wab page
+# Update snapshot filename on web page
`dirname $0`/update-web.sh OpenSCAD-$VERSION.dmg
diff --git a/scripts/release-common.sh b/scripts/release-common.sh
index de14cb1..a30d43a 100755
--- a/scripts/release-common.sh
+++ b/scripts/release-common.sh
@@ -9,10 +9,12 @@
#
# Usage: release-common.sh [-v <versionstring>] [-c] [-x32]
# -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
#
-# If no version string is given, todays date will be used (YYYY-MM-DD)
+# 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.
# If no make target is given, release will be used on Windows, none one Mac OS X
#
# The commit info will extracted from git and be passed to qmake as OPENSCAD_COMMIT
@@ -23,7 +25,7 @@
printUsage()
{
- echo "Usage: $0 -v <versionstring> -c -mingw32
+ echo "Usage: $0 -v <versionstring> -d <versiondate> -c -mingw32
echo
echo " Example: $0 -v 2010.01
}
@@ -59,16 +61,20 @@ else
exit
fi
-while getopts 'v:c' c
+while getopts 'v:d:c' c
do
case $c in
v) VERSION=$OPTARG;;
+ d) VERSIONDATE=$OPTARG;;
c) OPENSCAD_COMMIT=`git log -1 --pretty=format:"%h"`
esac
done
+if test -z "$VERSIONDATE"; then
+ VERSIONDATE=`date "+%Y.%m.%d"`
+fi
if test -z "$VERSION"; then
- VERSION=`date "+%Y.%m.%d"`
+ VERSION=$VERSIONDATE
fi
@@ -102,7 +108,7 @@ if [ -d .git ]; then
git submodule update
fi
-echo "Building openscad-$VERSION $CONFIGURATION..."
+echo "Building openscad-$VERSION ($VERSIONDATE) $CONFIGURATION..."
case $OS in
LINUX|MACOSX)
@@ -230,6 +236,7 @@ echo "Creating archive.."
case $OS in
MACOSX)
+ /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $VERSIONDATE" OpenSCAD.app/Contents/Info.plist
macdeployqt OpenSCAD.app -dmg -no-strip
mv OpenSCAD.dmg OpenSCAD-$VERSION.dmg
hdiutil internet-enable -yes -quiet OpenSCAD-$VERSION.dmg
contact: Jan Huwald // Impressum