diff -r bb1748e0dd9b -r c6e8afe0ba85 secureswitools/swisistools/source/rscparser/dirparse.cpp --- a/secureswitools/swisistools/source/rscparser/dirparse.cpp Tue Jun 29 16:50:12 2010 +0300 +++ b/secureswitools/swisistools/source/rscparser/dirparse.cpp Thu Jul 08 20:28:00 2010 +0300 @@ -310,9 +310,17 @@ componentData.iLocale = aLocale; componentData.iServiceUid = aServUid; - componentData.iOpaqueData = aStrValue; - aAppOpaqueData.iOpaqueDataType.push_back(componentData); + /* + * Under LINUX : The OpaqueData which is read from the resource file will be in UTF-16 format contained + * in a std::wstring. So, we need to convert it back to UTF-32 format which is the format + * of LINUX specific std::wstring. + * + * Under WINDOWS : Nothing needs to be done and this is taken care of by XercesStringToWString() + * which is platform specific. + */ + componentData.iOpaqueData = XercesStringToWString(reinterpret_cast(aStrValue.c_str())); + aAppOpaqueData.iOpaqueDataType.push_back(componentData); } /** @@ -326,10 +334,18 @@ aParamList->IsFlagSet(CParameterList::EFlagsDisableZDriveChecksSet) ) { + #ifdef __LINUX__ + return wstring2string(aParamList->SystemDrivePath()) + "/sys/install/scr/scr.db"; + #else return wstring2string(aParamList->SystemDrivePath()) + "\\sys\\install\\scr\\scr.db"; + #endif } + #ifdef __LINUX__ + return wstring2string(aParamList->RomDrivePath()) + "/sys/install/scr/provisioned/scr.db"; + #else return wstring2string(aParamList->RomDrivePath()) + "\\sys\\install\\scr\\provisioned\\scr.db"; + #endif } /** @@ -346,7 +362,12 @@ int isRomApplication = 1; xmlGenerator.WritePreProvisionDetails(filename , aScrPreProvisionDetail, isRomApplication); + #ifdef __LINUX__ + std::string executable = "scrtool"; + #else std::string executable = "scrtool.exe"; + #endif + std::string command; command = executable + " -d " + GetDbPath(aParamList) + " -p " + tmpFileName; @@ -517,13 +538,21 @@ { size_t found; std::string folder; + #ifdef __LINUX__ + found=aFileName.find("private/10003a3f/"); + #else found=aFileName.find("private\\10003a3f\\"); + #endif if( found != string::npos ) folder = aFileName.substr(0,found); else { + #ifdef __LINUX__ + std::string errMsg= "Failed : Resource File Path should contain /private/10003a3f/"; + #else std::string errMsg= "Failed : Resource File Path should contain \\private\\10003a3f\\"; + #endif throw CResourceFileException(errMsg); } @@ -606,7 +635,11 @@ else { aFilePath = aParamList->RomDrivePath(); + #ifdef __LINUX__ + aFilePath.append(L"/private/10003a3f/apps"); + #else aFilePath.append(L"\\private\\10003a3f\\apps"); + #endif } int iCount = 0; @@ -625,9 +658,14 @@ { iCount++; std::string fName; - fName = Ucs2ToUtf8( *curr ); + fName = wstring2string( *curr ); std::string FilePath = wstring2string(aFilePath); + #ifdef __LINUX__ + FilePath.append("/"); + #else FilePath.append("\\"); + #endif + FilePath.append(fName); std::cout<<"Parsing - "<