Commit da448aa0 authored by dev's avatar dev

added some relinks in Homebrew libs (absolute paths refering to other libs ......

added some relinks in Homebrew libs (absolute paths refering to other libs ... homebrew 2.0 issue ? osx upgrade issue ? xcode linker issue ?
parent 8081ab13
......@@ -10,8 +10,8 @@ CONFIG += debug_and_release \
VERSION_MAJ = 1
VERSION_MIN = 5
VERSION_PATCH = 3
VERSION_TYPE = r # a = alpha, b = beta, rc = release candidate, r = release, other => error
VERSION_PATCH = 4
VERSION_TYPE = a # a = alpha, b = beta, rc = release candidate, r = release, other => error
VERSION_BUILD = 0
VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_PATCH}-$${VERSION_TYPE}.$${VERSION_BUILD}"
......@@ -164,6 +164,7 @@ macx {
LIBS += -framework CoreMedia
LIBS += -lcrypto
LIBS += -L/usr/local/opt/openssl/lib
LIBS += -L/usr/local/opt/quazip/lib
LIBS += -L/usr/local/opt/ffmpeg/lib
INCLUDEPATH += /usr/local/opt/openssl/include
......
......@@ -19,7 +19,7 @@ PROJECT_ROOT="$SCRIPT_PATH/../.."
APPLICATION_NAME="OpenBoard"
BASE_QT_DIR=~/Qt/5.5/clang_64
BASE_QT_DIR=~/Qt/5.9.8/clang_64
# Executables
QMAKE=$BASE_QT_DIR/bin/qmake
MACDEPLOYQT=$BASE_QT_DIR/bin/macdeployqt
......@@ -200,6 +200,32 @@ cd "`pwd`/build/macx/release/product/"
$MACDEPLOYQT "`pwd`/$APPLICATION_NAME.app"
cd -
# make sure libs installed via homebrew 2.0 refer to in-app libs
notify "relinking libs ..."
# libavformat
install_name_tool "$APP/Contents/Frameworks/libavformat.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavcodec.58.dylib @executable_path/../Frameworks/libavcodec.58.dylib
install_name_tool "$APP/Contents/Frameworks/libavformat.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libswresample.3.dylib @executable_path/../Frameworks/libswresample.3.dylib
install_name_tool "$APP/Contents/Frameworks/libavformat.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavutil.56.dylib @executable_path/../Frameworks/libavutil.56.dylib
# libavcodec
install_name_tool "$APP/Contents/Frameworks/libavcodec.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libswresample.3.dylib @executable_path/../Frameworks/libswresample.3.dylib
install_name_tool "$APP/Contents/Frameworks/libavcodec.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavutil.56.dylib @executable_path/../Frameworks/libavutil.56.dylib
#libswresample
install_name_tool "$APP/Contents/Frameworks/libswresample.3.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavutil.56.dylib @executable_path/../Frameworks/libavutil.56.dylib
#libswscale
install_name_tool "$APP/Contents/Frameworks/libswscale.5.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavutil.56.dylib @executable_path/../Frameworks/libavutil.56.dylib
# libhogweed
install_name_tool "$APP/Contents/Frameworks/libhogweed.4.dylib" -change /usr/local/Cellar/nettle/3.4.1/lib/libnettle.6.dylib @executable_path/../Frameworks/libnettle.6.dylib
# libssl
install_name_tool "$APP/Contents/Frameworks/libssl.1.1.dylib" -change /usr/local/Cellar/openssl@1.1/1.1.1d/lib/libcrypto.1.1.dylib @executable_path/../Frameworks/libcrypto.1.1.dylib
# libvorbis
install_name_tool "$APP/Contents/Frameworks/libvorbisenc.2.dylib" -change /usr/local/Cellar/libvorbis/1.3.6/lib/libvorbis.0.dylib @executable_path/../Frameworks/libvorbis.0.dylib
notify "Extracting debug information ..."
$DSYMUTIL "$APP/Contents/MacOS/$APPLICATION_NAME" -o "$DSYM"
$STRIP -S "$APP/Contents/MacOS/$APPLICATION_NAME"
......
# Directories
PRODUCT_DIR="$BUILD_DIR/product"
function notify {
GROWLNOTIFY=`which growlnotify`
if [ -x "$GROWLNOTIFY" ]; then
$GROWLNOTIFY --name OpenBoard-build --iconpath /Developer/Applications/Xcode.app --message "$1" "OpenBoard"
fi
printf "\033[32m--->\033[0m $1\n"
}
function abort {
printf "\033[31merror:\033[0m $1\n"
exit 1
}
function warn {
abort "$1"
}
function checkExecutable {
if [ ! -x "$1" ]; then
abort "$1 not found"
fi
}
APP="$PRODUCT_DIR/$APPLICATION_NAME.app"
# make sure libs installed via homebrew 2.0 refer to in-app libs
notify "relinking libs ..."
# libavformat
install_name_tool "$APP/Contents/Frameworks/libavformat.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavcodec.58.dylib @executable_path/../Frameworks/libavcodec.58.dylib
install_name_tool "$APP/Contents/Frameworks/libavformat.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libswresample.3.dylib @executable_path/../Frameworks/libswresample.3.dylib
install_name_tool "$APP/Contents/Frameworks/libavformat.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavutil.56.dylib @executable_path/../Frameworks/libavutil.56.dylib
# libavcodec
install_name_tool "$APP/Contents/Frameworks/libavcodec.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libswresample.3.dylib @executable_path/../Frameworks/libswresample.3.dylib
install_name_tool "$APP/Contents/Frameworks/libavcodec.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavutil.56.dylib @executable_path/../Frameworks/libavutil.56.dylib
#libswresample
install_name_tool "$APP/Contents/Frameworks/libswresample.3.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavutil.56.dylib @executable_path/../Frameworks/libavutil.56.dylib
#libswscale
install_name_tool "$APP/Contents/Frameworks/libswscale.5.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavutil.56.dylib @executable_path/../Frameworks/libavutil.56.dylib
# libhogweed
install_name_tool "$APP/Contents/Frameworks/libhogweed.4.dylib" -change /usr/local/Cellar/nettle/3.4.1/lib/libnettle.6.dylib @executable_path/../Frameworks/libnettle.6.dylib
# libssl
install_name_tool "$APP/Contents/Frameworks/libssl.1.1.dylib" -change /usr/local/Cellar/openssl@1.1/1.1.1c/lib/libcrypto.1.1.dylib @executable_path/../Frameworks/libcrypto.1.1.dylib
# libvorbis
install_name_tool "$APP/Contents/Frameworks/libvorbisenc.2.dylib" -change /usr/local/Cellar/libvorbis/1.3.6/lib/libvorbis.0.dylib @executable_path/../Frameworks/libvorbis.0.dylib
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment