From f8b354d1585dd2f615f2842079b384fd92c325e3 Mon Sep 17 00:00:00 2001 From: Alex Birch Date: Sun, 10 Jun 2018 00:27:44 +0100 Subject: [PATCH] explain --- Builds/MacOSX/relink-build-for-distribution.sh | 15 +++++++++++++++ Builds/MacOSX/relink_libs.sh | 12 ++++++++++++ 2 files changed, 27 insertions(+) diff --git a/Builds/MacOSX/relink-build-for-distribution.sh b/Builds/MacOSX/relink-build-for-distribution.sh index 93589fe..6df09dd 100755 --- a/Builds/MacOSX/relink-build-for-distribution.sh +++ b/Builds/MacOSX/relink-build-for-distribution.sh @@ -1,5 +1,20 @@ #!/usr/bin/env bash +# This script used to be used for manually copying +# libs into the target bundle and rewriting the dynamic +# links, to make the bundle portable. +# +# The script is (hopefully) no longer needed, +# because now our builds are portable automatically. +# +# We have a directory of already-linked +# libraries (lib_relinked), which regular builds +# link against and copy into the target bundle. +# +# The contents of lib_relinked were created by doing +# a one-time run of relink_libs.sh upon some libs +# copied out of brew. + # Ascertain directory in which script lives; compatible with all UNIX # Thanks to kenorb # http://stackoverflow.com/a/17744637/5257399 diff --git a/Builds/MacOSX/relink_libs.sh b/Builds/MacOSX/relink_libs.sh index d9e8249..8ceef51 100755 --- a/Builds/MacOSX/relink_libs.sh +++ b/Builds/MacOSX/relink_libs.sh @@ -1,5 +1,17 @@ #!/usr/bin/env bash +# This script does not need to be run in a general +# workflow. I just ran it once upon some brew libs +# that I'd copied into lib_relinked. +# +# As a result: lib_relinked now contains _relinked_ +# binaries, whose install names are relative to @rpath +# (instead of an absolute path provided by brew). +# +# Thus, libraries in lib_relinked are portable, and +# and executable which sets rpath correctly can +# discover them. + # Ascertain directory in which script lives; compatible with all UNIX # Thanks to kenorb # http://stackoverflow.com/a/17744637/5257399