summaryrefslogtreecommitdiff
path: root/src/Manager
diff options
context:
space:
mode:
authorDuyoung Jang <duyoung.jang@samsung.com>2012-10-10 19:35:04 +0900
committerDuyoung Jang <duyoung.jang@samsung.com>2012-10-10 19:35:04 +0900
commit3efabba92b137535498ec40e5e94ed9e75ebe542 (patch)
tree655898e5d51d96913ea852684391bc4e672011dd /src/Manager
parent5bba03dd48a930243c475ed860dea850bef2a75f (diff)
downloadinstaller-3efabba92b137535498ec40e5e94ed9e75ebe542.tar.gz
installer-3efabba92b137535498ec40e5e94ed9e75ebe542.tar.bz2
installer-3efabba92b137535498ec40e5e94ed9e75ebe542.zip
Apply category for ime, home-screen, lock-screen
Change-Id: Ifda8a6d7f69fd3db673f5d880d87b1e621d7d174
Diffstat (limited to 'src/Manager')
-rwxr-xr-xsrc/Manager/ConfigurationManager.cpp56
-rwxr-xr-xsrc/Manager/ConfigurationManager.h1
2 files changed, 57 insertions, 0 deletions
diff --git a/src/Manager/ConfigurationManager.cpp b/src/Manager/ConfigurationManager.cpp
index 525b029..56971dd 100755
--- a/src/Manager/ConfigurationManager.cpp
+++ b/src/Manager/ConfigurationManager.cpp
@@ -27,6 +27,8 @@
#include <FBaseUtilStringUtil.h>
#include <FIoFile.h>
+#include <FIoDirectory.h>
+#include <FApp_Aul.h>
#include <FApp_PackageInfoImpl.h>
#include <FApp_PackageManagerImpl.h>
#include <FBase_StringConverter.h>
@@ -156,6 +158,27 @@ ConfigurationManager::CreateFile(InstallationContext* pContext)
uiScalabilityInfoFile.Format(1024, L"%ls%ls", rootPath.GetPointer(), UISCALABILITY_INFO_FILE);
CreateInfoFile(uiScalabilityInfoFile, &uiScalability);
+
+ if (pContext->GetCategory().IsEmpty() == false)
+ {
+ String category = pContext->GetCategory();
+ category.ToLowerCase();
+
+ int type = _Aul::GetAppType(category);
+
+ if (category == L"ime")
+ {
+ CreateImeSymlink(binaryPath, appName);
+ }
+
+ String typeInfo;
+ typeInfo.Format(1024, L"%d", type);
+
+ String typeInfoFile;
+ typeInfoFile.Format(1024, L"%ls%ls", rootPath.GetPointer(), TYPE_INFO_FILE);
+
+ CreateInfoFile(typeInfoFile, &typeInfo);
+ }
}
else if (appType == L"ServiceApp")
{
@@ -405,6 +428,39 @@ ConfigurationManager::CreateInfoFile(const String& filePath, const String* pCont
}
bool
+ConfigurationManager::CreateImeSymlink(const String& binaryPath, const String& appName)
+{
+ bool res = true;
+ int err = 0;
+ const char* pExePath = null;
+ const char* pSymlinkPath = null;
+
+ Directory::Create(IME_PATH, true);
+
+ String exePath;
+ exePath.Format(1024, L"%ls.exe", binaryPath.GetPointer());
+
+ String symlinkPath;
+ symlinkPath.Format(1024, L"%s/%ls.so", IME_PATH, appName.GetPointer());
+
+ pExePath = _StringConverter::CopyToCharArrayN(exePath);
+ TryCatch(pExePath, res = false, "[osp-installer] pExePath is null");
+
+ pSymlinkPath = _StringConverter::CopyToCharArrayN(symlinkPath);
+ TryCatch(pSymlinkPath, res = false, "[osp-installer] pSymlinkPath is null");
+
+ err = symlink(pExePath, pSymlinkPath);
+
+ AppLogTag(OSP_INSTALLER, "[%s] -> [%s]", pSymlinkPath, pExePath);
+
+CATCH:
+ delete[] pExePath;
+ delete[] pSymlinkPath;
+
+ return res;
+}
+
+bool
ConfigurationManager::FindPrivilege(InstallationContext* pContext, const String& privilege) const
{
TryReturn(pContext, false, "[osp-installer] pContext is null.");
diff --git a/src/Manager/ConfigurationManager.h b/src/Manager/ConfigurationManager.h
index d5e7dc9..f4a7111 100755
--- a/src/Manager/ConfigurationManager.h
+++ b/src/Manager/ConfigurationManager.h
@@ -49,6 +49,7 @@ private:
bool CreateSystemXmlFile(InstallationContext* pContext);
bool CreateHybridServiceDesktopFile(InstallationContext* pContext);
bool CreateInfoFile(const Osp::Base::String& filePath, const Osp::Base::String* pContext);
+ bool CreateImeSymlink(const Osp::Base::String& binaryPath, const Osp::Base::String& appName);
bool FindPrivilege(InstallationContext* pContext, const Osp::Base::String& privilege) const;
}; // ConfigurationManager