Fix bug 10166. Use rvct.h as fallback for rvct tools preinclude
authortimkelly
Mon, 14 Dec 2009 10:22:37 -0600
changeset 679 9e29549b331d
parent 670 7305e0342ce0
child 680 4224161eb5db
Fix bug 10166. Use rvct.h as fallback for rvct tools preinclude
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SymbianBuildContext.java
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SymbianBuildContext.java	Thu Dec 10 13:44:05 2009 -0600
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SymbianBuildContext.java	Mon Dec 14 10:22:37 2009 -0600
@@ -305,7 +305,14 @@
 		if (installedRVCTTools.length > 0) {
 			rvctFragment = getRVCTFragment(installedRVCTTools[0]);
 		}
-		return getSDK().getIncludePath().append(rvctFragment).append(rvctFragment + ".h"); //$NON-NLS-1$
+		IPath prefixFilePath = getSDK().getIncludePath().append(rvctFragment).append(rvctFragment + ".h"); //$NON-NLS-1$
+		if (prefixFilePath.toFile().exists()){
+			return prefixFilePath;
+		} else {
+			// SF kits around SF^3 started to only use a single rvct.h header instead of specific versioned ones
+			// based on the default installation
+			return getSDK().getIncludePath().append("rvct").append("rvct" + ".h");
+		}
 	}
 
 	private String getRVCTFragment(IRVCTToolChainInfo info) {