- TizenRefApp-5150, TizenRefApp-5151 fixed issue with invisible settings ug(do not disturb + App Notifications)
- TizenRefApp-5173, modified default manifest
- returned back multiuser feature
Change-Id: Ic7492579a04e3cdcd7d0695ed2b57873f036b090
Signed-off-by: Andrey Klimenko <and.klimenko@samsung.com>
ADD_SUBDIRECTORY(ug-setting-notification-do-not-disturb-efl)
ADD_SUBDIRECTORY(ug-setting-notification-app-notifications-efl)
-ADD_DEPENDENCIES(ug-setting-notification-do-not-disturb-efl ug-setting-notification-efl)
-ADD_DEPENDENCIES(ug-setting-notification-app-notifications-efl ug-setting-notification-efl)
+ADD_DEPENDENCIES(ug-ug-setting-notification-do-not-disturb-efl ug-setting-notification-efl)
+ADD_DEPENDENCIES(ug-ug-setting-notification-app-notifications-efl ug-setting-notification-efl)
MESSAGE("notification-setting main End")
<manifest>
- <define>
- <domain name="ug-setting-notification-efl" />
- </define>
<request>
- <domain name="ug-setting-notification-efl" />
+ <domain name="_"/>
</request>
- <assign>
- <filesystem path="/usr/share/icons/default/small/ug-setting-notification-efl.png" label="_"/>
- <filesystem path="/opt/usr/apps/ug-setting-notification-efl/res/*" label="_"/>
- </assign>
-
</manifest>
BuildRequires: edje-bin
BuildRequires: cmake
BuildRequires: gettext-tools
-#BuildRequires: model-build-features
BuildRequires: pkgconfig(notification)
BuildRequires: pkgconfig(pkgmgr)
BuildRequires: pkgconfig(pkgmgr-info)
BuildRequires: pkgconfig(capi-system-system-settings)
BuildRequires: pkgconfig(capi-appfw-app-manager)
BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(libtzplatform-config)
%description
%setup -q
cp %{SOURCE1001} .
-
-
%build
-
export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
%endif
-%cmake .
+%cmake . -DCMAKE_INSTALL_PREFIX=%{TZ_SYS_RO_UG} \
+ -DTZ_SYS_RO_PACKAGES=%{TZ_SYS_RO_PACKAGES} \
+ -DSYS_SHARE_DIR=%{TZ_SYS_SHARE}
+
make -j2
%install
%make_install
-mkdir -p %{buildroot}/usr/apps/ug-setting-notification-efl/bin
-ln -sf /usr/bin/ug-client %{buildroot}/usr/apps/ug-setting-notification-efl/bin/ug-setting-notification-efl
-ln -sf /usr/bin/ug-client %{buildroot}/usr/apps/ug-setting-notification-efl/bin/ug-setting-notification-do-not-disturb-efl
-ln -sf /usr/bin/ug-client %{buildroot}/usr/apps/ug-setting-notification-efl/bin/ug-setting-notification-app-notifications-efl
-
-#mkdir -p %{buildroot}/usr/ug/bin
-#ln -sf /usr/bin/ug-client %{buildroot}/usr/ug/bin/ug-setting-notification-efl
-
-mkdir -p %{buildroot}/usr/apps/ug-setting-notification-efl/res
+mkdir -p %{buildroot}%{TZ_SYS_RO_UG}/bin/
+ln -sf /usr/bin/ug-client %{buildroot}%{TZ_SYS_RO_UG}/bin/ug-setting-notification-efl
+ln -sf /usr/bin/ug-client %{buildroot}%{TZ_SYS_RO_UG}/bin/ug-setting-notification-do-not-disturb-efl
+ln -sf /usr/bin/ug-client %{buildroot}%{TZ_SYS_RO_UG}/bin/ug-setting-notification-app-notifications-efl
%post -n %{name} -p /sbin/ldconfig
%postun -n %{name} -p /sbin/ldconfig
-
%files
%manifest %{name}.manifest
%defattr(-,root,root,-)
-%{_prefix}/apps/%{name}/*
-%{_prefix}/share/packages/%{name}.xml
-%{_datarootdir}/license/%{name}
-%{_datadir}/icons/default/small/ug-setting-notification-efl.png
-
-/usr/apps/ug-setting-notification-efl/res/locale/*/LC_MESSAGES/*
-
+%{TZ_SYS_RO_UG}/*
+%{TZ_SYS_RO_PACKAGES}/*
+%{TZ_SYS_SHARE}/license/%{name}
--- /dev/null
+#!/bin/bash
+
+usage()
+{
+echo "
+usage: sh run.sh [-h] [-b] [-i] [-r] [-t] [-d] [-A ARCH]
+ [--help] [--build] [--install] [--run] [--test] [--debug] [--arch ARCH]
+
+optional arguments:
+ -h, --help show this help message and exit
+
+action:
+ -b --build build project
+ -i, --install install to device or emulator
+ -r, --run run application. Don't use with -t option
+ -t, --test builds unit-tests as well, ignored without -b option
+ -d, --debug install debuginfo and debugsource packages
+ -l, --local local incremental build(with --noinit --incremental kwys)
+
+build configuration options:
+ -A ARCH, --arch ARCH build target arch. Default - armv7l
+ -b 'Keys', --build 'Keys' build project with additional gbs build keys
+
+ examples:
+ 'run.sh -b -t -i -A armv7l' will build application and try to install it to target-device, unit-tests will be also built
+ 'run.sh -i -A armv7l[i586|aarch64]' will install latest build for tizen-2.4 device [emulator|tizen-3.0 device]
+"
+}
+
+##-------------- check options --------------##
+
+if [ -z "$1" ]; then usage; exit 0; fi
+
+BUILDOPTION=false
+BUILDKEYS=""
+INSTALLOPTION=false
+RUNOPTION=false
+DEBUGOPTION=false
+TESTOPTION=false
+PLATFORM=armv7l
+LOCALBUILD=false
+
+SHORTOPTS="hA:b::irdtl"
+LONGOPTS="arch:,build::,install,run,debug,test,help,local"
+SCRIPTNAME=`basename $0`
+
+ARGS=$(getopt -q --options "$SHORTOPTS" --longoptions "$LONGOPTS" --name $SCRIPTNAME -- "$@")
+
+while true; do
+ case $1 in
+ -h|--help)
+ usage
+ exit 0
+ ;;
+ -A|--arch)
+ val=`echo $2 | sed -e "s/-//g"`
+ if echo "$SHORTOPTS$LONGOPTS" | grep -q "$val"; then
+ echo "Wrong ARCH"
+ usage
+ exit 0;
+ fi
+ PLATFORM=$2
+ shift
+ ;;
+ -b|--build)
+ BUILDOPTION=true
+ key=`echo $2 | sed -e "s/-//g"`
+ if ! echo "$SHORTOPTS$LONGOPTS" | grep -q "$key"; then
+ BUILDKEYS=$2
+ shift
+ fi
+ ;;
+ -i|--install)
+ INSTALLOPTION=true
+ ;;
+ -r|--run)
+ RUNOPTION=true
+ ;;
+ -d|--debug)
+ DEBUGOPTION=true
+ ;;
+ -t|--test)
+ TESTOPTION=true
+ ;;
+ -l|--local)
+ LOCALBUILD=true
+ ;;
+ --)
+ break
+ ;;
+ *)
+ if [ ! -z "$1" ]; then usage; exit 0; fi
+ break
+ ;;
+ esac
+ shift
+done
+
+echo "BUILDOPTION=$BUILDOPTION"
+echo "BUILDKEYS=$BUILDKEYS"
+echo "INSTALLOPTION=$INSTALLOPTION"
+echo "RUNOPTION=$RUNOPTION"
+echo "DEBUGOPTION=$DEBUGOPTION"
+echo "TESTOPTION=$TESTOPTION"
+echo "PLATFORM=$PLATFORM"
+
+##------------- project config -------------##
+
+PREFIX="org.tizen"
+INSTALLDIR=/usr/apps
+SDB=~/tizen-sdk/tools/sdb
+TEMPDIR=/home/rpms # for keeping rpm packages on device
+GBSROOT=~/GBS-ROOT
+
+##------------------ spec ------------------##
+
+spec_file=`find -name *.spec`
+
+# org.tizen.message
+APPNAME=`cat "$spec_file" | grep ^Name | awk '{print $2}'`
+# 0.8.52
+VERSION=`cat "$spec_file" | grep ^Version | awk '{print $2}'`
+# 1
+RELEASE=`cat "$spec_file" | grep ^Release | awk '{print $2}'`
+# message
+BINNAME=`echo $APPNAME | sed "s/$PREFIX\.//"`
+
+RPMSPATH=$GBSROOT/local/BUILD-ROOTS/scratch.$PLATFORM.0/home/abuild/rpmbuild/RPMS/$PLATFORM
+
+DEBUGSOURCEPKGNAME=$APPNAME-debugsource-$VERSION-$RELEASE.$PLATFORM
+DEBUGINFOPKGNAME=$APPNAME-debuginfo-$VERSION-$RELEASE.$PLATFORM
+
+##-----------------------------------------##
+
+hasPrefix()
+{
+ if echo "$1" | grep -q "$PREFIX"; then
+ return 0;
+ else
+ return 1;
+ fi
+}
+
+##--------------- sdb shell ---------------##
+
+SdbShell()
+{
+ ShowMessage "$1" -c yellow
+ $SDB shell su -c "$1"
+}
+
+##--------------- color echo --------------##
+
+# arguments:
+# $1 : message text
+# -c|--color : text color (red, green, blue, yellow). Default value - blue
+# -n|--noti : show GUI notification
+# -s|--secondary : secondary message text
+# example: ShowMessage "Message to show" -c red --noti -s "Some additional text"
+
+ShowMessage()
+{
+ show_noti=false
+ color_val=""
+ message_sec=""
+ message=""
+
+ while [[ $# > 0 ]]; do
+ key="$1"
+
+ case $key in
+ -c|--color)
+ color_val="$2"
+ shift # past argument
+ ;;
+ -s|--secondary)
+ message_sec="$2"
+ shift # past argument
+ ;;
+ -n|--noti)
+ show_noti=true
+ ;;
+ *)
+ message="$1"
+ ;;
+ esac
+ shift # past argument or value
+ done
+
+ case "$color_val" in
+ "green")
+ color="32m"
+ noti_icon="-i $PWD/edje/images/icon_emotion_sunglasses.png"
+ ;;
+ "red")
+ color="31m"
+ noti_icon="-i $PWD/edje/images/icon_emotion_angry.png"
+ ;;
+ "blue")
+ color="34m"
+ ;;
+ "yellow")
+ color="33m"
+ ;;
+ *)
+ color="34m"
+ ;;
+ esac
+
+ echo -e "\033[1;"$color$message $message_sec"\033[0m"
+ if [ $show_noti = "true" ]; then
+ notify-send -u critical $noti_icon "$message" "$message_sec"
+ fi
+}
+
+##----------- check connection ------------##
+
+checkConnection()
+{
+ sdbstate=$($SDB get-state)
+ if [ $sdbstate = "unknown" ]
+ then
+ ShowMessage "Connection error." -c red --noti -s "Make sure that only one device or emulator is connected."
+ exit 0
+ fi
+}
+
+##---------------- build ------------------##
+
+build()
+{
+ ShowMessage "Building application..."
+
+ gbsoutput="gbsoutput.log"
+
+ if [ $LOCALBUILD = "true" ];
+ then
+ BUILDKEYS="$BUILDKEYS --noinit --incremental"
+ fi
+
+ if [ $TESTOPTION = "true" ];
+ then
+ BUILDKEYS+=" --define 'TEST%20ON'"
+ fi
+
+ ShowMessage "gbs -v -d build -B $GBSROOT -A $PLATFORM --include-all --keep-packs $BUILDKEYS"
+ gbs -v -d build -B $GBSROOT -A $PLATFORM --include-all --keep-packs $BUILDKEYS 2>&1 | tee $gbsoutput
+
+ if cat "$gbsoutput" | grep -q "gbs:info: Done"; then
+ ShowMessage "Build successfull!" -s "In glory of Tizen!" -c green --noti
+ rm -f $gbsoutput;
+ else
+ comp_error=$(cat "$gbsoutput" | grep "error:"| sed '/Bad exit status/,//d; s/\[.*\/\(.*\) error:/\\nerror in \1/;')
+ ShowMessage "Build failed!" -s "$comp_error" -c red --noti
+ rm -f $gbsoutput
+ exit 0;
+ fi
+}
+
+##-----------------------------------------##
+
+# figure out which packages need to be installed
+
+initPackageList()
+{
+ packages_count=`cat "$spec_file" | grep -c %package`
+
+ # if packages count more then 1
+ if [ $packages_count -gt 1 ]
+ then
+ ShowMessage "When building the project is generated $packages_count (+ debuginfo and debugsource) RPM packages"
+ # case of multipackage project
+ PACKAGELIST=`cat "$spec_file" | grep %package | sed 's/-n//' |awk '{print $2}'`
+ else
+ ShowMessage "one package"
+ # only one package into package list
+ PACKAGELIST=$APPNAME
+ fi
+}
+
+##------------ Uninstalling ---------------##
+
+uninstall()
+{
+ ShowMessage "Stopping old application..."
+ SdbShell "pkill -f $APPNAME"
+
+ for current_package in $PACKAGELIST
+ do
+ ShowMessage "Uninstalling old application $current_package..."
+ if hasPrefix $current_package; then
+ # uninstall with pkgcmd
+ SdbShell "pkgcmd -q -u -n $current_package"
+ else
+ # uninstall with rpm
+ SdbShell "rpm -e --nodeps $current_package-*"
+ fi
+ done
+
+ if [ $DEBUGOPTION = "true" ]
+ then
+ SdbShell "rpm -e --nodeps $APPNAME-debugsource-*"
+ SdbShell "rpm -e --nodeps $APPNAME-debuginfo-*"
+ fi
+}
+
+##-------------- Pushing ------------------##
+
+push()
+{
+ SdbShell "mkdir -p $TEMPDIR/"
+
+ for current_package_name in $PACKAGELIST
+ do
+ current_package=$current_package_name-$VERSION-$RELEASE.$PLATFORM.rpm
+ ShowMessage "Pushing the package $current_package to device ..."
+ $SDB push $RPMSPATH/$current_package $TEMPDIR/
+ done
+
+ if [ $DEBUGOPTION = "true" ]
+ then
+ $SDB push $RPMSPATH/$DEBUGSOURCEPKGNAME.rpm $TEMPDIR/
+ $SDB push $RPMSPATH/$DEBUGINFOPKGNAME.rpm $TEMPDIR/
+ fi
+}
+
+##------------- Installing ----------------##
+
+install()
+{
+ for current_package_name in $PACKAGELIST
+ do
+ current_package=$current_package_name-$VERSION-$RELEASE.$PLATFORM.rpm
+ ShowMessage "Installing the package $current_package ..."
+ #$SDB install $RPMSPATH/$current_package
+ #if hasPrefix $current_package; then
+ # install with pkgcmd
+ #SdbShell "pkgcmd -q -i -t rpm -p $TEMPDIR/$current_package"
+ #else
+ # uninstall with rpm
+ SdbShell "rpm -ivh --force --nodeps $TEMPDIR/$current_package"
+ #fi
+ done
+
+ if [ $DEBUGOPTION = "true" ]
+ then
+ ShowMessage "Installing the package $DEBUGINFOPKGNAME.rpm ..."
+ SdbShell "rpm -i $TEMPDIR/$DEBUGINFOPKGNAME.rpm"
+ ShowMessage "Installing the package $DEBUGSOURCEPKGNAME.rpm ..."
+ SdbShell "rpm -i $TEMPDIR/$DEBUGSOURCEPKGNAME.rpm"
+ fi
+
+ SdbShell "pkg_initdb"
+}
+
+##--------------- Running ----------------##
+
+run()
+{
+ if hasPrefix $APPNAME; then
+ ABSOLUTEPATHTOAPP=$INSTALLDIR/$APPNAME/bin/$BINNAME
+ else
+ fullappname=`echo $APPNAME | sed "s/^/$PREFIX\./"`
+ ABSOLUTEPATHTOAPP=$INSTALLDIR/$fullappname/bin/$BINNAME
+ fi
+
+ if [ $1 = "tests" ]
+ then
+ TESTAPP=$ABSOLUTEPATHTOAPP-test
+ # todo: stop old test-run
+ ShowMessage "running the $TESTAPP..."
+ SdbShell "$TESTAPP"
+ else
+ SdbShell "pkill -f $APPNAME"
+ ShowMessage "running the $ABSOLUTEPATHTOAPP..."
+ SdbShell "$ABSOLUTEPATHTOAPP"
+ fi
+}
+
+##-----------------------------------------##
+
+installApp()
+{
+ checkConnection
+ initPackageList
+
+ $SDB root on
+ #uninstall
+ push
+ install
+
+ $SDB root off
+}
+
+runApp()
+{
+ checkConnection
+ run
+}
+
+runTest()
+{
+ checkConnection
+ run tests
+}
+
+##------------------ main -----------------##
+
+if [ $BUILDOPTION = "true" ]; then build; fi
+if [ $INSTALLOPTION = "true" ]; then installApp; fi
+if [ $RUNOPTION = "true" ]; then runApp; fi
+
+##-----------------------------------------##
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(ug-setting-notification-app-notifications-efl C)
+PROJECT(ug-ug-setting-notification-app-notifications-efl C)
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(PROJECT_NAME "${PROJECT_NAME}")
-SET(LIBDIR "${PREFIX}/apps/${PROJECT_NAME}/lib/ug")
-SET(RESDIR "${PREFIX}/apps/${PROJECT_NAME}/res")
-SET(DATADIR "${PREFIX}/apps/${PROJECT_NAME}/data")
-#SET(LOCALEDIR "${RESDIR}/locale")
-SET(IMAGEDIR "${RESDIR}/images")
-SET(EDJEDIR "${RESDIR}/edje")
-SET(ETCDIR "${RESDIR}/etc")
+SET(LIBDIR "${PREFIX}/lib")
SET(VERSION_MAJOR 0)
SET(VERSION "${VERSION_MAJOR}.0.1")
-
INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED
elementary
capi-system-system-settings
capi-appfw-app-manager
capi-appfw-application
+ libtzplatform-config
)
SET(BUILD_SOURCE
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc)
ADD_DEFINITIONS(${pkgs_CFLAGS})
ADD_DEFINITIONS("-DPKGNAME=\"${PROJECT_NAME}\"")
-#ADD_DEFINITIONS("-DLOCALE=\"${LOCALEDIR}\"")
-ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"")
ADD_LIBRARY(${PROJECT_NAME} SHARED ${BUILD_SOURCE})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} ug-setting-notification-efl)
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} ug-setting-notification-efl)
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION_MAJOR})
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${VERSION})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ug-setting-notification-efl/inc)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ug-setting-notification-efl/inc)
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/ug-setting-notification-efl/lib/ug)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
-MESSAGE("ug-setting-notification-do-not-disturb-efl End")
+MESSAGE("ug-ug-setting-notification-app-notifications-efl End")
# End of a file
#include <libintl.h>
#include <ui-gadget-module.h>
#include <package_manager.h>
+#include <tzplatform_config.h>
#include "notification-setting-info.h"
#include "common-efl.h"
ops->priv = ugd;
ops->opt = UG_OPT_INDICATOR_ENABLE;
- if (bindtextdomain(PKGNAME, "/usr/apps/ug-setting-notification-efl/res/locale") == NULL) {
+ if (bindtextdomain(PKGNAME, tzplatform_mkpath(TZ_SYS_RO_APP, "ug-setting-notification-efl/res/locale")) == NULL) {
/* Failed to allocate memory for allocating heap for store the path of LOCALE directory */
}
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(ug-setting-notification-do-not-disturb-efl C)
+PROJECT(ug-ug-setting-notification-do-not-disturb-efl C)
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(PROJECT_NAME "${PROJECT_NAME}")
-SET(LIBDIR "${PREFIX}/apps/${PROJECT_NAME}/lib/ug")
-SET(RESDIR "${PREFIX}/apps/${PROJECT_NAME}/res")
-SET(DATADIR "${PREFIX}/apps/${PROJECT_NAME}/data")
-#SET(LOCALEDIR "${RESDIR}/locale")
-SET(IMAGEDIR "${RESDIR}/images")
-SET(EDJEDIR "${RESDIR}/edje")
-SET(ETCDIR "${RESDIR}/etc")
+SET(LIBDIR "${PREFIX}/lib")
SET(VERSION_MAJOR 0)
SET(VERSION "${VERSION_MAJOR}.0.1")
capi-system-system-settings
capi-appfw-app-manager
capi-appfw-application
+ libtzplatform-config
)
SET(BUILD_SOURCE
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc)
ADD_DEFINITIONS(${pkgs_CFLAGS})
ADD_DEFINITIONS("-DPKGNAME=\"${PROJECT_NAME}\"")
-#ADD_DEFINITIONS("-DLOCALE=\"${LOCALEDIR}\"")
-ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"")
ADD_LIBRARY(${PROJECT_NAME} SHARED ${BUILD_SOURCE})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ug-setting-notification-efl/inc)
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/ug-setting-notification-efl/lib/ug)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
-MESSAGE("ug-setting-notification-do-not-disturb-efl End")
+MESSAGE("ug-ug-setting-notification-do-not-disturb-efl End")
# End of a file
#include <libintl.h>
#include <ui-gadget-module.h>
#include <package_manager.h>
+#include <tzplatform_config.h>
#include "do-not-disturb-efl.h"
#include "pkgmgr-setting-info.h"
#include "excepted-apps-efl.h"
ops->priv = ugd;
ops->opt = UG_OPT_INDICATOR_ENABLE;
- if (bindtextdomain(PKGNAME, "/usr/apps/ug-setting-notification-efl/res/locale") == NULL) {
+ if (bindtextdomain(PKGNAME, tzplatform_mkpath(TZ_SYS_RO_APP, "ug-setting-notification-efl/res/locale"))== NULL) {
/* Failed to allocate memory for allocating heap for store the path of LOCALE directory */
}
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(PROJECT_NAME "${PROJECT_NAME}")
-SET(LIBDIR "${PREFIX}/apps/${PROJECT_NAME}/lib/ug")
-SET(RESDIR "${PREFIX}/apps/${PROJECT_NAME}/res")
-SET(DATADIR "${PREFIX}/apps/${PROJECT_NAME}/data")
-SET(LOCALEDIR "${RESDIR}/locale")
+
+SET(LIBDIR "${PREFIX}/lib")
+SET(RESDIR "${PREFIX}/res")
SET(IMAGEDIR "${RESDIR}/images")
-SET(EDJEDIR "${RESDIR}/edje")
-SET(ETCDIR "${RESDIR}/etc")
+SET(LICENSEDIR "${SYS_SHARE_DIR}/license")
+SET(PACKAGEDIR ${TZ_SYS_RO_PACKAGES})
+SET(ICONDIR "${PREFIX}/default/small/")
+SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
SET(VERSION_MAJOR 0)
SET(VERSION "${VERSION_MAJOR}.0.1")
capi-system-system-settings
capi-appfw-app-manager
capi-appfw-application
+ libtzplatform-config
)
SET(BUILD_SOURCE
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc)
ADD_DEFINITIONS(${pkgs_CFLAGS} "-fPIC")
ADD_DEFINITIONS("-DPKGNAME=\"${PROJECT_NAME}\"")
-#ADD_DEFINITIONS("-DLOCALE=\"${LOCALEDIR}\"")
-ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"")
ADD_LIBRARY(${PROJECT_NAME} STATIC ${BUILD_SOURCE})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
-#TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${bin_pkgs_LDFLAGS})
-#SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION_MAJOR})
-#SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${VERSION})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME "${PROJECT_NAME}")
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.xml DESTINATION /usr/share/packages)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PROJECT_NAME}.png DESTINATION /usr/share/icons/default/small/)
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/ug-setting-notification-efl/lib/ug)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION ${LICENSEDIR} RENAME "${PROJECT_NAME}")
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.xml DESTINATION ${PACKAGEDIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PROJECT_NAME}.png DESTINATION ${ICONDIR})
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/images/ DESTINATION ${IMAGEDIR})
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/images/ DESTINATION ${IMAGEDIR})
MESSAGE("ug-setting-notification-efl End")
#define _APPS_SE(fmt, arg...) SECURE_LOG(LOG_ERROR, LOG_TAG_APPS, " "fmt, ##arg)
#endif
-#ifdef ADD_FILE_LOG
-#define _F(fmt, arg...) do { \
- FILE *fp;\
- fp = fopen("/opt/usr/apps/org.tizen.w-home/data/logs", "a+");\
- if (NULL == fp) break;\
- fprintf(fp, "[%s:%d] "fmt"\n", __func__, __LINE__, ##arg); \
- fclose(fp);\
-} while (0)
-#else
-#define _F(fmt, arg...) ;
-#endif
-
#define retvm_if_timer(timer, expr, val, fmt, arg...) do { \
if (expr) { \
_E(fmt, ##arg); \
#include <tizen.h>
#include "log.h"
-
-#define DEFAULT_ICON IMAGEDIR"/unknown.png"
-
-
typedef struct {
/* innate features */
char *appid;
# for i18n
+SET(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/res/locale")
+
SET(POFILES
ar.po
az.po
DEPENDS ${absPofile}
)
- INSTALL(FILES ${moFile} DESTINATION /usr/apps/${PROJECT_NAME}/res/locale/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+ INSTALL(FILES ${moFile} DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
SET(moFiles ${moFiles} ${moFile})
ENDFOREACH(pofile)
*
*/
+#include <tzplatform_config.h>
#include "pkgmgr-setting-info.h"
#include "common-efl.h"
Evas_Object *img = elm_image_add(parent);
if(access(icon, 0) == -1) {
- icon = strdup("/usr/share/icons/default/small/ug-setting-notification-efl.png");
+ icon = strdup(tzplatform_mkpath(TZ_SYS_RO_ICONS, "default/small/ug-setting-notification-efl.png"));
}
elm_image_file_set(img, icon, NULL);