summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrachi Kumar <prachi.kumar@samsung.com>2018-09-12 18:01:59 +0530
committerPrachi Kumar <prachi.kumar@samsung.com>2018-09-13 20:09:02 +0530
commit8bc1d1a99ea538f17928531c2ee84d4f3de34b64 (patch)
tree894632a0ab9c2d823d95245cc83b44a3129a44cf
parent67215d5c31c6a5dfdd25cbc5a40fd04c9b87b056 (diff)
downloadwatch-face-editor-8bc1d1a99ea538f17928531c2ee84d4f3de34b64.tar.gz
watch-face-editor-8bc1d1a99ea538f17928531c2ee84d4f3de34b64.tar.bz2
watch-face-editor-8bc1d1a99ea538f17928531c2ee84d4f3de34b64.zip
Added gbs build support
Change-Id: Iabf2ce67f23972f382d1311721da4f24b3750ef6 Signed-off-by: Prachi Kumar <prachi.kumar@samsung.com>
-rwxr-xr-x.cproject3
-rw-r--r--CMakeLists.txt98
-rw-r--r--inc/watch-face-editor.h1
-rw-r--r--org.tizen.watch-face-editor.manifest5
-rw-r--r--org.tizen.watch-face-editor.xml.in13
-rw-r--r--packaging/org.tizen.watch-face-editor.spec66
-rw-r--r--shared/res/org.tizen.watch-face-editor.png (renamed from shared/res/watch-face-editor.png)bin4605 -> 4605 bytes
7 files changed, 184 insertions, 2 deletions
diff --git a/.cproject b/.cproject
index 86c9945..890925b 100755
--- a/.cproject
+++ b/.cproject
@@ -107,6 +107,7 @@
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/privacy-privilege-manager/&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/rpc-port&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/rua/&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/screen_connector_watcher&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/screen_connector_watcher_evas&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
@@ -236,6 +237,7 @@
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/privacy-privilege-manager/&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/rpc-port&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/rua/&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/screen_connector_watcher&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/screen_connector_watcher_evas&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
<listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
@@ -299,7 +301,6 @@
</option>
<option id="gnu.cpp.link.option.libs.485140775" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs">
<listOptionValue builtIn="false" value="watchface-editor"/>
- <listOptionValue builtIn="false" value="appsvc"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.738354801" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..afdee32
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,98 @@
+# Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
+#
+# Licensed under the Flora License, Version 1.1 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://floralicense.org/license/
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT("watch-face-editor" C)
+
+
+IF(NOT DEFINED PACKAGE_NAME)
+ SET(PACKAGE_NAME "org.tizen.watch-face-editor")
+ENDIF(NOT DEFINED PACKAGE_NAME)
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+IF(NOT DEFINED BINDIR)
+ SET(BINDIR"${PREFIX}/bin")
+ENDIF(NOT DEFINED BINDIR)
+IF(NOT DEFINED MANIFESTDIR)
+ SET(MANIFESTDIR "/usr/share/packages")
+ENDIF(NOT DEFINED MANIFESTDIR)
+IF(NOT DEFINED DESKTOP_ICONDIR)
+ SET(DESKTOP_ICONDIR "/usr/share/icons/default/small")
+ENDIF(NOT DEFINED DESKTOP_ICONDIR)
+IF(NOT DEFINED DESKTOP_ICON)
+ SET(DESKTOP_ICON ${PACKAGE_NAME}.png)
+ENDIF(DESKTOP_ICON)
+
+SET(SHAREDIR "${PREFIX}/shared")
+SET(RESDIR "${PREFIX}/res")
+SET(EDJDIR "${RESDIR}/edje")
+SET(SRCS
+ src/main.c
+ src/view.c
+ src/utils.c
+)
+
+INCLUDE_DIRECTORIES(
+ ${CMAKE_CURRENT_SOURCE_DIR}/inc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src
+ ${CMAKE_CURRENT_SOURCE_DIR}/res
+)
+
+ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE_NAME}\"")
+ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(PKGS REQUIRED
+ glib-2.0
+ dlog
+ elementary
+ efl-extension
+ bundle
+ capi-appfw-application
+ capi-system-system-settings
+ capi-appfw-watch-application
+ watchface-editor
+ screen_connector_watcher
+ screen_connector_watcher_evas
+ capi-appfw-app-manager
+ watch-control
+ vconf
+ )
+
+FOREACH(flag ${PKGS_CFLAGS})
+ SET(EXTRA_CFLGAS "${EXTRA_CFLGAS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLGAS} -fPIE")
+SET(CMAKE_EXE_LINKER_FLAGS "-pie -Wl,--as-needed")
+ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${PKGS_LDFLAGS})
+
+ADD_CUSTOM_TARGET(main.edj
+ COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/res/images "${EDJEFLAGS}"
+ ${CMAKE_CURRENT_SOURCE_DIR}/res/edje/main.edc
+ ${CMAKE_CURRENT_BINARY_DIR}/main.edj
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/res/edje/main.edc
+ ${CMAKE_CURRENT_SOURCE_DIR}/res/edje/color_classes.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} main.edj)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/main.edj DESTINATION ${EDJDIR})
+
+CONFIGURE_FILE(${PACKAGE_NAME}.xml.in ${PACKAGE_NAME}.xml)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
+INSTALL(FILES ${PACKAGE_NAME}.xml DESTINATION ${MANIFESTDIR})
+
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/shared/res/${DESKTOP_ICON} DESTINATION ${DESKTOP_ICONDIR})
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/shared/res DESTINATION ${SHAREDIR} FILES_MATCHING PATTERN "*.png")
diff --git a/inc/watch-face-editor.h b/inc/watch-face-editor.h
index 7c2222e..6a12e4d 100644
--- a/inc/watch-face-editor.h
+++ b/inc/watch-face-editor.h
@@ -24,7 +24,6 @@
#include <dlog.h>
#include <watchface-editor.h>
#include <watchface-editable.h>
-#include <watchface-complication.h>
#ifdef LOG_TAG
#undef LOG_TAG
diff --git a/org.tizen.watch-face-editor.manifest b/org.tizen.watch-face-editor.manifest
new file mode 100644
index 0000000..97e8c31
--- /dev/null
+++ b/org.tizen.watch-face-editor.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
diff --git a/org.tizen.watch-face-editor.xml.in b/org.tizen.watch-face-editor.xml.in
new file mode 100644
index 0000000..c822dae
--- /dev/null
+++ b/org.tizen.watch-face-editor.xml.in
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="5.0" package="org.tizen.watch-face-editor" version="1.0.0">
+ <profile name="wearable"/>
+ <ui-application appid="org.tizen.watch-face-editor" exec="watch-face-editor" multiple="false" nodisplay="false" taskmanage="true" type="capp">
+ <label>Editor</label>
+ <icon>watch-face-editor.png</icon>
+ </ui-application>
+ <privileges>
+ <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+ <privilege>http://tizen.org/privilege/datasharing</privilege>
+ <privilege>http://tizen.org/privilege/widget.viewer</privilege>
+ </privileges>
+</manifest>
diff --git a/packaging/org.tizen.watch-face-editor.spec b/packaging/org.tizen.watch-face-editor.spec
new file mode 100644
index 0000000..feea7f2
--- /dev/null
+++ b/packaging/org.tizen.watch-face-editor.spec
@@ -0,0 +1,66 @@
+Name: org.tizen.watch-face-editor
+Summary: PUT SUMMARY HERE
+Version: 0.1
+Release: 1
+Group: TO_BE/FILLED_IN
+License: Apache
+Source0: %{name}-%{version}.tar.gz
+
+BuildRequires: cmake
+BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(bundle)
+BuildRequires: pkgconfig(efl-extension)
+BuildRequires: pkgconfig(capi-system-system-settings)
+BuildRequires: pkgconfig(capi-appfw-watch-application)
+BuildRequires: pkgconfig(watchface-editor)
+BuildRequires: pkgconfig(screen_connector_watcher)
+BuildRequires: pkgconfig(screen_connector_watcher_evas)
+BuildRequires: pkgconfig(capi-appfw-app-manager)
+BuildRequires: pkgconfig(watch-control)
+BuildRequires: pkgconfig(vconf)
+BuildRequires: gettext-devel
+
+%define _pkgdir /usr/apps/%{name}
+%define _bindir %{_pkgdir}/bin
+%define _resdir %{_pkgdir}/res
+%define _sharedir %{_pkgdir}/shared
+%define _datadir %{_pkgdir}/data
+%define _manifestdir /usr/share/packages
+%define _desktop_icondir /opt/share/icons/default/small
+
+%description
+PUT DESCRIPTION HERE
+
+%prep
+%setup -q
+
+%build
+cmake \
+ -DCMAKE_INSTALL_PREFIX=%{_pkgdir} \
+ -DPACKAGE_NAME=%{name} \
+ -DBINDIR=%{_bindir} \
+ -DMANIFESTDIR=%{_manifestdir} \
+ -DDESKTOP_ICONDIR=%{_desktop_icondir} \
+ -DDESKTOP_ICON=%{name}.png \
+ -DVERSION=%{version}
+
+make %{?jobs:-j%jobs}
+
+%install
+%make_install
+install --directory %{buildroot}/%{_datadir}
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%manifest org.tizen.watch-face-editor.manifest
+%defattr(-,root,root,-)
+%{_bindir}/*
+%{_resdir}/*
+%{_sharedir}/*
+%{_datadir}
+%{_manifestdir}/%{name}.xml
+%{_desktop_icondir}/%{name}.png
diff --git a/shared/res/watch-face-editor.png b/shared/res/org.tizen.watch-face-editor.png
index 8e479c4..8e479c4 100644
--- a/shared/res/watch-face-editor.png
+++ b/shared/res/org.tizen.watch-face-editor.png
Binary files differ