From: Simon Morlat Date: Wed, 23 Mar 2011 17:21:37 +0000 (+0100) Subject: start implementing a macos bundle X-Git-Url: http://sjero.net/git/?p=linphone;a=commitdiff_plain;h=1d4d255839eeb07f23402e195cc365dc935750cc start implementing a macos bundle --- diff --git a/Makefile.am b/Makefile.am index 66d01711..cef6503c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,7 +16,7 @@ ORTP_DIR=oRTP endif -SUBDIRS = m4 pixmaps po $(ORTP_DIR) $(MS2_DIR) \ +SUBDIRS = build m4 pixmaps po $(ORTP_DIR) $(MS2_DIR) \ coreapi console gtk share scripts @@ -59,6 +59,7 @@ ISS_SCRIPT_PATH=$(shell cd $(top_srcdir) && pwd)/$(ISS_SCRIPT) #path to Inno Setup 5 compiler ISCC=ISCC.exe PACKAGE_WIN32_FILELIST=$(PACKAGE)-win32.filelist +PACKAGE_BUNDLE_FILE=$(top_srcdir)/build/macos/reltime.bundle EXTRA_DIST = config.rpath BUGS linphone.kdevelop \ intltool-extract.in \ @@ -186,3 +187,13 @@ Portfile-devel: $(top_srcdir)/scripts/Portfile-devel.tmpl dist sed -e 's/\@VERSION\@/$(LINPHONE_VERSION)/g' \ -e 's/\@LINPHONE_MD5\@/$(shell md5sum linphone-$(VERSION).tar.gz | awk {'print $$1'})/' < $< > $@ +bundle: + 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) + + + diff --git a/README.macos b/README.macos index 9531aca9..251b6227 100644 --- a/README.macos +++ b/README.macos @@ -37,7 +37,7 @@ After installing jhbuild and get gtk built, $ jhbuild shell -$ PKG_CONFIG_PATH=/Users/smorlat/gtk/inst/lib/pkgconfig:/opt/local/lib/pkgconfig/ ./configure --disable-video --disable-gtk_ui --disable-strict +$ PKG_CONFIG_PATH=$HOME/gtk/inst/lib/pkgconfig:/opt/local/lib/pkgconfig/ ./configure --disable-video --disable-strict diff --git a/build/Makefile.am b/build/Makefile.am new file mode 100644 index 00000000..84ac3e90 --- /dev/null +++ b/build/Makefile.am @@ -0,0 +1,2 @@ +SUBDIRS=macos + diff --git a/build/macos/Info-linphone.plist.in b/build/macos/Info-linphone.plist.in new file mode 100644 index 00000000..8023a278 --- /dev/null +++ b/build/macos/Info-linphone.plist.in @@ -0,0 +1,31 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + Linphone + CFBundleGetInfoString + @PACKAGE_VERSION@, (C) 2011 The linphone team http://www.linphone.org + CFBundleIconFile + linphone_logo.icns + CFBundleIdentifier + org.linphone.linphone + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleShortVersionString + @PACKAGE_VERSION@ + CFBundleSignature + ???? + CFBundleVersion + @PACKAGE_VERSION@ + NSHumanReadableCopyright + Copyright 2011 Belledonne Communications + LSMinimumSystemVersion + 10.4 + + + diff --git a/build/macos/Makefile.am b/build/macos/Makefile.am new file mode 100644 index 00000000..5e2f376d --- /dev/null +++ b/build/macos/Makefile.am @@ -0,0 +1,3 @@ +EXTRA_DIST=linphone.bundle.in environment.sh + + diff --git a/build/macos/environment.sh b/build/macos/environment.sh new file mode 100644 index 00000000..f331e77a --- /dev/null +++ b/build/macos/environment.sh @@ -0,0 +1,3 @@ +export EXTRA_ARGS="--workdir $bundle_res" +unset GDK_PIXBUF_MODULE_FILE + diff --git a/build/macos/linphone.bundle b/build/macos/linphone.bundle new file mode 100644 index 00000000..0777945b --- /dev/null +++ b/build/macos/linphone.bundle @@ -0,0 +1,160 @@ + + + + + + ${env:JHBUILD_PREFIX} + ${env:LINPHONE_INSTALL_PREFIX} + ${env:LINPHONE_INSTALL_PREFIX} + /opt/local + + ${env:HOME}/Desktop + + + + + + + + + + + + + + + gtk+-2.0 + + + + ${project}/Info-linphone.plist + + ${prefix:linphone}/bin/linphone + + + + ${prefix:liblinphone}/lib/*.*.dylib + + + + ${prefix:macports}/lib/libspeex.*.dylib + + + + ${prefix:macports}/lib/libosip.*.dylib + + + + ${prefix:macports}/lib/libeXosip.*.dylib + + + + + ${prefix}/lib/${gtkdir}/modules/*.so + + + + ${prefix}/lib/gdk-pixbuf-2.0/* + + + + + ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/engines/*.so + + + + + ${prefix}/share/locale + + + + + + ${prefix:linphone}/share/* + + + + + ${prefix}/share/themes + + + + + ${project}/../../pixmaps/linphone_logo.icns + + + + + ${project}/environment.sh + + + + + + + + ${prefix:linphone}/share/sounds/linphone/ + + + + + + diff --git a/configure.ac b/configure.ac index c4198463..66e65a12 100644 --- a/configure.ac +++ b/configure.ac @@ -464,7 +464,10 @@ AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false) AC_OUTPUT([ -Makefile +Makefile +build/Makefile +build/macos/Makefile +build/macos/Info-linphone.plist m4/Makefile po/Makefile.in pixmaps/Makefile diff --git a/gtk/main.c b/gtk/main.c index 77689b39..b35b8f4c 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -34,6 +34,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include +#ifdef WIN32 +#define chdir _chdir +#endif + #define LINPHONE_ICON "linphone.png" const char *this_program_ident_string="linphone_ident_string=" LINPHONE_VERSION; @@ -60,9 +64,7 @@ static gboolean verbose=0; static gboolean auto_answer = 0; static gchar * addr_to_call = NULL; static gboolean iconified=FALSE; -#ifdef WIN32 static gchar *workingdir=NULL; -#endif static char *progpath=NULL; static GOptionEntry linphone_options[]={ @@ -94,7 +96,6 @@ static GOptionEntry linphone_options[]={ .arg_data = (gpointer) & auto_answer, .description = N_("if set automatically answer incoming calls") }, -#ifdef WIN32 { .long_name = "workdir", .short_name = '\0', @@ -102,7 +103,6 @@ static GOptionEntry linphone_options[]={ .arg_data = (gpointer) & workingdir, .description = N_("Specifiy a working directory (should be the base of the installation, eg: c:\\Program Files\\Linphone)") }, -#endif {0} }; @@ -1331,9 +1331,9 @@ void linphone_gtk_log_handler(OrtpLogLevel lev, const char *fmt, va_list args){ if (verbose){ const char *lname="undef"; char *msg; - #if defined(__linux) || defined(__APPLE__) +#if defined(__linux) || defined(__APPLE__) va_list cap;/*copy of our argument list: a va_list cannot be re-used (SIGSEGV on linux 64 bits)*/ - #endif +#endif switch(lev){ case ORTP_DEBUG: lname="debug"; @@ -1449,10 +1449,10 @@ int main(int argc, char *argv[]){ g_type_class_unref (g_type_class_ref (GTK_TYPE_BUTTON)); g_object_set(settings, "gtk-menu-images", TRUE, NULL); g_object_set(settings, "gtk-button-images", TRUE, NULL); -#ifdef WIN32 + if (workingdir!=NULL) - _chdir(workingdir); -#endif + chdir(workingdir); + /* Now, look for the factory configuration file, we do it this late since we want to have had time to change directory and to parse the options, in case we needed to access the working directory */ @@ -1505,3 +1505,4 @@ int main(int argc, char *argv[]){ free(progpath); return 0; } +