summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinc/InstallerDefs.h3
-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
6 files changed, 78 insertions, 67 deletions
diff --git a/inc/InstallerDefs.h b/inc/InstallerDefs.h
index 0b37007..759f7e7 100755
--- a/inc/InstallerDefs.h
+++ b/inc/InstallerDefs.h
@@ -21,13 +21,14 @@
#ifndef _INSTALLER_DEFS_H_
#define _INSTALLER_DEFS_H_
-#define OSP_INSTALLER_VERSION "osp-installer version = [2012/12/26]_RC[1]"
+#define OSP_INSTALLER_VERSION "osp-installer version = [2012/12/26]_RC[2]"
#define DIR_BIN L"/bin"
#define DIR_INFO L"/info"
#define DIR_RES L"/res"
#define DIR_DATA L"/data"
#define DIR_ICONS L"/icons"
+#define DIR_SHARED_RES L"/shared-res"
#define DIR_LIB L"/lib"
#define DIR_SETTING L"/setting"
#define DIR_CONTENTS L"/contents"
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);