From: wchang kim Date: Fri, 4 May 2018 04:58:05 +0000 (+0900) Subject: Adding the tool to build a configuable SDK extension. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F35%2F178235%2F1;p=tools%2Ftbb.git Adding the tool to build a configuable SDK extension. Change-Id: I90d8c3746ffd52a842f162b04b0bc38998e03cc0 --- diff --git a/.gitignore b/.gitignore index 09d9c60..6ee0458 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,6 @@ advanced/20* advanced/Config_base.in advanced/Config_unified.in -output/ +./output/ dl/* tags diff --git a/config-sdk/.gitignore b/config-sdk/.gitignore new file mode 100644 index 0000000..598fdd9 --- /dev/null +++ b/config-sdk/.gitignore @@ -0,0 +1,23 @@ +.info/ +.pkg/ +.plugin/ +.rpm/ +.target/ +.temp_pkg/ +.tmp/ +old/ +pkginfo.manifest +iot_rs_config +mapping-bb-rs.xml +rs.log +rs_xml.list +rs_tbb/ +extension/output/ +extension/base/pkginfo.manifest +extension/core-add-ons/pkginfo.manifest +extension/NativeAppDevelopment/pkginfo.manifest +extension/NativeAppDevelopment-CLI/pkginfo.manifest +extension/rootstrap/pkginfo.manifest +extension/rootstrap/data/* +extension/*.zip +extension/core-add-ons/data/* diff --git a/config-sdk/clean_data.sh b/config-sdk/clean_data.sh new file mode 100755 index 0000000..9cb0edc --- /dev/null +++ b/config-sdk/clean_data.sh @@ -0,0 +1,24 @@ +#!/bin/sh +rm -rf .info/ +rm -rf .pkg/ +rm -rf .plugin/ +rm -rf .rpm/ +rm -rf .target/ +rm -rf .temp_pkg/ +rm -rf .temp_sdk_pkg/ +rm -rf .tmp/ +rm -f ./pkginfo.manifest +rm -f ./iot_rs_config +rm -f ./mapping-bb-rs.xml +rm -f ./rs.log +rm -f ./rs_xml.list +rm -rf ./rs_tbb/* +rm -rf ./extension/output/* +rm -f ./extension/base/pkginfo.manifest +rm -f ./extension/core-add-ons/pkginfo.manifest +rm -f ./extension/NativeAppDevelopment/pkginfo.manifest +rm -f ./extension/NativeAppDevelopment-CLI/pkginfo.manifest +rm -f ./extension/rootstrap/pkginfo.manifest +rm -rf ./extension/rootstrap/data/* +rm -f ./extension/*.zip +rm -rf ./extension/core-add-ons/data/* diff --git a/config-sdk/extension/NativeAppDevelopment-CLI/changelog b/config-sdk/extension/NativeAppDevelopment-CLI/changelog new file mode 100644 index 0000000..4595222 --- /dev/null +++ b/config-sdk/extension/NativeAppDevelopment-CLI/changelog @@ -0,0 +1,3 @@ +* 0.0.1 +- Initialize Meta for tizen_network_audio_armv7l-v1.0-4.0 customized platform +== TizenSDK 2017-08-30 diff --git a/config-sdk/extension/NativeAppDevelopment-CLI/data/.wd b/config-sdk/extension/NativeAppDevelopment-CLI/data/.wd new file mode 100644 index 0000000..e69de29 diff --git a/config-sdk/extension/NativeAppDevelopment/changelog b/config-sdk/extension/NativeAppDevelopment/changelog new file mode 100644 index 0000000..4595222 --- /dev/null +++ b/config-sdk/extension/NativeAppDevelopment/changelog @@ -0,0 +1,3 @@ +* 0.0.1 +- Initialize Meta for tizen_network_audio_armv7l-v1.0-4.0 customized platform +== TizenSDK 2017-08-30 diff --git a/config-sdk/extension/NativeAppDevelopment/data/.wd b/config-sdk/extension/NativeAppDevelopment/data/.wd new file mode 100644 index 0000000..e69de29 diff --git a/config-sdk/extension/base/changelog b/config-sdk/extension/base/changelog new file mode 100644 index 0000000..4595222 --- /dev/null +++ b/config-sdk/extension/base/changelog @@ -0,0 +1,3 @@ +* 0.0.1 +- Initialize Meta for tizen_network_audio_armv7l-v1.0-4.0 customized platform +== TizenSDK 2017-08-30 diff --git a/config-sdk/extension/base/data/.wd b/config-sdk/extension/base/data/.wd new file mode 100644 index 0000000..e69de29 diff --git a/config-sdk/extension/core-add-ons/data/.wd b/config-sdk/extension/core-add-ons/data/.wd new file mode 100644 index 0000000..e69de29 diff --git a/config-sdk/extension/core-add-ons/template/features/native/feature.xml b/config-sdk/extension/core-add-ons/template/features/native/feature.xml new file mode 100755 index 0000000..8645530 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/features/native/feature.xml @@ -0,0 +1,423 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The application requires a built-in physical keyboard supporting the specified(string) keyboard layout. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The application requires at least the specified number of simultaneous touches in a multi-point touch. The maximum number of touch point : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config-sdk/extension/core-add-ons/template/privileges/native/privilege-native.properties b/config-sdk/extension/core-add-ons/template/privileges/native/privilege-native.properties new file mode 100755 index 0000000..9209095 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/privileges/native/privilege-native.properties @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/appendix.mk b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/appendix.mk new file mode 100755 index 0000000..2e06c34 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/appendix.mk @@ -0,0 +1 @@ +# Appendix diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/basedef.mk b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/basedef.mk new file mode 100755 index 0000000..a762983 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/basedef.mk @@ -0,0 +1,34 @@ +# Add inputs and outputs from these tool invocations to the build variables + + +OS_NAME := $(shell $(UNAME)) + + +#ifeq ($(origin BUILD_CONFIG), undefined) +BUILD_CONFIG ?= Debug +#endif + +#ifeq ($(origin ARCH), undefined) +ARCH ?= i386 +#endif + +#ifeq ($(origin PROJPATH), undefined) +PROJPATH ?= . +#endif + + +#ifeq ($(origin PROJ_PATH), undefined) +PROJ_PATH ?= $(PROJPATH) +#endif + +#ifeq ($(strip $(OUTPUT_DIR)),) +#OUTPUT_DIR ?= $(PROJ_PATH)/$(BUILD_CONFIG) +#endif + +#ifeq ($(strip $(BUILD_ARCH)),) +BUILD_ARCH ?= $(ARCH) +#endif + +#ifeq ($(strip $(ENVENTOR_PATH)),) +ENVENTOR_PATH ?= $(SDK_TOOLPATH)/enventor +#endif diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/build_c.mk b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/build_c.mk new file mode 100755 index 0000000..5fffeea --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/build_c.mk @@ -0,0 +1,113 @@ +# C/C++ build script + + +_FUNC_EXT2O = $(patsubst %.$(3),$(1)/%.o,$(2)) +_FUNC_C2O = $(call _FUNC_EXT2O,$(1),$(2),c) +_FUNC_CPP2O = $(call _FUNC_EXT2O,$(1),$(2),cpp) + + +# parameter : +# $(1) - C/C++ soruce file +# $(2) - output path +# $(3) - .ext +# $(4) - unique id +CONVERT_ESC_EXT_TO_O = $(addprefix $(2)/,$(notdir $(patsubst %.$(3),%-$(4).o,$(1)))) + +#CONVERT_ESC_C_TO_O = $(call CONVERT_ESC_EXT_TO_O,$(1),$(2),c) +#CONVERT_ESC_CPP_TO_O = $(call CONVERT_ESC_EXT_TO_O,$(1),$(2),cpp) + + +# parameter : +# $(1) - encoded one C/C++ soruce file +# $(2) - output path +# $(3) - ext title (C/C++) +# $(4) - ext (c/cpp) +# $(5) - compiler ($(CC)/$(CXX)) +# $(6) - build opt +# $(7) - build opt file +# output : +# $(8) - output files list +define C_BUILD_PROC_RAW +$(call CONVERT_ESC_EXT_TO_O,$(1),$(2),$(4),$(8)) : $(call DECODE_4MAKE,$(1)) $(7) + @echo ' Building file: $$<' + @echo ' Invoking: $(3) Compiler' + $$(call MAKEDIRS,$$(@D)) + $(5) -c "$$<" -o "$$@" $(6) -Wp,@$(7) + @echo ' Finished building: $$<' +$(9) += $(call CONVERT_ESC_EXT_TO_O,$(1),$(2),$(4),$(8)) +endef + + +# parameter : +# $(1) - output paths +# $(2) - src paths +# $(3) - inc paths +# $(4) - inc files +# $(5) - Defs +# $(6) - UnDefs +# $(7) - compiler opt +# $(8) - compiler opt file +# $(9) - ext title (C/C++) +# $(10) - ext (c/cpp) +# $(11) - compiler ($(CC)/$(CXX)) +# output : +# $(12) - OBJS +# return : +# none +define C_PROC_RAW + +_OUTPUT_DIR := $$(strip $(1))# +_SRCS := $(2)# +_INCS := $(3)# +_INC_FILES := $(4)# +_DEFS := $(5)# +_UNDEFS := $(6)# + +_OPT := $(7) +_OPT_FILE := $(8) + +_EXT_TITLE := $(9) +_EXT := $(10) +_COMPILER := $(11) + +#_OUTPUT_FILES := $(12) + +_ENC_SRCS := $$(call ENCODE_4MAKE,$$(_SRCS)) +_ENC_SRCS := $$(filter %.$$(_EXT),$$(_ENC_SRCS)) + +ifneq ($$(strip $$(_SRCS)),) + +_NORMAL_SRCS := $$(filter-out %*.$$(_EXT),$$(_ENC_SRCS)) +_WIDLCARD_SRCS := $$(filter %*.$$(_EXT),$$(_ENC_SRCS)) + +_ALL_SRCS := $$(call DECODE_4MAKE,$$(_NORMAL_SRCS)) \ + $$(foreach var,$$(_WIDLCARD_SRCS),$$(call FIND_FILES_4MAKE,$$(call DECODE_4MAKE,$$(var)))) + +ifneq ($$(strip $$(_ALL_SRCS)),) + +_ENC_SRCS := $$(call ENCODE_4MAKE,$$(_ALL_SRCS)) + +_CDEFS := $$(CDEFS) +_CDEFS += $$(addprefix -D,$$(_DEFS)) +_CDEFS += $$(addprefix -U,$$(_UNDEFS)) + +_ENC_C_INCS := $$(call ENCODE_4MAKE,$$(_INCS)) +_ENC_C_INCS := $$(addprefix -I,$$(_ENC_C_INCS)) + +_ENC_INC_FILES := $$(call ENCODE_4MAKE,$$(_INC_FILES)) +_ENC_INC_FILES += $$(addprefix -include,$$(_ENC_INC_FILES)) + +_C_INCS := $$(call DECODE_4MAKE,$$(_ENC_C_INCS) $$(_ENC_C_INC_FILES)) + +_DEFS := $$(_CDEFS) $$(_C_INCS) -I"pch" $$(_OPT) + +_UNIQUE_ID = $$(firstword $$(shell echo $$(var) | $$(CKSUM))) + +$$(foreach var,$$(_ENC_SRCS),$$(eval $$(call C_BUILD_PROC_RAW,$$(var),$$(_OUTPUT_DIR),$$(_EXT_TITLE),$$(_EXT),$$(_COMPILER),$$(_DEFS),$$(_OPT_FILE),$$(_UNIQUE_ID),$(12)))) + +endif # (_(strip _(_ALL_SRCS)),) + +endif # (_(strip _(_SRCS)),) + + +endef diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/build_edc.mk b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/build_edc.mk new file mode 100755 index 0000000..6f85fdd --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/build_edc.mk @@ -0,0 +1,81 @@ +# EDC build script + + +FUNC_EDC2EDJ = $(patsubst %.edc,$(2)/%.edj,$(1)) + +# parameter : +# $(1) - C/C++ soruce file +# $(2) - output path +CONVERT_ESC_EDC_TO_EDJ = $(call CONVERT_4MAKE_TO_OUT,$(call FUNC_EDC2EDJ,$(1),$(2))) + + +# parameter : +# $(1) - encoded one C/C++ soruce file +# $(2) - output path +# $(3) - build opt +# output : +# $(4) - output files list +define EDJ_BUILD_PROC_RAW +$(call CONVERT_ESC_EDC_TO_EDJ,$(1),$(2)) : $(call DECODE_4MAKE,$(1)) + @echo ' Building file: $$<' + @echo ' Invoking: EDC Resource Compiler' + $$(call MAKEDIRS,$$(@D)) + $$(EDJE_CC) $(3) "$$<" "$$@" + @echo ' Finished building: $$<' +$(4) += $(call CONVERT_ESC_EDC_TO_EDJ,$(1),$(2)) +endef + + +# parameter : +# $(1) - output paths +# $(2) - src paths +# $(3) - image inc paths +# $(4) - sound inc paths +# $(5) - font inc paths +# output : +# $(6) - OBJS +# return : +# none +define EDJ_PROC_RAW + +_OUTPUT_DIR := $$(strip $(1))# +_SRCS := $(2)# +_IMAGE_DIRS := $(3)# +_SOUND_DIRS := $(4)# +_FONT_DIRS := $(5)# + +ifneq ($$(strip $$(_SRCS)),) + +_ENC_SRCS := $$(call ENCODE_4MAKE,$$(_SRCS)) + +_NORMAL_SRCS := $$(filter-out %*.edc,$$(_ENC_SRCS)) +_WIDLCARD_SRCS := $$(filter %*.edc,$$(_ENC_SRCS)) + +_ALL_SRCS := $$(call DECODE_4MAKE,$$(_NORMAL_SRCS)) \ + $$(foreach var,$$(_WIDLCARD_SRCS),$$(call FIND_FILES_4MAKE,$$(call DECODE_4MAKE,$$(var)))) + +ifneq ($$(strip $$(_ALL_SRCS)),) + +_ENC_SRCS := $$(call ENCODE_4MAKE,$$(_ALL_SRCS)) + +_COMPILER_FLAGS := -id "$$(ENVENTOR_SHARED_RES_PATH)/images" +_COMPILER_FLAGS += -sd "$$(ENVENTOR_SHARED_RES_PATH)/sounds" +_COMPILER_FLAGS += -fd "$$(ENVENTOR_SHARED_RES_PATH)/fonts" + +ifneq ($$(strip $$(_IMAGE_DIRS)),) +_COMPILER_FLAGS += $$(addprefix -id ,$$(_IMAGE_DIRS)) +endif +ifneq ($$(strip $$(_SOUND_DIRS)),) +_COMPILER_FLAGS += $$(addprefix -sd ,$$(_SOUND_DIRS)) +endif +ifneq ($$(strip $$(_FONT_DIRS)),) +_COMPILER_FLAGS += $$(addprefix -fd ,$$(_FONT_DIRS)) +endif + +$$(foreach var,$$(_ENC_SRCS),$$(eval $$(call EDJ_BUILD_PROC_RAW,$$(var),$$(_OUTPUT_DIR),$$(_COMPILER_FLAGS),$(6)))) + +endif # (_(strip _(_ALL_SRCS)),) + +endif # (_(strip _(_SRCS)),) + +endef diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/build_po.mk b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/build_po.mk new file mode 100755 index 0000000..d88d71a --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/build_po.mk @@ -0,0 +1,64 @@ +# PO build script + + +_FUNC_PO2MO = $(patsubst %.po,$(2)/res/locale/%/LC_MESSAGES/$(3).mo,$(notdir $(1))) + + +# parameter : +# $(1) - C/C++ soruce file +# $(2) - output path +# $(3) - app name +CONVERT_ESC_PO_TO_MO = $(call CONVERT_4MAKE_TO_OUT,$(call _FUNC_PO2MO,$(1),$(2),$(3))) + + +# parameter : +# $(1) - encoded one C/C++ soruce file +# $(2) - output path +# $(3) - app name +# output : +# $(4) - output files list +define MO_BUILD_PROC_RAW +$(call CONVERT_ESC_PO_TO_MO,$(1),$(2),$(3)) : $(call DECODE_4MAKE,$(1)) + @echo ' Building file: $$<' + @echo ' Invoking: msgfmt String Formatter' + $$(call MAKEDIRS,$$(@D)) + $$(MSGFMT) -o "$$@" "$$<" + @echo ' Finished building: $$<' +$(4) += $(call CONVERT_ESC_PO_TO_MO,$(1),$(2),$(3)) +endef + + +# parameter : +# $(1) - output dir +# $(2) - src paths +# $(3) - app name +# output : +# $(4) - OBJS + +define MO_PROC_RAW + +_OUTPUT_DIR := $(1) +_SRCS := $(2) +_APPNAME := $(3) + +ifneq ($$(strip $$(_SRCS)),) + +_ENC_SRCS := $$(call ENCODE_4MAKE,$$(_SRCS)) + +_NORMAL_SRCS := $$(filter-out %*.po,$$(_ENC_SRCS)) +_WIDLCARD_SRCS := $$(filter %*.po,$$(_ENC_SRCS)) + +_ALL_SRCS := $$(call DECODE_4MAKE,$$(_NORMAL_SRCS)) \ + $$(foreach var,$$(_WIDLCARD_SRCS),$$(call FIND_FILES_4MAKE,$$(call DECODE_4MAKE,$$(var)))) + +ifneq ($$(strip $$(_ALL_SRCS)),) + +_ENC_SRCS := $$(call ENCODE_4MAKE,$$(_ALL_SRCS)) + +$$(foreach var,$$(_ENC_SRCS),$$(eval $$(call MO_BUILD_PROC_RAW,$$(var),$$(_OUTPUT_DIR),$$(_APPNAME),$(4)))) + +endif # (_(strip _(_ALL_SRCS)),) + +endif # (_(strip _(_SRCS)),) + +endef diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/flags.mk b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/flags.mk new file mode 100755 index 0000000..f0a594e --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/flags.mk @@ -0,0 +1,27 @@ +# Add tools flags defines + +ifeq ($(strip $(BUILD_CONFIG)),Debug) +OPTIMIZATION_OP := -O0 +DEBUG_OP := -g3 -D_DEBUG +CPP_OPTIMIZATION_OP := -O0 +CPP_DEBUG_OP := -g3 -D_DEBUG +LINK_OP := +else +ifeq ($(strip $(BUILD_CONFIG)),Release) +OPTIMIZATION_OP := -O3 +DEBUG_OP := +CPP_OPTIMIZATION_OP := -O3 +CPP_DEBUG_OP := +LINK_OP := -s +endif +endif + +COMPILE_FLAGS = $(DEBUG_OP) $(OPTIMIZATION_OP) -Wall -c -fmessage-length=0 + +CPP_COMPILE_FLAGS = $(CPP_DEBUG_OP) $(CPP_OPTIMIZATION_OP) -Wall -c -fmessage-length=0 + +LINK_FLAGS = -L"$(PROJ_PATH)/lib" -Wl,--no-undefined $(LINK_OP) + +AR_FLAGS = + +EDC_COMPILE_FLAGS = -id "$(PROJ_PATH)/edje/images" -sd "$(PROJ_PATH)/edje/sounds" -fd "$(PROJ_PATH)/edje/fonts" diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/funcs.mk b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/funcs.mk new file mode 100755 index 0000000..3ba778b --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/funcs.mk @@ -0,0 +1,50 @@ + +BSLASH := \\# +NULL_CHAR := # +SPACE := \ # +COLON := :# +DOTDOT := ..# +SPACE_ESC := &sp;# +COLON_ESC := &co;# +SPACE_OUT := ~sp~# +COLON_OUT := ~co~# +DOTDOT_OUT := ~dtdt~# + +BSLASH2SLASH = $(subst $(BSLASH),/,$(1)) + +REMOVE_TAIL = $(patsubst %/,%,$(1)) + +#LOWER_CASE = $(shell echo translit($(1),[A-Z],[a-z])|$(M4)) +LOWER_CASE = $(shell echo $(1)|$(TR) [A-Z] [a-z]) + +#ifneq ($(findstring Windows,$(OS)),) +# ... +#endif + +FIND_FILES = $(shell $(FIND) $(1)/$(2) | $(SED) 's/^$(subst /,$(BSLASH)/,$(1))$(BSLASH)///') +FIND_FILES_ESC = $(shell $(FIND) $(1)/$(2) | $(SED) 's/^$(subst /,$(BSLASH)/,$(1))$(BSLASH)///' -e 's/:/$(BSLASH)&co;/g' -e 's/$(BSLASH) /$(BSLASH)&sp;/g') +FIND_FILES_4MAKE = $(shell $(FIND) $(1)/$(2) | $(SED) 's/^$(subst /,$(BSLASH)/,$(1))$(BSLASH)///') + +FIND_FILES_ABS = $(shell $(FIND) $(1)) +FIND_FILES_ABS_4MAKE = $(shell $(FIND) $(1) -e 's/$(BSLASH) /$(BSLASH)&sp;/g') +FIND_FILES_ABS_ESC = $(shell $(FIND) $(1) -e 's/:/$(BSLASH)&co;/g' -e 's/$(BSLASH) /$(BSLASH)&sp;/g') + +FIND_FILES_4MAKE = $(shell $(FIND) $(1) | $(SED) 's/ /\\\ /g') + +#ENCODE_ESC = $(shell echo $(1) | $(SED) -e 's/:/$(BSLASH)&co;/g' -e 's/$(BSLASH) /$(BSLASH)&sp;/g') +#DECODE_ESC = $(shell echo $(1) | $(SED) -e 's/$(BSLASH)&co;/:/g' -e 's/$(BSLASH)&sp;/$(BSLASH) / g') +ENCODE_ESC = $(subst $(SPACE),$(SPACE_ESC),$(subst $(COLON),$(COLON_ESC),$(1))) +DECODE_ESC = $(subst $(COLON_ESC),$(COLON),$(subst $(SPACE_ESC),$(SPACE),$(1))) +ENCODE_4MAKE = $(subst $(SPACE),$(SPACE_ESC),$(1)) +DECODE_4MAKE = $(subst $(SPACE_ESC),$(SPACE),$(1)) + +CONVERT_TO_OUT = $(subst $(DOTDOT),$(DOTDOT_OUT),$(subst $(COLON),$(COLON_OUT),$(subst $(SPACE),$(SPACE_OUT),$(1)))) +CONVERT_ESC_TO_OUT = $(subst $(DOTDOT),$(DOTDOT_OUT),$(subst $(COLON_ESC),$(COLON_OUT),$(subst $(SPACE_ESC),$(SPACE_OUT),$(1)))) +CONVERT_4MAKE_TO_OUT = $(subst $(DOTDOT),$(DOTDOT_OUT),$(subst $(COLON),$(COLON_OUT),$(subst $(SPACE_ESC),$(SPACE_OUT),$(1)))) + +PROC_NO_EXIST = $(if $(wildcard $(1)),,$(call $(2),$(1))) +define MAKEDIRS0 + @echo ' Building directory: $(1)' + @$(MKDIR) $(MKDIR_OP) $(subst $(BSLASH),/,$(1)) +endef +MAKEDIRS = $(call PROC_NO_EXIST,$(1),MAKEDIRS0) diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/makefile b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/makefile new file mode 100755 index 0000000..117b240 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/makefile @@ -0,0 +1,34 @@ +# +# Usege : make -f /Build/makefile -C +# + +BUILD_SCRIPT_VERSION := 1.1.0 + +.PHONY : app_version app_build app_clean build_version + + +all : app_build + +clean : app_clean + +version : build_version + +#PROJ_ROOT = . +#BUILD_ROOT := $(PROJ_PATH)/Build# + +ifeq ($(MAKE_NAME),mingw32-make) +ifneq ($(SHELL),) +OPTIONS += --eval="SHELL=$(SHELL)" +endif +endif + +app_build : + @echo $(MAKE) -f "$(BUILD_ROOT)/makefile.mk" + @$(MAKE_BIN) -f "$(BUILD_ROOT)/makefile.mk" -C "$(PROJ_PATH)" $(OPTIONS) + +app_clean : + @$(MAKE) -f "$(BUILD_ROOT)/makefile.mk" -C "$(PROJ_PATH)" $(OPTIONS) clean + +build_version : + @echo makefile : $(BUILD_SCRIPT_VERSION) + @$(MAKE) -f "$(BUILD_ROOT)/makefile.mk" -C "$(PROJ_PATH)" $(OPTIONS) version diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/makefile.mk b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/makefile.mk new file mode 100755 index 0000000..53c0428 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/makefile.mk @@ -0,0 +1,205 @@ +# +# Usege : make -f /Build/makefile -C +# + +BUILD_SCRIPT_VERSION := 1.2.3 + +.PHONY : app_version app_clean build_version + + +all : app_build + +clean : app_clean + +version : build_version + +_BLANK :=# +_SPACE := $(_BLANK) $(_BLANK)# +_SPACE_4MAKE := \$(_SPACE)# + +NULL_CHAR :=# +SPACE := $(NULL_CHAR) $(NULL_CHAR)# + +PROJ_ROOT := . +_PROJ_ROOT_4MAKE := $(subst $(_SPACE),$(_SPACE_4MAKE),$(PROJ_ROOT))# +PROJ_ROOT=$(_PROJ_ROOT_4MAKE) +_BUILD_ROOT_4MAKE := $(subst $(_SPACE),$(_SPACE_4MAKE),$(BUILD_ROOT))# +BUILD_ROOT=$(_BUILD_ROOT_4MAKE) + +include $(BUILD_ROOT)/basedef.mk + +include $(PROJ_ROOT)/project_def.prop +-include $(PROJ_ROOT)/build_def.prop + +include $(BUILD_ROOT)/funcs.mk + +-include $(BUILD_ROOT)/tooldef.mk +-include $(BUILD_ROOT)/flags.mk +-include $(BUILD_ROOT)/platform.mk + + +APPTYPE := $(type) + +OUTPUT_DIR := $(PROJ_ROOT)/$(BUILD_CONFIG) +OBJ_OUTPUT := $(OUTPUT_DIR)/objs + +LOWER_APPNAME := $(call LOWER_CASE,$(APPNAME)) +APPID2 := $(subst $(basename $(APPID)).,,$(APPID)) + +ifeq ($(strip $(APPTYPE)),app) +APPFILE := $(OUTPUT_DIR)/$(LOWER_APPNAME) +endif +ifeq ($(strip $(APPTYPE)),staticLib) +APPFILE := $(OUTPUT_DIR)/lib$(LOWER_APPNAME).a +endif +ifeq ($(strip $(APPTYPE)),sharedLib) +APPFILE := $(OUTPUT_DIR)/lib$(LOWER_APPNAME).so +endif + +ifneq ($(strip $(PLATFORM_INCS)),) +PLATFORM_INCS_FILE := $(OBJ_OUTPUT)/platform_incs_file.inc +endif + +include $(BUILD_ROOT)/build_c.mk + + +ifeq ($(strip $(APPTYPE)),app) +EXT_OP := -fPIE +endif +ifeq ($(strip $(APPTYPE)),staticLib) +EXT_OP := -fPIE +endif +ifeq ($(strip $(APPTYPE)),sharedLib) +EXT_OP := -fPIC +endif + +C_OPT := $(COMPILE_FLAGS) $(TC_COMPILER_MISC) $(RS_COMPILER_MISC) $(EXT_OP) --sysroot="$(SYSROOT)" -Werror-implicit-function-declaration $(M_OPT) $(USER_C_OPTS) +CPP_OPT := $(CPP_COMPILE_FLAGS) $(TC_COMPILER_MISC) $(RS_COMPILER_MISC) $(EXT_OP) --sysroot="$(SYSROOT)" -Werror-implicit-function-declaration $(M_OPT) $(USER_CPP_OPTS) +C_OPT_FILE := $(PLATFORM_INCS_FILE) + +OBJS := # + +# Global C/C++ +ifeq ($(strip $(USER_ROOT)),) +USER_ROOT := $(PROJ_ROOT) +endif +$(eval $(call C_PROC_RAW,$(OBJ_OUTPUT),$(USER_SRCS),$(USER_INC_DIRS),$(USER_INC_FILES),$(USER_DEFS),$(USER_UNDEFS),$(C_OPT),$(C_OPT_FILE),C,c,$(CC),OBJS)) +$(foreach ext,cpp cxx cc c++ C,$(eval $(call C_PROC_RAW,$(OBJ_OUTPUT),$(USER_SRCS),$(USER_INC_DIRS),$(USER_CPP_INC_FILES),$(USER_CPP_DEFS),$(USER_CPP_UNDEFS),$(CPP_OPT),$(C_OPT_FILE),C++,$(ext),$(CXX),OBJS))) + +# Individual C/C++ +ifneq ($(strip $(USER_EXT_C_KEYS)),) +$(foreach var,$(USER_EXT_C_KEYS),$(eval $(call C_PROC_RAW,$(OBJ_OUTPUT),$(USER_EXT_$(var)_SRCS),$(USER_EXT_$(var)_INC_DIRS),$(USER_EXT_$(var)_INC_FILES),$(USER_EXT_$(var)_DEFS),$(USER_EXT_$(var)_UNDEFS),$(C_OPT),$(C_OPT_FILE),C,c,$(CC),OBJS))) +$(foreach ext,cpp cxx cc c++ C,$(foreach var,$(USER_EXT_C_KEYS),$(eval $(call C_PROC_RAW,$(OBJ_OUTPUT),$(USER_EXT_$(var)_SRCS),$(USER_EXT_$(var)_INC_DIRS),$(USER_EXT_$(var)_CPP_INC_FILES),$(USER_EXT_$(var)_CPP_DEFS),$(USER_EXT_$(var)_CPP_UNDEFS),$(CPP_OPT),$(C_OPT_FILE),C++,$(ext),$(CXX),OBJS)))) +endif + + +ifneq ($(strip $(USER_LIB_DIRS)),) +_ENC_USER_LIB_DIRS := $(call ENCODE_4MAKE,$(USER_LIB_DIRS)) +_ENC_USER_LIB_DIRS := $(addprefix -L,$(_ENC_USER_LIB_DIRS)) +LIBPATHS := $(call DECODE_4MAKE,$(_ENC_USER_LIB_DIRS)) +endif + +LIBS += $(addprefix -l,$(USER_LIBS)) + +UOBJS += $(USER_OBJS) + +M_OPT = -MMD -MP -MF"$(@:%.o=%.d)" + +DEPS := $(OBJS:.o=.d) + +ifneq ($(strip $(DEPS)),) +-include $(PROJ_ROOT)/Build/$(DEPS) +endif + + +ifeq ($(strip $(APPTYPE)),app) +$(APPFILE) : $(OBJS) $(UOBJS) + @echo ' Building target: $@' + @echo ' Invoking: C/C++ Linker' + $(call MAKEDIRS,$(@D)) + $(CXX) -o $(APPFILE) $(OBJS) $(UOBJS) $(LIBPATHS) -Xlinker --as-needed $(LIBS) $(LINK_FLAGS) $(TC_LINKER_MISC) $(RS_LINKER_MISC) -pie -lpthread --sysroot="$(SYSROOT)" -Xlinker --version-script="$(PROJ_ROOT)/.exportMap" $(RS_LIB_PATHS) $(RS_LIBRARIES) -Xlinker -rpath='$$ORIGIN/../lib' -Werror-implicit-function-declaration $(USER_LINK_OPTS) + @echo ' Finished building target: $@' +endif +ifeq ($(strip $(APPTYPE)),staticLib) +$(APPFILE) : $(OBJS) $(UOBJS) + @echo ' Building target: $@' + @echo ' Invoking: Archive utility' + $(call MAKEDIRS,$(@D)) + $(AR) -r $(APPFILE) $(OBJS) $(UOBJS) $(AR_FLAGS) $(USER_LINK_OPTS) + @echo ' Finished building target: $@' +endif +ifeq ($(strip $(APPTYPE)),sharedLib) +$(APPFILE) : $(OBJS) $(UOBJS) + @echo ' Building target: $@' + @echo ' Invoking: C/C++ Linker' + $(call MAKEDIRS,$(@D)) + $(CXX) -o $(APPFILE) $(OBJS) $(UOBJS) $(LIBPATHS) -Xlinker --as-needed $(LIBS) $(LINK_FLAGS) $(TC_LINKER_MISC) $(RS_LINKER_MISC) -shared -lpthread --sysroot="$(SYSROOT)" $(RS_LIB_PATHS) $(RS_LIBRARIES) $(USER_LINK_OPTS) + @echo ' Finished building target: $@' +endif + + +$(OBJ_OUTPUT) : + $(call MAKEDIRS,$@) + +$(OUTPUT_DIR) : + $(call MAKEDIRS,$@) + + +#ifneq ($(strip $(PLATFORM_INCS)),) +#$(PLATFORM_INCS_FILE) : $(OBJ_OUTPUT) +# @echo ' Building inc file: $@' +#ifneq ($(findstring Windows,$(OS)),) +#ifneq ($(findstring 3.82,$(MAKE_VERSION)),) +# $(file > $@,$(PLATFORM_INCS)) +#else +# @echo $(PLATFORM_INCS) > $@ +#endif +#else +# @echo '$(PLATFORM_INCS)' > $@ +#endif +#endif + + +include $(BUILD_ROOT)/build_edc.mk + +#ifeq ($(strip $(ENVENTOR_SHARED_RES_PATH)),) +ENVENTOR_SHARED_RES_PATH ?= $(ENVENTOR_PATH)/share/enventor +#endif + +EDJ_FILES := + +# Global EDCs +ifneq ($(strip $(USER_EDCS)),) +$(eval $(call EDJ_PROC_RAW,$(OUTPUT_DIR),$(USER_EDCS),$(USER_EDCS_IMAGE_DIRS),$(USER_EDCS_SOUND_DIRS),$(USER_EDCS_FONT_DIRS),EDJ_FILES)) +endif + +# Individual EDCs +ifneq ($(strip $(USER_EXT_EDC_KEYS)),) +$(foreach var,$(USER_EXT_EDC_KEYS),$(eval $(call EDJ_PROC_RAW,$(OUTPUT_DIR),$(USER_EXT_$(var)_EDCS),$(USER_EXT_$(var)_EDCS_IMAGE_DIRS),$(USER_EXT_$(var)_EDCS_SOUND_DIRS),$(USER_EXT_$(var)_EDCS_FONT_DIRS),EDJ_FILES))) +endif + + +include $(BUILD_ROOT)/build_po.mk + +MO_FILES := + +# Global POs +ifneq ($(strip $(USER_POS)),) +$(eval $(call MO_PROC_RAW,$(OUTPUT_DIR),$(USER_POS),$(APPID2),MO_FILES)) +endif + + +secondary-outputs : $(EDJ_FILES) $(MO_FILES) + +-include appendix.mk + +app_build : $(OUTPUT_DIR) $(APPFILE) secondary-outputs + @echo ========= done ========= + + +app_clean : + rm -f $(APPFILE) + rm -rf $(OUTPUT_DIR) + +build_version : + @echo makefile.mk : $(BUILD_SCRIPT_VERSION) diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/platform.mk b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/platform.mk new file mode 100755 index 0000000..3895d90 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/platform.mk @@ -0,0 +1,18 @@ +# Add inputs and outputs from these tool invocations to the build variables + +SYSROOT = $(SBI_SYSROOT) + +#USR_INCS := $(addprefix -I "$(SYSROOT),$(PLATFORM_INCS_EX)) +USR_INCS1 := $(addsuffix ",$(PLATFORM_INCS_EX)) +USR_INCS := $(addprefix -I "$(SYSROOT),$(USR_INCS1)) + +ifeq ($(strip $(PLATFORM_LIB_PATHS)),) +RS_LIB_PATHS := "$(SYSROOT)/usr/lib" +else +RS_LIB_PATHS1 := $(addsuffix ",$(PLATFORM_LIB_PATHS)) +RS_LIB_PATHS := $(addprefix -L "$(SYSROOT),$(RS_LIB_PATHS1)) +endif + +RS_LIBRARIES := $(addprefix -l,$(RS_LIBRARIES_EX)) + +PLATFORM_INCS = $(USR_INCS) -I "$(SDK_PATH)/library" diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/tooldef.mk b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/tooldef.mk new file mode 100755 index 0000000..c62243c --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Common/Build Script/Build/tooldef.mk @@ -0,0 +1,70 @@ +# Add inputs and outputs from these tool invocations to the build variables + +ifneq ($(strip $(SHELL_BIN)),) +SHELL = $(SHELL_BIN) +else +SHELL = sh +endif + +ifneq ($(strip $(MKDIR_BIN)),) +MKDIR = $(MKDIR_BIN) +MKDIR_OP = -p +else +MKDIR = mkdir +MKDIR_OP = -p +endif + +ifneq ($(strip $(UNAME_BIN)),) +UNAME = $(UNAME_BIN) +else +UNAME = uname +endif + +ifneq ($(strip $(M4_BIN)),) +M4 = $(M4_BIN) +else +M4 = m4 +endif + +ifneq ($(strip $(TR_BIN)),) +TR = $(TR_BIN) +else +TR = tr +endif + +ifneq ($(strip $(FIND_BIN)),) +FIND = $(FIND_BIN) +else +FIND = find +endif + +ifneq ($(strip $(SED_BIN)),) +SED = $(SED_BIN) +else +SED = sed +endif + +ifneq ($(strip $(GREP_BIN)),) +GREP = $(GREP_BIN) +else +GREP = grep +endif + +ifneq ($(strip $(EDJE_CC_BIN)),) +EDJE_CC = $(EDJE_CC_BIN) +else +EDJE_CC = edje_cc +endif + +ifneq ($(strip $(MSGFMT_BIN)),) +MSGFMT = $(MSGFMT_BIN) +else +MSGFMT = msgfmt +endif + +ifneq ($(strip $(CKSUM_BIN)),) +CKSUM = $(CKSUM_BIN) +else +CKSUM = cksum +endif + diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/description.xml b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/description.xml new file mode 100755 index 0000000..015ace6 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/description.xml @@ -0,0 +1,31 @@ + + + Service + 1.0 + + + tizen_iot + 5.0 + + + org.tizen.nativecore.buildArtefactType.app + False + + Template + + + screenshot.png + + + ic_s_service.png + ic_m_service_n.png + ic_m_service_s.png + ic_l_service.png + + + This is the empty template for developing service application + Note : + The standalone service application can't be submitted to Tizen Store. + Refer to 'Developing Multi-projects as a Combined Package' section of Getting Started page in the developer's site or help contents. + + diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/ic_l_service.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/ic_l_service.png new file mode 100755 index 0000000..50e796f Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/ic_l_service.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/ic_m_service_n.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/ic_m_service_n.png new file mode 100755 index 0000000..3c3c4ae Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/ic_m_service_n.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/ic_m_service_s.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/ic_m_service_s.png new file mode 100755 index 0000000..02c8c08 Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/ic_m_service_s.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/ic_s_service.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/ic_s_service.png new file mode 100755 index 0000000..b982002 Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/ic_s_service.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/project/inc/main.h b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/project/inc/main.h new file mode 100755 index 0000000..9d90e54 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/project/inc/main.h @@ -0,0 +1,12 @@ +#ifndef __$(appName)_H__ +#define __$(appName)_H__ + +#include + +#ifdef LOG_TAG +#undef LOG_TAG +#endif +#define LOG_TAG "$(appName)" + + +#endif /* __$(appName)_H__ */ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/project/project_def.prop b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/project/project_def.prop new file mode 100755 index 0000000..32b9507 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/project/project_def.prop @@ -0,0 +1,11 @@ +APPNAME = $(appName) + +type = app +profile = $(platform) + +USER_SRCS = src/$(appName).c +USER_DEFS = +USER_INC_DIRS = inc +USER_OBJS = +USER_LIBS = +USER_EDCS = diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/project/shared/res/mainmenu.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/project/shared/res/mainmenu.png new file mode 100755 index 0000000..9765b1b Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/project/shared/res/mainmenu.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/project/src/main.c b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/project/src/main.c new file mode 100755 index 0000000..fb520aa --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/project/src/main.c @@ -0,0 +1,64 @@ +#include +#include +#include "$(appName).h" + +bool service_app_create(void *data) +{ + // Todo: add your code here. + return true; +} + +void service_app_terminate(void *data) +{ + // Todo: add your code here. + return; +} + +void service_app_control(app_control_h app_control, void *data) +{ + // Todo: add your code here. + return; +} + +static void +service_app_lang_changed(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_LANGUAGE_CHANGED*/ + return; +} + +static void +service_app_region_changed(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_REGION_FORMAT_CHANGED*/ +} + +static void +service_app_low_battery(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_LOW_BATTERY*/ +} + +static void +service_app_low_memory(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_LOW_MEMORY*/ +} + +int main(int argc, char* argv[]) +{ + char ad[50] = {0,}; + service_app_lifecycle_callback_s event_callback; + app_event_handler_h handlers[5] = {NULL, }; + + event_callback.create = service_app_create; + event_callback.terminate = service_app_terminate; + event_callback.app_control = service_app_control; + + service_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, service_app_low_battery, &ad); + service_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, service_app_low_memory, &ad); + service_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, service_app_lang_changed, &ad); + service_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, service_app_region_changed, &ad); + + return service_app_main(argc, argv, &event_callback, ad); +} diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/project/tizen-manifest.xml b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/project/tizen-manifest.xml new file mode 100755 index 0000000..50d7917 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/project/tizen-manifest.xml @@ -0,0 +1,8 @@ + + + + + $(appName).png + + + diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/sample.xml b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/sample.xml new file mode 100755 index 0000000..b591722 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/sample.xml @@ -0,0 +1,52 @@ + + diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/screenshot.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/screenshot.png new file mode 100755 index 0000000..a8e5e1a Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/ServiceApp/screenshot.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/description.xml b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/description.xml new file mode 100755 index 0000000..5bdfe3a --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/description.xml @@ -0,0 +1,26 @@ + + + Shared Library + 1.0 + + + tizen_iot + 5.0 + + + org.tizen.nativecore.buildArtefactType.sharedLib + False + + Template + + + screenshot.png + + + ic_s_shared_library.png + ic_m_shared_library_n.png + ic_m_shared_library_s.png + ic_l_shared_library.png + + This is the template for developing a shared library + diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/ic_l_shared_library.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/ic_l_shared_library.png new file mode 100755 index 0000000..4802078 Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/ic_l_shared_library.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/ic_m_shared_library_n.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/ic_m_shared_library_n.png new file mode 100755 index 0000000..8be458e Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/ic_m_shared_library_n.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/ic_m_shared_library_s.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/ic_m_shared_library_s.png new file mode 100755 index 0000000..540f9ea Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/ic_m_shared_library_s.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/ic_s_shared_library.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/ic_s_shared_library.png new file mode 100755 index 0000000..cab3a49 Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/ic_s_shared_library.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/project/inc/lib.h b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/project/inc/lib.h new file mode 100755 index 0000000..9679ffb --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/project/inc/lib.h @@ -0,0 +1,21 @@ +#ifndef _$(appNameUpper)_H_ +#define _$(appNameUpper)_H_ + +/** + * This header file is included to define _EXPORT_. + */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +// This method is exported from $(appName).so +EXPORT_API bool tizen$(appName)(void); + +#ifdef __cplusplus +} +#endif +#endif // _$(appNameUpper)_H_ + diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/project/project_def.prop b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/project/project_def.prop new file mode 100755 index 0000000..1d9b99b --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/project/project_def.prop @@ -0,0 +1,11 @@ +APPNAME = $(appName) + +type = sharedLib +profile = $(platform) + +USER_SRCS = src/$(appName).c +USER_DEFS = +USER_INC_DIRS = inc +USER_OBJS = +USER_LIBS = +USER_EDCS = diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/project/src/lib.c b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/project/src/lib.c new file mode 100755 index 0000000..58f0af6 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/project/src/lib.c @@ -0,0 +1,11 @@ +/** + * This file contains the exported symbol. + */ +#include "$(appName).h" + +// This is an example of an exported method. +bool +tizen$(appName)(void) +{ + return true; +} diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/sample.xml b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/sample.xml new file mode 100755 index 0000000..f14ecfd --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/sample.xml @@ -0,0 +1,42 @@ + + diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/screenshot.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/screenshot.png new file mode 100755 index 0000000..a8e5e1a Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/SharedLibrary/screenshot.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/description.xml b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/description.xml new file mode 100755 index 0000000..64d2f91 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/description.xml @@ -0,0 +1,28 @@ + + + Basic UI with EDC + 1.0 + + + tizen_iot + 5.0 + + + org.tizen.nativecore.buildArtefactType.app + False + + Template + + + screenshot.png + + + ic_s_basic_ui_with_edc.png + ic_m_basic_ui_with_edc_n.png + ic_m_basic_ui_with_edc_s.png + ic_l_basic_ui_with_edc.png + + + This is an empty template project for developing UI Application with EDC. + + diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/ic_l_basic_ui_with_edc.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/ic_l_basic_ui_with_edc.png new file mode 100755 index 0000000..be76718 Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/ic_l_basic_ui_with_edc.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/ic_m_basic_ui_with_edc_n.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/ic_m_basic_ui_with_edc_n.png new file mode 100755 index 0000000..41d8e87 Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/ic_m_basic_ui_with_edc_n.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/ic_m_basic_ui_with_edc_s.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/ic_m_basic_ui_with_edc_s.png new file mode 100755 index 0000000..7160499 Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/ic_m_basic_ui_with_edc_s.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/ic_s_basic_ui_with_edc.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/ic_s_basic_ui_with_edc.png new file mode 100755 index 0000000..1be304b Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/ic_s_basic_ui_with_edc.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/project/inc/main.h b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/project/inc/main.h new file mode 100755 index 0000000..de3ffdc --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/project/inc/main.h @@ -0,0 +1,23 @@ +#ifndef __$(appName)_H__ +#define __$(appName)_H__ + +#include +#include +#include +#include +#include + +#ifdef LOG_TAG +#undef LOG_TAG +#endif +#define LOG_TAG "$(appName)" + +#if !defined(PACKAGE) +#define PACKAGE "$(packageName)" +#endif + +#define EDJ_FILE "edje/$(appName).edj" +#define GRP_MAIN "main" + + +#endif /* __$(appName)_H__ */ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/project/project_def.prop b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/project/project_def.prop new file mode 100755 index 0000000..d95f467 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/project/project_def.prop @@ -0,0 +1,11 @@ +APPNAME = $(appName) + +type = app +profile = $(platform) + +USER_SRCS = src/$(appName).c +USER_DEFS = +USER_INC_DIRS = inc +USER_OBJS = +USER_LIBS = +USER_EDCS = res/edje/$(appName).edc diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/project/res/edje/main.edc b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/project/res/edje/main.edc new file mode 100755 index 0000000..083dc42 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/project/res/edje/main.edc @@ -0,0 +1,14 @@ +collections { + group { name: "main"; + parts { + part { name: "txt_title"; + type: TEXT; + mouse_events: 0; + description { state: "default" 0.0; + text { text: "Hello Tizen"; font: "Tizen:style=regular"; size: 20; min: 1 1; align: 0.5 0; ellipsis: -1; } + color: 0 0 0 255; + } + } + } + } +} diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/project/shared/res/mainmenu.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/project/shared/res/mainmenu.png new file mode 100755 index 0000000..9765b1b Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/project/shared/res/mainmenu.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/project/src/main.c b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/project/src/main.c new file mode 100755 index 0000000..3fcf6c4 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/project/src/main.c @@ -0,0 +1,188 @@ +#include "$(appName).h" + +typedef struct appdata{ + Evas_Object* win; + Evas_Object* layout; + Evas_Object* conform; +} appdata_s; + +static void +win_delete_request_cb(void *data, Evas_Object *obj, void *event_info) +{ + ui_app_exit(); +} + +static void +layout_back_cb(void *data, Evas_Object *obj, void *event_info) +{ + appdata_s *ad = data; + /* Let window go to hide state. */ + elm_win_lower(ad->win); +} + +static void +app_get_resource(const char *edj_file_in, char *edj_path_out, int edj_path_max) +{ + char *res_path = app_get_resource_path(); + if (res_path) { + snprintf(edj_path_out, edj_path_max, "%s%s", res_path, edj_file_in); + free(res_path); + } +} + +static void +create_base_gui(appdata_s *ad) +{ + char edj_path[PATH_MAX] = {0, }; + + /* Window */ + /* Create and initialize elm_win. + elm_win is mandatory to manipulate window. */ + ad->win = elm_win_util_standard_add(PACKAGE, PACKAGE); + elm_win_conformant_set(ad->win, EINA_TRUE); + elm_win_autodel_set(ad->win, EINA_TRUE); + + if (elm_win_wm_rotation_supported_get(ad->win)) { + int rots[4] = { 0, 90, 180, 270 }; + elm_win_wm_rotation_available_rotations_set(ad->win, (const int *)(&rots), 4); + } + + evas_object_smart_callback_add(ad->win, "delete,request", win_delete_request_cb, NULL); + + /* Conformant */ + /* Create and initialize elm_conformant. + elm_conformant is mandatory for base gui to have proper size + when indicator or virtual keypad is visible. */ + ad->conform = elm_conformant_add(ad->win); + elm_win_indicator_mode_set(ad->win, ELM_WIN_INDICATOR_SHOW); + elm_win_indicator_opacity_set(ad->win, ELM_WIN_INDICATOR_OPAQUE); + evas_object_size_hint_weight_set(ad->conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(ad->win, ad->conform); + evas_object_show(ad->conform); + + /* Base Layout */ + /* Create an actual view of the base gui. + Modify this part to change the view. */ + app_get_resource(EDJ_FILE, edj_path, (int)PATH_MAX); + ad->layout = elm_layout_add(ad->win); + elm_layout_file_set(ad->layout, edj_path, GRP_MAIN); + evas_object_size_hint_weight_set(ad->layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + eext_object_event_callback_add(ad->layout, EEXT_CALLBACK_BACK, layout_back_cb, ad); + elm_object_content_set(ad->conform, ad->layout); + + /* Show window after base gui is set up */ + evas_object_show(ad->win); + +} + +static bool +app_create(void *data) +{ + /* Hook to take necessary actions before main event loop starts + Initialize UI resources and application's data + If this function returns true, the main loop of application starts + If this function returns false, the application is terminated */ + appdata_s *ad = data; + + create_base_gui(ad); + + return true; +} + +static void +app_control(app_control_h app_control, void *data) +{ + /* Handle the launch request. */ +} + +static void +app_pause(void *data) +{ + /* Take necessary actions when application becomes invisible. */ +} + +static void +app_resume(void *data) +{ + /* Take necessary actions when application becomes visible. */ +} + +static void +app_terminate(void *data) +{ + /* Release all resources. */ +} + +static void +ui_app_lang_changed(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_LANGUAGE_CHANGED*/ + + int ret; + char *language; + + ret = app_event_get_language(event_info, &language); + if (ret != APP_ERROR_NONE) { + dlog_print(DLOG_ERROR, LOG_TAG, "app_event_get_language() failed. Err = %d.", ret); + return; + } + + if (language != NULL) { + elm_language_set(language); + free(language); + } +} + +static void +ui_app_orient_changed(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_DEVICE_ORIENTATION_CHANGED*/ + return; +} + +static void +ui_app_region_changed(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_REGION_FORMAT_CHANGED*/ +} + +static void +ui_app_low_battery(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_LOW_BATTERY*/ +} + +static void +ui_app_low_memory(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_LOW_MEMORY*/ +} + +int +main(int argc, char *argv[]) +{ + appdata_s ad = {0,}; + int ret = 0; + + ui_app_lifecycle_callback_s event_callback = {0,}; + app_event_handler_h handlers[5] = {NULL, }; + + event_callback.create = app_create; + event_callback.terminate = app_terminate; + event_callback.pause = app_pause; + event_callback.resume = app_resume; + event_callback.app_control = app_control; + + ui_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, ui_app_low_battery, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, ui_app_low_memory, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, ui_app_orient_changed, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, ui_app_lang_changed, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, ui_app_region_changed, &ad); + + ret = ui_app_main(argc, argv, &event_callback, &ad); + if (ret != APP_ERROR_NONE) { + dlog_print(DLOG_ERROR, LOG_TAG, "ui_app_main() is failed. err = %d", ret); + } + + return ret; +} diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/project/tizen-manifest.xml b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/project/tizen-manifest.xml new file mode 100755 index 0000000..8d494f8 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/project/tizen-manifest.xml @@ -0,0 +1,8 @@ + + + + + $(appName).png + + + diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/sample.xml b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/sample.xml new file mode 100755 index 0000000..a2d9b96 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/sample.xml @@ -0,0 +1,56 @@ + + diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/screenshot.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/screenshot.png new file mode 100755 index 0000000..c5929a8 Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-edc-ui/screenshot.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/description.xml b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/description.xml new file mode 100755 index 0000000..adbc3d4 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/description.xml @@ -0,0 +1,28 @@ + + + Basic UI + 1.0 + + + tizen_iot + 5.0 + + + org.tizen.nativecore.buildArtefactType.app + False + + Template + + + screenshot.png + + + ic_s_efl.png + ic_m_efl_n.png + ic_m_efl_s.png + ic_l_efl.png + + + This is an empty template project for developing UI Application. + + diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/ic_l_efl.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/ic_l_efl.png new file mode 100755 index 0000000..ee3c66e Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/ic_l_efl.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/ic_m_efl_n.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/ic_m_efl_n.png new file mode 100755 index 0000000..fcd3bf9 Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/ic_m_efl_n.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/ic_m_efl_s.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/ic_m_efl_s.png new file mode 100755 index 0000000..b32888e Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/ic_m_efl_s.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/ic_s_efl.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/ic_s_efl.png new file mode 100755 index 0000000..3e5fcaa Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/ic_s_efl.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/project/inc/main.h b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/project/inc/main.h new file mode 100755 index 0000000..8690dae --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/project/inc/main.h @@ -0,0 +1,19 @@ +#ifndef __$(appName)_H__ +#define __$(appName)_H__ + +#include +#include +#include +#include +#include + +#ifdef LOG_TAG +#undef LOG_TAG +#endif +#define LOG_TAG "$(appName)" + +#if !defined(PACKAGE) +#define PACKAGE "$(packageName)" +#endif + +#endif /* __$(appName)_H__ */ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/project/project_def.prop b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/project/project_def.prop new file mode 100755 index 0000000..32b9507 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/project/project_def.prop @@ -0,0 +1,11 @@ +APPNAME = $(appName) + +type = app +profile = $(platform) + +USER_SRCS = src/$(appName).c +USER_DEFS = +USER_INC_DIRS = inc +USER_OBJS = +USER_LIBS = +USER_EDCS = diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/project/shared/res/mainmenu.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/project/shared/res/mainmenu.png new file mode 100755 index 0000000..9765b1b Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/project/shared/res/mainmenu.png differ diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/project/src/main.c b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/project/src/main.c new file mode 100755 index 0000000..a77f8b8 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/project/src/main.c @@ -0,0 +1,173 @@ +#include "$(appName).h" + +typedef struct appdata { + Evas_Object *win; + Evas_Object *conform; + Evas_Object *label; +} appdata_s; + +static void +win_delete_request_cb(void *data, Evas_Object *obj, void *event_info) +{ + ui_app_exit(); +} + +static void +win_back_cb(void *data, Evas_Object *obj, void *event_info) +{ + appdata_s *ad = data; + /* Let window go to hide state. */ + elm_win_lower(ad->win); +} + +static void +create_base_gui(appdata_s *ad) +{ + /* Window */ + /* Create and initialize elm_win. + elm_win is mandatory to manipulate window. */ + ad->win = elm_win_util_standard_add(PACKAGE, PACKAGE); + elm_win_autodel_set(ad->win, EINA_TRUE); + + if (elm_win_wm_rotation_supported_get(ad->win)) { + int rots[4] = { 0, 90, 180, 270 }; + elm_win_wm_rotation_available_rotations_set(ad->win, (const int *)(&rots), 4); + } + + evas_object_smart_callback_add(ad->win, "delete,request", win_delete_request_cb, NULL); + eext_object_event_callback_add(ad->win, EEXT_CALLBACK_BACK, win_back_cb, ad); + + /* Conformant */ + /* Create and initialize elm_conformant. + elm_conformant is mandatory for base gui to have proper size + when indicator or virtual keypad is visible. */ + ad->conform = elm_conformant_add(ad->win); + elm_win_indicator_mode_set(ad->win, ELM_WIN_INDICATOR_SHOW); + elm_win_indicator_opacity_set(ad->win, ELM_WIN_INDICATOR_OPAQUE); + evas_object_size_hint_weight_set(ad->conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(ad->win, ad->conform); + evas_object_show(ad->conform); + + /* Label */ + /* Create an actual view of the base gui. + Modify this part to change the view. */ + ad->label = elm_label_add(ad->conform); + elm_object_text_set(ad->label, "Hello Tizen"); + evas_object_size_hint_weight_set(ad->label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_content_set(ad->conform, ad->label); + + /* Show window after base gui is set up */ + evas_object_show(ad->win); +} + +static bool +app_create(void *data) +{ + /* Hook to take necessary actions before main event loop starts + Initialize UI resources and application's data + If this function returns true, the main loop of application starts + If this function returns false, the application is terminated */ + appdata_s *ad = data; + + create_base_gui(ad); + + return true; +} + +static void +app_control(app_control_h app_control, void *data) +{ + /* Handle the launch request. */ +} + +static void +app_pause(void *data) +{ + /* Take necessary actions when application becomes invisible. */ +} + +static void +app_resume(void *data) +{ + /* Take necessary actions when application becomes visible. */ +} + +static void +app_terminate(void *data) +{ + /* Release all resources. */ +} + +static void +ui_app_lang_changed(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_LANGUAGE_CHANGED*/ + + int ret; + char *language; + + ret = app_event_get_language(event_info, &language); + if (ret != APP_ERROR_NONE) { + dlog_print(DLOG_ERROR, LOG_TAG, "app_event_get_language() failed. Err = %d.", ret); + return; + } + + if (language != NULL) { + elm_language_set(language); + free(language); + } +} + +static void +ui_app_orient_changed(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_DEVICE_ORIENTATION_CHANGED*/ + return; +} + +static void +ui_app_region_changed(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_REGION_FORMAT_CHANGED*/ +} + +static void +ui_app_low_battery(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_LOW_BATTERY*/ +} + +static void +ui_app_low_memory(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_LOW_MEMORY*/ +} + +int +main(int argc, char *argv[]) +{ + appdata_s ad = {0,}; + int ret = 0; + + ui_app_lifecycle_callback_s event_callback = {0,}; + app_event_handler_h handlers[5] = {NULL, }; + + event_callback.create = app_create; + event_callback.terminate = app_terminate; + event_callback.pause = app_pause; + event_callback.resume = app_resume; + event_callback.app_control = app_control; + + ui_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, ui_app_low_battery, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, ui_app_low_memory, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, ui_app_orient_changed, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, ui_app_lang_changed, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, ui_app_region_changed, &ad); + + ret = ui_app_main(argc, argv, &event_callback, &ad); + if (ret != APP_ERROR_NONE) { + dlog_print(DLOG_ERROR, LOG_TAG, "app_main() is failed. err = %d", ret); + } + + return ret; +} diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/project/tizen-manifest.xml b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/project/tizen-manifest.xml new file mode 100755 index 0000000..8d494f8 --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/project/tizen-manifest.xml @@ -0,0 +1,8 @@ + + + + + $(appName).png + + + diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/sample.xml b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/sample.xml new file mode 100755 index 0000000..6599faf --- /dev/null +++ b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/sample.xml @@ -0,0 +1,51 @@ + + diff --git a/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/screenshot.png b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/screenshot.png new file mode 100755 index 0000000..176bf18 Binary files /dev/null and b/config-sdk/extension/core-add-ons/template/samples/Template/Native/basic-ui/screenshot.png differ diff --git a/config-sdk/extension/output/.wd b/config-sdk/extension/output/.wd new file mode 100644 index 0000000..e69de29 diff --git a/config-sdk/extension/rootstrap/data/.wd b/config-sdk/extension/rootstrap/data/.wd new file mode 100644 index 0000000..e69de29 diff --git a/config-sdk/extension/version_info b/config-sdk/extension/version_info new file mode 100644 index 0000000..a4366db --- /dev/null +++ b/config-sdk/extension/version_info @@ -0,0 +1,5 @@ +MAIN_VERSION="1.0" +MINOR_VERSION="0.0.1" +MAINTAINER="Woo Chang Kim" +SUPPORT_OS="ubuntu-32, ubuntu-64, windows-32, windows-64, macos-64" +BUILD_OS="ubuntu-64" diff --git a/config-sdk/make_extension.sh b/config-sdk/make_extension.sh new file mode 100755 index 0000000..e4463b6 --- /dev/null +++ b/config-sdk/make_extension.sh @@ -0,0 +1,166 @@ +#!/bin/bash + +if [ $# != 4 ] +then + echo "Usage : make_extension.sh " + echo " format of snapshot id : yyyymmdd.n" + echo " format of platform version : 4.0 or 5.0" + exit 1 +fi + +BB_LIST_FILE=$1 +EXT_NAME=$2 +VERSION=$3 +SNAPSHOT=$4 + +MAP_BB_RS_FILE_LOC=https://git.tizen.org/cgit/tools/building-blocks/plain/mapping-bb-rs.xml?h=tizen +MAP_BB_RS_FILE=mapping-bb-rs.xml + +download_mapping_file() +{ + if [ ! -e $MAP_BB_RS_FILE ] + then + wget -r -np -nd -P ./ $MAP_BB_RS_FILE_LOC -O ./$MAP_BB_RS_FILE + if [ $? != 0 ] + then + return $? + fi + fi + return 0 +} + +clean_files() +{ + rm -f $MAP_BB_RS_FILE +} + +RS_LIST_FILE="rs_xml.list" +TMP_RS_LIST_FILE="tmp_rs_xml.list" +make_rs_list_file() +{ + BB_LIST=`cat $BB_LIST_FILE` + echo -n "" > $TMP_RS_LIST_FILE + + for TBB in $BB_LIST + do + XPATH="//buildingblock[@name=\"${TBB}\"]/rs_info" + RS_LIST=`xmllint --xpath $XPATH $MAP_BB_RS_FILE` + if [ $? == 0 ] + then + echo $RS_LIST >> $TMP_RS_LIST_FILE + fi + done + + sed -e 's/<\/rs_info>/\n/g' $TMP_RS_LIST_FILE | sed -e 's///g' | sed -e '/^$/d' > $RS_LIST_FILE + rm -f $TMP_RS_LIST_FILE +} + +RS_RESOURCE=./rs_resource +RS_TBB=./rs_tbb +make_rs_tbb_directory() +{ +### make directory structure ### + rm -rf $RS_TBB + + DIR_LIST=`du $RS_RESOURCE | awk '{print $2}' | sed -e 's/rs_resource/rs_tbb/g'` + + mkdir $RS_TBB + for DIRX in $DIR_LIST + do + mkdir -p $DIRX + done + +### copy files ### + mkdir -p $RS_TBB/ + RS_LIST=`cat $RS_LIST_FILE` + + for RSXML in $RS_LIST + do + ORIGIN_LOC=`find $RS_RESOURCE -name $RSXML` + if [ $? == 0 ] + then + for ITEM in $ORIGIN_LOC + do + DEST_LOC=`echo $ITEM | sed -e 's/rs_resource/rs_tbb/g'` + echo "cp -f $ITEM $DEST_LOC" + cp -f $ITEM $DEST_LOC + done + else + echo "Warning : There is no xml file.($RSXML)" + fi + done +} + +CONFIG_FILE=iot_rs_config +# input : version, profile, snapshot +make_config_file() +{ +if [ $1 != "4.0" -a $1 != "5.0" ] +then + P_VER="5.0" +else + P_VER=$1 +fi + +PROFILE=$2 +SNAP=$3 + +echo "# Rootstrap configraution" > $CONFIG_FILE +echo "export PLATFORM_VERSION=\"$P_VER\"" >> $CONFIG_FILE +echo "export PLATFORM_PROFILE=\"$PROFILE\"" >> $CONFIG_FILE +if [ $P_VER = "5.0" ] +then +echo "export BASE_URL_PREFIX=\"http://download.tizen.org/snapshots/tizen/base/latest/\"" >> $CONFIG_FILE +echo "export BASE_URL_POSTFIX_TARGET=\"/repos/standard/packages/\"" >> $CONFIG_FILE +echo "export BASE_URL_POSTFIX_EMULATOR=\"/repos/standard/packages/\"" >> $CONFIG_FILE +echo "export SNAPSHOT_URL_PREFIX=\"http://download.tizen.org/snapshots/tizen/unified/tizen-unified_$SNAP/\"" >> $CONFIG_FILE +else +echo "export BASE_URL_PREFIX=\"http://download.tizen.org/snapshots/tizen/4.0-base/latest/\"" >> $CONFIG_FILE +echo "export BASE_URL_POSTFIX_TARGET=\"/repos/arm/packages/\"" >> $CONFIG_FILE +echo "export BASE_URL_POSTFIX_EMULATOR=\"/repos/emulator32/packages/\"" >> $CONFIG_FILE +echo "export SNAPSHOT_URL_PREFIX=\"http://download.tizen.org/snapshots/tizen/4.0-unified/tizen-4.0-unified_$SNAP/\"" >> $CONFIG_FILE +fi + +echo "export BASE_PKG_SVR_TARGET=\"\${BASE_URL_PREFIX}\${BASE_URL_POSTFIX_TARGET}\"" >> $CONFIG_FILE +echo "export BASE_PKG_SVR_EMULATOR=\"\${BASE_URL_PREFIX}\${BASE_URL_POSTFIX_EMULATOR}\"" >> $CONFIG_FILE + +echo "export SNAPSHOT_URL_POSTFIX_EMULATOR=\"/repos/emulator/packages/\"" >> $CONFIG_FILE +echo "export SNAPSHOT_URL_POSTFIX_TARGET=\"/repos/standard/packages/\"" >> $CONFIG_FILE + +echo "export RPM_PKG_SVR_EMULATOR=\"\${SNAPSHOT_URL_PREFIX}\${SNAPSHOT_URL_POSTFIX_EMULATOR}\"" >> $CONFIG_FILE +echo "export RPM_PKG_SVR_TARGET=\"\${SNAPSHOT_URL_PREFIX}\${SNAPSHOT_URL_POSTFIX_TARGET}\"" >> $CONFIG_FILE + +echo "# Wget ID/PW for Local Test" >> $CONFIG_FILE +echo "export ID=" >> $CONFIG_FILE +echo "export PW=" >> $CONFIG_FILE +} + +echo "1. Downlading a mapping file. (building-blocks to rs files)" +download_mapping_file + +if [ $? != 0 ] +then + echo "Downlading a mapping file is failed" + exit 2 +fi +echo "Downlading a mapping file is successful." + +echo "2. Making rs_xml list" +make_rs_list_file + +sync + +echo "3. Making rs_tbb directory" +make_rs_tbb_directory + +echo "4. Making config file" +make_config_file $VERSION $EXT_NAME $SNAPSHOT + +echo "5. Making rootstrap" +./make_rootstrap.sh -C $CONFIG_FILE -c -t ./rs_tbb + +echo "6. Making pakcage" +./package_rootstrap.sh -C $CONFIG_FILE + +echo "7. Merging all files" +./package_all.sh $EXT_NAME $VERSION diff --git a/config-sdk/make_rootstrap.sh b/config-sdk/make_rootstrap.sh new file mode 100755 index 0000000..58bb208 --- /dev/null +++ b/config-sdk/make_rootstrap.sh @@ -0,0 +1,397 @@ +#!/bin/bash + +SCRIPT_NAME="$(basename ${BASH_SOURCE[0]})" +SCRIPT_FULLPATH="$(readlink -f ${BASH_SOURCE[0]})" +SCRIPT_BASE="$(dirname ${SCRIPT_FULLPATH})" +SCRIPT_VER="0.0.2" + +CMD_RS_GEN="${SCRIPT_BASE}/script/rootstrap_gen_1.0.sh" +CMD_RS_INFO="${SCRIPT_BASE}/script/rootstrap_info_gen_1.0.sh" +CMD_RS_PLUGIN="${SCRIPT_BASE}/script/rootstrap_plugin_gen_1.0.sh" +CMD_API_FILTER="${SCRIPT_BASE}/script/api_filter.sh" + +DIR_INFO=".info" +DIR_RPM=".rpm" +DIR_PLUGIN=".plugin" +DIR_TMP=".tmp" +DIR_EMULATOR=".emulator" +DIR_TARGET=".target" +DIR_ZIP=".zip" + +PRIVATE_STRING="" + +LOGFILE="rs.log" + +if [ -e ${LOGFILE} ]; then + rm ${LOGFILE}; +fi + +touch ${LOGFILE} + +############################################################################### +# function log +############################################################################### +function log() +{ + printf "[${SCRIPT_NAME}:${BASH_LINENO[0]}] ${@}\n" +} + +############################################################################### +# function check_error +# $1 : Error code(integer) +# $2 : Error Message +# $3 : Error Xml File) +# Example : check_error $? "Fail to function" +############################################################################### +function check_error() +{ + if [ "$1" -ne "0" ]; then + printf "[${SCRIPT_NAME}:${BASH_LINENO[0]}] ERROR : $2 - exit code ($1) \n" 1>&2 + exit $1 + fi +} + +############################################################################### +# function remove_dir +# $@ : Files +# Example : remove_dir test_dir test_file +############################################################################### +function remove_dir () { + echo "remove dir : $@" + rm -rf $@ >/dev/null 2>&1 +} + +############################################################################### +## function callRootstrapGen +# $1 : emulator/target +# $2 : ${RPM_PKG_SVR_EMULATOR} +# $3 : ${BASE_PKG_SVR_EMULATOR} +# Example : callRootstrapGen emulator ${RPM_PKG_SVR_EMULATOR} ${BASE_PKG_SVR_EMULATOR} +############################################################################### +function callRootstrapGen () { + log "make rootstrap for ${1}..." 1>&2 + ROOTSTRAP_TYPE=${1}; + + if [[ -z ${3} ]] + then + FULL_RS_CMD="${CMD_RS_GEN} -t ${1} -u ${2} ${xmlList}" + else + FULL_RS_CMD="${CMD_RS_GEN} -t ${1} -u ${2} -b ${3} ${xmlList}" + fi + + FULL_RS_INFO_CMD="${CMD_RS_INFO} -t $1 -l ${xmlList} -p $PLATFORM_PROFILE -v $PLATFORM_VERSION" + + if [[ "${ROOTSTRAP_TYPE}" == "emulator" ]]; then + FULL_CMD_RS_PLUGIN_GEN="${CMD_RS_PLUGIN} -t ${ROOTSTRAP_TYPE} -i .info/$PLATFORM_PROFILE-$PLATFORM_VERSION-emulator.core.dev.xml -p ${PLATFORM_PROFILE} -v ${PLATFORM_VERSION}" + elif [[ "${ROOTSTRAP_TYPE}" == "target" ]]; then + FULL_CMD_RS_PLUGIN_GEN="${CMD_RS_PLUGIN} -t ${ROOTSTRAP_TYPE} -i .info/$PLATFORM_PROFILE-$PLATFORM_VERSION-device.core.dev.xml -p ${PLATFORM_PROFILE} -v ${PLATFORM_VERSION}" + else + exit 1; + fi + + if [[ ${DEBUG_MODE} == "1" ]] + then + log "$FULL_RS_CMD" + $FULL_RS_CMD + check_error $? "Fail to ${CMD_RS_GEN}" + + log "$FULL_RS_INFO_CMD" + $FULL_RS_INFO_CMD + check_error $? "Fail to ${CMD_RS_INFO}" + + log "$FULL_CMD_RS_PLUGIN_GEN" + $FULL_CMD_RS_PLUGIN_GEN + check_error $? "Fail to ${FULL_CMD_RS_PLUGIN_GEN}" + + else + if [[ -e ${LOGFILE} ]]; then + log "$FULL_RS_CMD" | tee -a ${LOGFILE} + fi + $FULL_RS_CMD >/dev/null + check_error $? "Fail to ${CMD_RS_GEN}" + + log "$FULL_RS_INFO_CMD" + $FULL_RS_INFO_CMD >/dev/null + check_error $? "Fail to ${CMD_RS_INFO}" + + log "$FULL_CMD_RS_PLUGIN_GEN" + $FULL_CMD_RS_PLUGIN_GEN >/dev/null + check_error $? "Fail to ${FULL_CMD_RS_PLUGIN_GEN}" + fi + + ##Append Snapshot + if [ -n "${SNAPSHOT_BASE}" ]; then + + log "ADD Snapshot : ${SNAPSHOT_BASE}" + + if [[ "${ROOTSTRAP_TYPE}" == "emulator" ]]; then + echo '' | tee -a .info/$PLATFORM_PROFILE-$PLATFORM_VERSION-emulator.core.dev.xml + elif [[ "${ROOTSTRAP_TYPE}" == "target" ]]; then + echo '' | tee -a .info/$PLATFORM_PROFILE-$PLATFORM_VERSION-device.core.dev.xml + fi + fi + + log "Done... [$SECONDS]Sec" 1>&2 +} + + +GLOBAL_ERROR="0" +OPT_TARGET=false +OPT_EMULATOR=false +OPT_DOWNLOAD_RPM=false +OPT_CLEAN=false +OPT_CONF="" + +############################################################################### +# function usage +############################################################################### +function usage () { +echo "$SCRIPT_NAME ($SCRIPT_VER) is script to make rootstrap using xml from OBS" + echo "Usage: $SCRIPT_NAME -C [] [