summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Smith <brian@dbsoft.org>2020-03-10 12:25:05 -0500
committerBrian Smith <brian@dbsoft.org>2020-03-13 12:21:43 -0500
commita7b58dedb2eead94fc41fbb86c0a9c0a49ac51ce (patch)
treeab39528ed2d724457fe639d04dc10d5652cc08c2
parent798279388ce80cdf5c62e9cae7d64356f1991ed0 (diff)
downloadbasilisk-a7b58dedb2eead94fc41fbb86c0a9c0a49ac51ce.tar.gz
Issue MoonchildProductions/UXP#1469 - Copy dylibs to the application bundle instead of symlinks.
-rw-r--r--basilisk/app/Makefile.in3
-rw-r--r--basilisk/app/macbuild/Contents/MacOS-files-copy.in11
-rw-r--r--basilisk/app/macbuild/Contents/MacOS-files.in1
3 files changed, 14 insertions, 1 deletions
diff --git a/basilisk/app/Makefile.in b/basilisk/app/Makefile.in
index b0c1570..5f82f69 100644
--- a/basilisk/app/Makefile.in
+++ b/basilisk/app/Makefile.in
@@ -83,6 +83,9 @@ tools repackage:: $(DIST)/bin/$(MOZ_APP_NAME)
sed -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > '$(dist_dest)/$(LPROJ)/InfoPlist.strings'
rsync -a --exclude-from='$(srcdir)/macbuild/Contents/MacOS-files.in' $(DIST)/bin/ '$(dist_dest)/Contents/Resources'
rsync -a --include-from='$(srcdir)/macbuild/Contents/MacOS-files.in' --exclude '*' $(DIST)/bin/ '$(dist_dest)/Contents/MacOS'
+ # MacOS-files-copy.in is a list of files that should be copies rather
+ # than symlinks and placed in .app/Contents/MacOS.
+ rsync -aL --include-from='$(srcdir)/macbuild/Contents/MacOS-files-copy.in' --exclude '*' $(DIST)/bin/ '$(dist_dest)/Contents/MacOS'
$(RM) '$(dist_dest)/Contents/MacOS/$(MOZ_APP_NAME)'
rsync -aL $(DIST)/bin/$(MOZ_APP_NAME) '$(dist_dest)/Contents/MacOS'
cp -RL $(DIST)/branding/firefox.icns '$(dist_dest)/Contents/Resources/firefox.icns'
diff --git a/basilisk/app/macbuild/Contents/MacOS-files-copy.in b/basilisk/app/macbuild/Contents/MacOS-files-copy.in
new file mode 100644
index 0000000..628fea3
--- /dev/null
+++ b/basilisk/app/macbuild/Contents/MacOS-files-copy.in
@@ -0,0 +1,11 @@
+# Specifies files that should be copied (via deep copy, resolving symlinks)
+# from dist/bin to the .app/Contents/MacOS directory. Linking is preferred to
+# reduce disk I/O during builds, so just include dylibs which need to be in the
+# same directory as returned by dladdr(3).
+#
+# Some of these dylibs load other dylibs which are assumed to be siblings in
+# the same directory obtained from dladdr(3). With macOS 10.15, dladdr returns
+# absolute resolved paths which breaks this assumption if symlinks are used
+# because the symlink targets are in different directories. Hence the need for
+# them to be copied to the same directory.
+/*.dylib
diff --git a/basilisk/app/macbuild/Contents/MacOS-files.in b/basilisk/app/macbuild/Contents/MacOS-files.in
index 849336b..2dba8d6 100644
--- a/basilisk/app/macbuild/Contents/MacOS-files.in
+++ b/basilisk/app/macbuild/Contents/MacOS-files.in
@@ -1,5 +1,4 @@
/*.app/***
-/*.dylib
/certutil
/firefox-bin
/gtest/***