|
1 /* |
|
2 * Copyright (c) 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 "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: Mifconv definitions. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __MIFCONV_H__ |
|
20 #define __MIFCONV_H__ |
|
21 |
|
22 #if (defined( _MSC_VER ) && _MSC_VER <= 1200 ) //1200 == VC++ 6.0 |
|
23 #pragma warning(disable: 4100) |
|
24 #pragma warning(disable: 4511) |
|
25 #pragma warning(disable: 4512) |
|
26 #pragma warning(disable: 4530) |
|
27 #pragma warning(disable: 4663) |
|
28 #pragma warning(disable: 4710) |
|
29 #pragma warning(disable: 4786) |
|
30 #pragma warning(disable: 4800) |
|
31 #endif |
|
32 |
|
33 #include <iostream> |
|
34 #include <fstream> |
|
35 using namespace std; |
|
36 |
|
37 #include "mifconv_types.h" |
|
38 using namespace MifConvDefs; |
|
39 |
|
40 // Mifconv version |
|
41 static const MifConvString MifConvVersion("3.1.7"); |
|
42 static const MifConvString MifConvDate("10th July 2009"); |
|
43 static const MifConvString MifConvYears("2009"); |
|
44 |
|
45 // Mifconv return values: |
|
46 #define MIFCONV_ERROR 1 |
|
47 #define MIFCONV_NO_ERROR 0 |
|
48 |
|
49 #define MIFCONV_WILDCARD "*" |
|
50 #define BMP_FILE_EXTENSION "bmp" |
|
51 #define SVG_FILE_EXTENSION "svg" |
|
52 #define SVGB_BINARY_FILE_EXTENSION "svgb" |
|
53 #define HEADER_FILE_EXTENSION "mbg" |
|
54 #define MBM_FILE_EXTENSION "mbm" |
|
55 #define MIF_FILE_EXTENSION "mif" |
|
56 |
|
57 #define FILE_EXTENSION_SEPARATOR "." |
|
58 #define STRING_LIST_ARGUMENT_SEPARATOR ";" |
|
59 |
|
60 #ifdef MSVC7 |
|
61 #define FILE_IN_BINARY_NOCREATE_FLAGS (ios::in | ios::binary | ios::nocreate) |
|
62 #else |
|
63 #define FILE_IN_BINARY_NOCREATE_FLAGS (ios::in | ios::binary) |
|
64 #endif |
|
65 |
|
66 #ifdef WIN32 |
|
67 #define DIR_SEPARATOR "\\" |
|
68 #define DIR_SEPARATOR2 '\\' |
|
69 #define INCORRECT_DIR_SEPARATOR "/" |
|
70 #define INCORRECT_DIR_SEPARATOR2 '/' |
|
71 #define OPTION_PREFIX1_STR "/" |
|
72 #define OPTION_PREFIX1_CHAR '/' |
|
73 #define OPTION_PREFIX2_STR "-" |
|
74 #define OPTION_PREFIX2_CHAR '-' |
|
75 #else |
|
76 #define DIR_SEPARATOR "/" |
|
77 #define DIR_SEPARATOR2 '/' |
|
78 #define INCORRECT_DIR_SEPARATOR "\\" |
|
79 #define INCORRECT_DIR_SEPARATOR2 '\\' |
|
80 #define OPTION_PREFIX1_STR "-" |
|
81 #define OPTION_PREFIX1_CHAR '-' |
|
82 #define OPTION_PREFIX2_STR "-" |
|
83 #define OPTION_PREFIX2_CHAR '-' |
|
84 #endif |
|
85 |
|
86 // BMCONV defines |
|
87 #define BMCONV_EXECUTABLE_NAME "bmconv" |
|
88 #define BMCONV_TEMP_FILE_POSTFIX "_###_bmconv_tmp_cmd_file" |
|
89 |
|
90 #if defined (__SERIES60_30__) || defined (__SERIES60_31__) || defined (__S60_32__) |
|
91 #define BMCONV_OPTION_PREFIX "/" |
|
92 #else |
|
93 #define BMCONV_OPTION_PREFIX "-" |
|
94 #endif |
|
95 |
|
96 #define BMCONV_QUIET_PARAMETER "q" |
|
97 #define BMCONV_PALETTE_PARAMETER "p" |
|
98 |
|
99 // SVGTBINENCODE defines |
|
100 #define SVGTBINENCODE_EXECUTABLE_NAME "svgtbinencode" |
|
101 #define SVGTBINENCODE_OPTION_PREFIX "-" |
|
102 #define SVGTBINENCODE_VERSION_PARAMETER "v" |
|
103 |
|
104 // Bitmap searching directories |
|
105 static const MifConvString S60_PATH = "epoc32" + MifConvString(DIR_SEPARATOR) + "s60"; |
|
106 static const MifConvString S60_ICONS_PATH = S60_PATH + MifConvString(DIR_SEPARATOR) + "icons"; |
|
107 static const MifConvString S60_BITMAPS_PATH = S60_PATH + MifConvString(DIR_SEPARATOR) + "bitmaps"; |
|
108 |
|
109 // Environment variable names |
|
110 static const MifConvString EPOCROOT_ENV = MifConvString("EPOCROOT"); |
|
111 static const MifConvString SBS_BUILD_DIR_ENV = MifConvString("SBS_BUILD_DIR"); |
|
112 |
|
113 // EPOC paths |
|
114 static const MifConvString EPOC32_PATH = "epoc32"; |
|
115 static const MifConvString DEFAULT_EPOCROOT = MifConvString(""); |
|
116 static const MifConvString EPOC_TOOLS_PATH = "epoc32" + MifConvString(DIR_SEPARATOR) + "tools"; |
|
117 |
|
118 static const MifConvString EPOC_BUILD_PATH = "epoc32" + MifConvString(DIR_SEPARATOR) + "build"; |
|
119 static const MifConvString EPOC_ICON_BUILD_PATH_POSTFIX = "s60" + MifConvString(DIR_SEPARATOR) + "icons"; |
|
120 |
|
121 |
|
122 // Debug logging file environment variable |
|
123 static const MifConvString MIFCONV_DEBUG_FILE_ENV("MIFCONV_DEBUG_FILE"); |
|
124 |
|
125 // Maximum amount of target file removal tries |
|
126 #define MIFCONV_MAX_REMOVE_TRIES 10 |
|
127 |
|
128 #endif |