Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Modified CMake file. Added launch and sysbus files.

Change-Id: If4c78f1cdb3e0319a1508b33b57af10a447c39f0
  • Loading branch information...
commit 9c2f94c6983300497f1afa9e872a16bba7617c14 1 parent 7625159
@sarumugam sarumugam authored
View
5 CMakeLists.txt
@@ -24,7 +24,7 @@ include(webOS/webOS)
webos_modules_init(1 0 0 QUALIFIER RC2)
webos_component(2 0 0)
-webos_add_compiler_flags(ALL "-DMOJ_LINUX -DMOJ_X86 -DMOJ_DEBUG")
+webos_add_compiler_flags(ALL "-DMOJ_LINUX -DMOJ_X86")
webos_machine_dep()
@@ -53,10 +53,11 @@ add_executable(configurator ${SOURCE_FILES} )
target_link_libraries(configurator
-L.
- ${MOJODB_LDFLAGS}
+ ${MOJODB_LDFLAGS}
${GLIB2_LDFLAGS}
${LUNASERVICE_LDFLAGS}
${CJSON_LDFLAGS}
)
webos_build_program()
+webos_build_system_bus_files()
View
14 files/launch/configurator-async.in
@@ -0,0 +1,14 @@
+# AM may crash or be stopped manually. Need to re-register the activities
+# in this case
+start on activitymanager-ready
+
+# Need to make sure that AM doesn't hang when it emits it's upstart signal
+# This is actually not safe, as it can cause upstart to eat the events.
+# The Activity Manager will call the configurator directly.
+service
+
+# The file cache & db kinds need to be configured first
+script
+ logger -s "Configuring activities asynchronously"
+ @WEBOS_INSTALL_BINDIR@/luna-send -n 1 palm://com.palm.configurator/run '{"types":["activities"]}'
+end script
View
57 files/launch/configurator.in
@@ -0,0 +1,57 @@
+# not ideal - would like to start this on started mojodb and filecache-ready
+# but our upstart doesn't support this (0.5 needed AFAIK)
+start on stopped finish
+
+# AM may crash or be stopped manually. Need to re-register the activities
+# in this case
+# AM now starts the configurator directly though a service call
+# start on activitymanager-ready
+
+# Some activities can only be registered once first use has completed (otherwise activity
+# manager will launch apps during first use when they don't expect to be running).
+start on first-use-finished
+start on first-use-profile-created
+
+# Need to make sure that AM doesn't hang when it emits it's upstart signal
+# This is actually not safe, as it can cause upstart to eat the events.
+# The Activity Manager will call the configurator directly.
+# service
+
+# The file cache & db kinds need to be configured first
+script
+ if [ "x$UPSTART_EVENT" = "xstopped" ]; then
+ # This is the "stopped finish" event - first pass we register file cache and dbkinds
+ logger -s "Configuring dbkinds & filecache"
+ @WEBOS_INSTALL_BINDIR@/luna-send -n 1 palm://com.palm.configurator/run '{"types":["dbkinds","filecache"]}'
+ # This has to happen *after* the kinds are created.
+ logger -s "Configuring dbpermissions"
+ @WEBOS_INSTALL_BINDIR@/luna-send -n 1 palm://com.palm.configurator/run '{"types":["dbpermissions"]}'
+ fi
+
+ # Notify it is safe to run the activity manager if it hasn't started already
+ initctl emit datastore-initialized
+
+ # Now we configure activities doesn't matter if it hasn't started yet
+ # Rely on ls2 delivering the messages once it does
+
+ # The only time we care about the first use distiction is when we're registering
+ # activities - behaviour is the same - just the flag is different
+ #
+ # Don't do this. The Activity Manager will call the configurator directly
+ # to work around the upstart issue.
+
+ #POST_FIRST_USE=0
+ #if [ -f "/var/luna/preferences/ran-first-use" ] && [ -f "/var/luna/preferences/first-use-profile-created" ]; then
+ # POST_FIRST_USE=1
+ #fi
+
+ #if [ $POST_FIRST_USE -eq 1 ]; then
+ # logger -s "Configuring activities"
+ # luna-send -n 1 palm://com.palm.configurator/run '{"types":["activities"]}'
+ #else
+ # logger -s "Configuring activities prior to first-use"
+ # luna-send -n 1 palm://com.palm.configurator/run '{"types":["activities-first-use"]}'
+ #fi
+ logger -s "Configuring activities"
+ @WEBOS_INSTALL_BINDIR@/luna-send -n 1 palm://com.palm.configurator/run '{"types":["activities"]}'
+end script
View
14 files/sysbus/com.palm.configurator.json.prv.in
@@ -0,0 +1,14 @@
+{
+ "role": {
+ "exeName":"@WEBOS_INSTALL_BINDIR@/configurator",
+ "type": "privileged",
+ "allowedNames": ["com.palm.configurator"]
+ },
+ "permissions": [
+ {
+ "service":"com.palm.configurator",
+ "inbound":["*"],
+ "outbound":["*"]
+ }
+ ]
+}
View
4 files/sysbus/com.palm.configurator.service.prv.in
@@ -0,0 +1,4 @@
+[D-BUS Service]
+Name=com.palm.configurator
+Exec=@WEBOS_INSTALL_BINDIR@/configurator -c {\"log\":{\"appender\":{\"type\":\"syslog\"},\"levels\":{\"configurator\":\"notice\"}}} service
+Type=dynamic
Please sign in to comment.
Something went wrong with that request. Please try again.