--- a/secureswitools/swisistools/source/interpretsis/main.cpp Tue Aug 31 15:21:33 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsis/main.cpp Wed Sep 01 12:22:02 2010 +0100
@@ -28,9 +28,6 @@
#include "interpretsis.h"
#include "logger.h"
#include "../common/exception.h"
-#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
-#include "dirparse.h"
-#endif //SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
#ifndef _WIN32
@@ -50,9 +47,6 @@
int main(int argc, const char* argv[])
{
-#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
- std::string dbpath;
-#endif
bool pauseWhenDone = false;
int result= SUCCESS;
@@ -82,37 +76,10 @@
CInterpretSIS interpretSis(paramList);
-#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
- //Parsing Preprovisioned Resource file in not done if RegistryVersionExists
- if(!paramPtr->RegistryVersionExists())
- {
- if ( paramPtr->IsFlagSet(CParameterList::EFlagsResourceFilePathSet))
- {
- ParseResourceDir(paramPtr, interpretSis);
-
- if (NULL != logFile)
- {
- bool val = logFile->is_open();
- logFile->close();
- delete logFile;
- }
- return result;
- }
- else
- {
- ParseResourceDir(paramPtr, interpretSis);
- }
- }
-#endif //SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
-
result = interpretSis.Install();
-
+
// Uninstall the sis files
interpretSis.Uninstall();
-#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
- if(result != 0)
- dbpath=GetDbPath(paramPtr);
-#endif
}
catch( CCommandParser::CmdLineException err )
{
@@ -131,14 +98,6 @@
e.Display();
result = CONFIG_ERROR;
}
-#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
- catch(const CResourceFileException& aObject)
- {
- LERROR(L"Resource File Parsing Error - ");
- aObject.Display();
- result = RSC_PARSING_ERROR;
- }
-#endif //SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
catch(const RomManagerException& e)
{
LERROR(L"ROM Manager Error - ");
@@ -175,31 +134,13 @@
result = UNKNOWN_EXCEPTION;
LERROR(L"Unknown Error" << std::endl);
}
-#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
- //Restore Database in case of installation error for SA over SA and PU case
- if(result != 0)
- {
- std::string BackupDb(dbpath);
- BackupDb.append("_backup");
- if (FileExists(string2wstring(BackupDb)))
- {
- #ifdef __TOOLS2_LINUX__
- std::string command = "mv " + BackupDb + " " + dbpath;
- #else
- std::string command = "move " + BackupDb + " " + dbpath;
- #endif
- int err = system(command.c_str());
- if (err != 0)
- LERROR(L"Failed to Restore src.db ");
- }
- }
-#endif
+
if (NULL != logFile)
- {
+ {
bool val = logFile->is_open();
logFile->close();
delete logFile;
- }
+ }
return result;
-}
+ }