vlc | branch: master | David Fuhrmann <[email protected]> | Mon Mar 18 19:56:50 2019 +0100| [965c4a0294c4130f10d80338d98ac4923c0da932] | committer: David Fuhrmann
src: darwin/dirs: Package libraries and modules into Frameworks directory This is the correct place for bundling shared libraries (even if they are not in the Framework structure). > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=965c4a0294c4130f10d80338d98ac4923c0da932 --- bin/Makefile.am | 4 ++-- extras/package/macosx/package.mak | 13 ++++++------- src/darwin/dirs.m | 3 +-- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/bin/Makefile.am b/bin/Makefile.am index 6766004cf7..fed00b2b4d 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -47,8 +47,8 @@ endif vlc_osx_SOURCES = darwinvlc.m vlc_osx_LDFLAGS = $(LDFLAGS_vlc) -Wl,-framework,CoreFoundation,-framework,Cocoa -vlc_osx_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/lib/" -vlc_osx_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/plugins/" +vlc_osx_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/../Frameworks/" +vlc_osx_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/../Frameworks/plugins/" if HAVE_BREAKPAD vlc_osx_LDFLAGS += -Wl,-framework,Breakpad vlc_osx_OBJCFLAGS = -F$(CONTRIB_DIR)/Frameworks diff --git a/extras/package/macosx/package.mak b/extras/package/macosx/package.mak index 4f92487198..b3e70dde59 100644 --- a/extras/package/macosx/package.mak +++ b/extras/package/macosx/package.mak @@ -34,7 +34,7 @@ endif if BUILD_LUA ## Copy lua scripts cp -r "$(pkgdatadir)/lua" $@/Contents/Resources/share/ - cp -r "$(pkglibexecdir)/lua" $@/Contents/MacOS/ + cp -r "$(pkglibexecdir)/lua" $@/Contents/Frameworks/ endif ## HRTFs cp -r $(srcdir)/share/hrtfs $@/Contents/Resources/share/ @@ -45,17 +45,16 @@ endif test -d "$(prefix)/share/locale" && cp -r "$(prefix)/share/locale" $@/Contents/Resources/share/ || true printf "APPLVLC#" >| $@/Contents/PkgInfo ## Copy libs - mkdir -p $@/Contents/MacOS/lib - find $(prefix)/lib -name 'libvlc*.dylib' -maxdepth 1 -exec cp -a {} $@/Contents/MacOS/lib \; + find $(prefix)/lib -name 'libvlc*.dylib' -maxdepth 1 -exec cp -a {} $@/Contents/Frameworks \; ## Copy plugins - mkdir -p $@/Contents/MacOS/plugins - find $(prefix)/lib/vlc/plugins -name 'lib*_plugin.dylib' -maxdepth 2 -exec cp -a {} $@/Contents/MacOS/plugins \; + mkdir -p $@/Contents/Frameworks/plugins + find $(prefix)/lib/vlc/plugins -name 'lib*_plugin.dylib' -maxdepth 2 -exec cp -a {} $@/Contents/Frameworks/plugins \; ## Copy libbluray jar - -cp -a $(CONTRIB_DIR)/share/java/libbluray*.jar $@/Contents/MacOS/plugins/ + -cp -a $(CONTRIB_DIR)/share/java/libbluray*.jar $@/Contents/Frameworks/plugins/ ## Install binary cp $(prefix)/bin/vlc $@/Contents/MacOS/VLC ## Generate plugin cache - bin/vlc-cache-gen $@/Contents/MacOS/plugins + bin/vlc-cache-gen $@/Contents/Frameworks/plugins find $@ -type d -exec chmod ugo+rx '{}' \; find $@ -type f -exec chmod ugo+r '{}' \; diff --git a/src/darwin/dirs.m b/src/darwin/dirs.m index 6db871981e..039673e0d3 100644 --- a/src/darwin/dirs.m +++ b/src/darwin/dirs.m @@ -47,11 +47,10 @@ char *config_GetLibDir (void) { if (isBundle()) { NSBundle *bundle = [NSBundle mainBundle]; - NSString *path = bundle.executablePath; + NSString *path = bundle.privateFrameworksPath; if (!path) return NULL; - path = [path stringByDeletingLastPathComponent]; return strdup(path.UTF8String); } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
