Commit acf5d6b34fa6e218c2bf79568b25c6b848e5a3d0

Authored by Adeel Kazmi
1 parent bf93adfc

Separate RPMs for style files & images

Change-Id: Idef5cbccc4f4d62898543183179bfba384b5961d
.gitignore
... ... @@ -36,7 +36,6 @@ dali-builder
36 36 /build/desktop
37 37 /packaging/home*
38 38 *.mo
39   -demo-theme.json
40 39 simple-image-wall.js
41 40 /shared/resources-location.cpp
42 41 /build/tizen/documentation.list
... ...
packaging/com.samsung.dali-demo.spec
... ... @@ -30,6 +30,26 @@ The OpenGLES Canvas Core Demo is a collection of examples and demonstrations
30 30 of the capability of the toolkit.
31 31  
32 32 ##############################
  33 +# Resources
  34 +##############################
  35 +
  36 +%package resources_mobile
  37 +Summary: Specific resource files for a 720x1280 display on Tizen Mobile
  38 +Requires: %{name} = %{version}-%{release}
  39 +Conflicts: %{name}-resources_rpi
  40 +%description resources_mobile
  41 +dali-demo specific resource files for a 720x1280 display on Tizen Mobile
  42 +Contains style / style images
  43 +
  44 +%package resources_rpi
  45 +Summary: Specific resource files for a 1920x1080 display on Raspberry Pi 4
  46 +Requires: %{name} = %{version}-%{release}
  47 +Conflicts: %{name}-resources_mobile
  48 +%description resources_rpi
  49 +dali-demo specific resource files for a 1920x1080 display on Raspberry Pi 4
  50 +Contains style / style images
  51 +
  52 +##############################
33 53 # Preparation
34 54 ##############################
35 55 %prep
... ... @@ -99,6 +119,7 @@ mkdir -p %{buildroot}%{smack_rule_dir}
99 119 cp -f %{_builddir}/%{name}-%{version}/%{name}.rule %{buildroot}%{smack_rule_dir}
100 120 %endif
101 121  
  122 +cp -rf %{_builddir}/%{name}-%{version}/resources/style/rpi %{buildroot}/%{dali_app_res_dir}/style_rpi
102 123  
103 124 ##############################
104 125 # Post Install
... ... @@ -107,6 +128,26 @@ cp -f %{_builddir}/%{name}-%{version}/%{name}.rule %{buildroot}%{smack_rule_dir}
107 128 /sbin/ldconfig
108 129 exit 0
109 130  
  131 +%post resources_rpi
  132 +pushd %{dali_app_res_dir}
  133 +rm -rf style
  134 +mv style_rpi style
  135 +popd
  136 +
  137 +##############################
  138 +# Pre Uninstall
  139 +##############################
  140 +
  141 +%preun resources_rpi
  142 +case "$1" in
  143 + 0)
  144 + %preun resources_rpi
  145 + pushd %{dali_app_res_dir}
  146 + mv style style_rpi
  147 + popd
  148 + ;;
  149 +esac
  150 +
110 151 ##############################
111 152 # Post Uninstall
112 153 ##############################
... ... @@ -136,8 +177,6 @@ exit 0
136 177 %{dali_app_res_dir}/models/*
137 178 %{dali_app_res_dir}/scripts/*
138 179 %{dali_app_res_dir}/shaders/*
139   -%{dali_app_res_dir}/style/*
140   -%{dali_app_res_dir}/style/images/*
141 180 %{dali_xml_file_dir}/%{name}.xml
142 181 %{dali_icon_dir}/*
143 182 %{locale_dir}/*
... ... @@ -145,3 +184,23 @@ exit 0
145 184 %config %{smack_rule_dir}/%{name}.rule
146 185 %endif
147 186 %license LICENSE
  187 +
  188 +%files resources_mobile
  189 +%if 0%{?enable_dali_smack_rules}
  190 +%manifest com.samsung.dali-demo.manifest-smack
  191 +%else
  192 +%manifest com.samsung.dali-demo.manifest
  193 +%endif
  194 +%defattr(-,root,root,-)
  195 +%{dali_app_res_dir}/style/*
  196 +%{dali_app_res_dir}/style/images/*
  197 +
  198 +%files resources_rpi
  199 +%if 0%{?enable_dali_smack_rules}
  200 +%manifest com.samsung.dali-demo.manifest-smack
  201 +%else
  202 +%manifest com.samsung.dali-demo.manifest
  203 +%endif
  204 +%defattr(-,root,root,-)
  205 +%{dali_app_res_dir}/style_rpi/*
  206 +%{dali_app_res_dir}/style_rpi/images/*
... ...
resources/style/rpi/demo-theme.json 0 → 100644
  1 +/*
  2 + * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  3 + *
  4 + * Licensed under the Apache License, Version 2.0 (the "License");
  5 + * you may not use this file except in compliance with the License.
  6 + * You may obtain a copy of the License at
  7 + *
  8 + * http://www.apache.org/licenses/LICENSE-2.0
  9 + *
  10 + * Unless required by applicable law or agreed to in writing, software
  11 + * distributed under the License is distributed on an "AS IS" BASIS,
  12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 + * See the License for the specific language governing permissions and
  14 + * limitations under the License.
  15 + *
  16 + */
  17 +
  18 +{
  19 + "includes":
  20 + [
  21 + "{APPLICATION_RESOURCE_PATH}/style/base-theme.json"
  22 + ],
  23 +
  24 + "styles":
  25 + {
  26 + "DemoTile":
  27 + {
  28 + "styles":[ "DemoTileBase" ]
  29 + },
  30 +
  31 + "LauncherBackground":
  32 + {
  33 + "background":
  34 + {
  35 + "visualType": "GRADIENT",
  36 + "center": [240, 400],
  37 + "radius": 932,
  38 + "units": "USER_SPACE",
  39 + "stopColor": [[0.247,0.38,0.52,1.0],[0.055,0.18,0.286,1.0]]
  40 + }
  41 + },
  42 +
  43 + "BubbleColor1":
  44 + {
  45 + "color": [ 0.3255, 0.3412, 0.6353, 0.32 ]
  46 + },
  47 +
  48 + "BubbleColor2":
  49 + {
  50 + "color": [ 0.3647, 0.7569, 0.8157, 0.32 ]
  51 + },
  52 +
  53 + "BubbleColor3":
  54 + {
  55 + "color": [ 0.3804, 0.7412, 0.6510, 0.32 ]
  56 + },
  57 +
  58 + "BubbleColor4":
  59 + {
  60 + "color": [ 1, 1, 1, 0.13 ]
  61 + }
  62 +
  63 + }
  64 +}
... ...