Remove ISymbianSDK#getPrefixFile. You can get this from ISDKBuildInfo#getPrefixFromVariantCfg().
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java Thu Aug 05 11:54:21 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java Thu Aug 05 13:14:00 2010 -0500
@@ -79,6 +79,7 @@
import com.nokia.carbide.cpp.internal.api.sdk.ISBSv2BuildConfigInfo;
import com.nokia.carbide.cpp.internal.api.sdk.ISBSv2BuildContext;
import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContextDataCache;
+import com.nokia.carbide.cpp.sdk.core.ISDKBuildInfo;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuilderID;
import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
@@ -416,11 +417,14 @@
&& new File(context.getSDK().getEPOCROOT()).exists()) {
defaultContext = context;
ISymbianSDK sdk = defaultContext.getSDK();
- if (context instanceof ISBSv2BuildContext){
- if (sdk.getPrefixFile(ISymbianBuilderID.SBSV2_BUILDER) != null)
+
+ if (context instanceof ISBSv1BuildContext){
+ ISDKBuildInfo sdkBuildInfo = sdk.getBuildInfo(ISymbianBuilderID.SBSV1_BUILDER);;
+ if (sdkBuildInfo.getPrefixFromVariantCfg() != null)
break;
} else {
- if (sdk.getPrefixFile(ISymbianBuilderID.SBSV1_BUILDER) != null)
+ ISDKBuildInfo sdkBuildInfo = sdk.getBuildInfo(ISymbianBuilderID.SBSV2_BUILDER);;
+ if (sdkBuildInfo.getPrefixFromVariantCfg() != null)
break;
}
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java Thu Aug 05 11:54:21 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java Thu Aug 05 13:14:00 2010 -0500
@@ -83,6 +83,7 @@
import com.nokia.carbide.cpp.internal.qt.core.QtCorePlugin;
import com.nokia.carbide.cpp.sdk.core.IBSFPlatform;
import com.nokia.carbide.cpp.sdk.core.ISBVPlatform;
+import com.nokia.carbide.cpp.sdk.core.ISDKBuildInfo;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuilderID;
import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
@@ -2318,7 +2319,8 @@
}
// we need to check the variant hrh files as well
- File prefixFile = config.getSDK().getPrefixFile(ISymbianBuilderID.SBSV1_BUILDER);
+ ISDKBuildInfo sdkBuildInfo = config.getSDK().getBuildInfo(ISymbianBuilderID.SBSV1_BUILDER);;
+ File prefixFile = sdkBuildInfo.getPrefixFromVariantCfg().toFile();
if (prefixFile != null && prefixFile.lastModified() > oldestMakefileTimestamp) {
return true;
}
@@ -2439,7 +2441,8 @@
final long makefileTimestamp = makefile.lastModified();
// we need to check the variant hrh files as well
- File prefixFile = config.getSDK().getPrefixFile(ISymbianBuilderID.SBSV1_BUILDER);
+ ISDKBuildInfo sdkBuildInfo = config.getSDK().getBuildInfo(ISymbianBuilderID.SBSV1_BUILDER);;
+ File prefixFile = sdkBuildInfo.getPrefixFromVariantCfg().toFile();
if (prefixFile != null && prefixFile.lastModified() > makefileTimestamp) {
return true;
}
@@ -2522,7 +2525,8 @@
final long makefileTimestamp = makefile.lastModified();
// we need to check the variant hrh files as well
- File prefixFile = config.getSDK().getPrefixFile(ISymbianBuilderID.SBSV1_BUILDER);
+ ISDKBuildInfo sdkBuildInfo = config.getSDK().getBuildInfo(ISymbianBuilderID.SBSV1_BUILDER);;
+ File prefixFile = sdkBuildInfo.getPrefixFromVariantCfg().toFile();
if (prefixFile != null && prefixFile.lastModified() > makefileTimestamp) {
return true;
}
@@ -2895,7 +2899,8 @@
ISymbianSDK sdk = config.getSDK();
ISBSv1BuildInfo sbsv1BuildInfo = (ISBSv1BuildInfo)sdk.getBuildInfo(ISymbianBuilderID.SBSV1_BUILDER);
ISBVPlatform sbvPlatform = sbsv1BuildInfo.getSBVCatalog().findPlatform(config.getPlatformString());
- File sdkPrefix = sdk.getPrefixFile(ISymbianBuilderID.SBSV1_BUILDER);
+ ISDKBuildInfo sdkBuildInfo = config.getSDK().getBuildInfo(ISymbianBuilderID.SBSV1_BUILDER);;
+ File sdkPrefix = sdkBuildInfo.getPrefixFromVariantCfg().toFile();
if (sbvPlatform != null){
// might be an alternate HRH file to use
--- a/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/PreprocessHandler.java Thu Aug 05 11:54:21 2010 -0500
+++ b/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/PreprocessHandler.java Thu Aug 05 13:14:00 2010 -0500
@@ -87,6 +87,7 @@
import com.nokia.carbide.cpp.internal.builder.utils.Activator;
import com.nokia.carbide.cpp.internal.builder.utils.ui.LanguageSelectionDialog;
import com.nokia.carbide.cpp.internal.builder.utils.ui.PreprocessPreferencePage;
+import com.nokia.carbide.cpp.sdk.core.ISDKBuildInfo;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuilderID;
import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
import com.nokia.cpp.internal.api.utils.core.FileUtils;
@@ -204,10 +205,13 @@
// add the sdk prefix file if any
File sdkPrefix = null;
if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
- sdkPrefix = buildConfig.getSDK().getPrefixFile(ISymbianBuilderID.SBSV1_BUILDER);
+ ISDKBuildInfo sdkBuildInfo = buildConfig.getSDK().getBuildInfo(ISymbianBuilderID.SBSV1_BUILDER);;
+ sdkPrefix = sdkBuildInfo.getPrefixFromVariantCfg().toFile();
} else {
- sdkPrefix = buildConfig.getSDK().getPrefixFile(ISymbianBuilderID.SBSV2_BUILDER);
+ ISDKBuildInfo sdkBuildInfo = buildConfig.getSDK().getBuildInfo(ISymbianBuilderID.SBSV2_BUILDER);;
+ sdkPrefix = sdkBuildInfo.getPrefixFromVariantCfg().toFile();
}
+
if (sdkPrefix != null && sdkPrefix.exists()) {
args.add("-include"); //$NON-NLS-1$
args.add("\"" + sdkPrefix.getAbsolutePath() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SymbianBuildContextDataCache.java Thu Aug 05 11:54:21 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SymbianBuildContextDataCache.java Thu Aug 05 13:14:00 2010 -0500
@@ -187,7 +187,9 @@
List<IDefine> macros = new ArrayList<IDefine>();
Map<String, IDefine> namedMacros = new HashMap<String, IDefine>();
- File prefixFile = sdk.getPrefixFile(builderId);
+
+ ISDKBuildInfo sdkBuildInfo = sdk.getBuildInfo(builderId);
+ File prefixFile = sdkBuildInfo.getPrefixFromVariantCfg().toFile();
ISDKBuildInfo buildInfo = sdk.getBuildInfo(builderId);
if (prefixFile == null){
@@ -474,7 +476,8 @@
}
// also search files in same folder as variant.hrh
- File prefix = sdk.getPrefixFile(builderId);
+ ISDKBuildInfo sdkBuildInfo = sdk.getBuildInfo(builderId);
+ File prefix = sdkBuildInfo.getPrefixFromVariantCfg().toFile();
if (sbvPlatform != null){
// might be an alternate HRH file to use
IPath varVarHRH = sbvPlatform.getBuildVariantHRHFile();
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SBSv1BuildInfo.java Thu Aug 05 11:54:21 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SBSv1BuildInfo.java Thu Aug 05 13:14:00 2010 -0500
@@ -60,6 +60,7 @@
private List<ISymbianBuildContext> bsfContextList = new ArrayList<ISymbianBuildContext>(0);
private Map<String, List<String>> cachedPlatformMacros = new HashMap<String, List<String>>();
private List<String> supportedTargetTypesList = new ArrayList<String>();
+ private IPath variantFilePath;
private static final String TARGETTYPE_PM_FILE = "epoc32/tools/trgtype.pm"; //$NON-NLS-1$
public static final String VARIANT_CFG_FILE = "epoc32/tools/variant/variant.cfg"; //$NON-NLS-1$
@@ -158,6 +159,11 @@
* @return A path object, or null if the variant.cfg does not exist. This routine does not check to see if the returned path exists.
*/
public IPath getPrefixFromVariantCfg(){
+
+ if (variantFilePath != null){
+ return variantFilePath;
+ }
+
File epocRoot = new File(sdk.getEPOCROOT());
File variantCfg;
variantCfg = new File(epocRoot, SPP_VARIANT_CFG_FILE);
@@ -188,7 +194,7 @@
variantDir = matcher.group(1);
variantFile = matcher.group(3);
File variantFullPathFile = new File(epocRoot, variantDir + File.separator + variantFile);
- IPath variantFilePath = new Path(PathUtils.convertPathToUnix(variantFullPathFile.getAbsolutePath()));
+ variantFilePath = new Path(PathUtils.convertPathToUnix(variantFullPathFile.getAbsolutePath()));
return variantFilePath;
}
}
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SymbianSDK.java Thu Aug 05 11:54:21 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SymbianSDK.java Thu Aug 05 13:14:00 2010 -0500
@@ -155,20 +155,20 @@
return osVersion;
}
- public File getPrefixFile(String builderId) {
- File prefixFile = prefixFileMap.get(builderId);
- if (prefixFile == null) {
- ISDKBuildInfo buildInfo = getBuildInfo(builderId);
- if (buildInfo != null) {
- IPath prefixFilePath = buildInfo.getPrefixFromVariantCfg();
- if (prefixFilePath != null) {
- prefixFile = prefixFilePath.toFile();
- setPrefixFile(prefixFilePath, builderId);
- }
- }
- }
- return prefixFile;
- }
+// public File getPrefixFile(String builderId) {
+// File prefixFile = prefixFileMap.get(builderId);
+// if (prefixFile == null) {
+// ISDKBuildInfo buildInfo = getBuildInfo(builderId);
+// if (buildInfo != null) {
+// IPath prefixFilePath = buildInfo.getPrefixFromVariantCfg();
+// if (prefixFilePath != null) {
+// prefixFile = prefixFilePath.toFile();
+// setPrefixFile(prefixFilePath, builderId);
+// }
+// }
+// }
+// return prefixFile;
+// }
public IPath getReleaseRoot() {
String epocRoot = getEPOCROOT();
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISymbianSDK.java Thu Aug 05 11:54:21 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISymbianSDK.java Thu Aug 05 13:14:00 2010 -0500
@@ -63,13 +63,13 @@
*/
Version getOSVersion();
- /**
- * Returns the prefix file for a particular builder.
- * @param builderId id string of a builder
- * @return the File object for the prefix file, or
- * <code>null</code> if there isn't one for the SDK.
- */
- File getPrefixFile(String builderId);
+// /**
+// * Returns the prefix file for a particular builder.
+// * @param builderId id string of a builder
+// * @return the File object for the prefix file, or
+// * <code>null</code> if there isn't one for the SDK.
+// */
+// File getPrefixFile(String builderId);
/**
* Returns an IPath for the epoc32\release directory of a SDK.