From ac7f354e08b2da2f832b86384100fbb8766a28aa Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 25 Aug 2011 17:16:55 +0200 Subject: [PATCH] improve mac bundle generation and fix many related problems. --- Makefile.am | 15 +++++++++++++-- README.macos | 23 ++++++++++++++++++++++- build/macos/linphone.bundle | 9 +++++++++ gtk/gtkrc.mac | 2 +- oRTP | 2 +- 5 files changed, 46 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index ff9efa45..149c37c7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -177,14 +177,25 @@ Portfile-devel: $(top_srcdir)/scripts/Portfile-devel.tmpl dist sed -e 's/\@VERSION\@/$(LINPHONE_VERSION)/g' \ -e 's/\@LINPHONE_MD5\@/$(GEN_MD5)/' < $< > $@ -bundle: +MACAPPNAME=Linphone.app +BUNDLEDIR=$(shell echo "$$HOME/Desktop/$(MACAPPNAME)") +LIBICONV_HACK=$(top_builddir)/build/macos/libiconv.2.dylib + +$(LIBICONV_HACK): + cd $(top_builddir)/build/macos && \ + wget http://download-mirror.savannah.gnu.org/releases/linphone/misc/libiconv.2.dylib + +bundle: $(LIBICONV_HACK) rm -rf $(INSTALLDIR) mkdir -p $(INSTALLDIR) make install DESTDIR=$(INSTALLDIR) LINPHONE_INSTALL_PREFIX=$(INSTALLDIR_WITH_PREFIX) \ LIBLINPHONE_INSTALL_PREFIX=$(INSTALLDIR_WITH_PREFIX) \ ige-mac-bundler $(PACKAGE_BUNDLE_FILE) - cd $$HOME/Desktop && zip -r Linphone-$(VERSION).app.zip Linphone.app + /bin/echo -n "[Pango]\nModuleFiles=./etc/pango/pango.modules" \ + > $(BUNDLEDIR)/Contents/Resources/etc/pango/pangorc + cp -f $(LIBICONV_HACK) $(BUNDLEDIR)/Contents/Resources/lib/. + cd $(BUNDLEDIR)/.. && zip -r $(PACKAGE)-$(VERSION).app.zip $(MACAPPNAME) diff --git a/README.macos b/README.macos index 1ed55dc7..e5a8a50f 100644 --- a/README.macos +++ b/README.macos @@ -26,7 +26,7 @@ Fetch SDL: Compile: $ cd SDL $ ./autogen.sh - $ ./configure --disable-video-dummy --disable-video-x11 && make -j4 + $ ./configure --prefix=/opt/local && make -j4 $ sudo make install When this version will be integrated into macports, only this will be necessary: @@ -35,6 +35,7 @@ When this version will be integrated into macports, only this will be necessary: - Install gtk. It is recommended to use the quartz backend for better integration. $ port install gtk2 +no_x11 $ port install ige-mac-integration + $ port install hicolor-icon-theme - Compile linphone @@ -50,6 +51,26 @@ Install to /opt/local Done. +If you want to generate a portable bundle, then install ige-mac-bundler. +The version in macports doesn't work at all. +Use git: + $ git clone https://github.com/jralls/ige-mac-bundler.git + $ cd ige-mac-bundler && make install + $ export PATH=$PATH:~/.local/bin +Then run, inside linphone source tree: + $ make bundle + +The resulting bundle is located in ~/Desktop, together with a zipped version. + +For a better appearance, you can install the gtk-quartz-engine (a gtk theme) that make gtk application more similar to other mac applications (but not perfect). + + $ git clone https://github.com/jralls/gtk-quartz-engine.git + $ cd gtk-quartz-engine + $ autoreconf -i + $ ./configure --prefix=/opt/local && make + $ sudo make install + +Generate a new bundle to have it packaged. diff --git a/build/macos/linphone.bundle b/build/macos/linphone.bundle index b38d550a..52aa54c6 100644 --- a/build/macos/linphone.bundle +++ b/build/macos/linphone.bundle @@ -16,6 +16,7 @@ ${env:LINPHONE_INSTALL_PREFIX} ${env:LINPHONE_INSTALL_PREFIX} /opt/local + /usr/local