* Compiling linphone on macos X *
**********************************
+You need:
+ - Xcode (download from apple or using appstore application)
+ - Macports: http://www.macports.org/
+ Download and install macports using its user friendly installer.
-You have two options: using gtk-osx framework (http://gtk-osx.sourceforge.net/) which results in a Linphone GTK well integrated into Mac OS
-environment. The other option is using MacPort, in which case Linphone will run as an X11 application inside Mac OS.
-
-At the date of March 25, 2011, no video support is available yet.
-
-
-Compiling using gtk-osx
-=======================
-
-Requirements:
-* gtk-osx framework
-* xcode (for gcc)
-* macport (to retrieve dependencies easily, such as libosip2, libeXosip2, libspeex
-* linphone git tree
-
-Steps:
-
-- Install gtk-osx jhbuild environment as described at
-http://sourceforge.net/apps/trac/gtk-osx/wiki/Build
-It will build gtk for osx as well as many dependencies.
-
-- Install ige-mac-bundler following instructions here (git clone method is preferred):
-http://sourceforge.net/apps/trac/gtk-osx/wiki/Bundle
+- Install build time dependencies
+ $ port install automake autoconf libtool intltool
- Install some linphone dependencies with macports
$ port install speex-dev
$ port install osip2
$ port install eXosip2
+ $ port install ffmpeg-devel
+ $ port install sdl-devel
-- Install libSDL and ffmpeg from their official git or hg repositories. At this date (2011/05/09) the macports version are too old and buggy.
+- Install gtk. It is recommended to use the quartz backend for better integration.
+ $ port install gtk2 +no_x11
+ $ port install ige-mac-integration
-- Now you can compile linphone
+- Compile linphone
-$ jhbuild shell
-$ PKG_CONFIG_PATH=$HOME/gtk/inst/lib/pkgconfig:/opt/local/lib/pkgconfig/ ./configure --disable-static --disable-strict --with-gsm=/opt/local --disable-x11
-#assuming you have gsm installed in /opt/local. However gsm is optional.
-$ make
+If you got the source code from git, run ./autogen.sh first.
-- You can generate a bundle using
-$ make bundle
-
-The bundle is generated in ~/Desktop/Linphone and can safely be exported to other places and computers.
-
-
-Compiling using MacPort
-=======================
-
-This procedure works for audio, video still not fully supported.
-It was tested on macos X (leopard) on september 2009.
-
-Requirements:
-* xcode (for gcc)
-* macport (GNU porting project)
-* svn or git checkout'd linphone tree.
-
-Steps:
-* install with the 'port install' command the following dependencies
- - automake
- - autoconf
- - libtool
- - gettext
- - intltool
- - gtk2
- - speex-dev
- - osip2
- - eXosip2
+Then or otherwise, do:
-* add /opt/local/bin to your PATH by editing (or creating) ~/.profile, logout and login again for changes to take effect
+ $ ./configure --prefix=/opt/local --with-readline=/opt/local --disable-strict --disable-x11 && make
+
+Install to /opt/local
-* within linphone source directory, run ./autogen.sh
-* run
- ./configure --prefix=/opt/local --disable-video --with-readline=none && make
- (note: we disable readline for linphonec because it appears to hang at this time)
-* install to /opt/local
- sudo make install
+ $ sudo make install
+Done.
static gchar *workingdir=NULL;
static char *progpath=NULL;
gchar *linphone_logfile=NULL;
+static gboolean app_terminated=FALSE;
static GOptionEntry linphone_options[]={
{
}
}
+#ifdef HAVE_GTK_OSX
+static gboolean on_block_termination(void){
+ gtk_main_quit();
+ g_message("Block termination returning %i",!app_terminated);
+ return !app_terminated;
+}
+#endif
+
int main(int argc, char *argv[]){
#ifdef ENABLE_NLS
void *p;
g_signal_connect(G_OBJECT(theMacApp),"NSApplicationDidBecomeActive",(GCallback)linphone_gtk_show_main_window,NULL);
g_signal_connect(G_OBJECT(theMacApp),"NSApplicationWillTerminate",(GCallback)gtk_main_quit,NULL);
/*never block termination:*/
- g_signal_connect(G_OBJECT(theMacApp),"NSApplicationBlockTermination",(GCallback)gtk_false,NULL);
+ g_signal_connect(G_OBJECT(theMacApp),"NSApplicationBlockTermination",(GCallback)on_block_termination,NULL);
#endif
the_ui=linphone_gtk_create_window("main");
linphone_gtk_destroy_log_window();
linphone_core_destroy(the_core);
linphone_gtk_log_uninit();
+ app_terminated=TRUE;
#ifndef HAVE_GTK_OSX
/*workaround a bug on win32 that makes status icon still present in the systray even after program exit.*/
gtk_status_icon_set_visible(icon,FALSE);