#define VERSION_INFO_FILE L"/info/version.info"
#define UISCALABILITY_INFO_FILE L"/info/uiscalability.info"
#define WEBSERVICE_INFO_FILE L"/info/webservice.info"
+#define TYPE_INFO_FILE L"/info/type.info"
#define PACKAGE_XML_FILE L"/info/manifest.xml"
#define UISCALABILITY_INFO L"1 %ls %ls %ls"
#define UIAPP_LOADER_PATH "/usr/lib/osp/osp-ui-app-loader" // UiApp
#define SERVICEAPP_LOADER_PATH "/usr/lib/osp/osp-service-app-loader" // ServiceApp
#define SYSTEMAPP_LOADER_PATH "/usr/lib/osp/osp-system-service-loader" // System Service
+#define IME_PATH "/opt/apps/scim/lib/scim-1.0/1.4.0/Helper"
#define APP_OWNER_ID 5000
#define APP_GROUP_ID 5000
#define DIR_MEMORYCARD_OSP_APPLICATIONS_TEMP L"/opt/storage/sdcard/apps/__@@osp_tmp@@__"
#define OSP_INSTALLER "osp-installer"
-#define OSP_INSTALLER_VERSION "osp-installer version = 2012/10/09"
+#define OSP_INSTALLER_VERSION "osp-installer version = 2012/10/10"
enum InstallationSetStep
{
__appVersion = appVersion;
}
+const String&
+InstallationContext::GetCategory(void) const
+{
+ return __category;
+}
+
+void
+InstallationContext::SetCategory(const String& category)
+{
+ __category = category;
+}
+
String
InstallationContext::GetManifestXmlPath(void)
{
const Osp::Base::String& GetAppVersion(void) const;
void SetAppVersion(const Osp::Base::String& appVersion);
+ const Osp::Base::String& GetCategory(void) const;
+ void SetCategory(const Osp::Base::String& category);
+
Osp::Base::String GetManifestXmlPath(void);
Osp::Base::String GetSignatureXmlPath(void);
Osp::Base::String __appId;
Osp::Base::String __appVersion;
Osp::Base::String __appRootPath;
+ Osp::Base::String __category;
Osp::Base::Collection::ArrayList* __pPrivilegeList;
RootCertificateType __rootCertType;
#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>
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")
{
}
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.");
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
*/
#include <FLclLocale.h>
+#include <FApp_Aul.h>
#include <FApp_PackageInfoImpl.h>
#include "ManifestGenerator.h"
bool
ManifestGenerator::Write()
{
- bool preload = false; //__pContext->IsPreloaded();
+ //bool preload = false; //__pContext->IsPreloaded();
String xmlPath;
String package;
String location;
// temp
String nodisplay("true");
String taskmanage("false");
+ String category;
if (pAppInfoImpl->GetType() == L"UiApp")
{
- taskmanage = "true";
+ taskmanage = L"true";
if (pAppInfoImpl->IsMainmenuVisible() == true)
{
- nodisplay = "false";
+ nodisplay = L"false";
}
else
{
- nodisplay = "true";
+ nodisplay = L"true";
+ }
+
+ if (__pContext->GetCategory().IsEmpty() == false)
+ {
+ category.Format(1024, L"%ls", __pContext->GetCategory().GetPointer());
+ category.ToLowerCase();
+
+ if (_Aul::GetAppType(category) != 0)
+ {
+ taskmanage = L"false";
+ nodisplay = L"true";
+ }
}
}
__pWriter->WriteAttribute("multiple", "false");
__pWriter->WriteAttribute("type", type);
+ if (category.IsEmpty() == false)
+ {
+ __pWriter->WriteAttribute("categories", category);
+ }
+
#if 0
if (pAppInfoImpl->GetType() == L"UiApp")
{
char *pExecutableName = null;
char *pDefault = null;
char *pMainmenuVisible = null;
+ char *pCategory = null;
__pPackageAppInfoImpl = new _PackageAppInfoImpl;
TryReturn(__pPackageAppInfoImpl, false, "[osp-installer] __pPackageAppInfoImpl is null");
__pPackageAppInfoImpl->SetPackageName(app_id);
+ pCategory = pAttr->Find("Category");
+ if (pCategory)
+ {
+ AppLogTag(OSP_INSTALLER, "<Category=%s>", pCategory);
+ __pContext->SetCategory(pCategory);
+ }
+
AppLogTag(OSP_INSTALLER, "app_id = %S", app_id.GetPointer());
AppLogTag(OSP_INSTALLER, "<UiApp Name=\"%s\" Default=\"%s\">", pExecutableName, pDefault ? pDefault:"False");