13
0

prepare installer for multiabi bundles

This commit is contained in:
Robin Gareus 2016-07-29 21:50:47 +02:00
parent 3647d47b6d
commit 73c0f9e529

View File

@ -31,6 +31,7 @@ USER_NAME=$(logname)
#### Global Variables #### #### Global Variables ####
HAS_XDG="T" HAS_XDG="T"
MULTABI_BUNDLE=""
######################## ########################
# Function Definitions # Function Definitions
@ -229,6 +230,20 @@ case `uname -m` in
;; ;;
esac esac
###################
# Determine gcc ABI
###################
if -n "$MULTABI_BUNDLE"; then
if ! ${NORM_USER} "${PKG_PATH}/.gcc-glibmm-abi-check --gcc5 > /dev/null"; then
ABI=-gcc4
else
ABI=-gcc5
fi
else
ABI=
fi
#################### ####################
# Check disk space # Check disk space
#################### ####################
@ -237,15 +252,15 @@ esac
# in case they are on different devices # in case they are on different devices
echo "Checking for required disk space" echo "Checking for required disk space"
if [ ! -e .${PGM_NAME}_${ARCH}-*.size ]; then if [ ! -e .${PGM_NAME}_${ARCH}${ABI}-*.size ]; then
echo "" echo ""
echo "!!! ERROR !!! Can't locate .size file for ${ARCH} bundle." echo "!!! ERROR !!! Can't locate .size file for ${ARCH}${ABI} bundle."
echo "This package is broken or does not support ${ARCH}." echo "This package is broken or does not support ${ARCH}${ABI}."
echo "" echo ""
read -p "Press ENTER to exit installer:" BLAH read -p "Press ENTER to exit installer:" BLAH
exit 1 exit 1
else else
REQUIRED_BYTES=$(cat .${PGM_NAME}_${ARCH}-*.size) REQUIRED_BYTES=$(cat .${PGM_NAME}_${ARCH}${ABI}-*.size)
#Installer needs 2x the space since the bundle is unpacked locally and then copied #Installer needs 2x the space since the bundle is unpacked locally and then copied
REQUIRED_BYTES=$(($REQUIRED_BYTES + $REQUIRED_BYTES)) REQUIRED_BYTES=$(($REQUIRED_BYTES + $REQUIRED_BYTES))
@ -281,34 +296,36 @@ fi
# Determine C11 stdlibc++ ABI # Determine C11 stdlibc++ ABI
############################# #############################
if %REPLACE_GCC5%; then if -z "$ABI"; then
# Ardour was compiled with gcc5, warn on gcc4 systems if %REPLACE_GCC5%; then
if ! ${NORM_USER} "${PKG_PATH}/.gcc-glibmm-abi-check --gcc5 > /dev/null"; then # Ardour was compiled with gcc5, warn on gcc4 systems
echo "" if ! ${NORM_USER} "${PKG_PATH}/.gcc-glibmm-abi-check --gcc5 > /dev/null"; then
echo "WARNING: GCC4/5 libstdc++ ABI Mismatch" echo ""
echo "" echo "WARNING: GCC4/5 libstdc++ ABI Mismatch"
echo "${PGM_NAME} was compiled with gcc5, your system uses an older version of the" echo ""
echo "standard c++ library. Plugins on your system may not load or plugin-UIs" echo "${PGM_NAME} was compiled with gcc5, your system uses an older version of the"
echo "may cause crashes." echo "standard c++ library. Plugins on your system may not load or plugin-UIs"
echo "" echo "may cause crashes."
ANSWER=$(VaildateYesNoQuestion "Continue anyway?") echo ""
if test "n" = $ANSWER; then ANSWER=$(VaildateYesNoQuestion "Continue anyway?")
exit 1 if test "n" = $ANSWER; then
exit 1
fi
fi fi
fi else
else # Ardour was compiled with gcc4, warn on gcc5 systems
# Ardour was compiled with gcc4, warn on gcc5 systems if ! ${NORM_USER} "${PKG_PATH}/.gcc-glibmm-abi-check --gcc4 > /dev/null"; then
if ! ${NORM_USER} "${PKG_PATH}/.gcc-glibmm-abi-check --gcc4 > /dev/null"; then echo ""
echo "" echo "WARNING: GCC4/5 libstdc++ ABI Mismatch"
echo "WARNING: GCC4/5 libstdc++ ABI Mismatch" echo ""
echo "" echo "${PGM_NAME} was compiled with gcc4, your system uses a newer version of the"
echo "${PGM_NAME} was compiled with gcc4, your system uses a newer version of the" echo "standard c++ library. Plugins on your system may not load or plugin-UIs"
echo "standard c++ library. Plugins on your system may not load or plugin-UIs" echo "may cause crashes."
echo "may cause crashes." echo ""
echo "" ANSWER=$(VaildateYesNoQuestion "Continue anyway?")
ANSWER=$(VaildateYesNoQuestion "Continue anyway?") if test "n" = $ANSWER; then
if test "n" = $ANSWER; then exit 1
exit 1 fi
fi fi
fi fi
fi fi
@ -334,19 +351,19 @@ FILESYSTEM_TYPE=$(df -P -T "${PKG_PATH}" | grep / | awk '{print $2}')
echo "Bundle is on ${FILESYSTEM_TYPE} filesystem" echo "Bundle is on ${FILESYSTEM_TYPE} filesystem"
# untar the correct bundle for us to install # untar the correct bundle for us to install
echo "Unpacking bundle for $ARCH" echo "Unpacking bundle for $ARCH${ABI}"
if [ ! -e ${PGM_NAME}_${ARCH}-*.tar ]; then if [ ! -e ${PGM_NAME}_${ARCH}${ABI}-*.tar ]; then
echo "" echo ""
echo "!!! ERROR !!! Can't locate ${ARCH} bundle file." echo "!!! ERROR !!! Can't locate ${ARCH}${ABI} bundle file."
echo "" echo ""
read -p "Press ENTER to exit installer:" BLAH read -p "Press ENTER to exit installer:" BLAH
exit 1 exit 1
fi fi
if ! tar -xf ${PGM_NAME}_${ARCH}-*.tar; then if ! tar -xf ${PGM_NAME}_${ARCH}${ABI}-*.tar; then
echo "" echo ""
echo "!!! ERROR !!! Can't unpack ${ARCH} bundle file." echo "!!! ERROR !!! Can't unpack ${ARCH}${ABI} bundle file."
echo "" echo ""
read -p "Press ENTER to exit installer:" BLAH read -p "Press ENTER to exit installer:" BLAH
exit 1 exit 1
@ -354,7 +371,7 @@ else
echo "Bundle unpacked" echo "Bundle unpacked"
fi fi
BUNDLE_DIR=$(basename `find -maxdepth 1 -type d -name "${PGM_NAME}_${ARCH}-*"`) BUNDLE_DIR=$(basename `find -maxdepth 1 -type d -name "${PGM_NAME}_${ARCH}${ABI}-*"`)
####################### #######################