40 private ISymbianSDK sdk; |
40 private ISymbianSDK sdk; |
41 private String displayString; |
41 private String displayString; |
42 private String configID; // cconfiguration 'id' attribute from .cproject |
42 private String configID; // cconfiguration 'id' attribute from .cproject |
43 |
43 |
44 // Raptor config query data |
44 // Raptor config query data |
45 String outputPathString; |
45 private String outputPathString; |
46 List<String> metaDataMacros = new ArrayList<String>(); // macros to parse the INF/MMPs files (these do not contain values) |
46 private List<String> metaDataMacros = new ArrayList<String>(); // macros to parse the INF/MMPs files (these do not contain values) |
47 List<String> metaDataIncludes = new ArrayList<String>(); |
47 private List<String> metaDataIncludes = new ArrayList<String>(); |
48 String metaDataVariantHRH; |
48 private String metaDataVariantHRH; |
49 String configParseErrorMessage = null; |
49 private String configParseErrorMessage = null; |
50 |
50 |
51 public BuildContextSBSv2(ISymbianSDK theSDK, String thePlatform, String theTarget, String theSBSv2Alias, String displayName, String configID) { |
51 public BuildContextSBSv2(ISymbianSDK theSDK, String thePlatform, String theTarget, String theSBSv2Alias, String displayName, String configID) { |
52 this.sdk = theSDK; |
52 this.sdk = theSDK; |
53 this.platform = thePlatform.toUpperCase(); |
53 this.platform = thePlatform.toUpperCase(); |
54 this.target = theTarget.toUpperCase(); |
54 this.target = theTarget.toUpperCase(); |
67 if (configParseErrorMessage != null && configParseErrorMessage.length() > 0){ |
67 if (configParseErrorMessage != null && configParseErrorMessage.length() > 0){ |
68 this.displayString = sbsv2Alias + " ERROR: " + configParseErrorMessage; |
68 this.displayString = sbsv2Alias + " ERROR: " + configParseErrorMessage; |
69 } else { |
69 } else { |
70 this.displayString = getPlatformString().toUpperCase() + " " + getTargetString().toUpperCase(); |
70 this.displayString = getPlatformString().toUpperCase() + " " + getTargetString().toUpperCase(); |
71 } |
71 } |
72 |
|
73 } |
72 } |
74 |
73 |
75 @Override |
74 @Override |
76 public ISymbianSDK getSDK() { |
75 public ISymbianSDK getSDK() { |
77 return sdk; |
76 return sdk; |
126 return getConfigID(); |
125 return getConfigID(); |
127 } |
126 } |
128 |
127 |
129 @Override |
128 @Override |
130 public String getDefaultDefFileDirectoryName() { |
129 public String getDefaultDefFileDirectoryName() { |
131 // TOOD: THIS IS ABLD STUFF. isASSP does not belong with Raptor |
130 |
132 // TODO: How the ASSP option affects the path? |
|
133 |
|
134 String dirName = getDefFileDirectoryNameForPlatform(platform); |
131 String dirName = getDefFileDirectoryNameForPlatform(platform); |
135 // TODO: Previously BSF's folder was EABI? What is it for SBSv2 variants? |
|
136 |
132 |
137 if (dirName == null) { |
133 if (dirName == null) { |
138 // fallback for unknown cases |
134 // fallback for unknown cases |
139 dirName = platform; |
135 dirName = platform; |
140 } |
136 } |
141 |
137 |
142 return dirName; |
138 return dirName; |
143 } |
139 } |
144 |
140 |
145 private String getDefFileDirectoryNameForPlatform(String platform) { |
141 private String getDefFileDirectoryNameForPlatform(String platform) { |
146 // TODO: This is still ABLD stype stuff |
142 if (sbsv2Alias.toUpperCase().contains("WINSCW")) { |
147 if (platform.equals(EMULATOR_PLATFORM)) { |
|
148 return "BWINS"; //$NON-NLS-1$ |
143 return "BWINS"; //$NON-NLS-1$ |
149 } else if (platform.equals(ARMV5_PLATFORM) |
144 } else if (sbsv2Alias.toUpperCase().contains("ARM")) { |
150 || platform.equals(ARMV5_ABIV2_PLATFORM) |
|
151 || platform.equals(ARMV6_PLATFORM) |
|
152 || platform.equals(ARMV6_ABIV2_PLATFORM) |
|
153 || platform.equals(GCCE_PLATFORM)) { |
|
154 return "EABI"; //$NON-NLS-1$ |
145 return "EABI"; //$NON-NLS-1$ |
155 } |
146 } |
156 return null; |
147 return null; |
157 } |
148 } |
158 |
149 |
159 @Override |
150 @Override |
160 public IPath getCompilerPrefixFile() { |
151 public IPath getCompilerPrefixFile() { |
161 // TODO: This is ABLD hard-code mechanism. Should be able to get from Raptor query mechanism |
152 |
162 if (platform.equals(GCCE_PLATFORM)) { |
153 if (sbsv2Alias.toUpperCase().contains(TOOLCHAIN_GCCE)) { |
163 return getGCCEPrefixFilePath(); |
154 return getGCCEPrefixFilePath(); |
164 } else if (platform.equals(ARMV5_PLATFORM) |
155 } else if (sbsv2Alias.toUpperCase().contains((TOOLCHAIN_ARM))) { |
165 || platform.equals(ARMV5_ABIV2_PLATFORM) |
|
166 || platform.equals(ARMV6_PLATFORM) |
|
167 || platform.equals(ARMV6_ABIV2_PLATFORM)) { |
|
168 return getRVCTPrefixFilePath(); |
156 return getRVCTPrefixFilePath(); |
169 } |
157 } |
170 |
158 |
171 // fallback for WINSCW, MSVC, etc. |
159 // fallback for WINSCW, MSVC, etc. |
172 return null; |
160 return null; |