I have made the following changes intended for :
  CE:UX:MTF / meegotouch-applauncherd

Please review and accept ASAP - BOSS has already processed this request and 
suggests ???
See the "Messages from BOSS" section below

https://build.pub.meego.com/request/show/2697

Thank You,
bossbot ([email protected])

[This message was auto-generated]

---

Request # 2697:

Messages from BOSS:
  None

State:   new          2011-10-24T19:34:15 bossbot

Reviews:
     from bossbot  :BOSS suggests accepting this review. See email for more 
details.
BOSS accepted this review because:
 Target repo CE_UX_MTF_armv7hl found.
     accepted on No date

Changes:
  submit: Project:MTF / meegotouch-applauncherd -> CE:UX:MTF / 
meegotouch-applauncherd
  Index: meegotouch-applauncherd-2.0.3.tar.bz2
===================================================================
Binary file meegotouch-applauncherd-2.0.3.tar.bz2 added
Index: 0002-Changes-lbooster-plugin-included-in-build.patch
===================================================================
--- 0002-Changes-lbooster-plugin-included-in-build.patch (revision 0)
+++ 0002-Changes-lbooster-plugin-included-in-build.patch (revision 15)
@@ -0,0 +1,26 @@
+From 14a191ee160a1f219e6d3587f652334d90c52548 Mon Sep 17 00:00:00 2001
+From: Antti Kervinen <[email protected]>
+Date: Tue, 14 Jun 2011 16:09:20 +0300
+Subject: [PATCH 2/4] Changes: lbooster plugin included in build
+
+---
+ src/CMakeLists.txt |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index b228eab..d8f5d1e 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -19,6 +19,9 @@ add_subdirectory(qtbooster)
+ # Sub build: qdeclarativebooster plugin
+ add_subdirectory(qdeclarativebooster)
+ 
++# Sub build: lbooster plugin
++add_subdirectory(lbooster)
++
+ # Sub build: single-instance binary / library
+ add_subdirectory(single-instance)
+ 
+-- 
+1.7.2.2
+
Index: 0001-Changes-separate-link-dlopen-library-configuration-f.patch
===================================================================
--- 0001-Changes-separate-link-dlopen-library-configuration-f.patch (revision 0)
+++ 0001-Changes-separate-link-dlopen-library-configuration-f.patch (revision 
15)
@@ -0,0 +1,55 @@
+From 7acb0d1cfa4467ae0845373e0757eb6761c6081e Mon Sep 17 00:00:00 2001
+From: Antti Kervinen <[email protected]>
+Date: Thu, 9 Jun 2011 11:13:36 +0300
+Subject: [PATCH] Changes: separate link/dlopen library configuration for MeeGo
+
+---
+ scripts/libraries_meego.py |    7 +++++++
+ scripts/library-helper.py  |   10 +++++++++-
+ 2 files changed, 16 insertions(+), 1 deletions(-)
+ create mode 100644 scripts/libraries_meego.py
+
+diff --git a/scripts/libraries_meego.py b/scripts/libraries_meego.py
+new file mode 100644
+index 0000000..529ce63
+--- /dev/null
++++ b/scripts/libraries_meego.py
+@@ -0,0 +1,7 @@
++# Library statuses
++D = 0   # dlopen
++L = 1   # link
++
++libraries = [
++    (D, "/usr/lib/libmeegoqmllauncher.so.0",                                
"-lmeegoqmllauncher", "libmeegoqmllauncher", "meego-qml-launcher-devel"),
++]
+diff --git a/scripts/library-helper.py b/scripts/library-helper.py
+index d5a5855..4ad1118 100755
+--- a/scripts/library-helper.py
++++ b/scripts/library-helper.py
+@@ -28,7 +28,7 @@ real_runtime_deps = set(['${shlibs:Depends}',
+ D = 0   # dlopen
+ L = 1   # link
+ 
+-libraries = [
++libraries_nokia = [
+     # Library                                                              
Linker flags, Binary package, Dev package
+     #(L, "/usr/lib/libcontactsvoicemail.so.0",                              
"-lcontactsvoicemail", "libcontactsvoicemail0", "libcontactswidgets-dev"),
+     #(L, "/usr/lib/libmaemomeegotouchcalendarinterface.so.1",               
"-lmaemomeegotouchcalendarinterface", "maemo-meegotouch-interfaces", 
"maemo-meegotouch-interfaces-dev"),
+@@ -184,6 +184,14 @@ libraries = [
+     (L, "/lib/librt-2.10.1.so",                                            
"-lrt-2.10.1", "libc6", "libc6"),
+ ]
+ 
++# Choose library list based on build environment
++libraries = libraries_nokia
++try:
++    if "MeeGo" in file("/etc/meego-release").read():
++        import libraries_meego
++        libraries=libraries_meego.libraries
++except: pass
++
+ import sys
+ import fileinput
+ import re
+-- 
+1.7.2.2
+
Index: meegotouch-applauncherd.yaml
===================================================================
--- meegotouch-applauncherd.yaml (revision 0)
+++ meegotouch-applauncherd.yaml (revision 15)
@@ -0,0 +1,187 @@
+Name: meegotouch-applauncherd
+Summary: Application launcher for fast startup
+Version: 2.0.3
+Release: 1
+Group: System/Daemons
+License: LGPLv2+
+URL: http://meego.gitorious.com/meegotouch/meegotouch-applauncherd
+Sources:
+    - "%{name}-%{version}.tar.bz2"
+Patches:
+    - BMC14389_add_X-MEEGO-IVI.patch
+#    - fix_build.patch
+    - BMC_22845_move-var-run-to-home.patch
+    - remove-calls-in-qt-api-extension.patch
+Description: |
+    Application invoker and launcher daemon that speed up
+    application startup time and share memory. Provides also
+    functionality to launch applications as single instances.
+PkgConfigBR:
+    - QtCore
+    - meegotouch
+    - x11
+    - xtst
+    - xextproto
+    - xi
+    - xext
+PkgBR:
+    - cmake
+    - python
+Builder: make
+Files:
+    - "%{_bindir}/invoker"
+    - "%{_libdir}/applauncherd/libapplauncherd.so"
+    - "%{_libdir}/applauncherd/libebooster.so"
+    - "%{_libdir}/applauncherd/libmbooster.so"
+    - "%{_libdir}/applauncherd/libqtbooster.so"
+    - "%{_libdir}/applauncherd/libqdeclarativebooster.so"
+    - "%{_libdir}/libmdeclarativecache.so.0"
+    - "%{_libdir}/libmdeclarativecache.so.0.1"
+    - "%{_bindir}/applauncherd.bin"
+    - "%{_bindir}/applauncherd"
+    - "%{_bindir}/single-instance"
+    - "%config %{_sysconfdir}/xdg/autostart/applauncherd.desktop"
+SubPackages:
+    - Name: devel
+      Group: Development/Tools
+      Summary: Development files for launchable applications
+      Description: |
+         Development files for creating applications that can be launched
+         using meegotouch-applauncherd.
+      Files:
+        - "%{_libdir}/pkgconfig/meegotouch-boostable.pc"
+        - "%{_libdir}/pkgconfig/qdeclarative-boostable.pc"
+        - "%{_libdir}/pkgconfig/qt-boostable.pc"
+        - "%{_includedir}/applauncherd/MDeclarativeCache"
+        - "%{_includedir}/applauncherd/mdeclarativecache.h"
+        - "%{_datadir}/qt4/mkspecs/features/meegotouch-boostable.prf"
+        - "%{_datadir}/qt4/mkspecs/features/qt-boostable.prf"
+        - "%{_datadir}/qt4/mkspecs/features/qdeclarative-boostable.prf"
+        - "%{_libdir}/libmdeclarativecache.so"
+
+    - Name: doc
+      Group: Development/Tools
+      Summary: Instructions for application developer
+      Description: |
+         Documentation files for application developer.
+      Files:
+        - "%doc %{_docdir}/applauncherd/README"
+        - "%doc %{_docdir}/applauncherd/README-QDECLARATIVEBOOSTER"
+        - "%doc 
%{_docdir}/applauncherd/examples/boosted-qml/with-cmake/CMakeLists.txt"
+        - "%doc %{_docdir}/applauncherd/examples/boosted-qml/with-cmake/README"
+        - "%doc 
%{_docdir}/applauncherd/examples/boosted-qml/with-cmake/main.cpp"
+        - "%doc 
%{_docdir}/applauncherd/examples/boosted-qml/with-cmake/main.qml"
+        - "%doc %{_docdir}/applauncherd/examples/boosted-qml/with-qmake/README"
+        - "%doc 
%{_docdir}/applauncherd/examples/boosted-qml/with-qmake/main.cpp"
+        - "%doc 
%{_docdir}/applauncherd/examples/boosted-qml/with-qmake/main.qml"
+        - "%doc 
%{_docdir}/applauncherd/examples/boosted-qml/with-qmake/with-qmake.pro"
+
+    - Name: testapps
+      Group: Development/Tools
+      Summary: Test applications for launchable applications
+      Description: |
+         Test applications used for testing meegotouch-applauncherd.
+      Files:
+        - "%{_bindir}/fala_e_helloworld1"
+        - "%{_bindir}/fala_e_helloworld2"
+        - "%{_bindir}/fala_focus"
+        - "%{_bindir}/fala_ft_hello"
+        - "%{_bindir}/fala_gettime_ms"
+        - "%{_bindir}/fala_pixelchanged"
+        - "%{_bindir}/fala_status"
+        - "%{_bindir}/fala_wl"
+        - "%{_bindir}/fala_wol"
+        - "%{_bindir}/fala_gettime"
+        - "%{_bindir}/fala_ft_hello1"
+        - "%{_bindir}/fala_ft_hello2"
+        - "%{_bindir}/fala_ft_themetest"
+        - "%{_bindir}/fala_windowid"
+        - "%{_bindir}/fala_multi-instance"
+        - "%{_bindir}/fala_qml_helloworld"
+        - "%{_bindir}/fala_qml_helloworld1"
+        - "%{_bindir}/fala_qml_helloworld2"
+        - "%{_bindir}/fala_qml_wl"
+        - "%{_bindir}/fala_qml_wol"
+        - "%{_bindir}/fala_exit"
+        - "%{_bindir}/fala_multi-window"
+        - "%{_bindir}/fala_wait"
+        - "%{_bindir}/fala_windowless"
+        - "%{_bindir}/xsendevent"
+        - "%{_datadir}/themes/base/meegotouch/fala_ft_themetest/svg/baa.svg"
+        - "%{_datadir}/dbus-1/services/com.nokia.fala_testapp.service"
+        - "%{_datadir}/fala_images/landscape.jpg"
+        - "%{_datadir}/fala_images/main.qml"
+        - "%{_datadir}/fala_images/portrait.jpg"
+        #E: arch-dependent-file-in-usr-share (Badness: 590)
+        - "%exclude %{_datadir}/fala_images/fala_hello"
+        - "%exclude %{_datadir}/fala_images/fala_qml_helloworld"
+
+
+    - Name: tests
+      Group: Development/Tools
+      Summary: Test scripts for launchable applications
+      Description: |
+         Test scripts used for testing meegotouch-applauncherd.
+      Requires:
+          - "%{name}-testapps = %{version}-%{release}"
+      Files:
+      - "%{_datadir}/applauncherd-M-art-tests/tests.xml"
+      - "%{_datadir}/applauncherd-M-bug-tests/tests.xml"
+      - "%{_datadir}/applauncherd-M-functional-tests/tests.xml"
+      - "%{_datadir}/applauncherd-M-performance-tests/tests.xml"
+      - "%{_datadir}/applauncherd-tests"
+      - "%{_libdir}/applauncherd-tests/tests.xml"
+      - "%{_libdir}/applauncherd-tests/ut_booster"
+      - "%{_libdir}/applauncherd-tests/ut_boosterfactory"
+      - "%{_libdir}/applauncherd-tests/ut_daemon"
+      - "%{_libdir}/applauncherd-tests/ut_ebooster"
+      - "%{_libdir}/applauncherd-tests/ut_connection"
+      - "%{_libdir}/applauncherd-tests/ut_mbooster"
+      - "%{_libdir}/applauncherd-tests/ut_qtbooster"
+      - "%{_libdir}/applauncherd-tests/ut_socketmanager"
+      - "%{_libdir}/applauncherd-tests/ut_dbooster"
+      - "%{_libdir}/applauncherd-tests/libutplugin.so"
+      - "%{_libdir}/applauncherd-tests/libutwithcreate.so"
+      - "%{_libdir}/applauncherd-tests/libutwithcreatetype.so"
+      - "%{_libdir}/applauncherd-tests/libutwithcreatetypesocketname.so"
+      - "%{_libdir}/applauncherd-tests/libutwithlock.so"
+      - "%{_libdir}/applauncherd-tests/libutwithlockunlock.so"
+      - "%{_libdir}/applauncherd-tests/ut_appdata"
+      - "%{_libdir}/applauncherd-tests/ut_boosterpluginregistry"
+      - "%{_libdir}/applauncherd-tests/ut_logger"
+      - "%{_libdir}/applauncherd-tests/ut_singleinstance"
+      - "%{_datadir}/applauncherd-M-testscripts/check_pipes.py"
+      - "%{_datadir}/applauncherd-M-testscripts/check_pipes.pyc"
+      - "%{_datadir}/applauncherd-M-testscripts/check_pipes.pyo"
+      - "%{_datadir}/applauncherd-M-testscripts/signal-forward/fala_sf_m.py"
+      - "%{_datadir}/applauncherd-M-testscripts/signal-forward/fala_sf_m.pyc"
+      - "%{_datadir}/applauncherd-M-testscripts/signal-forward/fala_sf_m.pyo"
+      - "%{_datadir}/applauncherd-M-testscripts/signal-forward/fala_sf_m.sh"
+      - "%{_datadir}/applauncherd-M-testscripts/signal-forward/fala_sf_qt.py"
+      - "%{_datadir}/applauncherd-M-testscripts/signal-forward/fala_sf_qt.pyc"
+      - "%{_datadir}/applauncherd-M-testscripts/signal-forward/fala_sf_qt.pyo"
+      - "%{_datadir}/applauncherd-M-testscripts/signal-forward/fala_sf_qt.sh"
+      - "%{_datadir}/applauncherd-M-testscripts/tc_theming.rb"
+      - "%{_datadir}/applauncherd-M-testscripts/test-func-launcher.py"
+      - "%{_datadir}/applauncherd-M-testscripts/test-func-launcher.pyc"
+      - "%{_datadir}/applauncherd-M-testscripts/test-func-launcher.pyo"
+      - "%{_datadir}/applauncherd-M-testscripts/test-perf-mbooster.py"
+      - "%{_datadir}/applauncherd-M-testscripts/test-perf-mbooster.pyc"
+      - "%{_datadir}/applauncherd-M-testscripts/test-perf-mbooster.pyo"
+      - "%{_datadir}/applauncherd-M-testscripts/ts_prestartapp.rb"
+      - "%{_datadir}/applauncherd-M-testscripts/fala_wid"
+      - "%{_datadir}/applauncherd-M-testscripts/fala_xres_wl"
+      - "%{_datadir}/applauncherd-M-testscripts/fala_xres_wol"
+      - "%{_datadir}/applauncherd-M-testscripts/test-perf.rb"
+      - "%{_datadir}/applauncherd-M-testscripts/utils.py"
+      - "%{_datadir}/applauncherd-M-testscripts/utils.pyc"
+      - "%{_datadir}/applauncherd-M-testscripts/utils.pyo"
+      - "%{_datadir}/applauncherd-testscripts/view.qml"
+      - 
"%{_datadir}/themes/base/meegotouch/fala_ft_themetest/style/fala_ft_themetest.css"
+      - "%{_datadir}/applications/fala_wl.desktop"
+      - "%{_datadir}/applications/fala_wol.desktop"
+      - "%{_datadir}/applications/fala_qml_wol.desktop"
+      - "%{_datadir}/applications/fala_qml_wl.desktop"
+      - "%{_datadir}/fala_qml_helloworld/main.qml"
+      - "%{_datadir}/dbus-1/services/com.nokia.fala_wl.service"
+      - "%{_datadir}/dbus-1/services/com.nokia.fala_wol.service"
Index: BMC_22845_move-var-run-to-home.patch
===================================================================
--- BMC_22845_move-var-run-to-home.patch (revision 0)
+++ BMC_22845_move-var-run-to-home.patch (revision 15)
@@ -0,0 +1,74 @@
+diff --git a/doc/singleinstance.dox b/doc/singleinstance.dox
+index 7365ae8..2642557 100644
+--- a/doc/singleinstance.dox
++++ b/doc/singleinstance.dox
+@@ -15,7 +15,7 @@ Exec=/usr/bin/invoker --single-instance --type=e 
/usr/bin/myApp
+ \endverbatim
+ 
+ As a result, a lock file 
+-\c /var/run/single-instance-locks/usr/bin/myApp/instance.lock is created. 
++\c /home/meego/.single-instance-locks/usr/bin/myApp/instance.lock is created. 
+ If applauncherd cannot acquire the lock, it tries to find the corresponding
+ window and activates it. 
+ 
+diff --git a/src/launcherlib/daemon.cpp b/src/launcherlib/daemon.cpp
+index 6bd6b71..9bd6643 100644
+--- a/src/launcherlib/daemon.cpp
++++ b/src/launcherlib/daemon.cpp
+@@ -117,7 +117,7 @@ bool Daemon::lock()
+     fl.l_start = 0;
+     fl.l_len = 1;
+ 
+-    if((m_lockFd = open("/var/run/applauncherd.lock", O_WRONLY | O_CREAT, 
0666)) == -1)
++    if((m_lockFd = open("/home/meego/applauncherd.lock", O_WRONLY | O_CREAT, 
0666)) == -1)
+         return false;
+ 
+     if(fcntl(m_lockFd, F_SETLK, &fl) == -1)
+diff --git a/src/qdeclarativebooster/README-QDECLARATIVEBOOSTER 
b/src/qdeclarativebooster/README-QDECLARATIVEBOOSTER
+index addeb9f..2c1a77f 100644
+--- a/src/qdeclarativebooster/README-QDECLARATIVEBOOSTER
++++ b/src/qdeclarativebooster/README-QDECLARATIVEBOOSTER
+@@ -178,7 +178,7 @@ This can be achieved by adding --single-instance to the 
invoker command:
+   Name=com.nokia.<application_name>
+   Exec=/usr/bin/invoker --single-instance --type=d /usr/bin/<application_name>
+  
+-As a result, a lock file 
/var/run/single-instance-locks/<application_name>/instance.lock 
++As a result, a lock file 
/home/meego/.single-instance-locks/<application_name>/instance.lock 
+ is created.  If applauncherd cannot acquire the lock, it tries to find the
+ corresponding window and activates it.
+ 
+diff --git a/src/single-instance/main.cpp b/src/single-instance/main.cpp
+index 51a8c82..b05ad54 100644
+--- a/src/single-instance/main.cpp
++++ b/src/single-instance/main.cpp
+@@ -36,7 +36,7 @@
+ namespace
+ {
+     int g_lockFd = -1;
+-    const std::string LOCK_PATH_BASE("/var/run/single-instance-locks/");
++    const std::string LOCK_PATH_BASE("/home/meego/.single-instance-locks/");
+     const std::string LOCK_FILE_NAME("instance.lock");
+ }
+ 
+@@ -247,7 +247,7 @@ extern "C"
+      * \brief Try to acquire a lock file.
+      *
+      * Tries to acquire a lock currently at
+-     * /var/run/single-instance-locks/[binaryName]/instance.lock
++     * /home/meego/.single-instance-locks/[binaryName]/instance.lock
+      *
+      * \param binaryName Full path to the binary.
+      * \return true if succeeded, false on failure.
+diff --git a/tests/meego/testscripts/utils.py 
b/tests/meego/testscripts/utils.py
+index 72a07df..9e2da20 100644
+--- a/tests/meego/testscripts/utils.py
++++ b/tests/meego/testscripts/utils.py
+@@ -28,7 +28,7 @@ def remove_applauncherd_runtime_files():
+     Removes files that applauncherd leaves behind after it has been stopped
+     """
+ 
+-    files = ['/var/run/applauncherd.lock']
++    files = ['/home/meego/applauncherd.lock']
+     files += glob.glob('/tmp/boost*')
+ 
+     for f in files:
Index: fix_build.patch
===================================================================
--- fix_build.patch (revision 0)
+++ fix_build.patch (revision 15)
@@ -0,0 +1,102 @@
+diff --git a/src/common/eventhandler.cpp b/src/common/eventhandler.cpp
+index be2d1e7..1ba30a8 100644
+--- a/src/common/eventhandler.cpp
++++ b/src/common/eventhandler.cpp
+@@ -110,7 +110,8 @@ void EventHandler::hupSignalHandler(int)
+     Logger::logError(" EventHandler::hupSignalHandler(int) ");
+ 
+     char a = 1;
+-    ::write(m_sighupFd[0], &a, sizeof(a));
++    ssize_t writtenBytes = ::write(m_sighupFd[0], &a, sizeof(a));
++    Q_UNUSED(writtenBytes);
+ }
+ 
+ void EventHandler::handleSigHup()
+diff --git a/src/invoker/invokelib.c b/src/invoker/invokelib.c
+index fb516c7..cdd5a77 100644
+--- a/src/invoker/invokelib.c
++++ b/src/invoker/invokelib.c
+@@ -29,7 +29,8 @@
+ void invoke_send_msg(int fd, uint32_t msg)
+ {
+     debug("%s: %08x\n", __FUNCTION__, msg);
+-    write(fd, &msg, sizeof(msg));
++    ssize_t writtenBytes = write(fd, &msg, sizeof(msg));
++    (void)writtenBytes;
+ }
+ 
+ bool invoke_recv_msg(int fd, uint32_t *msg)
+@@ -71,7 +72,8 @@ void invoke_send_str(int fd, char *str)
+         debug("%s: '%s'\n", __FUNCTION__, str);
+ 
+         /* Send the string. */
+-        write(fd, str, size);
++        ssize_t writtenBytes = write(fd, str, size);
++       (void)writtenBytes;
+     }
+ }
+ 
+diff --git a/src/invoker/invoker.c b/src/invoker/invoker.c
+index 91c8910..5b630cc 100644
+--- a/src/invoker/invoker.c
++++ b/src/invoker/invoker.c
+@@ -97,7 +97,8 @@ static void sig_forwarder(int sig)
+ 
+         // Write signal number to the self-pipe
+         char signal_id = (char) sig;
+-        write(g_signal_pipe[1], &signal_id, 1);
++        ssize_t writtenBytes = write(g_signal_pipe[1], &signal_id, 1);
++        (void)writtenBytes;
+ 
+         // Send the signal to itself using the default handler
+         raise(sig);
+@@ -565,7 +566,8 @@ static int wait_for_launched_process_to_exit(int 
socket_fd, bool wait_term)
+                 {
+                     // Clean up the pipe
+                     char signal_id;
+-                    read(g_signal_pipe[0], &signal_id, sizeof(signal_id));
++                    ssize_t readBytes = read(g_signal_pipe[0], &signal_id, 
sizeof(signal_id));
++                    (void)readBytes;
+ 
+                     // Set signals forwarding to the invoked process again
+                     // (they were reset by the signal forwarder).
+diff --git a/tests/common/testapps/fala_qml_helloworld/fala_qml_wl.desktop 
b/tests/common/testapps/fala_qml_helloworld/fala_qml_wl.desktop
+index 5535caa..0b2d426 100644
+--- a/tests/common/testapps/fala_qml_helloworld/fala_qml_wl.desktop
++++ b/tests/common/testapps/fala_qml_helloworld/fala_qml_wl.desktop
+@@ -3,5 +3,4 @@ Type=Application
+ Name=fala_qml_wl
+ Icon=icon-l-video
+ Exec=invoker --single-instance --type=d /usr/bin/fala_qml_wl
+-Categories=X-MeeGo;X-Demos;
+ OnlyShowIn=X-MeeGo;
+diff --git a/tests/common/testapps/fala_qml_helloworld/fala_qml_wol.desktop 
b/tests/common/testapps/fala_qml_helloworld/fala_qml_wol.desktop
+index cf53eaa..59bfe7e 100644
+--- a/tests/common/testapps/fala_qml_helloworld/fala_qml_wol.desktop
++++ b/tests/common/testapps/fala_qml_helloworld/fala_qml_wol.desktop
+@@ -3,5 +3,4 @@ Type=Application
+ Name=fala_qml_wol
+ Icon=icon-l-video
+ Exec=single-instance /usr/bin/fala_qml_wol
+-Categories=X-MeeGo;X-Demos;
+ OnlyShowIn=X-MeeGo;
+diff --git a/tests/common/testapps/testapp/fala_wl.desktop 
b/tests/common/testapps/testapp/fala_wl.desktop
+index ee8466f..61869aa 100644
+--- a/tests/common/testapps/testapp/fala_wl.desktop
++++ b/tests/common/testapps/testapp/fala_wl.desktop
+@@ -3,5 +3,4 @@ Type=Application
+ Name=fala_wl
+ Icon=icon-l-video
+ Exec=/usr/bin/invoker --type=m /usr/bin/fala_wl
+-Categories=X-MeeGo;X-Demos;
+ OnlyShowIn=X-MeeGo;
+diff --git a/tests/common/testapps/testapp/fala_wol.desktop 
b/tests/common/testapps/testapp/fala_wol.desktop
+index 3cedfce..dac279a 100644
+--- a/tests/common/testapps/testapp/fala_wol.desktop
++++ b/tests/common/testapps/testapp/fala_wol.desktop
+@@ -3,5 +3,4 @@ Type=Application
+ Name=fala_wol
+ Icon=icon-l-video
+ Exec=/usr/bin/fala_wol
+-Categories=X-MeeGo;X-Demos;
+ OnlyShowIn=X-MeeGo;
Index: 0006-Cgroups-support-using-libcgroup.patch
===================================================================
--- 0006-Cgroups-support-using-libcgroup.patch (revision 0)
+++ 0006-Cgroups-support-using-libcgroup.patch (revision 15)
@@ -0,0 +1,297 @@
+From ba7dc46a5b6189f9f6a012932204de7fcbbc073e Mon Sep 17 00:00:00 2001
+From: Sergey Glushchenko <[email protected]>
+Date: Wed, 15 Jun 2011 05:55:43 -0700
+Subject: [PATCH 6/6] Cgroups support using libcgroup
+
+---
+ CMakeLists.txt                 |   18 +++++++
+ src/launcherlib/booster.cpp    |  104 ++++++++++++++++++++++++++++++++++++---
+ src/launcherlib/booster.h      |   21 ++++++++
+ src/launcherlib/connection.cpp |   20 +++++---
+ src/launcherlib/connection.h   |    2 +-
+ 5 files changed, 149 insertions(+), 16 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c5989d3..ed64db0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -59,6 +59,24 @@ else (EXISTS ${CREDS_H})
+     message(STATUS "  not found: Platform Security is disabled.")
+ endif (EXISTS ${CREDS_H})
+ 
++# Find libcgroup.h
++message(STATUS "checking for libcgroup.h")
++find_file(LIBCGROUP_H NAMES libcgroup.h PATHS /usr/include)
++if (EXISTS ${LIBCGROUP_H})
++    message(STATUS "  found: " ${LIBCGROUP_H})
++    message(STATUS "checking for libcgroup")
++    find_library(LIBCGROUP NAMES cgroup)
++    if (EXISTS ${LIBCGROUP})
++        add_definitions(-DHAVE_CGROUP)
++        link_libraries(${LIBCGROUP})
++        message(STATUS "  found: " ${LIBCGROUP})
++    else (EXISTS ${LIBCGROUP})
++        message(STATUS "  not found: cgroups switching is disabled.")
++    endif (EXISTS ${LIBCGROUP})
++else (EXISTS ${LIBCGROUP_H})
++    message(STATUS "  not found: cgroups switching is disabled.")
++endif (EXISTS ${LIBCGROUP_H})
++
+ if ($ENV{DISABLE_VERIFICATION})
+     add_definitions(-DDISABLE_VERIFICATION)
+ endif ($ENV{DISABLE_VERIFICATION})
+diff --git a/src/launcherlib/booster.cpp b/src/launcherlib/booster.cpp
+index 8a64654..ba8752d 100644
+--- a/src/launcherlib/booster.cpp
++++ b/src/launcherlib/booster.cpp
+@@ -36,6 +36,12 @@
+ #include <sstream>
+ #include <stdexcept>
+ 
++#ifdef HAVE_CGROUP
++#include <libcgroup.h>
++#include <fstream>
++using std::ifstream;
++#endif
++
+ #ifdef Q_WS_X11
+ #include <X11/Xlib.h>
+ #include <X11/Xatom.h>
+@@ -82,7 +88,8 @@ Booster::Booster() :
+     m_oldPriority(0),
+     m_oldPriorityOk(false),
+     m_spaceAvailable(0),
+-    m_bootMode(false)
++    m_bootMode(false),
++    m_invokersPid(0)
+ {
+ #ifdef HAVE_CREDS
+     // initialize credentials to be filtered out from boosted applications
+@@ -90,6 +97,9 @@ Booster::Booster() :
+ #endif
+ 
+     m_boosted_gid = getGroupId("boosted", FALLBACK_GID);
++#ifdef HAVE_CGROUP
++    getControllersList();
++#endif
+ }
+ 
+ Booster::~Booster()
+@@ -441,6 +451,12 @@ void Booster::setEnvironmentBeforeLaunch()
+     if (!errno && cur_prio < m_appData->priority())
+         setpriority(PRIO_PROCESS, 0, m_appData->priority());
+ 
++#ifdef HAVE_CGROUP
++    // Setup proper cgroups if they are used
++    if (!m_controllers.empty())
++        setupCgroups();
++#endif
++
+     // Set user ID and group ID of calling process if differing
+     // from the ones we got from invoker
+ 
+@@ -608,14 +624,12 @@ bool Booster::popPriority()
+ 
+ pid_t Booster::invokersPid()
+ {
+-    if (m_connection->isReportAppExitStatusNeeded())
+-    {
+-        return m_connection->peerPid();
+-    }
+-    else
+-    {
+-        return 0;
++    if (!m_invokersPid) {
++        // Store invoker's pid. Otherwise it might become unreadable
++        // due to passing the connection fd to the applauncherd.
++        m_invokersPid = m_connection->peerPid();
+     }
++    return m_invokersPid;
+ }
+ 
+ void Booster::setBoosterLauncherSocket(int newBoosterLauncherSocket)
+@@ -691,3 +705,77 @@ void Booster::resetOomAdj()
+                          strerror(errno));
+     }
+ }
++
++#ifdef HAVE_CGROUP
++void Booster::getControllersList()
++{
++    ifstream in("/proc/mounts");
++    if (in.is_open())
++    {
++        string curr;
++        while (in >> curr)
++        {
++            if (curr == "cgroup")
++            {
++                in >> curr;
++                size_t pos = 0;
++                for (size_t i = 0; i < curr.size(); i++)
++                {
++                    if (curr[i] == ',')
++                    {
++                        m_controllers.push_back(curr.substr(pos, i - pos));
++                        pos = i + 1;
++                    }
++                    else if (i == curr.size() - 1)
++                    {
++                        m_controllers.push_back(curr.substr(pos));
++                    }
++                }
++            }
++        }
++    }
++    in.close();
++}
++#endif
++
++#ifdef HAVE_CGROUP
++void Booster::setupCgroups()
++{
++    if (!cgroup_init()) {
++        std::list<string>::iterator it;
++        for (it = m_controllers.begin(); it != m_controllers.end(); it++) {
++            char *path;
++            
++            if (cgroup_get_current_controller_path(invokersPid(), 
(*it).c_str(), &path)) {
++                Logger::logDebug("Booster: 
cgroup_get_current_controller_path() failed with"
++                                 " controller: %s", (*it).c_str());
++                continue;
++            }
++
++            struct cgroup *cg = cgroup_new_cgroup(path);
++
++            if (cg == NULL) {
++                Logger::logDebug("Booster: cgroup_new_cgroup() failed with"
++                                 " path: %s", path);
++                free(path);
++                continue;
++            }
++
++            if (cgroup_add_controller(cg, (*it).c_str()) == NULL) {
++                Logger::logDebug("Booster: cgroup_add_controller() failed");
++                free(path);
++                cgroup_free(&cg);
++                continue;
++            }
++
++            if (cgroup_attach_task(cg)) {
++                Logger::logDebug("Booster: cgroup_attach_task() failed");
++            }
++
++            free(path);
++            cgroup_free_controllers(cg);
++            cgroup_free(&cg);
++        }
++    }
++}
++#endif
+diff --git a/src/launcherlib/booster.h b/src/launcherlib/booster.h
+index 4aa91b1..cc22f3c 100644
+--- a/src/launcherlib/booster.h
++++ b/src/launcherlib/booster.h
+@@ -25,6 +25,10 @@
+ #include <cstdlib>
+ #include <string>
+ 
++#ifdef HAVE_CGROUP
++#include <list>
(97 more lines skipped)
Index: meegotouch-applauncherd.spec
===================================================================
--- meegotouch-applauncherd.spec (revision 0)
+++ meegotouch-applauncherd.spec (revision 15)
@@ -0,0 +1,287 @@
+# 
+# Do NOT Edit the Auto-generated Part!
+# Generated by: spectacle version 0.23
+# 
+# >> macros
+# << macros
+
+Name:       meegotouch-applauncherd
+Summary:    Application launcher for fast startup
+Version:    2.0.3
+Release:    1
+Group:      System/Daemons
+License:    LGPLv2+
+URL:        http://meego.gitorious.com/meegotouch/meegotouch-applauncherd
+Source0:    %{name}-%{version}.tar.bz2
+Source100:  meegotouch-applauncherd.yaml
+Patch0:     BMC14389_add_X-MEEGO-IVI.patch
+Patch1:     BMC_22845_move-var-run-to-home.patch
+Patch2:     remove-calls-in-qt-api-extension.patch
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+BuildRequires:  pkgconfig(QtCore)
+BuildRequires:  pkgconfig(meegotouch)
+BuildRequires:  pkgconfig(x11)
+BuildRequires:  pkgconfig(xtst)
+BuildRequires:  pkgconfig(xextproto)
+BuildRequires:  pkgconfig(xi)
+BuildRequires:  pkgconfig(xext)
+BuildRequires:  cmake
+BuildRequires:  python
+BuildRequires:  desktop-file-utils
+
+
+%description
+Application invoker and launcher daemon that speed up
+application startup time and share memory. Provides also
+functionality to launch applications as single instances.
+
+
+
+%package devel
+Summary:    Development files for launchable applications
+Group:      Development/Tools
+Requires:   %{name} = %{version}-%{release}
+
+%description devel
+Development files for creating applications that can be launched
+using meegotouch-applauncherd.
+
+
+%package doc
+Summary:    Instructions for application developer
+Group:      Development/Tools
+Requires:   %{name} = %{version}-%{release}
+
+%description doc
+Documentation files for application developer.
+
+
+%package testapps
+Summary:    Test applications for launchable applications
+Group:      Development/Tools
+Requires:   %{name} = %{version}-%{release}
+
+%description testapps
+Test applications used for testing meegotouch-applauncherd.
+
+
+%package tests
+Summary:    Test scripts for launchable applications
+Group:      Development/Tools
+Requires:   %{name} = %{version}-%{release}
+Requires:   %{name}-testapps = %{version}-%{release}
+
+%description tests
+Test scripts used for testing meegotouch-applauncherd.
+
+
+
+%prep
+%setup -q -n %{name}-%{version}
+
+# BMC14389_add_X-MEEGO-IVI.patch
+%patch0 -p1
+# BMC_22845_move-var-run-to-home.patch
+%patch1 -p1
+# remove-calls-in-qt-api-extension.patch
+%patch2 -p1
+# >> setup
+# << setup
+
+%build
+# >> build pre
+export BUILD_TESTS=1
+export MEEGO=1
+unset LD_AS_NEEDED
+# << build pre
+
+%configure --disable-static
+make %{?jobs:-j%jobs}
+
+# >> build post
+# << build post
+%install
+rm -rf %{buildroot}
+# >> install pre
+# << install pre
+%make_install
+
+# >> install post
+# rpmlint complains about installing binaries in /usr/share, so
+# move them elsewhere and leave a symlink in place.
+mv %{buildroot}/usr/share/applauncherd-tests %{buildroot}/usr/lib
+(cd %{buildroot}/usr/share; ln -s ../lib/applauncherd-tests)
+# << install post
+desktop-file-install --delete-original       \
+  --dir %{buildroot}%{_datadir}/applications             \
+   %{buildroot}%{_datadir}/applications/*.desktop
+
+
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+%files
+%defattr(-,root,root,-)
+%{_bindir}/invoker
+%{_libdir}/applauncherd/libapplauncherd.so
+%{_libdir}/applauncherd/libebooster.so
+%{_libdir}/applauncherd/libmbooster.so
+%{_libdir}/applauncherd/libqtbooster.so
+%{_libdir}/applauncherd/libqdeclarativebooster.so
+%{_libdir}/libmdeclarativecache.so.0
+%{_libdir}/libmdeclarativecache.so.0.1
+%{_bindir}/applauncherd.bin
+%{_bindir}/applauncherd
+%{_bindir}/single-instance
+%config %{_sysconfdir}/xdg/autostart/applauncherd.desktop
+# >> files
+# << files
+
+
+%files devel
+%defattr(-,root,root,-)
+%{_libdir}/pkgconfig/meegotouch-boostable.pc
+%{_libdir}/pkgconfig/qdeclarative-boostable.pc
+%{_libdir}/pkgconfig/qt-boostable.pc
+%{_includedir}/applauncherd/MDeclarativeCache
+%{_includedir}/applauncherd/mdeclarativecache.h
+%{_datadir}/qt4/mkspecs/features/meegotouch-boostable.prf
+%{_datadir}/qt4/mkspecs/features/qt-boostable.prf
+%{_datadir}/qt4/mkspecs/features/qdeclarative-boostable.prf
+%{_libdir}/libmdeclarativecache.so
+# >> files devel
+# << files devel
+
+%files doc
+%defattr(-,root,root,-)
+%doc %{_docdir}/applauncherd/README
+%doc %{_docdir}/applauncherd/README-QDECLARATIVEBOOSTER
+%doc %{_docdir}/applauncherd/examples/boosted-qml/with-cmake/CMakeLists.txt
+%doc %{_docdir}/applauncherd/examples/boosted-qml/with-cmake/README
+%doc %{_docdir}/applauncherd/examples/boosted-qml/with-cmake/main.cpp
+%doc %{_docdir}/applauncherd/examples/boosted-qml/with-cmake/main.qml
+%doc %{_docdir}/applauncherd/examples/boosted-qml/with-qmake/README
+%doc %{_docdir}/applauncherd/examples/boosted-qml/with-qmake/main.cpp
+%doc %{_docdir}/applauncherd/examples/boosted-qml/with-qmake/main.qml
+%doc %{_docdir}/applauncherd/examples/boosted-qml/with-qmake/with-qmake.pro
+# >> files doc
+# << files doc
+
+%files testapps
+%defattr(-,root,root,-)
+%{_bindir}/fala_e_helloworld1
+%{_bindir}/fala_e_helloworld2
+%{_bindir}/fala_focus
+%{_bindir}/fala_ft_hello
+%{_bindir}/fala_gettime_ms
+%{_bindir}/fala_pixelchanged
+%{_bindir}/fala_status
+%{_bindir}/fala_wl
+%{_bindir}/fala_wol
+%{_bindir}/fala_gettime
+%{_bindir}/fala_ft_hello1
+%{_bindir}/fala_ft_hello2
+%{_bindir}/fala_ft_themetest
(87 more lines skipped)
Index: remove-calls-in-qt-api-extension.patch
===================================================================
--- remove-calls-in-qt-api-extension.patch (revision 0)
+++ remove-calls-in-qt-api-extension.patch (revision 15)
@@ -0,0 +1,35 @@
+Binary files 
meegotouch-applauncherd-2.0.3.orig/src/launcherlib/.appdata.h.kate-swp and 
meegotouch-applauncherd-2.0.3/src/launcherlib/.appdata.h.kate-swp differ
+diff -ruN --exclude='*~' 
meegotouch-applauncherd-2.0.3.orig/src/mbooster/mbooster.cpp 
meegotouch-applauncherd-2.0.3/src/mbooster/mbooster.cpp
+--- meegotouch-applauncherd-2.0.3.orig/src/mbooster/mbooster.cpp       
2011-10-05 15:22:50.008747236 +0300
++++ meegotouch-applauncherd-2.0.3/src/mbooster/mbooster.cpp    2011-10-05 
15:33:55.175383390 +0300
+@@ -112,9 +112,9 @@
+     if (appName.length() > 1)
+         appClass += appName.right(appName.length() - 1);
+ 
+-    char* app_name = qstrdup(appName.toLatin1().data());
+-    QApplication::setAppName(app_name);
++    // char* app_name = qstrdup(appName.toLatin1().data());
++    // QApplication::setAppName(app_name);
+ 
+-    char* app_class = qstrdup(appClass.toLatin1().data());
+-    QApplication::setAppClass(app_class);
++    // char* app_class = qstrdup(appClass.toLatin1().data());
++    // QApplication::setAppClass(app_class);
+ }
+diff -ruN --exclude='*~' 
meegotouch-applauncherd-2.0.3.orig/src/qdeclarativebooster/qdeclarativebooster.cpp
 meegotouch-applauncherd-2.0.3/src/qdeclarativebooster/qdeclarativebooster.cpp
+--- 
meegotouch-applauncherd-2.0.3.orig/src/qdeclarativebooster/qdeclarativebooster.cpp
 2011-10-05 15:22:50.005747221 +0300
++++ 
meegotouch-applauncherd-2.0.3/src/qdeclarativebooster/qdeclarativebooster.cpp   
   2011-10-05 15:36:08.252313650 +0300
+@@ -104,9 +104,9 @@
+     if (appName.length() > 1)
+         appClass += appName.right(appName.length() - 1);
+ 
+-    char* app_name = qstrdup(appName.toLatin1().data());
+-    QApplication::setAppName(app_name);
++    // char* app_name = qstrdup(appName.toLatin1().data());
++    // QApplication::setAppName(app_name);
+ 
+-    char* app_class = qstrdup(appClass.toLatin1().data());
+-    QApplication::setAppClass(app_class);
++    // char* app_class = qstrdup(appClass.toLatin1().data());
++    // QApplication::setAppClass(app_class);
+ }
Index: meegotouch-applauncherd.changes
===================================================================
--- meegotouch-applauncherd.changes (revision 0)
+++ meegotouch-applauncherd.changes (revision 15)
@@ -0,0 +1,39 @@
+* Wed Oct 05 2011 Marko Saukko <[email protected]> - 2.0.3
+- Updated to the latest upstream version.
+
+* Tue Sep 27 2011 Miroslav Safr <[email protected]> - 0.30.5
+- added fix_build.patch and BMC_22845_move-var-run-to-home.patch
+- upgrade to 0.30.5
+
+* Wed Mar 16 2011 Jimmy Huang <[email protected]> - 0.18.1
+- Add BMC14389_add_X-MEEGO-IVI.patch - add the missing OnlyShowIn=X-MEEGO-IVI
+  in the desktop file to auto start meegotouch-applauncherd on IVI platforms
+
+* Wed Feb 9 2011 Nimika Keshri <[email protected]> - 0.18.1
+- BMC#10591 - meegotouch-applauncherd outdated in MeeGo
+
+* Mon Jan 17 2011 Jussi Lind <[email protected]> - 0.17.0
+- BMC#10591 - meegotouch-applauncherd outdated in MeeGo
+- Package description updated
+- Change yaml file updated with various changes
+
+* Wed Dec 17 2010 Nimika Keshri <[email protected]> - 0.15.10
+- BMC#10591 - meegotouch-applauncherd outdated in MeeGo
+
+* Wed Dec 1 2010 Nimika Keshri <[email protected]> - 0.15.5
+- BMC#10591 - meegotouch-applauncherd outdated in MeeGo
+- Remove obsolete patch 
0001-Changes-use-usr-bin-ruby-instead-of-usr-bin-ruby1.8-.patch 
+- Remove obsolete patch 
0002-Changes-In-MeeGo-install-file-etc-xdg-autostart-appl.patch
+- Change yaml file updated with various changes
+
+* Thu Sep 2 2010 Pertti Kellom?ki <[email protected]> - 0.12.1
+- Updated to version 0.12.1.
+- Packaged tests and test scripts as subpackages, reorganized testing
+  stuff to satisfy rpmlint.
+- Included a .desktop file which kicks off applauncherd in a UI session.
+
+* Wed Aug 25 2010 Pertti Kellom?ki <[email protected]> - 0.10.3
+- Updated to version 0.10.3.
+
+* Wed Jul 14 2010 Pertti Kellom?ki <[email protected]> - 0.8.0
+- Initial packaging.
Index: 0003-Changes-improved-booster-plugin-support-in-invoker.patch
===================================================================
--- 0003-Changes-improved-booster-plugin-support-in-invoker.patch (revision 0)
+++ 0003-Changes-improved-booster-plugin-support-in-invoker.patch (revision 15)
@@ -0,0 +1,169 @@
+From 93f957fee12367dfd110c3d1e90875fbb6858877 Mon Sep 17 00:00:00 2001
+From: Antti Kervinen <[email protected]>
+Date: Tue, 14 Jun 2011 16:23:20 +0300
+Subject: [PATCH 3/4] Changes: improved booster plugin support in invoker
+
+Invoker accepts any char as application type. If a string is
+given, the first char will define the type.
+---
+ src/invoker/invokelib.c |    1 -
+ src/invoker/invokelib.h |    6 ----
+ src/invoker/invoker.c   |   67 +++++++++-------------------------------------
+ 3 files changed, 13 insertions(+), 61 deletions(-)
+
+diff --git a/src/invoker/invokelib.c b/src/invoker/invokelib.c
+index fb516c7..ff64d15 100644
+--- a/src/invoker/invokelib.c
++++ b/src/invoker/invokelib.c
+@@ -74,4 +74,3 @@ void invoke_send_str(int fd, char *str)
+         write(fd, str, size);
+     }
+ }
+-
+diff --git a/src/invoker/invokelib.h b/src/invoker/invokelib.h
+index 2eb5b8e..8d47efd 100644
+--- a/src/invoker/invokelib.h
++++ b/src/invoker/invokelib.h
+@@ -27,10 +27,4 @@ bool invoke_recv_msg(int fd, uint32_t *msg);
+ 
+ void invoke_send_str(int fd, char *str);
+ 
+-#define INVOKER_M_SOCK     "/tmp/boostm"
+-#define INVOKER_QT_SOCK    "/tmp/boostq"
+-#define INVOKER_QDECL_SOCK "/tmp/boostd"
+-#define INVOKER_EXEC_SOCK  "/tmp/booste"
+-#define INVOKER_QMLL_SOCK  "/tmp/boostl"
+-
+ #endif
+diff --git a/src/invoker/invoker.c b/src/invoker/invoker.c
+index 410a887..721b144 100644
+--- a/src/invoker/invoker.c
++++ b/src/invoker/invoker.c
+@@ -62,13 +62,7 @@ static const unsigned int MAX_RESPAWN_DELAY = 10;
+ static const unsigned char EXIT_STATUS_APPLICATION_CONNECTION_LOST = 0xfa;
+ static const unsigned char EXIT_STATUS_APPLICATION_NOT_FOUND = 0x7f;
+ 
+-// Enumeration of possible application types:
+-// M_APP     : MeeGo Touch application
+-// QT_APP    : Qt/generic application
+-// QDECL_APP : QDeclarative (QML) application
+-// EXEC_APP  : Executable generic application (can be used with splash screen)
+-//
+-enum APP_TYPE { M_APP, QT_APP, QDECL_APP, EXEC_APP, QMLL_APP, UNKNOWN_APP };
++const char * sockPathPrefix = "/tmp/boost";
+ 
+ // Environment
+ extern char ** environ;
+@@ -203,10 +197,12 @@ static bool invoke_recv_ack(int fd)
+ }
+ 
+ // Inits a socket connection for the given application type
+-static int invoker_init(enum APP_TYPE app_type)
++static int invoker_init(char app_type)
+ {
+     int fd;
+     struct sockaddr_un sun;
++    const int maxSize = sizeof(sun.sun_path) - 1;
++    const int sockPathSize = strlen(sockPathPrefix) + 1;
+ 
+     fd = socket(PF_UNIX, SOCK_STREAM, 0);
+     if (fd < 0)
+@@ -217,34 +213,18 @@ static int invoker_init(enum APP_TYPE app_type)
+ 
+     sun.sun_family = AF_UNIX;  //AF_FILE;
+ 
+-    const int maxSize = sizeof(sun.sun_path) - 1;
+-    if(app_type == M_APP)
++    // sun_path will be sockPathPrefix + app_type + '\0'
++    strncpy(sun.sun_path, sockPathPrefix, maxSize);
++    if (sockPathSize <= maxSize)
+     {
+-        strncpy(sun.sun_path, INVOKER_M_SOCK, maxSize);
+-    }
+-    else if (app_type == QT_APP)
+-    {
+-        strncpy(sun.sun_path, INVOKER_QT_SOCK, maxSize);
+-    }
+-    else if (app_type == QDECL_APP)
+-    {
+-      strncpy(sun.sun_path, INVOKER_QDECL_SOCK, maxSize);
+-    }
+-    else if (app_type == EXEC_APP)
+-    {
+-      strncpy(sun.sun_path, INVOKER_EXEC_SOCK, maxSize);
+-    }
+-    else if (app_type == QMLL_APP)
+-    {
+-      strncpy(sun.sun_path, INVOKER_QMLL_SOCK, maxSize);
++        sun.sun_path[sockPathSize - 1] = app_type;
++        sun.sun_path[sockPathSize]     = '\0';
+     }
+     else
+     {
+-        die(1, "Unknown type of application: %d\n", app_type);
++        sun.sun_path[maxSize] = '\0';
+     }
+ 
+-    sun.sun_path[maxSize] = '\0';
+-
+     if (connect(fd, (struct sockaddr *)&sun, sizeof(sun)) < 0)
+     {
+         error("Failed to initiate connect on the socket.\n");
+@@ -656,7 +636,7 @@ static void invoke_fallback(char **prog_argv, char 
*prog_name, bool wait_term)
+ 
+ // Invokes the given application
+ static int invoke(int prog_argc, char **prog_argv, char *prog_name,
+-                  enum APP_TYPE app_type, uint32_t magic_options, bool 
wait_term, unsigned int respawn_delay,
++                  char app_type, uint32_t magic_options, bool wait_term, 
unsigned int respawn_delay,
+                   char *splash_file, char *landscape_splash_file)
+ {
+     int status = 0;
+@@ -685,7 +665,7 @@ static int invoke(int prog_argc, char **prog_argv, char 
*prog_name,
+ 
+ int main(int argc, char *argv[])
+ {
+-    enum APP_TYPE app_type      = UNKNOWN_APP;
++    char          app_type      = '\0';
+     int           prog_argc     = 0;
+     uint32_t      magic_options = 0;
+     bool          wait_term     = true;
+@@ -766,21 +746,7 @@ int main(int argc, char *argv[])
+             break;
+ 
+         case 't':
+-            if (strcmp(optarg, "m") == 0)
+-                app_type = M_APP;
+-            else if (strcmp(optarg, "q") == 0 || strcmp(optarg, "qt") == 0)
+-                app_type = QT_APP;
+-            else if (strcmp(optarg, "d") == 0)
+-                app_type = QDECL_APP;
+-            else if (strcmp(optarg, "e") == 0)
+-                app_type = EXEC_APP;
+-            else if (strcmp(optarg, "l") == 0)
+-                app_type = QMLL_APP;
+-            else
+-            {
+-                report(report_error, "Unknown application type: %s \n", 
optarg);
+-                usage(1);
+-            }
++            app_type = optarg[0];
+             break;
+ 
+         case 'd':
+@@ -846,13 +812,6 @@ int main(int argc, char *argv[])
+         return EXIT_STATUS_APPLICATION_NOT_FOUND;
+     }
+ 
+-    // Check if application type is unknown
+-    if (app_type == UNKNOWN_APP)
+-    {
+-        report(report_error, "Application's type is unknown.\n");
+-        usage(1);
+-    }
+-
+     if (pipe(g_signal_pipe) == -1)
+     { 
+         report(report_error, "Creating a pipe for Unix signals failed!\n"); 
+-- 
+1.7.2.2
+
Index: BMC14389_add_X-MEEGO-IVI.patch
===================================================================
--- BMC14389_add_X-MEEGO-IVI.patch (revision 0)
+++ BMC14389_add_X-MEEGO-IVI.patch (revision 15)
@@ -0,0 +1,11 @@
+Description: add the missing OnlyShowIn=X-MEEGO-IVI in the desktop file
+to auto start meegotouch-applauncherd on IVI platforms
+Author: Jimmy Huang <[email protected]>
+--- a/meego/applauncherd.desktop
++++ b/meego/applauncherd.desktop
+@@ -1,4 +1,4 @@
+ [Desktop Entry]
+ Exec=/usr/bin/applauncherd
+ X-Moblin-Priority=High
+-OnlyShowIn=X-MEEGO-HS;
++OnlyShowIn=X-MEEGO-HS;X-MEEGO-IVI;
Index: 0001-New-Type-l-booster-for-meego-qml-launcher-QML-applic.patch
===================================================================
--- 0001-New-Type-l-booster-for-meego-qml-launcher-QML-applic.patch (revision 0)
+++ 0001-New-Type-l-booster-for-meego-qml-launcher-QML-applic.patch (revision 
15)
@@ -0,0 +1,423 @@
+From a438ca6183251a30d7ab8bf1f9173a2ded94191d Mon Sep 17 00:00:00 2001
+From: Antti Kervinen <[email protected]>
+Date: Sun, 15 May 2011 13:33:04 -0700
+Subject: [PATCH 1/4] New: Type l booster for meego-qml-launcher QML 
applications
+
+Note: lbooster is not automatically compiled, needs to be added
+      to src/CMakeLists.txt.
+---
+ src/ebooster/ebooster.cpp            |    1 +
+ src/invoker/invokelib.h              |    1 +
+ src/invoker/invoker.c                |    8 ++-
+ src/launcherlib/booster.h            |    6 +-
+ src/lbooster/CMakeLists.txt          |   26 ++++++++
+ src/lbooster/README-LBOOSTER         |   15 +++++
+ src/lbooster/mqmllauncherbooster.cpp |  105 ++++++++++++++++++++++++++++++++++
+ src/lbooster/mqmllauncherbooster.h   |   95 ++++++++++++++++++++++++++++++
+ src/lbooster/pluginfactory.cpp       |   45 ++++++++++++++
+ 9 files changed, 298 insertions(+), 4 deletions(-)
+ create mode 100644 src/lbooster/CMakeLists.txt
+ create mode 100644 src/lbooster/README-LBOOSTER
+ create mode 100644 src/lbooster/mqmllauncherbooster.cpp
+ create mode 100644 src/lbooster/mqmllauncherbooster.h
+ create mode 100644 src/lbooster/pluginfactory.cpp
+
+diff --git a/src/ebooster/ebooster.cpp b/src/ebooster/ebooster.cpp
+index fe911e4..745ad27 100644
+--- a/src/ebooster/ebooster.cpp
++++ b/src/ebooster/ebooster.cpp
+@@ -20,6 +20,7 @@
+ #include "ebooster.h"
+ #include "logger.h"
+ 
++#include <string.h>
+ #include <errno.h>
+ 
+ #ifdef HAVE_MCOMPONENTCACHE
+diff --git a/src/invoker/invokelib.h b/src/invoker/invokelib.h
+index 5af9584..2eb5b8e 100644
+--- a/src/invoker/invokelib.h
++++ b/src/invoker/invokelib.h
+@@ -31,5 +31,6 @@ void invoke_send_str(int fd, char *str);
+ #define INVOKER_QT_SOCK    "/tmp/boostq"
+ #define INVOKER_QDECL_SOCK "/tmp/boostd"
+ #define INVOKER_EXEC_SOCK  "/tmp/booste"
++#define INVOKER_QMLL_SOCK  "/tmp/boostl"
+ 
+ #endif
+diff --git a/src/invoker/invoker.c b/src/invoker/invoker.c
+index 91c8910..410a887 100644
+--- a/src/invoker/invoker.c
++++ b/src/invoker/invoker.c
+@@ -68,7 +68,7 @@ static const unsigned char EXIT_STATUS_APPLICATION_NOT_FOUND 
= 0x7f;
+ // QDECL_APP : QDeclarative (QML) application
+ // EXEC_APP  : Executable generic application (can be used with splash screen)
+ //
+-enum APP_TYPE { M_APP, QT_APP, QDECL_APP, EXEC_APP, UNKNOWN_APP };
++enum APP_TYPE { M_APP, QT_APP, QDECL_APP, EXEC_APP, QMLL_APP, UNKNOWN_APP };
+ 
+ // Environment
+ extern char ** environ;
+@@ -234,6 +234,10 @@ static int invoker_init(enum APP_TYPE app_type)
+     {
+       strncpy(sun.sun_path, INVOKER_EXEC_SOCK, maxSize);
+     }
++    else if (app_type == QMLL_APP)
++    {
++      strncpy(sun.sun_path, INVOKER_QMLL_SOCK, maxSize);
++    }
+     else
+     {
+         die(1, "Unknown type of application: %d\n", app_type);
+@@ -770,6 +774,8 @@ int main(int argc, char *argv[])
+                 app_type = QDECL_APP;
+             else if (strcmp(optarg, "e") == 0)
+                 app_type = EXEC_APP;
++            else if (strcmp(optarg, "l") == 0)
++                app_type = QMLL_APP;
+             else
+             {
+                 report(report_error, "Unknown application type: %s \n", 
optarg);
+diff --git a/src/launcherlib/booster.h b/src/launcherlib/booster.h
+index 5bbc56d..4aa91b1 100644
+--- a/src/launcherlib/booster.h
++++ b/src/launcherlib/booster.h
+@@ -223,6 +223,9 @@ protected:
+     //! Reset out-of-memory killer adjustment
+     void resetOomAdj();
+ 
++    //! Data structure representing the application to be invoked
++    AppData* m_appData;
++
+ private:
+ 
+     //! Disable copy-constructor
+@@ -238,9 +241,6 @@ private:
+     //! Helper method: load the library and find out address for "main".
+     void* loadMain();
+ 
+-    //! Data structure representing the application to be invoked
+-    AppData* m_appData;
+-
+     //! Socket connection to invoker
+     Connection* m_connection;
+ 
+diff --git a/src/lbooster/CMakeLists.txt b/src/lbooster/CMakeLists.txt
+new file mode 100644
+index 0000000..3516e1c
+--- /dev/null
++++ b/src/lbooster/CMakeLists.txt
+@@ -0,0 +1,26 @@
++include(FindX11)
++
++# Qt support
++include(${QT_USE_FILE})
++
++set(LAUNCHER "${CMAKE_HOME_DIRECTORY}/src/launcherlib")
++set(COMMON "${CMAKE_HOME_DIRECTORY}/src/common")
++
++include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${COMMON} ${LAUNCHER} 
/usr/include/mlite /usr/include/meegoqmllauncher)
++
++# Set sources
++set(PLUGINSRC mqmllauncherbooster.cpp pluginfactory.cpp 
${LAUNCHER}/appdata.cpp ${LAUNCHER}/booster.cpp
++${LAUNCHER}/connection.cpp ${LAUNCHER}/logger.cpp
++${LAUNCHER}/singleinstance.cpp ${LAUNCHER}/socketmanager.cpp 
${COMMON}/eventhandler.cpp)
++set(MOC_HDRS ${COMMON}/eventhandler.h)
++qt4_wrap_cpp(MOC_SRC ${MOC_HDRS})
++
++# Set executables
++add_library(mqmllauncherbooster MODULE ${PLUGINSRC} ${MOC_SRC})
++set_target_properties(mqmllauncherbooster PROPERTIES 
++  COMPILE_FLAGS -fvisibility=hidden)
++target_link_libraries(mqmllauncherbooster ${LIBDL} "-lmeegoqmllauncher")
++
++# Add install rule
++install(TARGETS mqmllauncherbooster DESTINATION /usr/lib/applauncherd/)
++install(FILES README-LBOOSTER DESTINATION /usr/share/doc/applauncherd)
+diff --git a/src/lbooster/README-LBOOSTER b/src/lbooster/README-LBOOSTER
+new file mode 100644
+index 0000000..459ad5f
+--- /dev/null
++++ b/src/lbooster/README-LBOOSTER
+@@ -0,0 +1,15 @@
++This File
++=========
++
++mqmlbooster speeds up launching pure QML applications which would
++otherwise be launched with meego-qml-launcher.
++
++Usage:
++
++Replace original launch command
++
++meego-qml-launcher --app appname --cmd cmd-to-app
++
++with
++
++invoker --type=l meego-qml-launcher --app appname --cmd cmd-to-app
+diff --git a/src/lbooster/mqmllauncherbooster.cpp 
b/src/lbooster/mqmllauncherbooster.cpp
+new file mode 100644
+index 0000000..6f01c62
+--- /dev/null
++++ b/src/lbooster/mqmllauncherbooster.cpp
+@@ -0,0 +1,105 @@
++/***************************************************************************
++**
++** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
++** All rights reserved.
++** Contact: Nokia Corporation ([email protected])
++**
++** This file is part of applauncherd
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at [email protected].
++**
++** This library is free software; you can redistribute it and/or
++** modify it under the terms of the GNU Lesser General Public
++** License version 2.1 as published by the Free Software Foundation
++** and appearing in the file LICENSE.LGPL included in the packaging
++** of this file.
++**
++****************************************************************************/
++
++#include "mqmllauncherbooster.h"
++#include "connection.h"
++
++#include <meegoqmllauncher.h>
++
++const string MQMLLauncherBooster::m_socketId = "/tmp/boostl";
++const string MQMLLauncherBooster::m_temporaryProcessName = "booster-l";
++
++const string & MQMLLauncherBooster::socketId() const
++{
++    return m_socketId;
++}
++
++const string & MQMLLauncherBooster::socketName()
++{
++    return m_socketId;
++}
++
(223 more lines skipped)
Index: Makefile
===================================================================
--- Makefile (revision 0)
+++ Makefile (revision 15)
@@ -0,0 +1,6 @@
+PKG_NAME := meegotouch-applauncherd
+SPECFILE = $(addsuffix .spec, $(PKG_NAME))
+YAMLFILE = $(addsuffix .yaml, $(PKG_NAME))
+
+
+include /usr/share/packaging-tools/Makefile.common



Reply via email to