diff options
author | Brad Pitcher <bradpitcher@gmail.com> | 2012-02-04 21:14:35 (GMT) |
---|---|---|
committer | Brad Pitcher <bradpitcher@gmail.com> | 2012-02-04 21:14:35 (GMT) |
commit | 03771dc21ee84ff2ac681cec7782a478709f0d54 (patch) | |
tree | de713e6d26e00919e35c1bbb1c59e99efa76bc80 /scripts/release-common.sh | |
parent | e725437a5a083ba5fa9e1c53af27f6e84027d656 (diff) |
Fix linux releases
Diffstat (limited to 'scripts/release-common.sh')
-rwxr-xr-x | scripts/release-common.sh | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/scripts/release-common.sh b/scripts/release-common.sh index 72ae29c..80c9795 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # This script creates a binary release of OpenSCAD. # This should work under Mac OS X, Windows (msys), and Linux cross-compiling @@ -24,10 +24,20 @@ printUsage() echo " Example: $0 -v 2010.01 } -if [[ $OSTYPE =~ "darwin" ]]; then +if [[ "$OSTYPE" =~ "darwin" ]]; then OS=MACOSX elif [[ $OSTYPE == "msys" ]]; then OS=WIN +elif [[ $OSTYPE == "linux-gnu" ]]; then + OS=LINUX + if [[ `uname -m` == "x86_64" ]]; then + ARCH=64 + else + ARCH=32 + fi + echo "Detected ARCH: $ARCH" +elif [[ $OSTYPE == "mingw-cross-env" ]]; then + OS=LINXWIN fi echo "Detected OS: $OS" @@ -47,7 +57,7 @@ fi echo "Building openscad-$VERSION $CONFIGURATION..." case $OS in - MACOSX) + LINUX|MACOSX) CONFIG=deploy TARGET= ;; @@ -83,7 +93,7 @@ case $OS in rm -rf OpenSCAD.app ;; WIN) - #if the following files are missing their tried removal stops the build process on msys + #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 ;; esac @@ -158,4 +168,24 @@ case $OS in echo "Binary created: OpenSCAD-$VERSION.zip" echo "Installer created: OpenSCAD-$VERSION-Installer.exe" ;; + LINUX) + # Do stuff from release-linux.sh + mkdir openscad-$VERSION/bin + mkdir -p openscad-$VERSION/lib/openscad + cp scripts/openscad-linux openscad-$VERSION/bin/openscad + cp openscad openscad-$VERSION/lib/openscad/ + if [[ $ARCH == 64 ]]; then + gcc -o chrpath_linux -DSIZEOF_VOID_P=8 scripts/chrpath_linux.c + else + gcc -o chrpath_linux -DSIZEOF_VOID_P=4 scripts/chrpath_linux.c + fi + ./chrpath_linux -d openscad-$VERSION/lib/openscad/openscad + ldd openscad | sed -re 's,.* => ,,; s,[\t ].*,,;' -e '/Qt|boost/ { p; d; };' \ + -e '/lib(icu.*|stdc.*|audio|CGAL|GLEW|opencsg|png|gmp|gmpxx|mpfr)\.so/ { p; d; };' \ + -e 'd;' | xargs cp -vt openscad-$VERSION/lib/openscad/ + strip openscad-$VERSION/lib/openscad/* + cp scripts/installer-linux.sh openscad-$VERSION/install.sh + chmod 755 -R openscad-$VERSION/ + tar cz openscad-$VERSION > openscad-$VERSION.x86-64.tar.gz + ;; esac |