[vlc-commits] macOS: Simplify buildsystem, fix VLC.app
Marvin Scholz
git at videolan.org
Sun Feb 19 23:38:26 CET 2017
vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Sun Feb 19 23:37:35 2017 +0100| [475d57d04ce851bdf09495a9c02c0ba33d6e7592] | committer: Marvin Scholz
macOS: Simplify buildsystem, fix VLC.app
This simplifies package.mak by removing unnecessary VLC-tmp,
making VLC.app properly depend on install and removing the
VLC-dev.app, as VLC can now be run with the pseudo-bundle
from command-line for development.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=475d57d04ce851bdf09495a9c02c0ba33d6e7592
---
configure.ac | 4 +-
extras/package/macosx/package.mak | 64 +++++++++-------------
modules/gui/macosx/Makefile.am | 5 +-
.../gui/macosx/Resources => share}/Info.plist.in | 0
4 files changed, 30 insertions(+), 43 deletions(-)
diff --git a/configure.ac b/configure.ac
index bc40593..00285a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4263,8 +4263,8 @@ AM_COND_IF([HAVE_WIN32], [
AM_COND_IF([HAVE_DARWIN], [
AC_CONFIG_FILES([
- modules/gui/macosx/Resources/InfoPlist.strings
- modules/gui/macosx/Resources/Info.plist
+ modules/gui/macosx/UI/InfoPlist.strings:modules/gui/macosx/Resources/InfoPlist.strings.in
+ share/macosx/Info.plist:share/Info.plist.in
])
])
diff --git a/extras/package/macosx/package.mak b/extras/package/macosx/package.mak
index b19da79..ab34168 100644
--- a/extras/package/macosx/package.mak
+++ b/extras/package/macosx/package.mak
@@ -5,60 +5,40 @@ endif
# Symlink a pseudo-bundle
pseudo-bundle:
$(MKDIR_P) $(top_builddir)/bin/Contents/Resources/
- $(LN_S) -f $(abs_top_builddir)/modules/gui/macosx/UI $(top_builddir)/bin/Contents/Resources/English.lproj
- $(LN_S) -f $(abs_top_builddir)/modules/gui/macosx/Resources/InfoPlist.strings $(top_builddir)/bin/Contents/Resources/English.lproj/InfoPlist.strings
- $(LN_S) -f $(abs_top_builddir)/modules/gui/macosx/Resources/Info.plist $(top_builddir)/bin/Contents/Info.plist
- $(LN_S) -f $(CONTRIB_DIR)/Frameworks
+ $(LN_S) -hf $(abs_top_builddir)/modules/gui/macosx/UI $(top_builddir)/bin/Contents/Resources/English.lproj
+ $(LN_S) -hf $(abs_top_builddir)/share/macosx/Info.plist $(top_builddir)/bin/Contents/Info.plist
+ $(LN_S) -hf $(CONTRIB_DIR)/Frameworks
cd $(top_builddir)/bin/Contents/Resources/ && find $(abs_top_srcdir)/modules/gui/macosx/Resources/ -type f -exec $(LN_S) -f {} \;
-# This is just for development purposes.
-# The resulting VLC-dev.app will only run in this tree.
-VLC-dev.app: VLC-tmp
- rm -Rf $@
- cp -R VLC-tmp $@
- $(INSTALL) -m 0755 $(top_builddir)/bin/.libs/vlc-osx $@/Contents/MacOS/VLC
- $(LN_S) -f ../../../modules $@/Contents/MacOS/plugins
-
# VLC.app for packaging and giving it to your friends
# use package-macosx to get a nice dmg
-VLC.app: VLC-tmp
+VLC.app: install
rm -Rf $@
- cp -R VLC-tmp $@
- PRODUCT="$@" ACTION="release-makefile" src_dir=$(srcdir) build_dir=$(top_builddir) sh $(srcdir)/extras/package/macosx/build-package.sh
- bin/vlc-cache-gen $@/Contents/MacOS/plugins
- find $@ -type d -exec chmod ugo+rx '{}' \;
- find $@ -type f -exec chmod ugo+r '{}' \;
-
-VLC-tmp:
- $(AM_V_GEN)for i in src lib share modules/gui/macosx; do \
- (cd $$i && $(MAKE) $(AM_MAKEFLAGS) install $(silentstd)); \
- done
- ## Create directories
- mkdir -p $@/Contents/Resources/English.lproj
- mkdir -p $@/Contents/MacOS/share/locale/
- mkdir -p $@/Contents/MacOS/include/
- mkdir -p $@/Contents/Frameworks/
+ ## Copy Contents
+ cp -R $(prefix)/share/macosx/ $@
+ ## Copy .strings file
+ cp -R $(top_builddir)/modules/gui/macosx/UI/InfoPlist.strings $@/Contents/Resources/UI
+ ## Rename interface files (UI) folder
+ mv $@/Contents/Resources/UI $@/Contents/Resources/English.lproj
## Copy Info.plist and convert to binary
- cp -R $(top_builddir)/modules/gui/macosx/Resources/Info.plist $@/Contents/
+ cp -R $(top_builddir)/share/macosx/Info.plist $@/Contents/
xcrun plutil -convert binary1 $@/Contents/Info.plist
- ## Copy interface files (NIBs)
- cp -R $(top_builddir)/modules/gui/macosx/UI/ $@/Contents/Resources/English.lproj
- ## Copy resources
- cp -R $(prefix)/share/macosx/ $@/Contents/Resources
- ## Copy InfoPlist.strings file
- cp $(top_builddir)/modules/gui/macosx/Resources/InfoPlist.strings $@/Contents/Resources/English.lproj/
- ## Copy frameworks
- cp -R $(CONTRIB_DIR)/Growl.framework $@/Contents/Frameworks/
+ ## Create Frameworks dir and copy required ones
+ mkdir -p $@/Contents/Frameworks
+ cp -R $(CONTRIB_DIR)/Frameworks/Growl.framework $@/Contents/Frameworks
if HAVE_SPARKLE
- cp -R $(CONTRIB_DIR)/Sparkle.framework $@/Contents/Frameworks/
+ cp -R $(CONTRIB_DIR)/Frameworks/Sparkle.framework $@/Contents/Frameworks
endif
if HAVE_BREAKPAD
- cp -R $(CONTRIB_DIR)/Breakpad.framework $@/Contents/Frameworks/
+ cp -R $(CONTRIB_DIR)/Frameworks/Breakpad.framework $@/Contents/Frameworks
endif
+ mkdir -p $@/Contents/MacOS/share/locale/
if BUILD_LUA
## Copy lua scripts
cp -r "$(prefix)/lib/vlc/lua" "$(prefix)/share/vlc/lua" $@/Contents/MacOS/share/
endif
+ ## Copy some other stuff (?)
+ mkdir -p $@/Contents/MacOS/include/
(cd "$(prefix)/include" && $(AMTAR) -c --exclude "plugins" vlc) | $(AMTAR) -x -C $@/Contents/MacOS/include/
## Copy translations
cat $(top_srcdir)/po/LINGUAS | while read i; do \
@@ -69,6 +49,12 @@ endif
$@/Contents/Resources/$${i}.lproj/ ; \
done
printf "APPLVLC#" >| $@/Contents/PkgInfo
+ PRODUCT="$@" ACTION="release-makefile" src_dir=$(srcdir) build_dir=$(top_builddir) sh $(srcdir)/extras/package/macosx/build-package.sh
+ ## Generate plugin cache
+ bin/vlc-cache-gen $@/Contents/MacOS/plugins
+ find $@ -type d -exec chmod ugo+rx '{}' \;
+ find $@ -type f -exec chmod ugo+r '{}' \;
+
package-macosx: VLC.app
mkdir -p "$(top_builddir)/vlc-$(VERSION)/Goodies/"
diff --git a/modules/gui/macosx/Makefile.am b/modules/gui/macosx/Makefile.am
index dfcf4ca..1e0d878 100644
--- a/modules/gui/macosx/Makefile.am
+++ b/modules/gui/macosx/Makefile.am
@@ -95,7 +95,7 @@ libmacosx_plugin_la_SOURCES = \
VLCDefaultValueSliderCell.h VLCDefaultValueSliderCell.m
if HAVE_DARWIN
-libmacosx_plugin_la_DATA = \
+nobase_libmacosx_plugin_la_DATA = \
UI/About.nib \
UI/AddonManager.nib \
UI/AudioEffects.nib \
@@ -780,5 +780,6 @@ DEPS_res += \
Resources/vlc.scriptSuite \
Resources/vlc.scriptTerminology
-libmacosx_plugin_ladir = $(prefix)/share/macosx
+libmacosx_plugin_ladir = $(prefix)/share/macosx/Contents/Resources
+
dist_libmacosx_plugin_la_DATA = $(DEPS_res)
diff --git a/modules/gui/macosx/Resources/Info.plist.in b/share/Info.plist.in
similarity index 100%
rename from modules/gui/macosx/Resources/Info.plist.in
rename to share/Info.plist.in
More information about the vlc-commits
mailing list