|
1 /* |
|
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __SIS2IBY_H__ |
|
20 #define __SIS2IBY_H__ |
|
21 |
|
22 #include "pkgfileparser.h" |
|
23 |
|
24 #define SISEXTRACT_TOOL_NAME "dumpsis" // Extract tool |
|
25 #define SISEXTRACT_TOOL_DEFOPT " -x" // Default options to the tool |
|
26 #define SISEXTRACT_TOOL_EXTOPT " -d " // Extract path option |
|
27 |
|
28 typedef std::map<String,PPKGPARSER> PKGFILE_MAP; |
|
29 |
|
30 /** |
|
31 class Sis2Iby |
|
32 Implements the interfaces of SisUtils |
|
33 Provides methods to generate IBY file(s) from a SIS file |
|
34 |
|
35 @internalComponent |
|
36 @released |
|
37 */ |
|
38 class Sis2Iby : public SisUtils |
|
39 { |
|
40 public: |
|
41 Sis2Iby(char* aFile); |
|
42 ~Sis2Iby(); |
|
43 |
|
44 void ProcessSisFile(); |
|
45 void GenerateOutput(); |
|
46 |
|
47 private: |
|
48 void GenerateIby(String aPkgFile, PPKGPARSER aParser); |
|
49 TUint32 InvokeExtractTool(String sisFile); |
|
50 void UpdatePkgFileMap(String aPath, String aFile); |
|
51 void GetFileName(String aName, String& aFile); |
|
52 void AppendFileName(String& aPath, String aFile); |
|
53 void NormaliseSourceFile(String& aFile, String aPkgFile); |
|
54 void NormaliseDestFile(String& aFile); |
|
55 void MakeFullPath(String& aFile); |
|
56 |
|
57 void WriteLanguages(PPKGPARSER aParser); |
|
58 void WriteFileInclusion(String aSrcFile, String aDestFile, String aPkgName, int pad); |
|
59 void WritePackageHeader(PPKGPARSER aParser); |
|
60 void WriteInstallOptions(PPKGPARSER aParser); |
|
61 void WritePackageBody(PPKGPARSER aParser); |
|
62 void WriteInstallFileList(PINSTALLFILE_LIST aFileList, PPKGPARSER aParser, int pad); |
|
63 void InsertTabs(int num); |
|
64 |
|
65 PkgParser *pkgParser; |
|
66 PKGFILE_MAP iPkgFileMap; |
|
67 |
|
68 std::ofstream ibyHandle; |
|
69 |
|
70 TBool IsValidE32Image(String aFile); |
|
71 }; |
|
72 |
|
73 #endif //__SIS2IBY_H__ |