for (int i = 0 ; i < pAppList->GetCount(); i++)
{
pAppInfoImpl = dynamic_cast<_PackageAppInfoImpl*>(pAppList->GetAt(i));
-
if (pAppInfoImpl)
{
IMap* pNameList = pAppInfoImpl->GetNameList();
}
}
+ ArrayList* pFeatureList = pAppInfoImpl->GetAppFeatureList();
+ String glFrame = GetGlFrameValue(pFeatureList);
+
__pWriter->StartElement("ui-application");
__pWriter->WriteAttribute("appid", pAppInfoImpl->GetPackageName());
__pWriter->WriteAttribute("exec", binaryPath);
__pWriter->WriteAttribute("taskmanage", taskmanage);
__pWriter->WriteAttribute("multiple", "false");
__pWriter->WriteAttribute("type", type);
+ __pWriter->WriteAttribute("hw-acceleration", glFrame);
if (category.IsEmpty() == false)
{
return false;
}
+String
+ManifestGenerator::GetGlFrameValue(ArrayList* pFeatureList) const
+{
+ if (pFeatureList == null)
+ {
+ return "use-system-setting";
+ }
+
+ _AppFeatureInfoImpl* pFeature = null;
+ for (int i = 0 ; i < pFeatureList->GetCount(); i++)
+ {
+ pFeature = dynamic_cast<_AppFeatureInfoImpl*>(pFeatureList->GetAt(i));
+ if (pFeature == null)
+ {
+ return "use-system-setting";
+ }
+
+ if (pFeature->GetName() == L"GlFrame")
+ {
+ String value = pFeature->GetValue();
+ if (value == L"On")
+ {
+ return "use-GL";
+ }
+ else if (value == L"Off")
+ {
+ return "not-use-GL";
+ }
+ }
+ }
+
+ return "use-system-setting";
+}
+
bool
ManifestGenerator::WriteLanguageValue(IMap* pList, const String& element) const
{
ManifestHandler::OnUiAppElement(void)
{
XmlAttribute *pAttr = null;
- char *pExecutableName = null;
- char *pDefault = null;
- char *pMainmenuVisible = null;
- char *pCategory = null;
__pPackageAppInfoImpl = new _PackageAppInfoImpl;
TryReturn(__pPackageAppInfoImpl, false, "[osp-installer] __pPackageAppInfoImpl is null");
pAttr = GetAttribute();
TryReturn(pAttr, true, "[osp-installer] pAttr is null");
- pExecutableName = pAttr->Find("ExecutableName");
+ char* pExecutableName = pAttr->Find("ExecutableName");
if (pExecutableName == null)
{
pExecutableName = pAttr->Find("Name");
__pPackageAppInfoImpl->SetName(pExecutableName);
- pDefault = pAttr->Find("Default");
+ char* pDefault = pAttr->Find("Default");
if (pDefault)
{
__pPackageAppInfoImpl->SetDefault(pDefault);
__pPackageAppInfoImpl->SetType("UiApp");
- pMainmenuVisible = pAttr->Find("MainmenuVisible");
+ char* pMainmenuVisible = pAttr->Find("MainmenuVisible");
if (pMainmenuVisible)
{
if (strcasecmp(pMainmenuVisible, "True") == 0)
__pPackageAppInfoImpl->SetMainmenuVisible(false);
}
- _AppFeatureInfoImpl* pAppFeatureInfo = new _AppFeatureInfoImpl;
- TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
+ AddAppFeature("MainmenuVisible", pMainmenuVisible);
+ AppLogTag(OSP_INSTALLER, "<MainmenuVisible=%s>", pMainmenuVisible);
+ }
- pAppFeatureInfo->SetName("MainmenuVisible");
- pAppFeatureInfo->SetValue(pMainmenuVisible);
- __pPackageAppInfoImpl->AddAppFeature(*pAppFeatureInfo);
+ char* pGlFrame = pAttr->Find("GlFrame");
+ if (pGlFrame)
+ {
+ AddAppFeature("GlFrame", pGlFrame);
+ AppLogTag(OSP_INSTALLER, "<GlFrame=%s>", pGlFrame);
+ }
- AppLogTag(OSP_INSTALLER, "<MainmenuVisible=%s>", pMainmenuVisible);
+ char* pCategory = pAttr->Find("Category");
+ if (pCategory)
+ {
+ AppLogTag(OSP_INSTALLER, "<Category=%s>", pCategory);
+
+ CategoryType categoryType = InstallerUtil::GetCategoryType(pCategory);
+ __pPackageAppInfoImpl->SetAppFeature(categoryType);
}
String app_id;
-
if (__pContext->GetPackageNameType() == INSTALLER_PREFIX_TYPE_ORG)
{
app_id.Format(1024, PACKAGE_NAME_RULE_ORG, __pPackageInfoImpl->GetAppId().GetPointer(), pExecutableName);
__pPackageAppInfoImpl->SetPackageName(app_id);
- pCategory = pAttr->Find("Category");
- if (pCategory)
- {
- AppLogTag(OSP_INSTALLER, "<Category=%s>", pCategory);
-
- CategoryType categoryType = InstallerUtil::GetCategoryType(pCategory);
- __pPackageAppInfoImpl->SetAppFeature(categoryType);
- }
-
AppLogTag(OSP_INSTALLER, "app_id = %S", app_id.GetPointer());
AppLogTag(OSP_INSTALLER, "<UiApp Name=\"%s\" Default=\"%s\">", pExecutableName, pDefault ? pDefault:"False");
pMainmenuVisible = pAttr->Find("MainmenuVisible");
if (pMainmenuVisible)
{
- _AppFeatureInfoImpl* pAppFeatureInfo = new _AppFeatureInfoImpl;
- TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
-
- pAppFeatureInfo->SetName("MainmenuVisible");
- pAppFeatureInfo->SetValue(pMainmenuVisible);
- __pPackageAppInfoImpl->AddAppFeature(*pAppFeatureInfo);
-
+ AddAppFeature("MainmenuVisible", pMainmenuVisible);
AppLogTag(OSP_INSTALLER, "<MainmenuVisible=%s>", pMainmenuVisible);
}
pLaunchOnBoot = pAttr->Find("LaunchOnBoot");
if (pLaunchOnBoot)
{
- _AppFeatureInfoImpl* pAppFeatureInfo = new _AppFeatureInfoImpl;
- TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
-
- pAppFeatureInfo->SetName("LaunchOnBoot");
- pAppFeatureInfo->SetValue(pLaunchOnBoot);
-
- __pPackageAppInfoImpl->AddAppFeature(*pAppFeatureInfo);
-
+ AddAppFeature("LaunchOnBoot", pLaunchOnBoot);
AppLogTag(OSP_INSTALLER, "<LaunchOnBoot=%s>", pLaunchOnBoot);
}
pAutoRestart = pAttr->Find("AutoRestart");
if (pAutoRestart)
{
- _AppFeatureInfoImpl* pAppFeatureInfo = new _AppFeatureInfoImpl;
- TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
-
- pAppFeatureInfo->SetName("AutoRestart");
- pAppFeatureInfo->SetValue(pAutoRestart);
-
- __pPackageAppInfoImpl->AddAppFeature(*pAppFeatureInfo);
-
+ AddAppFeature("AutoRestart", pAutoRestart);
AppLogTag(OSP_INSTALLER, "<AutoRestart=%s>", pAutoRestart);
}
pRemoteUi = pAttr->Find("RemoteUi");
if (pRemoteUi)
{
- _AppFeatureInfoImpl* pAppFeatureInfo = new _AppFeatureInfoImpl;
- TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
-
- pAppFeatureInfo->SetName("RemoteUi");
- pAppFeatureInfo->SetValue(pRemoteUi);
-
- __pPackageAppInfoImpl->AddAppFeature(*pAppFeatureInfo);
-
+ AddAppFeature("RemoteUi", pRemoteUi);
AppLogTag(OSP_INSTALLER, "<RemoteUi=%s>", pRemoteUi);
}
+ char* pGlFrame = pAttr->Find("GlFrame");
+ if (pGlFrame)
+ {
+ AddAppFeature("GlFrame", pGlFrame);
+ AppLogTag(OSP_INSTALLER, "<GlFrame=%s>", pGlFrame);
+ }
+
String app_id;
if (__pContext->GetPackageNameType() == INSTALLER_PREFIX_TYPE_ORG)
return res;
}
+
+bool
+ManifestHandler::AddAppFeature(const Osp::Base::String& name, const Osp::Base::String& value)
+{
+ _AppFeatureInfoImpl* pAppFeatureInfo = new _AppFeatureInfoImpl;
+ TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
+
+ pAppFeatureInfo->SetName(name);
+ pAppFeatureInfo->SetValue(value);
+ __pPackageAppInfoImpl->AddAppFeature(*pAppFeatureInfo);
+
+ return true;
+}
+