fix bug 8478 (again, now for symbian foundation structure) RCL_2_0
authortimkelly
Mon, 13 Apr 2009 14:46:39 -0500
branchRCL_2_0
changeset 86 0322658bcd67
parent 85 ff7a6e6a0de4
child 88 0fcbe4e2fbe0
fix bug 8478 (again, now for symbian foundation structure)
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/processes/CheckS60CustKitSupport.java
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/processes/CheckS60CustKitSupport.java	Mon Apr 13 14:05:22 2009 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/processes/CheckS60CustKitSupport.java	Mon Apr 13 14:46:39 2009 -0500
@@ -39,7 +39,9 @@
 	private static final String S60_MIDDWARE_INC2 =  "epoc32/include/mw";
 	private static final String S60_INC_MACROS2 = "#include <domain/osextensions/platform_paths.hrh>\nAPP_LAYER_SYSTEMINCLUDE";
 
-	
+	private static final String S60_SF_FOLDER =  "sf";
+	private static final String S60_INC_MACROS_SF = "#include <platform_paths.hrh>\n#include <data_caging_paths.hrh>\nAPP_LAYER_SYSTEMINCLUDE";
+
 	protected IProject project;
 
 	@Override
@@ -72,24 +74,36 @@
 				Check.checkContract(obj instanceof ISymbianBuildContext);
 				ISymbianBuildContext symbianBuildContext = (ISymbianBuildContext)obj;
 				ISymbianSDK sdk = symbianBuildContext.getSDK();
-				if (sdk != null){
+				if (sdk != null) {
 					File middleWareInclude = new File(sdk.getEPOCROOT() + S60_MIDDWARE_INC);
-					// NOTE: Here we need to check the SDK major version becuase the 3.2 CustKit
-					// has the middleware folder but doesn't use the new build macros for include paths
-					if (sdk.getSDKVersion().getMajor() >= 5 && middleWareInclude.exists()){
+					
+					// NOTE: Here we need to check the SDK major version becuase
+					// the 3.2 CustKit
+					// has the middleware folder but doesn't use the new build
+					// macros for include paths
+					if (sdk.getSDKVersion().getMajor() >= 5 && middleWareInclude.exists()) {
 						// add symbol as at least one build config is a CustKit
 						S60_50_Macros_String = S60_INC_MACROS;
 						break;
 					}
-					else {
-						// try newer middleware paths moved to app layer includes
-						middleWareInclude = new File(sdk.getEPOCROOT() + S60_MIDDWARE_INC2);
-						if (sdk.getSDKVersion().getMajor() >= 5 && middleWareInclude.exists()){
-							// add symbol as at least one build config is a CustKit
-							S60_50_Macros_String = S60_INC_MACROS2;
-							break;
-						}
+					
+					middleWareInclude = new File(sdk.getEPOCROOT() + S60_MIDDWARE_INC2);
+					File sfoPath = new File(sdk.getEPOCROOT() + S60_SF_FOLDER);
+					// check for middleware paths and /sf path (if SFO kit)
+					if (sdk.getSDKVersion().getMajor() >= 5 && middleWareInclude.exists() && sfoPath.exists()) {
+						// add symbol as at least one build config is a CustKit
+						S60_50_Macros_String = S60_INC_MACROS_SF;
+						break;
 					}
+					
+					// try newer middleware paths moved to app layer includes
+					
+					if (sdk.getSDKVersion().getMajor() >= 5 && middleWareInclude.exists()) {
+						// add symbol as at least one build config is a CustKit
+						S60_50_Macros_String = S60_INC_MACROS2;
+						break;
+					}
+
 				}
 			}
 		}