1 /* |
1 /* |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of the License "Eclipse Public License v1.0" |
5 * under the terms of the License "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
47 COptions options(argc, argv); |
47 COptions options(argc, argv); |
48 |
48 |
49 std::string logFileName(options.GetLogFileName()); |
49 std::string logFileName(options.GetLogFileName()); |
50 std::auto_ptr<CLogger> logger(new CLogger(logFileName, options.GetLogLevel())); |
50 std::auto_ptr<CLogger> logger(new CLogger(logFileName, options.GetLogLevel())); |
51 |
51 |
52 std::string dllPath = "sqlite3.dll"; |
52 #ifdef __LINUX__ |
|
53 std::string dllPath = "sqlite-3.6.1.so"; |
|
54 #else |
|
55 std::string dllPath = "sqlite3.dll"; |
|
56 #endif |
|
57 |
53 std::auto_ptr<CDbLayer> db( new CDbLayer(dllPath, options.GetDbFileName())); |
58 std::auto_ptr<CDbLayer> db( new CDbLayer(dllPath, options.GetDbFileName())); |
54 std::auto_ptr<CScrXmlParser> xmlParser( new CScrXmlParser()); |
59 std::auto_ptr<CScrXmlParser> xmlParser( new CScrXmlParser()); |
55 |
60 |
56 if(options.IsDbAbsent()) |
61 if(options.IsDbAbsent()) |
57 { |
62 { |
|
63 #ifdef __LINUX__ |
|
64 std::string dbFileName = epocRootStr + "epoc32/tools/create_db.xml"; |
|
65 #else |
58 std::string dbFileName = epocRootStr + "epoc32\\tools\\create_db.xml"; |
66 std::string dbFileName = epocRootStr + "epoc32\\tools\\create_db.xml"; |
|
67 #endif |
|
68 |
59 std::auto_ptr<SchemaDetails> schema(xmlParser->ParseDbSchema(dbFileName)); |
69 std::auto_ptr<SchemaDetails> schema(xmlParser->ParseDbSchema(dbFileName)); |
60 db->CreateScrDatabase(*schema); |
70 db->CreateScrDatabase(*schema); |
61 } |
71 } |
62 |
72 |
63 std::vector<std::string> xmlFileNames = options.GetEnvFileNames(); |
73 std::vector<std::string> xmlFileNames = options.GetEnvFileNames(); |