From bdc4849a3b8264fd56a60b1e062134b264d6cf13 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 14 May 2021 11:09:25 +0200 Subject: [PATCH] Small cosmetic change to the macOS dylib rpaths update script. --- INSTALL-DEV.md | 16 ++++++++-------- tools/macOS_change_dylib_rpaths.sh | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/INSTALL-DEV.md b/INSTALL-DEV.md index c42a70b4e..9d608d35d 100644 --- a/INSTALL-DEV.md +++ b/INSTALL-DEV.md @@ -507,17 +507,17 @@ Note that the filenames could be slightly different depending on what versions y There are some secondary internal dependencies between some of these library files, and these are baked into the files as absolut paths. As such we need to rewrite these to rpaths (relative paths) which is done using the install_name_tool command. -A script is available to automate this, `tools/macOS_change_dylib_rpaths.sh` +A script is available to automate this: `tools/macOS_change_dylib_rpaths.sh` -Simply run this script: +Simply run the following: ``` cd emulationstation-de tools/macOS_change_dylib_rpaths.sh -Found file libfreetype.6.dylib - changing rpaths -Found file libavcodec.58.dylib - changing rpaths -Found file libavformat.58.dylib - changing rpaths -Found file libswresample.3.dylib - changing rpaths -Found file libswscale.5.dylib - changing rpaths +Found file libfreetype.6.dylib - changing to rpaths +Found file libavcodec.58.dylib - changing to rpaths +Found file libavformat.58.dylib - changing to rpaths +Found file libswresample.3.dylib - changing to rpaths +Found file libswscale.5.dylib - changing to rpaths ``` Verify that it worked as expected by running the otool command, for example `otool -L libfreetype.6.dylib` should show something like the following: @@ -533,7 +533,7 @@ libfreetype.6.dylib: It's unclear why the first line shows a reference to itself, and this line apparently can't be modified using the install_name_tool command. It doesn't matter though and the application will work fine even if this path does not exist on the system. -You of course only need to change the paths to rpaths once, well at least until you replace the libraries in case of moving to a newer version or so. +You of course only need to change the absolute paths to rpaths once, well at least until you replace the libraries in case of moving to a newer version or so. In addition to these libraries, you need to create a `plugins` directory and copy over the following VLC libraries, which are normally located in `/Applications/VLC.app/Contents/MacOS/plugins/`: diff --git a/tools/macOS_change_dylib_rpaths.sh b/tools/macOS_change_dylib_rpaths.sh index 28a3b6c06..83bfb25bf 100755 --- a/tools/macOS_change_dylib_rpaths.sh +++ b/tools/macOS_change_dylib_rpaths.sh @@ -18,14 +18,14 @@ export SWRESAMPLE_FILENAME=libswresample.3.dylib export SWSCALE_FILENAME=libswscale.5.dylib if [ -f $FREETYPE_FILENAME ]; then - echo Found file $FREETYPE_FILENAME - changing rpaths + echo Found file $FREETYPE_FILENAME - changing to rpaths chmod 755 $FREETYPE_FILENAME install_name_tool -change /usr/local/opt/libpng/lib/libpng16.16.dylib @rpath/libpng16.16.dylib $FREETYPE_FILENAME install_name_tool -add_rpath @executable_path $FREETYPE_FILENAME fi if [ -f $AVCODEC_FILENAME ]; then - echo Found file $AVCODEC_FILENAME - changing rpaths + echo Found file $AVCODEC_FILENAME - changing to rpaths chmod 755 $AVCODEC_FILENAME install_name_tool -change /usr/local/lib/libswresample.3.dylib @rpath/libswresample.3.dylib $AVCODEC_FILENAME install_name_tool -change /usr/local/lib/libavutil.56.dylib @rpath/libavutil.56.dylib $AVCODEC_FILENAME @@ -34,7 +34,7 @@ if [ -f $AVCODEC_FILENAME ]; then fi if [ -f $AVFORMAT_FILENAME ]; then - echo Found file $AVFORMAT_FILENAME - changing rpaths + echo Found file $AVFORMAT_FILENAME - changing to rpaths chmod 755 $AVFORMAT_FILENAME install_name_tool -change /usr/local/lib/libavcodec.58.dylib @rpath/libavcodec.58.dylib $AVFORMAT_FILENAME install_name_tool -change /usr/local/lib/libswresample.3.dylib @rpath/libswresample.3.dylib $AVFORMAT_FILENAME @@ -44,14 +44,14 @@ if [ -f $AVFORMAT_FILENAME ]; then fi if [ -f $SWRESAMPLE_FILENAME ]; then - echo Found file $SWRESAMPLE_FILENAME - changing rpaths + echo Found file $SWRESAMPLE_FILENAME - changing to rpaths chmod 755 $SWRESAMPLE_FILENAME install_name_tool -change /usr/local/lib/libavutil.56.dylib @rpath/libavutil.56.dylib $SWRESAMPLE_FILENAME install_name_tool -add_rpath @executable_path $SWRESAMPLE_FILENAME fi if [ -f $SWSCALE_FILENAME ]; then - echo Found file $SWSCALE_FILENAME - changing rpaths + echo Found file $SWSCALE_FILENAME - changing to rpaths chmod 755 $SWSCALE_FILENAME install_name_tool -change /usr/local/lib/libavutil.56.dylib @rpath/libavutil.56.dylib $SWSCALE_FILENAME install_name_tool -add_rpath @executable_path $SWSCALE_FILENAME