|
1 /**************************************************************************** |
|
2 ** |
|
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
4 ** All rights reserved. |
|
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 ** |
|
7 ** This file is part of the qmake application of the Qt Toolkit. |
|
8 ** |
|
9 ** $QT_BEGIN_LICENSE:LGPL$ |
|
10 ** No Commercial Usage |
|
11 ** This file contains pre-release code and may not be distributed. |
|
12 ** You may use this file in accordance with the terms and conditions |
|
13 ** contained in the Technology Preview License Agreement accompanying |
|
14 ** this package. |
|
15 ** |
|
16 ** GNU Lesser General Public License Usage |
|
17 ** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 ** General Public License version 2.1 as published by the Free Software |
|
19 ** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 ** packaging of this file. Please review the following information to |
|
21 ** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 ** |
|
24 ** In addition, as a special exception, Nokia gives you certain additional |
|
25 ** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 ** |
|
28 ** If you have questions regarding the use of this file, please contact |
|
29 ** Nokia at qt-info@nokia.com. |
|
30 ** |
|
31 ** |
|
32 ** |
|
33 ** |
|
34 ** |
|
35 ** |
|
36 ** |
|
37 ** |
|
38 ** $QT_END_LICENSE$ |
|
39 ** |
|
40 ****************************************************************************/ |
|
41 |
|
42 #ifndef SYMBIANCOMMON_H |
|
43 #define SYMBIANCOMMON_H |
|
44 |
|
45 #include <project.h> |
|
46 #include <makefile.h> |
|
47 #include "initprojectdeploy_symbian.h" |
|
48 |
|
49 #define PRINT_FILE_CREATE_ERROR(filename) fprintf(stderr, "Error: Could not create '%s'\n", qPrintable(filename)); |
|
50 |
|
51 class SymbianCommonGenerator |
|
52 { |
|
53 public: |
|
54 enum TargetType { |
|
55 TypeExe, |
|
56 TypeDll, |
|
57 TypeLib, |
|
58 TypePlugin, |
|
59 TypeSubdirs |
|
60 }; |
|
61 |
|
62 SymbianCommonGenerator(MakefileGenerator *generator); |
|
63 |
|
64 virtual void init(); |
|
65 |
|
66 protected: |
|
67 |
|
68 QString removePathSeparators(QString &file); |
|
69 void removeSpecialCharacters(QString& str); |
|
70 void removeEpocSpecialCharacters(QString& str); |
|
71 void generatePkgFile(const QString &iconFile, bool epocBuild); |
|
72 bool containsStartWithItem(const QChar &c, const QStringList& src); |
|
73 |
|
74 void writeRegRssFile(QMap<QString, QStringList> &useritems); |
|
75 void writeRegRssList(QTextStream &t, QStringList &userList, |
|
76 const QString &listTag, |
|
77 const QString &listItem); |
|
78 void writeRssFile(QString &numberOfIcons, QString &iconfile); |
|
79 void writeLocFile(QStringList &symbianLangCodes); |
|
80 //QTP: loc change start |
|
81 void writeSymbianLocFile(QStringList &symbianLangCodes); |
|
82 //QTP: loc change end |
|
83 void readRssRules(QString &numberOfIcons, |
|
84 QString &iconFile, |
|
85 QMap<QString, QStringList> &userRssRules); |
|
86 |
|
87 QStringList symbianLangCodesFromTsFiles(); |
|
88 void fillQt2S60LangMapTable(); |
|
89 //QTP: loc change start |
|
90 void modifyQt2S60LangMapTable(); |
|
91 //QTP: loc change end |
|
92 protected: |
|
93 MakefileGenerator *generator; |
|
94 |
|
95 QStringList generatedFiles; |
|
96 QStringList generatedDirs; |
|
97 QString fixedTarget; |
|
98 //QTP: loc change start |
|
99 QString translationFileName; |
|
100 //QTP: loc change end |
|
101 QString privateDirUid; |
|
102 QString uid3; |
|
103 TargetType targetType; |
|
104 |
|
105 QHash<QString, QString> qt2S60LangMapTable; |
|
106 }; |
|
107 |
|
108 #endif // SYMBIANCOMMON_H |