From: Adeel Kazmi Date: Fri, 10 Dec 2021 16:01:21 +0000 (+0000) Subject: Separate RPMs for style files & images X-Git-Tag: dali_2.1.3~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F66%2F267866%2F2;p=platform%2Fcore%2Fuifw%2Fdali-demo.git Separate RPMs for style files & images Change-Id: Idef5cbccc4f4d62898543183179bfba384b5961d --- diff --git a/.gitignore b/.gitignore index 8dbb871..4709d40 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,6 @@ dali-builder /build/desktop /packaging/home* *.mo -demo-theme.json simple-image-wall.js /shared/resources-location.cpp /build/tizen/documentation.list diff --git a/packaging/com.samsung.dali-demo.spec b/packaging/com.samsung.dali-demo.spec index c5c7532..8798782 100755 --- a/packaging/com.samsung.dali-demo.spec +++ b/packaging/com.samsung.dali-demo.spec @@ -30,6 +30,26 @@ The OpenGLES Canvas Core Demo is a collection of examples and demonstrations of the capability of the toolkit. ############################## +# Resources +############################## + +%package resources_mobile +Summary: Specific resource files for a 720x1280 display on Tizen Mobile +Requires: %{name} = %{version}-%{release} +Conflicts: %{name}-resources_rpi +%description resources_mobile +dali-demo specific resource files for a 720x1280 display on Tizen Mobile +Contains style / style images + +%package resources_rpi +Summary: Specific resource files for a 1920x1080 display on Raspberry Pi 4 +Requires: %{name} = %{version}-%{release} +Conflicts: %{name}-resources_mobile +%description resources_rpi +dali-demo specific resource files for a 1920x1080 display on Raspberry Pi 4 +Contains style / style images + +############################## # Preparation ############################## %prep @@ -99,6 +119,7 @@ mkdir -p %{buildroot}%{smack_rule_dir} cp -f %{_builddir}/%{name}-%{version}/%{name}.rule %{buildroot}%{smack_rule_dir} %endif +cp -rf %{_builddir}/%{name}-%{version}/resources/style/rpi %{buildroot}/%{dali_app_res_dir}/style_rpi ############################## # Post Install @@ -107,6 +128,26 @@ cp -f %{_builddir}/%{name}-%{version}/%{name}.rule %{buildroot}%{smack_rule_dir} /sbin/ldconfig exit 0 +%post resources_rpi +pushd %{dali_app_res_dir} +rm -rf style +mv style_rpi style +popd + +############################## +# Pre Uninstall +############################## + +%preun resources_rpi +case "$1" in + 0) + %preun resources_rpi + pushd %{dali_app_res_dir} + mv style style_rpi + popd + ;; +esac + ############################## # Post Uninstall ############################## @@ -136,8 +177,6 @@ exit 0 %{dali_app_res_dir}/models/* %{dali_app_res_dir}/scripts/* %{dali_app_res_dir}/shaders/* -%{dali_app_res_dir}/style/* -%{dali_app_res_dir}/style/images/* %{dali_xml_file_dir}/%{name}.xml %{dali_icon_dir}/* %{locale_dir}/* @@ -145,3 +184,23 @@ exit 0 %config %{smack_rule_dir}/%{name}.rule %endif %license LICENSE + +%files resources_mobile +%if 0%{?enable_dali_smack_rules} +%manifest com.samsung.dali-demo.manifest-smack +%else +%manifest com.samsung.dali-demo.manifest +%endif +%defattr(-,root,root,-) +%{dali_app_res_dir}/style/* +%{dali_app_res_dir}/style/images/* + +%files resources_rpi +%if 0%{?enable_dali_smack_rules} +%manifest com.samsung.dali-demo.manifest-smack +%else +%manifest com.samsung.dali-demo.manifest +%endif +%defattr(-,root,root,-) +%{dali_app_res_dir}/style_rpi/* +%{dali_app_res_dir}/style_rpi/images/* diff --git a/resources/style/rpi/demo-theme.json b/resources/style/rpi/demo-theme.json new file mode 100644 index 0000000..2405e72 --- /dev/null +++ b/resources/style/rpi/demo-theme.json @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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. + * + */ + +{ + "includes": + [ + "{APPLICATION_RESOURCE_PATH}/style/base-theme.json" + ], + + "styles": + { + "DemoTile": + { + "styles":[ "DemoTileBase" ] + }, + + "LauncherBackground": + { + "background": + { + "visualType": "GRADIENT", + "center": [240, 400], + "radius": 932, + "units": "USER_SPACE", + "stopColor": [[0.247,0.38,0.52,1.0],[0.055,0.18,0.286,1.0]] + } + }, + + "BubbleColor1": + { + "color": [ 0.3255, 0.3412, 0.6353, 0.32 ] + }, + + "BubbleColor2": + { + "color": [ 0.3647, 0.7569, 0.8157, 0.32 ] + }, + + "BubbleColor3": + { + "color": [ 0.3804, 0.7412, 0.6510, 0.32 ] + }, + + "BubbleColor4": + { + "color": [ 1, 1, 1, 0.13 ] + } + + } +}