summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDongeup Ham <dongeup.ham@samsung.com>2012-12-26 17:35:41 +0900
committerDongeup Ham <dongeup.ham@samsung.com>2012-12-26 17:35:41 +0900
commit7111af69a59fcfebeef7248b96f76c6e8f0a1eac (patch)
tree64be44a5e9fdef85d82be5bd9267ecd8937c4880 /src
parentb2fe89eebd0fc9e574402062d687e7ac5ae7ddca (diff)
downloadinstaller-7111af69a59fcfebeef7248b96f76c6e8f0a1eac.tar.gz
installer-7111af69a59fcfebeef7248b96f76c6e8f0a1eac.tar.bz2
installer-7111af69a59fcfebeef7248b96f76c6e8f0a1eac.zip
change icons path to shared-res
Change-Id: Ia4648369b5d61b1ae36b2ac6bfe9ffd87d2df201 Signed-off-by: Dongeup Ham <dongeup.ham@samsung.com>
Diffstat (limited to 'src')
-rwxr-xr-x[-rw-r--r--]src/Installer/PreloadedInstaller.cpp9
-rwxr-xr-xsrc/Manager/ConfigurationManager.cpp118
-rwxr-xr-xsrc/Manager/ConfigurationManager.h2
-rwxr-xr-x[-rw-r--r--]src/Manager/PermissionManager.cpp7
-rwxr-xr-xsrc/XmlHandler/ManifestGenerator.cpp6
5 files changed, 76 insertions, 66 deletions
diff --git a/src/Installer/PreloadedInstaller.cpp b/src/Installer/PreloadedInstaller.cpp
index dc83311..5e3679d 100644..100755
--- a/src/Installer/PreloadedInstaller.cpp
+++ b/src/Installer/PreloadedInstaller.cpp
@@ -21,6 +21,7 @@
#include <FBaseLog.h>
#include <FIoDirectory.h>
+#include <FIoFile.h>
#include "PreloadedInstaller.h"
#include "InstallerUtil.h"
@@ -91,8 +92,12 @@ PreloadedInstaller::OnInit(void)
destPath = destRootPath + DIR_LIB;
InstallerUtil::CreateSymlink(srcPath, destPath);
- srcPath = path + DIR_ICONS;
- destPath = destRootPath + DIR_ICONS;
+ srcPath = path + DIR_SHARED_RES;
+ destPath = destRootPath + DIR_SHARED_RES;
+ if (File::IsFileExist(srcPath) == false)
+ {
+ srcPath = path + DIR_ICONS;
+ }
InstallerUtil::CreateSymlink(srcPath, destPath);
srcPath = path + DIR_SETTING;
diff --git a/src/Manager/ConfigurationManager.cpp b/src/Manager/ConfigurationManager.cpp
index 203d51b..65bf975 100755
--- a/src/Manager/ConfigurationManager.cpp
+++ b/src/Manager/ConfigurationManager.cpp
@@ -578,65 +578,65 @@ ConfigurationManager::CreateSystemXmlFile(InstallationContext* pContext)
return ret;
}
-bool
-ConfigurationManager::CreateHybridServiceDesktopFile(InstallationContext* pContext)
-{
- AppLogTag(OSP_INSTALLER, "HybridServiceDesktopFile - START");
-
- bool ret = true;
- _PackageInfoImpl *pPackageInfoImpl = pContext->GetPackageInfoImpl();
- _PackageAppInfoImpl* pAppInfoImpl = null;
- ArrayList* pAppList = null;
- pAppList = pPackageInfoImpl->GetAppInfoList();
-
- for (int i = 0 ; i < pAppList->GetCount(); i++)
- {
- pAppInfoImpl = dynamic_cast<_PackageAppInfoImpl*>(pAppList->GetAt(i));
-
- if (pAppInfoImpl)
- {
- String name;
- name.Format(1024, L"%ls", pPackageInfoImpl->GetAppName().GetPointer());
-
- String binaryPath;
- binaryPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_BIN, pAppInfoImpl->GetName().GetPointer());
-
- String iconPath;
- iconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_ICONS, pAppInfoImpl->GetMainmenuIcon().GetPointer());
-
- String version;
- version.Format(1024, L"%ls", pPackageInfoImpl->GetAppVersion().GetPointer());
-
- String desktop;
- desktop.Format(1024, L"[Desktop Entry]\n"
- "Name=%ls\n"
- "Name[en_GB]=%ls\n"
- "Type=Application\n"
- "Exec=%ls\n"
- "Icon=%ls\n"
- "Version=%ls\n"
- "NoDisplay=true\n"
- "X-TIZEN-TaskManage=False\n"
- "X-TIZEN-PackageType=tpk\n",
- name.GetPointer(), name.GetPointer(), binaryPath.GetPointer(), iconPath.GetPointer(), version.GetPointer());
-
- String desktopPath;
- desktopPath.Format(1024, L"/opt/share/applications/%ls.desktop", pAppInfoImpl->GetPackageName().GetPointer());
-
- if (File::IsFileExist(desktopPath) == true)
- {
- AppLogTag(OSP_INSTALLER, "removing desktop filePath=[%ls]", desktopPath.GetPointer());
- InstallerUtil::Remove(desktopPath);
- }
-
- CreateInfoFile(desktopPath, &desktop);
- }
- }
-
- AppLogTag(OSP_INSTALLER, "HybridServiceDesktopFile - END");
-
- return ret;
-}
+//bool
+//ConfigurationManager::CreateHybridServiceDesktopFile(InstallationContext* pContext)
+//{
+// AppLogTag(OSP_INSTALLER, "HybridServiceDesktopFile - START");
+//
+// bool ret = true;
+// _PackageInfoImpl *pPackageInfoImpl = pContext->GetPackageInfoImpl();
+// _PackageAppInfoImpl* pAppInfoImpl = null;
+// ArrayList* pAppList = null;
+// pAppList = pPackageInfoImpl->GetAppInfoList();
+//
+// for (int i = 0 ; i < pAppList->GetCount(); i++)
+// {
+// pAppInfoImpl = dynamic_cast<_PackageAppInfoImpl*>(pAppList->GetAt(i));
+//
+// if (pAppInfoImpl)
+// {
+// String name;
+// name.Format(1024, L"%ls", pPackageInfoImpl->GetAppName().GetPointer());
+//
+// String binaryPath;
+// binaryPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_BIN, pAppInfoImpl->GetName().GetPointer());
+//
+// String iconPath;
+// iconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_ICONS, pAppInfoImpl->GetMainmenuIcon().GetPointer());
+//
+// String version;
+// version.Format(1024, L"%ls", pPackageInfoImpl->GetAppVersion().GetPointer());
+//
+// String desktop;
+// desktop.Format(1024, L"[Desktop Entry]\n"
+// "Name=%ls\n"
+// "Name[en_GB]=%ls\n"
+// "Type=Application\n"
+// "Exec=%ls\n"
+// "Icon=%ls\n"
+// "Version=%ls\n"
+// "NoDisplay=true\n"
+// "X-TIZEN-TaskManage=False\n"
+// "X-TIZEN-PackageType=tpk\n",
+// name.GetPointer(), name.GetPointer(), binaryPath.GetPointer(), iconPath.GetPointer(), version.GetPointer());
+//
+// String desktopPath;
+// desktopPath.Format(1024, L"/opt/share/applications/%ls.desktop", pAppInfoImpl->GetPackageName().GetPointer());
+//
+// if (File::IsFileExist(desktopPath) == true)
+// {
+// AppLogTag(OSP_INSTALLER, "removing desktop filePath=[%ls]", desktopPath.GetPointer());
+// InstallerUtil::Remove(desktopPath);
+// }
+//
+// CreateInfoFile(desktopPath, &desktop);
+// }
+// }
+//
+// AppLogTag(OSP_INSTALLER, "HybridServiceDesktopFile - END");
+//
+// return ret;
+//}
bool
ConfigurationManager::MergeToSystemXmlFile(const String& systemXmlPath, const String& webXmlPath, const String& serviceXmlPath)
diff --git a/src/Manager/ConfigurationManager.h b/src/Manager/ConfigurationManager.h
index 3f409e8..f17aa4c 100755
--- a/src/Manager/ConfigurationManager.h
+++ b/src/Manager/ConfigurationManager.h
@@ -53,7 +53,7 @@ public:
private:
bool CreateSystemXmlFile(InstallationContext* pContext);
- bool CreateHybridServiceDesktopFile(InstallationContext* pContext);
+ // bool CreateHybridServiceDesktopFile(InstallationContext* pContext);
bool MergeToSystemXmlFile(const Tizen::Base::String& systemXmlPath, const Tizen::Base::String& webXmlPath,const Tizen::Base::String& serviceXmlPath);
bool CreateInfoFile(const Tizen::Base::String& filePath, const Tizen::Base::String* pContext);
diff --git a/src/Manager/PermissionManager.cpp b/src/Manager/PermissionManager.cpp
index c021719..e5efd97 100644..100755
--- a/src/Manager/PermissionManager.cpp
+++ b/src/Manager/PermissionManager.cpp
@@ -83,7 +83,12 @@ PermissionManager::SetDirectory(InstallationContext* pContext)
InstallerUtil::ChangeDirectoryPermission(destPath, S_IRUSR | S_IXUSR);
// appRoot/icons(rx for app)
- destPath = appRootPath + DIR_ICONS;
+ destPath = appRootPath + DIR_SHARED_RES;
+ if (File::IsFileExist(destPath) == false)
+ {
+ String iconPath = appRootPath + DIR_ICONS;
+ InstallerUtil::CreateSymlink(iconPath, destPath);
+ }
InstallerUtil::ChangeDirectoryPermission(destPath, S_IRUSR | S_IXUSR);
// appRoot/contents(rx for app)
diff --git a/src/XmlHandler/ManifestGenerator.cpp b/src/XmlHandler/ManifestGenerator.cpp
index db6714c..1c7250c 100755
--- a/src/XmlHandler/ManifestGenerator.cpp
+++ b/src/XmlHandler/ManifestGenerator.cpp
@@ -277,7 +277,7 @@ ManifestGenerator::WriteLiveboxes(_PackageAppInfoImpl* pAppInfoImpl) const
if (pLiveboxInfo->GetIcon().IsEmpty() == false)
{
String liveboxIcon;
- liveboxIcon.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_ICONS, pLiveboxInfo->GetIcon().GetPointer());
+ liveboxIcon.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, pLiveboxInfo->GetIcon().GetPointer());
__pWriter->StartElement("icon");
__pWriter->WriteString(liveboxIcon);
@@ -471,7 +471,7 @@ ManifestGenerator::WriteApp(int index, Tizen::App::Package::_PackageAppInfoImpl*
if (pAppInfoImpl->GetMainmenuIcon().IsEmpty() == false)
{
String iconPath;
- iconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_ICONS, pAppInfoImpl->GetMainmenuIcon().GetPointer());
+ iconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, pAppInfoImpl->GetMainmenuIcon().GetPointer());
__pWriter->StartElement("icon");
__pWriter->WriteString(iconPath);
@@ -575,7 +575,7 @@ ManifestGenerator::WriteApp(int index, Tizen::App::Package::_PackageAppInfoImpl*
if (pAppInfoImpl->GetMainmenuIcon().IsEmpty() == false)
{
String iconPath;
- iconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_ICONS, pAppInfoImpl->GetMainmenuIcon().GetPointer());
+ iconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, pAppInfoImpl->GetMainmenuIcon().GetPointer());
__pWriter->StartElement("icon");
__pWriter->WriteString(iconPath);