diff -r 5cc91383ab1e -r 7333d7932ef7 secureswitools/swisistools/source/scrtool/main.cpp --- a/secureswitools/swisistools/source/scrtool/main.cpp Thu Aug 19 10:02:49 2010 +0300 +++ b/secureswitools/swisistools/source/scrtool/main.cpp Tue Aug 31 15:21:33 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -37,7 +37,7 @@ try { - const char* epocRoot = getenv("EPOCROOT"); + const char* epocRoot = getenv("EPOCROOT"); if(NULL == epocRoot) { throw CException("EPOCROOT environment variable not specified.", ExceptionCodes::EEnvNotSpecified); @@ -49,13 +49,23 @@ std::string logFileName(options.GetLogFileName()); std::auto_ptr logger(new CLogger(logFileName, options.GetLogLevel())); - std::string dllPath = "sqlite3.dll"; + #ifdef __LINUX__ + std::string dllPath = "sqlite-3.6.1.so"; + #else + std::string dllPath = "sqlite3.dll"; + #endif + std::auto_ptr db( new CDbLayer(dllPath, options.GetDbFileName())); std::auto_ptr xmlParser( new CScrXmlParser()); if(options.IsDbAbsent()) { + #ifdef __LINUX__ + std::string dbFileName = epocRootStr + "epoc32/tools/create_db.xml"; + #else std::string dbFileName = epocRootStr + "epoc32\\tools\\create_db.xml"; + #endif + std::auto_ptr schema(xmlParser->ParseDbSchema(dbFileName)); db->CreateScrDatabase(*schema); }