* implement the "maemo-laucher" feature, which makes modest startup faster.
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 15 May 2007 07:23:02 +0000 (07:23 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 15 May 2007 07:23:02 +0000 (07:23 +0000)
  this completes workitem "Launcher"

for more information:
  https://stage.maemo.org/svn/maemo/projects/haf/trunk/maemo-launcher/README

pmo-trunk-r1861

debian/control-maemo0
debian/control-maemo1
debian/rules
src/Makefile.am
src/modest-init.c

index a7bc431..a6edb41 100644 (file)
@@ -7,7 +7,7 @@ Standards-Version: 3.6.0
 
 Package: modest
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, modest-providers-data
+Depends: ${shlibs:Depends}, ${misc:Depends},${launcher:Depends},modest-providers-data,maemo-launcher
 Description: an e-mail client for platforms with modest resources
 
 Package: modest-dbg
index 2ab718c..d445918 100644 (file)
@@ -7,7 +7,7 @@ Standards-Version: 3.6.0
 
 Package: modest
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, modest-providers-data, osso-email-l10n-mr0,osso-icons-theme,operator-wizard-settings,osso-countries-l10n-mr0
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${launcher:Depends},modest-providers-data,osso-email-l10n-mr0,osso-icons-theme,operator-wizard-settings,osso-countries-l10n-mr0,maemo-launcher
 Description: an e-mail client for platforms with modest resources
 
 Package: modest-dbg
index 6384dfb..9588eb3 100755 (executable)
@@ -1,48 +1,42 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-
 # These are used for cross-compiling and for saving the configure script
 # from having to guess our platform (since we know it already)
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
-
 CFLAGS = -Wall -g
 PACKAGENAME = modest
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
 else
-#      CFLAGS += -O2
        CFLAGS += -O2
 endif
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
        INSTALL_PROGRAM += -s
 endif
 
+LAUNCHER = yes
+ifneq (,$(findstring maemo-launcher,$(DEB_BUILD_OPTIONS)))
+       LAUNCHER = yes
+endif
 
-#LAUNCHER = no 
-#ifneq (,$(findstring maemo-launcher,$(DEB_BUILD_OPTIONS)))
-#      LAUNCHER = yes
-#endif
-#
-#ifeq "$(strip $(LAUNCHER))" "yes"
-#      LAUNCHER_DEPENDS = -Vlauncher:Depends="maemo-launcher"
-#      LAUNCHER_CFLAGS = -shared
-#      LAUNCHER_LDFLAGS = -pie -shared -export-dynamic
-#endif
-
+ifeq "$(strip $(LAUNCHER))" "yes"
+       LAUNCHER_DEPENDS = -Vlauncher:Depends="maemo-launcher"
+       LAUNCHER_CFLAGS = -shared
+       LAUNCHER_LDFLAGS = -pie -shared -export-dynamic
+endif
 
 
 config.status: configure
        dh_testdir
        # commands to configure the package.
+       if [ ! -x configure ]; then ./autogen.sh; fi
        CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --sysconfdir=/etc --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
 
 configure: configure-stamp
@@ -56,10 +50,10 @@ build: build-stamp
 build-stamp:  config.status
        dh_testdir
 
-       # commands to compile the package.
+        # commands to compile the package.
        $(MAKE) \
-        MAEMO_LAUNCHER_CFLAGS="$(LAUNCHER_CFLAGS)" \
-        MAEMO_LAUNCHER_LDFLAGS="$(LAUNCHER_LDFLAGS)"
+         MAEMO_LAUNCHER_CFLAGS="$(LAUNCHER_CFLAGS)" \
+         MAEMO_LAUNCHER_LDFLAGS="$(LAUNCHER_LDFLAGS)"
        touch build-stamp
 
 clean:
@@ -75,8 +69,6 @@ endif
 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
        cp -f /usr/share/misc/config.guess config.guess
 endif
-
-
        dh_clean 
 
 install: build
@@ -86,15 +78,14 @@ install: build
        dh_installdirs
 
        # install the package into debian/tmp/
-       #
        $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
 
-#ifeq "$(strip $(LAUNCHER))" "yes"
-#      mv $(CURDIR)/debian/modest/usr/bin/modest \
-#      $(CURDIR)/debian/modest/usr/bin/modest.launch
-#      ln -s /usr/bin/maemo-invoker \
-#              $(CURDIR)/debian/modest/usr/bin/modest
-#endif
+ifeq "$(strip $(LAUNCHER))" "yes"
+       mv $(CURDIR)/debian/tmp/usr/bin/modest \
+       $(CURDIR)/debian/modest/usr/bin/modest.launch
+       ln -s /usr/bin/maemo-invoker \
+       $(CURDIR)/debian/modest/usr/bin/modest
+endif
 
 # Build architecture-independent files here.
 binary-indep: build install
index 776f2e1..2e643c7 100644 (file)
@@ -1,6 +1,7 @@
 #
 # Makefile.am
-# Time-stamp: <2007-04-21 11:15:36 (djcb)>
+# Time-stamp: <2007-05-15 08:46:05 (djcb)>
+
 SUBDIRS=$(MODEST_PLATFORM) widgets $(dbus_api)
 
 DIST_SUBDIRS = widgets gnome maemo dbus_api
@@ -88,8 +89,8 @@ modest_SOURCES=\
        modest-widget-memory.c\
        modest-widget-memory.h 
 
-#modest_CFLAGS  = "$(modest_CFLAGS)  $(MAEMO_LAUNCHER_CFLAGS)"
-#modest_LDFLAGS = "$(modest_LDFLAGS) $(MAEMO_LAUNCHER_LDFLAGS)"
+modest_CFLAGS  = $(MAEMO_LAUNCHER_CFLAGS)
+modest_LDFLAGS = $(MAEMO_LAUNCHER_LDFLAGS)
 
 modest_LDADD =                                                 \
        $(MODEST_GSTUFF_LIBS)                           \
index 42cd095..4065dc1 100644 (file)
@@ -136,7 +136,9 @@ modest_init_init_core (void)
        init_debug_g_type();
        init_debug_logging();
 
-       g_thread_init(NULL);
+       if (!g_thread_supported())
+               g_thread_init(NULL);
+       
        gdk_threads_init ();
        
        if (!modest_runtime_init()) {