mirror of https://github.com/vitalif/openscad
Fix linux releases
parent
4bf9b8af3e
commit
45e4c10123
|
@ -107,9 +107,6 @@
|
||||||
/* Define to the version of this package. */
|
/* Define to the version of this package. */
|
||||||
#define PACKAGE_VERSION ""0.13""
|
#define PACKAGE_VERSION ""0.13""
|
||||||
|
|
||||||
/* The size of a `void *', as computed by sizeof. */
|
|
||||||
#define SIZEOF_VOID_P 4
|
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
#define STDC_HEADERS 1
|
#define STDC_HEADERS 1
|
||||||
|
|
||||||
|
|
|
@ -1,41 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# WARNING: This script might only work with the authors setup...
|
|
||||||
|
|
||||||
VERSION=`date "+%Y.%m.%d"`
|
|
||||||
#VERSION=2011.12
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
# svnclean
|
|
||||||
|
|
||||||
qmake-qt4 VERSION=$VERSION QMAKE_CXXFLAGS_RELEASE="-O3 -march=pentium"
|
|
||||||
make
|
|
||||||
|
|
||||||
rm -rf release
|
|
||||||
mkdir -p release/{bin,lib/openscad,examples,libraries}
|
|
||||||
|
|
||||||
cat > release/bin/openscad << "EOT"
|
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
cd "$( dirname "$( type -p $0 )" )"
|
|
||||||
libdir=$PWD/../lib/openscad/
|
|
||||||
cd "$OLDPWD"
|
|
||||||
|
|
||||||
export LD_LIBRARY_PATH="$libdir${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
|
|
||||||
exec $libdir/openscad "$@"
|
|
||||||
EOT
|
|
||||||
|
|
||||||
cp openscad release/lib/openscad/
|
|
||||||
gcc -o chrpath_linux scripts/chrpath_linux.c
|
|
||||||
./chrpath_linux -d release/lib/openscad/openscad
|
|
||||||
|
|
||||||
ldd openscad | sed -re 's,.* => ,,; s,[\t ].*,,;' -e '/Qt|boost/ { p; d; };' \
|
|
||||||
-e '/lib(audio|CGAL|GLEW|opencsg|png|gmp|gmpxx|mpfr)\.so/ { p; d; };' \
|
|
||||||
-e 'd;' | xargs cp -vt release/lib/openscad/
|
|
||||||
strip release/lib/openscad/*
|
|
||||||
|
|
||||||
cat > release/install.sh << "EOT"
|
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# change to the install source directory
|
# change to the install source directory
|
||||||
cd "$( dirname "$( type -p $0 )" )"
|
cd "$( dirname "$( type -p $0 )" )"
|
||||||
|
@ -80,13 +43,3 @@ echo "Copying libraries..."
|
||||||
cp -rv libraries/. "$prefix"/share/openscad/libraries/
|
cp -rv libraries/. "$prefix"/share/openscad/libraries/
|
||||||
|
|
||||||
echo "Installation finished. Have a nice day."
|
echo "Installation finished. Have a nice day."
|
||||||
EOT
|
|
||||||
|
|
||||||
chmod 755 -R release/
|
|
||||||
|
|
||||||
cp examples/* release/examples/
|
|
||||||
chmod 644 -R release/examples/*
|
|
||||||
|
|
||||||
cp -R libraries/* release/libraries/
|
|
||||||
chmod -R u=rwx,go=r,+X release/libraries/*
|
|
||||||
rm -rf `find release/libraries -name ".git"`
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd "$( dirname "$( type -p $0 )" )"
|
||||||
|
libdir=$PWD/../lib/openscad/
|
||||||
|
cd "$OLDPWD"
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH="$libdir${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
|
||||||
|
exec $libdir/openscad "$@"
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# This script creates a binary release of OpenSCAD.
|
# This script creates a binary release of OpenSCAD.
|
||||||
# This should work under Mac OS X, Windows (msys), and Linux cross-compiling
|
# This should work under Mac OS X, Windows (msys), and Linux cross-compiling
|
||||||
|
@ -24,10 +24,20 @@ printUsage()
|
||||||
echo " Example: $0 -v 2010.01
|
echo " Example: $0 -v 2010.01
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ $OSTYPE =~ "darwin" ]]; then
|
if [[ "$OSTYPE" =~ "darwin" ]]; then
|
||||||
OS=MACOSX
|
OS=MACOSX
|
||||||
elif [[ $OSTYPE == "msys" ]]; then
|
elif [[ $OSTYPE == "msys" ]]; then
|
||||||
OS=WIN
|
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
|
fi
|
||||||
|
|
||||||
echo "Detected OS: $OS"
|
echo "Detected OS: $OS"
|
||||||
|
@ -47,7 +57,7 @@ fi
|
||||||
echo "Building openscad-$VERSION $CONFIGURATION..."
|
echo "Building openscad-$VERSION $CONFIGURATION..."
|
||||||
|
|
||||||
case $OS in
|
case $OS in
|
||||||
MACOSX)
|
LINUX|MACOSX)
|
||||||
CONFIG=deploy
|
CONFIG=deploy
|
||||||
TARGET=
|
TARGET=
|
||||||
;;
|
;;
|
||||||
|
@ -83,7 +93,7 @@ case $OS in
|
||||||
rm -rf OpenSCAD.app
|
rm -rf OpenSCAD.app
|
||||||
;;
|
;;
|
||||||
WIN)
|
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
|
touch -t 200012121010 parser_yacc.h parser_yacc.cpp lexer_lex.cpp
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -158,4 +168,24 @@ case $OS in
|
||||||
echo "Binary created: OpenSCAD-$VERSION.zip"
|
echo "Binary created: OpenSCAD-$VERSION.zip"
|
||||||
echo "Installer created: OpenSCAD-$VERSION-Installer.exe"
|
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
|
esac
|
||||||
|
|
Loading…
Reference in New Issue