getSISBuilderInfoList();
- /**
- * Get the (abld)build arguments info. Contains pref settings from the Arguments tab.
- * This only applies when building with SBSv1 (bldmake, abld)
- * @return IBuildArgumentsInfo instance, never null
- *
- * @deprecated use
- */
- IBuildArgumentsInfo getBuildArgumentsInfo();
-
- /**
- * Get the (abld)build arguments info. Contains pref settings from the Arguments tab.
- * This only applies when building with SBSv1 (bldmake, abld)
- * @return A copy of BuildArgumentsInfo instance, never null
- */
- BuildArgumentsInfo getBuildArgumentsInfoCopy();
-
- /**
- * Set the build arguments info for SBSv2 build arguments. This only sets values in memory, does
- * not write settings to disk. See
- * @return IBuildArgumentsInfo instance, never null
- */
- void setBuildArgumentsInfo(BuildArgumentsInfo bldArgInfo);
-
+
/**
* Get the parent Carbide project of this configuration.
* @return ICarbideProjectInfo
@@ -101,34 +82,6 @@
*/
IEnvironmentVarsInfo getEnvironmentVarsInfo();
- /**
- * Get the id that specifies the array of error parsers to use for a given build platform.
- * @return The integer ID of the parser to be use.
- * @see CarbideCPPBuilder.getParserIds(int id)
- */
- int getErrorParserId();
-
- /**
- * Returns the list of all built in macros for this configuration
- *
- * Macros will be just a name, e.g. "_DEBUG", "__SYMBIAN32__", etc..
- *
- *
- * @return a list of macros which may be empty.
- */
- List getBuiltinMacros();
-
- /**
- * Returns the ROM builder info from the ROM Builder tab.
- * @return
- */
- IROMBuilderInfo getROMBuildInfo();
-
- /**
- * Compares two configurations to see if their display names are equivalent.
- */
- boolean equals(Object obj);
-
/** Get the full path of the release directory into the SDK where binaries are built
* NOTE: This does not account for whether or not a project has the FEATUREVARIANT keyword
* @return IPath
@@ -137,4 +90,38 @@
*/
IPath getTargetOutputDirectory();
+ /**
+ * Retrieve the build context specific info.
+ * @return ISymbianBuildContext
+ * @since 3.0
+ */
+ ISymbianBuildContext getBuildContext();
+
+ /** ISymbianBuildContext wrapper
+ * @since 3.0 */
+ String getDisplayString();
+
+ /** ISymbianBuildContext wrapper
+ * @since 3.0 */
+ ISymbianSDK getSDK();
+
+ /** ISymbianBuildContext wrapper
+ * @since 3.0 */
+ String getPlatformString();
+
+ /** ISymbianBuildContext wrapper
+ * @since 3.0 */
+ String getTargetString();
+
+ /**
+ * Provides a list of macros suitable for preprocessing a CPP source file. This includes
+ * macros from the compiler prefix, Symbian HRH, buit-in build macros, and metadata macros.
+ * Note: If you don't want the macro values from the preincludes, you should use the methods
+ * directly under ISymbianBuildContext for more specificity.
+ * @return a list of macro defines
+ * @since 3.0
+ */
+ List getCompileTimeMacros();
+
+
}
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideProjectInfo.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideProjectInfo.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideProjectInfo.java Fri Aug 20 09:39:24 2010 -0500
@@ -52,11 +52,12 @@
public static final int ACTION_LINK_ONLY = 1;
public static final int ACTION_COMPILE_AND_LINK = 2;
+
/**
* Load all the configurations associated with this project. If this is a new project,
* then a dummy .settings file will be created which can be used to generate new build
* configurations.
- * @return A list of ICarbideBuildConfiguration objects, which may be empty
+ * @return A copy of the list of ICarbideBuildConfiguration objects, which may be empty. Modifying the result does not affect the project.
*/
public List getBuildConfigurations();
@@ -82,7 +83,7 @@
/**
* Check whether or not all components of the inf are built or subcomponents.
- * Building from inf means that only 'abld build' is invoked rather than invoking 'abld build' on specific MMP and makefiles
+ * Building from inf means that the build system is invoked on a single bld.inf, rather than build steps for individual MMPs
* @return true when building from bld.inf
*/
public boolean isBuildingFromInf();
@@ -106,14 +107,6 @@
public IPath getWorkspaceRelativeBldInfPath();
/**
- * Get the name of the MMP file that is used to calculate the target output (final artifact) for setting up launch configurations
- * @return
- *
- * @deprecated no longer used in 1.3. now returns an empty string.
- */
- public String getMMPTargetFile();
-
- /**
* Get the IProject for the Carbide.c++ project.
* @return IProject object
*/
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/IROMBuilderInfo.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/IROMBuilderInfo.java Thu Aug 19 13:31:39 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-package com.nokia.carbide.cdt.builder.project;
-
-/**
- * IROMBuilderInfo represents one instance of configuration data for the ROM Builder tab.
- * @see ICarbideBuildConfiguration
- */
-public interface IROMBuilderInfo {
-
- /**
- * Get the command line to build the ROM
- * @return string which may be empty
- */
- String getCommandLine();
-
- /**
- * Set the command line with which to build the ROM
- * @param commandLine
- */
- void setCommandLine(String commandLine);
-
- /**
- * Get the working directory to run the build from
- * @return string which may be empty
- */
- String getWorkingDirectory();
-
- /**
- * Set the working directory from which to run the build
- * @param workingDirectory
- */
- void setWorkingDirectory(String workingDirectory);
-
-}
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/CarbideConfigurationDataProvider.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/CarbideConfigurationDataProvider.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/CarbideConfigurationDataProvider.java Fri Aug 20 09:39:24 2010 -0500
@@ -28,6 +28,7 @@
import org.eclipse.cdt.core.ICExtensionReference;
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.ICStorageElement;
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
import org.eclipse.cdt.core.settings.model.extension.CConfigurationDataProvider;
import org.eclipse.core.resources.IFolder;
@@ -39,8 +40,8 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.core.runtime.jobs.Job;
+import org.osgi.framework.Version;
-import com.nokia.carbide.cdt.builder.BuildArgumentsInfo;
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
@@ -56,8 +57,17 @@
import com.nokia.carbide.cdt.internal.builder.gen.CarbideBuildConfig.CarbideBuilderConfigInfoType;
import com.nokia.carbide.cdt.internal.builder.gen.CarbideBuildConfig.ConfigurationType;
import com.nokia.carbide.cdt.internal.builder.xml.CarbideBuildConfigurationLoader;
-import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContext;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildArgumentsInfo;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv2;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildContext;
+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.SBSv2BuilderInfo;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
+import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
+import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin;
+import com.nokia.carbide.cpp.sdk.core.SymbianSDKFactory;
/**
* Main interface point with CDT with regards to our build configurations. Note that
@@ -109,6 +119,7 @@
return baseData;
}
+ @SuppressWarnings("restriction")
@Override
public CConfigurationData loadConfiguration(ICConfigurationDescription des,
IProgressMonitor monitor) throws CoreException {
@@ -119,9 +130,24 @@
throw new CoreException(new Status(IStatus.ERROR, CarbideBuilderPlugin.PLUGIN_ID, IStatus.OK, "Project " + project.getName() + " is not a valid Carbide project.", null));
}
- // find the configuration that matches the id (sdk, platform, target)
- String configId = des.getConfiguration().getId();
- ISymbianBuildContext context = SymbianBuildContext.getBuildContextFromDisplayName(configId);
+ ISymbianBuildContext context = null;
+ if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(project)){
+
+ context = loadSBSv2Configuration(des, monitor);
+
+ if (context == null){
+ throw new CoreException(new Status(IStatus.ERROR,
+ CarbideBuilderPlugin.PLUGIN_ID, IStatus.OK,
+ "Unable to load Carbide settings for project "
+ + project.getProject().getName(), null));
+ }
+ } else {
+ // Presume it's SBSv1
+ // find the configuration that matches the id (sdk, platform, target)
+ String configId = des.getConfiguration().getId();
+ context = BuildContextSBSv1.getBuildContextFromDisplayName(configId);
+ }
+
if (context == null) {
throw new CoreException(new Status(IStatus.ERROR, CarbideBuilderPlugin.PLUGIN_ID, IStatus.OK, "SDK specified in project " + project.getName() + " is not installed, please set it up from project property", null));
}
@@ -140,6 +166,75 @@
return null;
}
+ @SuppressWarnings("restriction")
+ private ISymbianBuildContext loadSBSv2Configuration(ICConfigurationDescription des,
+ IProgressMonitor monitor) {
+
+ ICStorageElement rootStorage;
+ try {
+ rootStorage = des.getStorage(CarbideBuildConfiguration.CARBIDE_STORAGE_ID, false);
+ } catch (CoreException e) {
+ return null;
+ }
+ String configID = des.getConfiguration().getId();
+ String buidAlias = null;
+ String platform = null;
+ String target = null;
+ String displayString = null;
+ String sdkID = null;
+ if (rootStorage != null) {
+ for (ICStorageElement se : rootStorage.getChildren()) {
+ if (se.getName().equals(
+ ISBSv2BuildContext.SBSV2_DATA_ID)) {
+
+ SBSv2BuilderInfo sbsv2BuilderInfo = new SBSv2BuilderInfo();
+ sbsv2BuilderInfo.loadFromStorage(se);
+ platform = sbsv2BuilderInfo.getSBSv2Setting(ISBSv2BuildConfigInfo.ATRRIB_CONFIG_BASE_PLATFORM);
+ target = sbsv2BuilderInfo.getSBSv2Setting(ISBSv2BuildConfigInfo.ATTRIB_CONFIG_TARGET);
+ buidAlias = sbsv2BuilderInfo.getSBSv2Setting(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_BUILD_ALIAS);
+ displayString = sbsv2BuilderInfo.getSBSv2Setting(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_CONFIG_DISPLAY_STRING);
+ sdkID = sbsv2BuilderInfo.getSBSv2Setting(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_SDK_ID);
+ }
+ }
+ } else {
+ return null;
+ }
+
+ ISymbianSDK sdk = null;
+ if (!configID.startsWith(ISBSv2BuildContext.BUILDER_ID)){
+ // pre-C3 (Carbide 2.x) project, get SDK id from config name
+ if (displayString == null){
+ displayString = configID;
+ }
+ if (sdkID == null){
+ sdkID = BuildContextSBSv2.getSDKIDFromV1ConfigName(displayString);
+ }
+ if (platform == null){
+ platform = BuildContextSBSv2.getPlatformFromV1ConfigName(displayString);
+ }
+ if (target == null){
+ target = BuildContextSBSv2.getTargetFromV1ConfigName(displayString);
+ }
+ if (buidAlias == null){
+ buidAlias = BuildContextSBSv2.getBuildAliasFromV1ConfigName(displayString);
+ }
+ }
+ if (sdkID != null){
+ sdk = SDKCorePlugin.getSDKManager().getSDK(sdkID, true);
+ if (sdk != null){
+ return new BuildContextSBSv2(sdk, platform, target, buidAlias, displayString, configID);
+ } else {
+ ISymbianSDK deadSDK = SymbianSDKFactory.createInstance(sdkID, ISymbianSDK.BAD_EPOCROOT, new Version("9.5"));
+ SDKCorePlugin.getSDKManager().addSDK(deadSDK);
+
+ return new BuildContextSBSv2(deadSDK, platform, target, buidAlias, displayString, configID);
+ }
+ }
+
+ return null;
+
+ }
+
@Override
public void removeConfiguration(ICConfigurationDescription des,
CConfigurationData data, IProgressMonitor monitor) {
@@ -175,12 +270,14 @@
protected static void convertSettingsData(IProject project, CarbideBuilderConfigInfoType buildConfigType) {
if (buildConfigType.getVersion() == CarbideBuildConfigurationLoader.SETTINGS_VERSION_0) {
- // Iteraate through all the configurations and convert from version 0 to 1.
+ // Iterate through all the configurations and convert from version 0 to 1.
// Reset all PATH, EPOCROOT, and MW* variables set back to their defaults
// as they are computed dynamically now.
for (Iterator i = buildConfigType.getConfiguration().iterator(); i.hasNext();) {
ConfigurationType currConfig = (ConfigurationType)i.next();
- ISymbianBuildContext context = SymbianBuildContext.getBuildContextFromDisplayName(currConfig.getName());
+
+ @SuppressWarnings("restriction")
+ ISymbianBuildContext context = BuildContextSBSv1.getBuildContextFromDisplayName(currConfig.getName());
IEnvironmentVarsInfo envSettings = new EnvironmentVarsInfo(project, context, currConfig.getEnvVars());
List varsFromSettings = envSettings.getModifiedEnvVarsListFromSettings();
List updatedEnvList = new ArrayList();
@@ -305,7 +402,8 @@
for (Iterator i = oldConfigInfo.getConfiguration().iterator(); i.hasNext();) {
ConfigurationType currConfig = (ConfigurationType)i.next();
- ISymbianBuildContext context = SymbianBuildContext.getBuildContextFromDisplayName(currConfig.getName());
+ @SuppressWarnings("restriction")
+ ISymbianBuildContext context = BuildContextSBSv1.getBuildContextFromDisplayName(currConfig.getName());
if (context != null) {
configs.add(context);
}
@@ -340,8 +438,9 @@
EnvironmentVarsInfo oldEnvVars = new EnvironmentVarsInfo(project, context, currConfig.getEnvVars());
buildConfiguration.setEnvironmentVarsInfo(new EnvironmentVarsInfo2(oldEnvVars));
+ if (context instanceof ISBSv1BuildContext)
if (wasVerboseChecked) {
- buildConfiguration.setBuildArgumentsInfo(new BuildArgumentsInfo("", "", "-v", "", "", "", "", "", "", "-v", "-v"));
+ ((ISBSv1BuildContext)context).setBuildArgumentsInfo(new BuildArgumentsInfo("", "", "-v", "", "", "", "", "", "", "-v", "-v"));
}
buildConfiguration.saveConfiguration(false);
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/BrokenConfigurationInProjectTreeNode.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/BrokenConfigurationInProjectTreeNode.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/BrokenConfigurationInProjectTreeNode.java Fri Aug 20 09:39:24 2010 -0500
@@ -41,7 +41,7 @@
for (ICarbideBuildConfiguration config : buildConfigList) {
if (config.getSDK().getUniqueId().equals(value.getUniqueId())) {
- childConfig.add(config);
+ childConfig.add(config.getBuildContext());
}
}
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/CarbidePrefsModifier.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/CarbidePrefsModifier.java Fri Aug 20 09:39:24 2010 -0500
@@ -0,0 +1,66 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+package com.nokia.carbide.cdt.internal.api.builder.ui;
+
+import com.nokia.carbide.cdt.builder.extension.ICarbidePrefsModifier;
+import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildArgumentsInfo;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildContext;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv2BuildContext;
+
+public class CarbidePrefsModifier implements ICarbidePrefsModifier {
+
+ @SuppressWarnings("deprecation")
+ public String getConfigurationValue(ICarbideBuildConfiguration config, String prefID) {
+
+ if (prefID.equals(ICarbidePrefsModifier.ABLD_BUILD_ARG_SETTING)){
+ if (config.getBuildContext() instanceof ISBSv1BuildContext){
+ BuildArgumentsInfo info = ((ISBSv1BuildContext)config.getBuildContext()).getBuildArgumentsInfoCopy();
+ return info.getAbldBuildArgs();
+ }
+ }
+
+ return null;
+ }
+
+ @SuppressWarnings("deprecation")
+ public void setConfigurationValue(ICarbideBuildConfiguration config, String arg, String prefID) {
+
+ if (prefID.equals(ICarbidePrefsModifier.ABLD_BUILD_ARG_SETTING)){
+ if (config.getBuildContext() instanceof ISBSv1BuildContext){
+ BuildArgumentsInfo info = ((ISBSv1BuildContext)config.getBuildContext()).getBuildArgumentsInfoCopy();
+ info.abldBuildArgs = arg;
+ ((ISBSv1BuildContext)config.getBuildContext()).setBuildArgumentsInfo(info);
+ }
+ }
+ }
+
+ @SuppressWarnings("deprecation")
+ public boolean isSupportedConfigurationPrefId(
+ ICarbideBuildConfiguration config, String prefID) {
+
+ if (prefID.equals(ICarbidePrefsModifier.ABLD_BUILD_ARG_SETTING)){
+ if (config.getBuildContext() instanceof ISBSv2BuildContext){
+ return false; // SBSv1 only
+ }
+ return true;
+ }
+
+ return false;
+ }
+
+}
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/MMPSelectionUI.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/MMPSelectionUI.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/MMPSelectionUI.java Fri Aug 20 09:39:24 2010 -0500
@@ -17,6 +17,7 @@
package com.nokia.carbide.cdt.internal.api.builder.ui;
import com.nokia.carbide.cdt.builder.EpocEngineHelper;
+import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IExtension;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
@@ -168,7 +169,7 @@
private Button excludeExtensionMakefilesCheckbox;
private Button excludeTestComponentsCheckbox;
private ListenerList listeners;
- private List extends ISymbianBuildContext> buildConfigs;
+ private List buildConfigs;
private IPath bldInfFile;
private final IRunnableContext runnableContext;
private List data = Collections.emptyList();
@@ -370,12 +371,12 @@
* @param bldInfFile IPath
* @param buildConfigs List
*/
- public void setBldInfFile(final IPath bldInfFile, final List buildConfigs, final boolean useSBSv2Builder) {
+ public void setBldInfFile(final IPath bldInfFile, final List buildContexts, final boolean useSBSv2Builder) {
if (bldInfFile.equals(this.bldInfFile) && buildConfigs.equals(this.buildConfigs))
return;
this.bldInfFile = bldInfFile;
- this.buildConfigs = buildConfigs;
+ this.buildConfigs = buildContexts;
this.useSBSv2Builder = useSBSv2Builder;
try {
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/ManageConfigurationsDialog.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/ManageConfigurationsDialog.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/ManageConfigurationsDialog.java Fri Aug 20 09:39:24 2010 -0500
@@ -17,6 +17,7 @@
package com.nokia.carbide.cdt.internal.api.builder.ui;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -24,6 +25,7 @@
import org.eclipse.jface.dialogs.TrayDialog;
import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.IFilter;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
@@ -34,6 +36,7 @@
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -52,21 +55,25 @@
import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
import com.nokia.carbide.cdt.builder.project.ICarbideProjectModifier;
import com.nokia.carbide.cdt.internal.builder.ui.CarbideCPPBuilderUIHelpIds;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv2BuildContext;
import com.nokia.carbide.cpp.internal.api.sdk.ISDKManagerInternal;
import com.nokia.carbide.cpp.internal.qt.core.QtConfigFilter;
import com.nokia.carbide.cpp.internal.qt.core.QtCorePlugin;
import com.nokia.carbide.cpp.internal.qt.core.QtSDKFilter;
+import com.nokia.carbide.cpp.internal.sdk.core.model.SDKManager;
import com.nokia.carbide.cpp.sdk.core.ISDKManager;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin;
import com.nokia.carbide.cpp.sdk.ui.shared.BuildTargetTreeNode;
import com.nokia.cpp.internal.api.utils.core.Check;
+import com.nokia.cpp.internal.api.utils.core.HostOS;
+import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils;
+@SuppressWarnings("restriction")
public class ManageConfigurationsDialog extends TrayDialog {
protected ContainerCheckedTreeViewer properSdkViewer;
- protected ContainerCheckedTreeViewer missingSdkViewer;
private FilteringContentProviderWrapper filteringContentProviderWrapper;
private final ICarbideProjectInfo cpi;
@@ -142,12 +149,14 @@
this.cpi = cpi;
setShellStyle(getShellStyle() | SWT.RESIZE);
- ISDKManager sdkMgr = SDKCorePlugin.getSDKManager();
- if (!sdkMgr.checkDevicesXMLSynchronized()){
- if (sdkMgr instanceof ISDKManagerInternal){
- ISDKManagerInternal sdkMgrInternal = (ISDKManagerInternal)sdkMgr;
- sdkMgrInternal.fireDevicesXMLChanged();
- }
+ if (HostOS.IS_WIN32){
+ ISDKManager sdkMgr = SDKCorePlugin.getSDKManager();
+ if (!((SDKManager)sdkMgr).checkDevicesXMLSynchronized()){
+ if (sdkMgr instanceof ISDKManagerInternal){
+ ISDKManagerInternal sdkMgrInternal = (ISDKManagerInternal)sdkMgr;
+ sdkMgrInternal.fireDevicesXMLChanged();
+ }
+ }
}
}
@@ -184,7 +193,28 @@
properSdkViewer = new ContainerCheckedTreeViewer(container, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
properSdkViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
- properSdkViewer.setLabelProvider(new LabelProvider());
+
+ class SDKNodeLabelProvider extends LabelProvider implements IColorProvider {
+
+ public Color getForeground(Object element) {
+ if (element instanceof BuildTargetTreeNode){
+ BuildTargetTreeNode treeNode = (BuildTargetTreeNode)element;
+ if (treeNode.getValue() instanceof ISymbianSDK){
+ if (treeNode.toString().contains(BuildTargetTreeNode.SDK_NODE_ERROR_EPOCROOT_INVALID)){
+ return WorkbenchUtils.getSafeShell().getDisplay().getSystemColor(SWT.COLOR_RED);
+ }
+ }
+ }
+
+ return null;
+ }
+
+ public Color getBackground(Object element) {
+ return null;
+ }
+ }
+
+ properSdkViewer.setLabelProvider(new SDKNodeLabelProvider());
TreeNodeContentProvider treeNodeContentProvider = new TreeNodeContentProvider();
filteringContentProviderWrapper =
new FilteringContentProviderWrapper(treeNodeContentProvider);
@@ -202,36 +232,17 @@
final Label uninstalledSdkConfigLabel = new Label(container, SWT.NONE);
uninstalledSdkConfigLabel.setToolTipText(Messages.getString("ManageConfigurationsDialog.Unavailable_Config_Label_ToolTip")); //$NON-NLS-1$
uninstalledSdkConfigLabel.setText(Messages.getString("ManageConfigurationsDialog.Unavailable_SDks_and_Configs")); //$NON-NLS-1$
- missingSdkViewer = new ContainerCheckedTreeViewer(container, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- missingSdkViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
- missingSdkViewer.setLabelProvider(new LabelProvider());
- filteringContentProviderWrapper =
- new FilteringContentProviderWrapper(treeNodeContentProvider);
- missingSdkViewer.setContentProvider(filteringContentProviderWrapper);
- missingSdkViewer.setInput(brokenTreeInput);
- propagateMissingSdkTree();
- missingSdkViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- // Disclose the tree if the user selected the parent node
- Object obj = event.getElement();
- if (obj instanceof BrokenConfigurationInProjectTreeNode){
- BrokenConfigurationInProjectTreeNode bttn = (BrokenConfigurationInProjectTreeNode)obj;
- missingSdkViewer.setExpandedState(bttn, true);
- }
- validatePage();
- }
- });
}
final Label sdkStaticHelp = new Label(parent, SWT.WRAP);
sdkStaticHelp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
sdkStaticHelp.setText(Messages.getString("ManageConfigurationsDialog.Select_config_help_text")); //$NON-NLS-1$
- Link fLink = new Link(parent, SWT.WRAP);
- fLink.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- fLink.setText(Messages.getString("ManageConfigurationsDialog.Select_Filtering_Prefs_Link")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- fLink.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
- fLink.addSelectionListener(new SelectionAdapter() {
+ Link configPrefLink = new Link(parent, SWT.WRAP);
+ configPrefLink.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ configPrefLink.setText(Messages.getString("ManageConfigurationsDialog.Select_Filtering_Prefs_Link")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ configPrefLink.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
+ configPrefLink.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
// I don't see a way to open it to a specific tab, only the page
if (Window.OK == PreferencesUtil.createPreferenceDialogOn(getShell(), "com.nokia.carbide.cpp.sdk.ui.preferences.BuildPlatformFilterPage", null, null, 0).open()){ //$NON-NLS-1$
@@ -240,6 +251,19 @@
}
});
+ Link sdkLink = new Link(parent, SWT.WRAP);
+ sdkLink.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ sdkLink.setText(Messages.getString("ManageConfigurationsDialog.Select_SymbianSDKs_Prefs_Link")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ sdkLink.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
+ sdkLink.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ // I don't see a way to open it to a specific tab, only the page
+ if (Window.OK == PreferencesUtil.createPreferenceDialogOn(getShell(), "com.nokia.carbide.cpp.sdk.ui.preferences.SDKPreferencePage", null, null, 0).open()){ //$NON-NLS-1$
+ drawSDKConfigTree();
+ }
+ }
+ });
+
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, CarbideCPPBuilderUIHelpIds.CARBIDE_BUILDER_MANAGE_CONFIGURATIONS_DLG);
return container;
@@ -249,7 +273,12 @@
boolean sbsv2Project = CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(cpi.getProject());
properSdkViewer.setContentProvider(filteringContentProviderWrapper);
- properSdkViewer.setInput(BuildTargetTreeNode.getTreeViewerInput(sbsv2Project));
+ BuildTargetTreeNode[] sdkConfigTreeNodes = BuildTargetTreeNode.getTreeViewerInput(sbsv2Project);
+ if (sbsv2Project){
+ replaceFilteredConfigsFromProject(sdkConfigTreeNodes);
+ }
+
+ properSdkViewer.setInput(sdkConfigTreeNodes);
propagateSdkTree();
properSdkViewer.addCheckStateListener(new ICheckStateListener() {
public void checkStateChanged(CheckStateChangedEvent event) {
@@ -266,6 +295,122 @@
}
/**
+ * When displaying build configs there may be configurations in the project that may not be displayed
+ * We add those back in so they reside in the checked tree viewer in case the user wants to remove them.
+ * @param sdkConfigTreeNodes
+ */
+ private void replaceFilteredConfigsFromProject(BuildTargetTreeNode[] sdkConfigTreeNodes) {
+ List bldConfigs = cpi.getBuildConfigurations();
+
+ HashMap> missingConfigMap = new HashMap>();
+ for (ICarbideBuildConfiguration config : bldConfigs){
+ boolean foundConfig = false;
+ // Add in configs that are only defined in the project and not the
+ // suggested filtered config cache
+ for (BuildTargetTreeNode sdkConfigNode : sdkConfigTreeNodes){
+ ISymbianSDK sdk = sdkConfigNode.getSymbianSDK();
+ if (!sdk.getUniqueId().equals(config.getSDK().getUniqueId())){
+ continue; // not in this SDK, don't bother looking at all configs
+ } else {
+ // Found the right SDK, now check and see if the config exists
+ TreeNode[] configNodes = sdkConfigNode.getChildren();
+ if (configNodes != null){
+ for (TreeNode childConfig : configNodes){
+ if (childConfig == null){
+ continue;
+ }
+ if (childConfig.getValue() instanceof ISymbianBuildContext){
+ ISymbianBuildContext context = (ISymbianBuildContext)(childConfig.getValue());
+ if (config.getBuildContext().equals(context)){
+ foundConfig = true;
+ break;
+ }
+ }
+ }
+ }
+ if (!foundConfig){
+ // save config off, we'll add it back in later
+ List contextsToAdd = new ArrayList();
+ if (null == missingConfigMap.get(sdkConfigNode)){
+ contextsToAdd.add(config.getBuildContext());
+ } else {
+ contextsToAdd = missingConfigMap.get(sdkConfigNode);
+ contextsToAdd.add(config.getBuildContext());
+ }
+ missingConfigMap.put(sdkConfigNode, contextsToAdd);
+
+ }
+ }
+ }
+ }
+
+ for (BuildTargetTreeNode sdkNode : missingConfigMap.keySet()){
+ List configsToAdd = missingConfigMap.get(sdkNode);
+ TreeNode[] oldConfigNodes = sdkNode.getChildren();
+ if (oldConfigNodes == null || oldConfigNodes.length == 0){
+ continue;
+ }
+ TreeNode[] newConfigNodes = new TreeNode[oldConfigNodes.length + configsToAdd.size()];
+ int index = 0;
+ // build up the old list....
+ for (TreeNode newConfigNode : oldConfigNodes){
+ if (newConfigNode == null){
+ continue;
+ }
+ if (newConfigNode.getValue() instanceof ISymbianBuildContext){
+ ISymbianBuildContext context = (ISymbianBuildContext)(newConfigNode.getValue());
+ newConfigNodes[index++] = new TreeNode(context) {
+ @Override
+ public String toString() {
+ ISymbianBuildContext context = (ISymbianBuildContext)getValue();
+ String sdkId = context.getSDK().getUniqueId();
+ String newDisplayString = stripSDKIDFromConfigName(context.getDisplayString(), sdkId);
+ if (context instanceof ISBSv2BuildContext){
+ ISBSv2BuildContext v2Context = (ISBSv2BuildContext)context;
+ if (v2Context.getConfigQueryData() == null){
+ newDisplayString += " ERROR: " + "Unable to load configuration data because the query to sbs failed."; // $NON-NLS-N$
+ }
+ else if (v2Context.getConfigQueryData().getConfigurationErrorMessage() != null &&
+ v2Context.getConfigQueryData().getConfigurationErrorMessage().length() > 0){
+ newDisplayString += " ERROR: " + v2Context.getConfigQueryData().getConfigurationErrorMessage();
+ }
+ }
+ return newDisplayString;
+ }
+ };
+ }
+ }
+
+ // ... then add the project specific items...
+ for (ISymbianBuildContext newContext : configsToAdd){
+ newConfigNodes[index++] = new TreeNode(newContext) {
+ @Override
+ public String toString() {
+ ISymbianBuildContext context = (ISymbianBuildContext)getValue();
+ String sdkId = context.getSDK().getUniqueId();
+ String newDisplayString = stripSDKIDFromConfigName(context.getDisplayString(), sdkId);
+ if (context instanceof ISBSv2BuildContext){
+ ISBSv2BuildContext v2Context = (ISBSv2BuildContext)context;
+ if (v2Context.getConfigQueryData() == null){
+ newDisplayString += " ERROR: " + "Unable to load configuration data because the query to sbs failed."; // $NON-NLS-N$
+ }
+ else if (v2Context.getConfigQueryData().getConfigurationErrorMessage() != null &&
+ v2Context.getConfigQueryData().getConfigurationErrorMessage().length() > 0){
+ newDisplayString += " ERROR: " + v2Context.getConfigQueryData().getConfigurationErrorMessage();
+ }
+ }
+ return newDisplayString;
+ }
+ };
+ }
+
+ sdkNode.setChildren(newConfigNodes);
+
+ }
+
+ }
+
+ /**
* Create contents of the button bar
* @param parent
*/
@@ -309,17 +454,19 @@
ISymbianBuildContext buildContext = (ISymbianBuildContext)currConfigNode.getValue();
for (ICarbideBuildConfiguration currExistingConfig : buildConfigList){
boolean checkIt = false;
- checkIt = currExistingConfig.equals(buildContext);
+ checkIt = currExistingConfig.getBuildContext().equals(buildContext);
if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(cpi.getProject()) &&
- !checkIt && currExistingConfig.getSBSv2Alias() == null){
+ !checkIt){
- // extra check to see if we're using SBSv2 and config display name is older SBSv1 style
- if (buildContext.getTargetString().equals(currExistingConfig.getTargetString()) &&
- buildContext.getPlatformString().equals(currExistingConfig.getPlatformString()) &&
- buildContext.getSDK().getUniqueId().equals(currExistingConfig.getSDK().getUniqueId() )
- && buildContext.getSBSv2Alias() != null && buildContext.getSBSv2Alias().split("_").length == 2){
-
- checkIt = true;
+ if (buildContext instanceof ISBSv2BuildContext){
+ ISBSv2BuildContext v2Context = (ISBSv2BuildContext)buildContext;
+ ISBSv2BuildContext currV2Context = (ISBSv2BuildContext)currExistingConfig.getBuildContext();
+ // extra check to see if we're using SBSv2 and config display name is older SBSv1 style
+ if (currV2Context.getConfigID().startsWith(ISBSv2BuildContext.BUILDER_ID)){
+ if (v2Context.getConfigID().equals(currV2Context.getConfigID()) ){
+ checkIt = true;
+ }
+ }
}
}
if (checkIt){
@@ -336,19 +483,6 @@
properSdkViewer.refresh();
}
- private void propagateMissingSdkTree() {
- TreeItem[] items = missingSdkViewer.getTree().getItems();
- // all nodes in this tree are select, as the tree only reflect selected config with bad SDK
- for (int i=0; iPlatform Filtering Preferences to configure displayed build configurations.
+ManageConfigurationsDialog.Select_Filtering_Prefs_Link=\n See Build Configuration Filtering Preferences to configure displayed build configurations.
+ManageConfigurationsDialog.Select_SymbianSDKs_Prefs_Link=\n See Symbian SDKs to manage your Symbian SDK installations.
MMPSelectionUI.BuildOrderColumnLabel=Build order
MMPSelectionUI.FileNameColumnLabel=File name
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/BuildConfigurationData.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/BuildConfigurationData.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/BuildConfigurationData.java Fri Aug 20 09:39:24 2010 -0500
@@ -48,6 +48,8 @@
import com.nokia.carbide.cdt.builder.EpocEngineHelper;
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildContext;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv2BuildContext;
import com.nokia.cpp.internal.api.utils.core.TextUtils;
/**
@@ -125,12 +127,18 @@
@Override
public String getId() {
- return carbideBuildConfig.getDisplayString();
+ if (carbideBuildConfig.getBuildContext() instanceof ISBSv1BuildContext){
+ return carbideBuildConfig.getBuildContext().getDisplayString();
+ } else if (carbideBuildConfig.getBuildContext() instanceof ISBSv2BuildContext) {
+ return ((ISBSv2BuildContext)carbideBuildConfig.getBuildContext()).getConfigID();
+ }
+
+ return null;
}
@Override
public String getName() {
- return carbideBuildConfig.getDisplayString();
+ return carbideBuildConfig.getBuildContext().getDisplayString();
}
@Override
@@ -277,7 +285,7 @@
ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(cpi.getProject());
if (projDes != null) {
- ICConfigurationDescription configDes = projDes.getConfigurationById(carbideBuildConfig.getDisplayString());
+ ICConfigurationDescription configDes = projDes.getConfigurationById(carbideBuildConfig.getBuildContext().getConfigurationID());
if (configDes != null) {
String sourcesCacheValue = "";
for (ICSourceEntry src : sourceEntries) {
@@ -308,7 +316,7 @@
try {
ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(project);
if (projDes != null) {
- ICConfigurationDescription configDes = projDes.getConfigurationById(carbideBuildConfig.getDisplayString());
+ ICConfigurationDescription configDes = projDes.getConfigurationById(((CarbideBuildConfiguration)carbideBuildConfig).getBuildContext().getConfigurationID());
if (configDes != null) {
ICStorageElement storage = configDes.getStorage(CONFIG_DATA_CACHE, false);
if (storage != null) {
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java Fri Aug 20 09:39:24 2010 -0500
@@ -31,59 +31,57 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
-import com.nokia.carbide.cdt.builder.BuildArgumentsInfo;
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
import com.nokia.carbide.cdt.builder.EpocEngineHelper;
import com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder;
-import com.nokia.carbide.cdt.builder.project.IBuildArgumentsInfo;
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
import com.nokia.carbide.cdt.builder.project.IEnvironmentVarsInfo;
-import com.nokia.carbide.cdt.builder.project.IROMBuilderInfo;
import com.nokia.carbide.cdt.builder.project.ISISBuilderInfo;
import com.nokia.carbide.cdt.internal.api.builder.SISBuilderInfo2;
-import com.nokia.carbide.cpp.internal.api.sdk.SBSv2Utils;
+import com.nokia.carbide.cpp.epoc.engine.preprocessor.DefineFactory;
+import com.nokia.carbide.cpp.epoc.engine.preprocessor.IDefine;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildContext;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildInfo;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv2BuildContext;
import com.nokia.carbide.cpp.internal.api.sdk.SDKManagerInternalAPI;
-import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContext;
+import com.nokia.carbide.cpp.internal.api.sdk.sbsv2.SBSv2QueryUtils;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
+import com.nokia.carbide.cpp.sdk.core.ISymbianBuilderID;
import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
import com.nokia.cpp.internal.api.utils.core.TrackedResource;
-public class CarbideBuildConfiguration extends SymbianBuildContext implements ICarbideBuildConfiguration {
+@SuppressWarnings("deprecation")
+public class CarbideBuildConfiguration implements ICarbideBuildConfiguration {
static final String NOT_INSTALLED = "(SDK not found)"; //$NON-NLS-1$
- protected static final String CARBIDE_STORAGE_ID = "CarbideConfigurationDataProvider"; //$NON-NLS-1$
+ public static final String CARBIDE_STORAGE_ID = "CarbideConfigurationDataProvider"; //$NON-NLS-1$
protected final static String SIS_BUILDER_DATA_ID = "SIS_BUILDER_DATA_ID"; //$NON-NLS-1$
protected final static String ENV_VAR_DATA_ID = "ENV_VAR_DATA_ID"; //$NON-NLS-1$
- protected final static String ARGUMENTS_DATA_ID = "ARGUMENTS_DATA_ID"; //$NON-NLS-1$
protected final static String ROM_BUILDER_DATA_ID = "ROM_BUILDER_DATA_ID"; //$NON-NLS-1$
- // SBSv2 only config settings
- protected final static String SBSV2_DATA_ID = "SBSV2_DATA_ID"; //$NON-NLS-1$
-
+ protected ISymbianBuildContext context;
protected TrackedResource projectTracker;
protected List sisBuilderInfoList;
protected EnvironmentVarsInfo2 envVarsInfo;
- protected BuildArgumentsInfo buildArgumentsInfo;
+
protected BuildConfigurationData buildConfigData;
- protected ROMBuilderInfo romBuilderInfo;
- protected SBSv2BuilderInfo sbsv2BuilderInfo;
+
protected boolean rebuildNeeded;
public CarbideBuildConfiguration(IProject project, ISymbianBuildContext context) {
- super(context.getSDK(), context.getPlatformString(), context.getTargetString(), context.getSBSv2Alias());
+ this.context = context;
projectTracker = new TrackedResource(project);
sisBuilderInfoList = new ArrayList(0);
envVarsInfo = new EnvironmentVarsInfo2(project, context);
- buildArgumentsInfo = new BuildArgumentsInfo(getSDK());
+
buildConfigData = new BuildConfigurationData(this);
- romBuilderInfo = new ROMBuilderInfo(getSDK());
- if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(project)){
- sbsv2BuilderInfo = new SBSv2BuilderInfo(context);
- }
+
rebuildNeeded = true;
}
@@ -102,15 +100,11 @@
}
} else if (se.getName().equals(ENV_VAR_DATA_ID)) {
envVarsInfo.loadFromStorage(se);
- } else if (se.getName().equals(ARGUMENTS_DATA_ID)) {
- loadBuildArgsFromStorage(se);
- } else if (se.getName().equals(ROM_BUILDER_DATA_ID)) {
- romBuilderInfo.loadFromStorage(se);
- } else if (se.getName().equals(SBSV2_DATA_ID)){
- if (sbsv2BuilderInfo != null){
- sbsv2BuilderInfo.loadFromStorage(se);
- }
- }
+ }
+
+ // Load build context specific settings.
+ getBuildContext().loadConfigurationSettings(se);
+
}
} else {
throw new CoreException(new Status(IStatus.ERROR, CarbideBuilderPlugin.PLUGIN_ID, IStatus.OK, "Unable to load Carbide settings for project " + projectTracker.getProject().getName() + ", " + getDisplayString(), null));
@@ -128,115 +122,9 @@
}
envVarsInfo.saveToStorage(rootStorage.createChild(ENV_VAR_DATA_ID));
- saveBuildArgsToStorage(rootStorage.createChild(ARGUMENTS_DATA_ID));
- romBuilderInfo.saveToStorage(rootStorage.createChild(ROM_BUILDER_DATA_ID));
- if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(getCarbideProject().getProject())){
- sbsv2BuilderInfo.saveToStorage(rootStorage.createChild(SBSV2_DATA_ID));
- }
- }
- }
-
- private void loadBuildArgsFromStorage(ICStorageElement rootStorage) {
- String value = rootStorage.getAttribute(BuildArgumentsInfo.BLDMAKEBLDFILESARGSSTORAGE);
- if (value != null) {
- buildArgumentsInfo.bldmakeBldFilesArgs = value;
- }
-
- value = rootStorage.getAttribute(BuildArgumentsInfo.BLDMAKECLEANARGSSTORAGE);
- if (value != null) {
- buildArgumentsInfo.bldmakeCleanArgs = value;
- }
-
- value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDBUILDARGSSTORAGE);
- if (value != null) {
- buildArgumentsInfo.abldBuildArgs = value;
- }
-
- value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDEXPORTARGSSTORAGE);
- if (value != null) {
- buildArgumentsInfo.abldExportArgs = value;
- }
-
- value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDMAKEFILEARGSSTORAGE);
- if (value != null) {
- buildArgumentsInfo.abldMakefileArgs = value;
- }
-
- value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDLIBRARYARGSSTORAGE);
- if (value != null) {
- buildArgumentsInfo.abldLibraryArgs = value;
- }
-
- value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDRESOURCEARGSSTORAGE);
- if (value != null) {
- buildArgumentsInfo.abldResourceArgs = value;
- }
-
- value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDTARGETARGSSTORAGE);
- if (value != null) {
- buildArgumentsInfo.abldTargetArgs = value;
- }
-
- value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDFINALARGSSTORAGE);
- if (value != null) {
- buildArgumentsInfo.abldFinalArgs = value;
- }
-
- value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDCLEANARGSSTORAGE);
- if (value != null) {
- buildArgumentsInfo.abldCleanArgs = value;
- }
-
- value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDFREEZEARGSSTORAGE);
- if (value != null) {
- buildArgumentsInfo.abldFreezeArgs = value;
- }
- }
-
- public void saveBuildArgsToStorage(ICStorageElement rootStorage) {
- if (buildArgumentsInfo.bldmakeBldFilesArgs.trim().length() > 0) {
- rootStorage.setAttribute(BuildArgumentsInfo.BLDMAKEBLDFILESARGSSTORAGE, buildArgumentsInfo.bldmakeBldFilesArgs);
- }
-
- if (buildArgumentsInfo.bldmakeCleanArgs.trim().length() > 0) {
- rootStorage.setAttribute(BuildArgumentsInfo.BLDMAKECLEANARGSSTORAGE, buildArgumentsInfo.bldmakeCleanArgs);
- }
-
- if (buildArgumentsInfo.abldBuildArgs.trim().length() > 0) {
- rootStorage.setAttribute(BuildArgumentsInfo.ABLDBUILDARGSSTORAGE, buildArgumentsInfo.abldBuildArgs);
- }
-
- if (buildArgumentsInfo.abldExportArgs.trim().length() > 0) {
- rootStorage.setAttribute(BuildArgumentsInfo.ABLDEXPORTARGSSTORAGE, buildArgumentsInfo.abldExportArgs);
- }
-
- if (buildArgumentsInfo.abldMakefileArgs.trim().length() > 0) {
- rootStorage.setAttribute(BuildArgumentsInfo.ABLDMAKEFILEARGSSTORAGE, buildArgumentsInfo.abldMakefileArgs);
- }
-
- if (buildArgumentsInfo.abldLibraryArgs.trim().length() > 0) {
- rootStorage.setAttribute(BuildArgumentsInfo.ABLDLIBRARYARGSSTORAGE, buildArgumentsInfo.abldLibraryArgs);
- }
-
- if (buildArgumentsInfo.abldResourceArgs.trim().length() > 0) {
- rootStorage.setAttribute(BuildArgumentsInfo.ABLDRESOURCEARGSSTORAGE, buildArgumentsInfo.abldResourceArgs);
- }
-
- if (buildArgumentsInfo.abldTargetArgs.trim().length() > 0) {
- rootStorage.setAttribute(BuildArgumentsInfo.ABLDTARGETARGSSTORAGE, buildArgumentsInfo.abldTargetArgs);
- }
-
- if (buildArgumentsInfo.abldFinalArgs.trim().length() > 0) {
- rootStorage.setAttribute(BuildArgumentsInfo.ABLDFINALARGSSTORAGE, buildArgumentsInfo.abldFinalArgs);
- }
-
- if (buildArgumentsInfo.abldCleanArgs.trim().length() > 0) {
- rootStorage.setAttribute(BuildArgumentsInfo.ABLDCLEANARGSSTORAGE, buildArgumentsInfo.abldCleanArgs);
- }
-
- if (buildArgumentsInfo.abldFreezeArgs.trim().length() > 0) {
- rootStorage.setAttribute(BuildArgumentsInfo.ABLDFREEZEARGSSTORAGE, buildArgumentsInfo.abldFreezeArgs);
+ // Save build context specific settings.
+ this.getBuildContext().saveConfigurationSettings(rootStorage, getBuildContext());
}
}
@@ -255,7 +143,8 @@
try {
ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(projectTracker.getProject());
if (projDes != null) {
- ICConfigurationDescription configDes = projDes.getConfigurationById(getDisplayString());
+
+ ICConfigurationDescription configDes = projDes.getConfigurationById(getBuildContext().getConfigurationID());
if (configDes != null) {
// save the CDT project description. this saves all configs but that's the
// only thing CDT allows at this point.
@@ -270,7 +159,7 @@
return false;
}
-
+
public List getSISBuilderInfoList() {
return sisBuilderInfoList;
}
@@ -289,53 +178,32 @@
}
}
- public int getErrorParserId(){
+ private int getErrorParserId(){
String plat = this.getPlatformString();
- if (this.getSBSv2Alias() != null && this.getSBSv2Alias().toUpperCase().contains(ISymbianBuildContext.GCCE_PLATFORM)){
- return ERROR_PARSERS_GCCE;
- }
-
- if (plat.equals(ISymbianBuildContext.EMULATOR_PLATFORM)){
- return ERROR_PARSERS_WINSCW;
- } else if (plat.startsWith("ARMV")){
- return ERROR_PARSERS_ARMVx;
- } else if (plat.equals(ISymbianBuildContext.GCCE_PLATFORM)){
- return ERROR_PARSERS_GCCE;
+ if (context instanceof ISBSv2BuildContext){
+ String toolChain = ((ISBSv2BuildContext)context).getToolChain();
+ if (toolChain.equalsIgnoreCase(ISBSv2BuildContext.TOOLCHAIN_ARM)){
+ return ERROR_PARSERS_ARMVx;
+ } else if (toolChain.equalsIgnoreCase(ISBSv2BuildContext.TOOLCHAIN_GCCE)){
+ return ERROR_PARSERS_GCCE;
+ } else if (toolChain.equalsIgnoreCase(ISBSv2BuildContext.TOOLCHAIN_WINSCW)){
+ return ERROR_PARSERS_WINSCW;
+ }
+ } else {
+ // SBSV1
+ if (plat.equals(ISBSv1BuildContext.EMULATOR_PLATFORM)){
+ return ERROR_PARSERS_WINSCW;
+ } else if (plat.startsWith("ARMV")){
+ return ERROR_PARSERS_ARMVx;
+ } else if (plat.equals(ISBSv1BuildContext.GCCE_PLATFORM)){
+ return ERROR_PARSERS_GCCE;
+ }
}
return ERROR_PARSERS_ALL;
}
- public List getBuiltinMacros() {
- List macros = new ArrayList();
-
- if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(getCarbideProject().getProject())){
- macros.add("SBSV2"); //$NON-NLS-1$
- }
-
- // add the macros that should always be defined
- macros.add("__SYMBIAN32__"); //$NON-NLS-1$
- macros.add("_UNICODE"); //$NON-NLS-1$
-
- ISymbianSDK sdk = getSDK();
- if (sdk != null && sdk.getOSVersion().getMajor() >= 9) {
- macros.add("__SUPPORT_CPP_EXCEPTIONS__"); //$NON-NLS-1$
- }
-
- if (getTargetString().equals(DEBUG_TARGET)) {
- macros.add("_DEBUG"); //$NON-NLS-1$
- } else {
- macros.add("NDEBUG"); //$NON-NLS-1$
- }
-
- if (hasSTDCPPSupport()){
- macros.add("__SYMBIAN_STDCPP_SUPPORT__");
- }
-
- return macros;
- }
-
public CConfigurationData getBuildConfigurationData() {
return buildConfigData;
}
@@ -358,7 +226,7 @@
public static String toMarkedConfig(String config) {
if (config == null)
return null;
- if (SDKManagerInternalAPI.getMissingSdk(SymbianBuildContext.getSDKIDFromConfigName(config)) != null) {
+ if (SDKManagerInternalAPI.getMissingSdk(BuildContextSBSv1.getSDKIDFromConfigName(config)) != null) {
return badSdkString() + config;
}
return config;
@@ -374,34 +242,63 @@
return config;
}
- public IBuildArgumentsInfo getBuildArgumentsInfo() {
- return (IBuildArgumentsInfo)buildArgumentsInfo;
+ public IPath getTargetOutputDirectory() {
+ if (context instanceof ISBSv2BuildContext){
+ if (((ISBSv2BuildContext) context).getConfigQueryData() != null){
+ return new Path(((ISBSv2BuildContext)context).getConfigQueryData().getOutputPathString());
+ } else {
+ return new Path("/" + SBSv2QueryUtils.BAD_EPOCROOT);
+ }
+ } else {
+ ISymbianSDK sdk = getSDK();
+ ISBSv1BuildContext v1Context = (ISBSv1BuildContext)context;
+ ISBSv1BuildInfo sbsv1BuildInfo = (ISBSv1BuildInfo)sdk.getBuildInfo(ISymbianBuilderID.SBSV1_BUILDER);
+ String releasePlatform = sbsv1BuildInfo.getBSFCatalog().getReleasePlatform(v1Context.getBasePlatformForVariation());
+ return sdk.getReleaseRoot().append(releasePlatform.toLowerCase()).append(getTargetString().toLowerCase());
+ }
+ }
+
+ public boolean getRebuildNeeded() {
+ return rebuildNeeded;
}
- public BuildArgumentsInfo getBuildArgumentsInfoCopy() {
- return new BuildArgumentsInfo(buildArgumentsInfo);
- }
-
- public void setBuildArgumentsInfo(BuildArgumentsInfo buildArgumentsInfo) {
- this.buildArgumentsInfo = buildArgumentsInfo;
+ public void setRebuildNeeded(boolean value) {
+ rebuildNeeded = value;
}
- public IROMBuilderInfo getROMBuildInfo() {
- return romBuilderInfo;
+ public ISymbianSDK getSDK() {
+ return context.getSDK();
+ }
+
+ public String getPlatformString() {
+ return context.getPlatformString();
+ }
+
+ public String getTargetString() {
+ return context.getTargetString();
}
- public ISBSv2BuildConfigInfo getSBSv2BuildConfigInfo(){
- return sbsv2BuilderInfo;
+ public String getDisplayString() {
+ return context.getDisplayString();
}
- private boolean hasSTDCPPSupport() {
+ public ISymbianBuildContext getBuildContext() {
+ return context;
+ }
+
+ /**
+ * Check that at least one MMP in the project configuration has stdcpp support keyword
+ * @return
+ * @since 3.0
+ */
+ public boolean hasSTDCPPSupport() {
- ICarbideProjectInfo cpi = getCarbideProject();
+ ICarbideProjectInfo cpi = this.getCarbideProject();
List buildConfig = new ArrayList();
List normalMakMakePaths = new ArrayList();
List testMakMakePaths = new ArrayList();
- buildConfig.add(this);
+ buildConfig.add(this.getBuildContext());
EpocEngineHelper.getMakMakeFiles(cpi.getAbsoluteBldInfPath(), buildConfig, normalMakMakePaths, testMakMakePaths, new NullProgressMonitor());
for (IPath mmpPath : normalMakMakePaths){
@@ -413,28 +310,17 @@
return false;
}
- public ISBSv2BuildConfigInfo getSBSv2ConfigInfo() {
- return sbsv2BuilderInfo;
- }
-
- public IPath getTargetOutputDirectory() {
- String releasePlatform = getSDK().getBSFCatalog().getReleasePlatform(getBasePlatformForVariation());
- if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(getCarbideProject().getProject())){
- // Test is this is an SBSv2 build binary variant (changes the output directory)
- ISBSv2BuildConfigInfo sbsv2Info = getSBSv2BuildConfigInfo();
- if ( sbsv2Info != null && SBSv2Utils.getVariantOutputDirModifier(sbsv2Info.getSBSv2Setting(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_VARIANT)) != null && !releasePlatform.contains(".") ){
- releasePlatform = releasePlatform + SBSv2Utils.getVariantOutputDirModifier(sbsv2Info.getSBSv2Setting(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_VARIANT));
- }
- }
- return getSDK().getReleaseRoot().append(releasePlatform.toLowerCase()).append(getTargetString().toLowerCase());
- }
-
- public boolean getRebuildNeeded() {
- return rebuildNeeded;
- }
-
- public void setRebuildNeeded(boolean value) {
- rebuildNeeded = value;
+ public List getCompileTimeMacros() {
+
+ List defines = new ArrayList();
+
+ defines.addAll(context.getBuildMacros());
+ defines.addAll(context.getCompilerPreincludeDefines());
+ defines.addAll(context.getVariantHRHDefines());
+ defines.addAll(context.getMetadataMacros());
+
+ return defines;
+
}
}
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildManager.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildManager.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildManager.java Fri Aug 20 09:39:24 2010 -0500
@@ -46,9 +46,11 @@
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
import com.nokia.carbide.cdt.builder.EpocEngineHelper;
import com.nokia.carbide.cdt.builder.ICarbideBuildManager;
+import com.nokia.carbide.cdt.builder.extension.ICarbidePrefsModifier;
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
import com.nokia.carbide.cdt.builder.project.ICarbideProjectModifier;
+import com.nokia.carbide.cdt.internal.api.builder.ui.CarbidePrefsModifier;
import com.nokia.carbide.cpp.sdk.core.ICarbideInstalledSDKChangeListener;
import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin;
import com.nokia.cpp.internal.api.utils.core.FileUtils;
@@ -70,9 +72,15 @@
private Map projectInfoMap = new HashMap();
private MultiResourceChangeListenerDispatcher resourceChangedListener = new MultiResourceChangeListenerDispatcher();
+ ICarbidePrefsModifier clientPrefsModifier;
+
public CarbideBuildManager() {
SDKCorePlugin.getSDKManager().addInstalledSdkChangeListener(this);
+
+ if (clientPrefsModifier == null){
+ clientPrefsModifier = new CarbidePrefsModifier();
+ }
}
public boolean isCarbideProject(IProject project) {
@@ -389,20 +397,27 @@
CarbideBuilderPlugin.getDefault().getPreferenceStore().setValue(CONVERTED_SRC_MAPPINGS_2X_TO_3X, true);
}
- synchronized(projectInfoMap){
- for (IProject currPrj : projectInfoMap.keySet()){
- try {
- ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(currPrj);
- if (projDes != null) {
- CCorePlugin.getDefault().setProjectDescription(currPrj, projDes, true, null);
- }
- } catch (CoreException e) {
- e.printStackTrace();
- CarbideBuilderPlugin.log(e);
- }
- }
- }
+ // TODO: This is causing deadlocks with the indexer and generally when other project info is being retrieved
+ // Need to consider what this is actually doing and why it even needs to be here.
+
+// synchronized(projectInfoMap){
+// for (IProject currPrj : projectInfoMap.keySet()){
+// try {
+// ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(currPrj);
+// if (projDes != null) {
+// CCorePlugin.getDefault().setProjectDescription(currPrj, projDes, true, null);
+// }
+// } catch (CoreException e) {
+// e.printStackTrace();
+// CarbideBuilderPlugin.log(e);
+// }
+// }
+// }
}
}
+
+ public ICarbidePrefsModifier getPrefsModifier(){
+ return clientPrefsModifier;
+ }
}
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.java Fri Aug 20 09:39:24 2010 -0500
@@ -17,25 +17,46 @@
package com.nokia.carbide.cdt.internal.builder;
import java.io.File;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Set;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.model.CoreModel;
-import org.eclipse.cdt.core.settings.model.*;
+import org.eclipse.cdt.core.settings.model.CIncludePathEntry;
+import org.eclipse.cdt.core.settings.model.CMacroEntry;
+import org.eclipse.cdt.core.settings.model.CMacroFileEntry;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.ICSettingEntry;
+import org.eclipse.cdt.core.settings.model.ICStorageElement;
import org.eclipse.cdt.core.settings.model.extension.CLanguageData;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.content.*;
-import org.eclipse.swt.widgets.Display;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeManager;
+import org.eclipse.core.runtime.content.IContentTypeSettings;
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
import com.nokia.carbide.cdt.builder.EpocEngineHelper;
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cpp.epoc.engine.model.sbv.ISBVView;
import com.nokia.carbide.cpp.epoc.engine.preprocessor.IDefine;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildContext;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildInfo;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv2BuildContext;
import com.nokia.carbide.cpp.sdk.core.IBSFPlatform;
import com.nokia.carbide.cpp.sdk.core.ISBVPlatform;
+import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
+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;
import com.nokia.cpp.internal.api.utils.core.TextUtils;
/**
@@ -132,11 +153,11 @@
Set macros = new HashSet();
macros.addAll(macroEntries);
- for (IDefine define : carbideBuildConfig.getVariantHRHDefines()) {
+ for (IDefine define : carbideBuildConfig.getBuildContext().getVariantHRHDefines()) {
macros.add(new CMacroEntry(define.getNameAndArguments(), define.getExpansion(), 0));
}
- for (IDefine define : carbideBuildConfig.getCompilerMacros()) {
+ for (IDefine define : carbideBuildConfig.getBuildContext().getCompilerPreincludeDefines()) {
macros.add(new CMacroEntry(define.getNameAndArguments(), define.getExpansion(), 0));
}
@@ -174,10 +195,18 @@
CarbideProjectInfo cpi = (CarbideProjectInfo)carbideBuildConfig.getCarbideProject();
IProject project = cpi.getProject();
+ ISymbianSDK sdk = carbideBuildConfig.getSDK();
+ ISymbianBuildContext context = carbideBuildConfig.getBuildContext();
// add platform includes first
- IBSFPlatform platform = carbideBuildConfig.getSDK().getBSFCatalog().findPlatform(carbideBuildConfig.getPlatformString());
- ISBVPlatform sbvPlat = carbideBuildConfig.getSDK().getSBVCatalog().findPlatform(carbideBuildConfig.getPlatformString());
+ IBSFPlatform platform = null;
+ ISBVPlatform sbvPlat = null;
+ if (context instanceof ISBSv1BuildContext) {
+ // SBSv1 only
+ ISBSv1BuildInfo sbsv1BuildInfo = (ISBSv1BuildInfo)sdk.getBuildInfo(ISymbianBuilderID.SBSV1_BUILDER);
+ platform = sbsv1BuildInfo.getBSFCatalog().findPlatform(carbideBuildConfig.getPlatformString());
+ sbvPlat = sbsv1BuildInfo.getSBVCatalog().findPlatform(carbideBuildConfig.getPlatformString());
+ }
if (platform != null) {
IPath[] systemIncludePaths = platform.getSystemIncludePaths();
for (IPath path : systemIncludePaths) {
@@ -212,6 +241,28 @@
includeEntries.add(new CIncludePathEntry(incPath, ICSettingEntry.LOCAL));
}
}
+
+ if (context instanceof ISBSv2BuildContext) {
+ // SBSv2 only system includes
+ if (((ISBSv2BuildContext)context).getSystemIncludes() != null){
+
+ for (IPath incPath : ((ISBSv2BuildContext)context).getSystemIncludes()) {
+ IPath projRelIncPath = FileUtils.removePrefixFromPath(projectPath, incPath);
+ if (projRelIncPath != null) {
+ includeEntries.add(new CIncludePathEntry(projectPath.append(projRelIncPath), 0));
+ } else {
+ includeEntries.add(new CIncludePathEntry(incPath, 0));
+ }
+
+ // remove duplicate system includes
+ File inc = incPath.toFile();
+ if (systemIncludes.contains(inc)) {
+ systemIncludes.remove(inc);
+ }
+ }
+ }
+ }
+
for (File inc : systemIncludes) {
// convert the absolute path to project relative if possible
IPath incPath = new Path(inc.toString());
@@ -224,8 +275,11 @@
}
// add OEM dir
- File oemDir = carbideBuildConfig.getSDK().getIncludePath().append("oem").toFile();
- if (oemDir.exists()) {
+ File oemDir = null;
+ if (sdk.getIncludePath() != null){
+ oemDir = sdk.getIncludePath().append("oem").toFile();
+ }
+ if (oemDir != null && oemDir.exists()) {
includeEntries.add(new CIncludePathEntry(new Path(oemDir.getAbsolutePath()), 0));
}
@@ -233,59 +287,31 @@
macroEntries = new ArrayList(0);
lastUseMMPMacrosValue = cpi.shouldUseMMPMacros();
-
- Map macros = new HashMap();
-
- // platform macros
- for (String platMacro : carbideBuildConfig.getSDK().getPlatformMacros(carbideBuildConfig.getPlatformString())) {
- macros.put("__" + platMacro + "__", ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- // built in macros
- for (String builtinMacro : carbideBuildConfig.getBuiltinMacros()) {
- macros.put(builtinMacro, ""); //$NON-NLS-1$
- }
-
- // vendor macros (e.g. __SERIES60_3x__)
- for (String builtinMacro : carbideBuildConfig.getSDK().getVendorSDKMacros()) {
- macros.put(builtinMacro, ""); //$NON-NLS-1$
- }
-
- // target type macros (e.g. __DLL__)
- List targetTypes = EpocEngineHelper.getTargetTypesForBuildConfiguration(carbideBuildConfig);
- // only add these if there is one target type. this is the case when there is only one mmp file, or
- // more than one but all have the same target type macro. it wouldn't make sense to add different
- // target type macros like __EXE__ and __DLL__.
- if (targetTypes.size() == 1) {
- for (String targetTypeMacro : carbideBuildConfig.getSDK().getTargetTypeMacros(targetTypes.get(0))) {
- macros.put(targetTypeMacro, ""); //$NON-NLS-1$
- }
- }
// get the list of all mmp files selected for the build configuration
// a null buildComponents list means all MMPs are included - so leave it null when indexing all files
List buildComponents = null;
if (!EpocEngineHelper.getIndexAllPreference())
buildComponents = carbideBuildConfig.getCarbideProject().isBuildingFromInf() ? null : carbideBuildConfig.getCarbideProject().getInfBuildComponents();
-
- // if the pref option is enabled, then check the mmp's for MACRO's.
- if (cpi.shouldUseMMPMacros()) {
- List mmps = EpocEngineHelper.getMMPFilesForBuildConfiguration(carbideBuildConfig);
- for (IPath mmp : mmps) {
- if (buildComponents != null && !TextUtils.listContainsIgnoreCase(buildComponents, mmp.lastSegment()))
- continue;
-
- List mmpMacros = EpocEngineHelper.getMMPMacrosForBuildConfiguration(mmp, carbideBuildConfig);
- for (String mmpMacro : mmpMacros) {
- // Symbian docs say they are converted to upper case always
- macros.put(mmpMacro.toUpperCase(), ""); //$NON-NLS-1$
+
+ List mmpFiles = null;
+ List projectDefines = new ArrayList();
+ if (buildComponents != null){
+ // Get the list of mmp files we are building so we only get those macros
+ List tmpMMPFiles = EpocEngineHelper.getMMPFilesForBuildConfiguration(carbideBuildConfig);
+ mmpFiles = new ArrayList();
+ for (IPath mmp : tmpMMPFiles){
+ if (TextUtils.listContainsIgnoreCase(buildComponents, mmp.lastSegment())){
+ mmpFiles.add(mmp);
}
}
- }
-
+ }
+
+ projectDefines = EpocEngineHelper.getGlobalDefinesForConfiguration(carbideBuildConfig, mmpFiles);
+
// now create the path entries for the macros
- for (String macro : macros.keySet()) {
- macroEntries.add(new CMacroEntry(macro, macros.get(macro), 0));
+ for (IDefine define : projectDefines) {
+ macroEntries.add(new CMacroEntry(define.getName(), define.getExpansion(), 0));
}
// get the list of files the engine references when parsing the bld.inf and mmp files
@@ -306,7 +332,7 @@
// the cache.
cacheTimestamp = System.currentTimeMillis();
}
-
+
private void persistCache() {
// persist the cache between IDE launches.
try {
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectInfo.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectInfo.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectInfo.java Fri Aug 20 09:39:24 2010 -0500
@@ -24,6 +24,7 @@
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
import org.eclipse.cdt.core.settings.model.ICStorageElement;
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
+import org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
@@ -302,6 +303,10 @@
ICConfigurationDescription config = projectDescription.getActiveConfiguration();
if (config != null) {
CConfigurationData data = config.getConfigurationData();
+ if (data == null){
+ ICConfigurationDescription[] config2 = projectDescription.getConfigurations();
+ data = config2[0].getConfigurationData();
+ }
if (data instanceof BuildConfigurationData) {
return ((BuildConfigurationData)data).getConfiguration();
}
@@ -322,6 +327,9 @@
}
public IPath getAbsoluteBldInfPath(){
+ if (projectRelativeBldInfPath.isAbsolute()){
+ return projectRelativeBldInfPath;
+ }
return CarbideBuilderPlugin.getProjectRoot(projectTracker.getProject()).append(projectRelativeBldInfPath);
}
@@ -330,13 +338,11 @@
}
public IPath getWorkspaceRelativeBldInfPath(){
+ if (projectRelativeBldInfPath.isAbsolute()){
+ return projectRelativeBldInfPath;
+ }
return new Path(projectTracker.getProject().getName()).append(projectRelativeBldInfPath);
}
-
- public String getMMPTargetFile(){
- // now deprecated in 1.3
- return "";
- }
public IProject getProject(){
return projectTracker.getProject();
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectModifier.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectModifier.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectModifier.java Fri Aug 20 09:39:24 2010 -0500
@@ -16,22 +16,32 @@
*/
package com.nokia.carbide.cdt.internal.builder;
+import java.util.ArrayList;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.ICStorageElement;
+import org.eclipse.cdt.core.settings.model.WriteAccessException;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
+
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cdt.builder.project.ICarbideProjectModifier;
import com.nokia.carbide.cdt.internal.api.builder.CarbideConfigurationDataProvider;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildContext;
+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.ISymbianBuildContext;
import com.nokia.cpp.internal.api.utils.core.Logging;
-import org.eclipse.cdt.core.CCorePlugin;
-import org.eclipse.cdt.core.model.CoreModel;
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.cdt.core.settings.model.*;
-import org.eclipse.core.runtime.*;
-
-import java.util.ArrayList;
-
public class CarbideProjectModifier extends CarbideProjectInfo implements ICarbideProjectModifier {
// need to make all changes to the same description and save it
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java Fri Aug 20 09:39:24 2010 -0500
@@ -16,35 +16,77 @@
*/
package com.nokia.carbide.cdt.internal.builder;
-import java.io.*;
-import java.util.*;
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
-import org.eclipse.cdt.make.core.makefile.*;
+import org.eclipse.cdt.make.core.makefile.ICommand;
+import org.eclipse.cdt.make.core.makefile.IMacroDefinition;
+import org.eclipse.cdt.make.core.makefile.IRule;
+import org.eclipse.cdt.make.core.makefile.ITargetRule;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.*;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
-import com.nokia.carbide.cdt.builder.*;
+import com.nokia.carbide.cdt.builder.BuilderPreferenceConstants;
+import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
+import com.nokia.carbide.cdt.builder.DefaultGNUMakefileViewConfiguration;
+import com.nokia.carbide.cdt.builder.DefaultMMPViewConfiguration;
+import com.nokia.carbide.cdt.builder.DefaultViewConfiguration;
+import com.nokia.carbide.cdt.builder.EpocEngineHelper;
+import com.nokia.carbide.cdt.builder.EpocEnginePathHelper;
import com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder;
import com.nokia.carbide.cdt.builder.builder.CarbideCommandLauncher;
-import com.nokia.carbide.cdt.builder.project.*;
+import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
+import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
import com.nokia.carbide.cdt.internal.builder.ui.MMPChangedActionDialog;
+import com.nokia.carbide.cdt.internal.builder.ui.MMPChangedActionDialog.MMPChangedAction;
import com.nokia.carbide.cdt.internal.builder.ui.TrackDependenciesQueryDialog;
-import com.nokia.carbide.cdt.internal.builder.ui.MMPChangedActionDialog.MMPChangedAction;
-import com.nokia.carbide.cpp.epoc.engine.*;
+import com.nokia.carbide.cpp.epoc.engine.BldInfViewRunnableAdapter;
+import com.nokia.carbide.cpp.epoc.engine.EpocEnginePlugin;
+import com.nokia.carbide.cpp.epoc.engine.MMPDataRunnableAdapter;
import com.nokia.carbide.cpp.epoc.engine.model.IModel;
import com.nokia.carbide.cpp.epoc.engine.model.IModelProvider;
import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IBldInfView;
import com.nokia.carbide.cpp.epoc.engine.model.makefile.IMakefileView;
-import com.nokia.carbide.cpp.epoc.engine.model.mmp.*;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.EMMPLanguage;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.EMMPStatement;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPData;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPResource;
import com.nokia.carbide.cpp.epoc.engine.preprocessor.AcceptedNodesViewFilter;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildContext;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildInfo;
import com.nokia.carbide.cpp.internal.qt.core.QtCorePlugin;
-import com.nokia.carbide.cpp.sdk.core.*;
+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;
import com.nokia.cpp.internal.api.utils.core.FileUtils;
import com.nokia.cpp.internal.api.utils.core.HostOS;
import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils;
@@ -98,14 +140,18 @@
areWeManagingTheMakeFiles = shouldManageMakeFiles(buildConfig);
// if variant BSF, let them know the other platforms that will be built as a result
- IBSFPlatform[] bsfPlatforms = buildConfig.getSDK().getBSFCatalog().getAdditionalBuiltPlatforms(buildConfig.getPlatformString());
- if (bsfPlatforms.length > 0) {
- String plats = "";
- for (IBSFPlatform plat : bsfPlatforms) {
- plats = ", " + plat.getName();
+ ISymbianSDK sdk = buildConfig.getSDK();
+ ISBSv1BuildInfo sbsv1BuildInfo = (ISBSv1BuildInfo)sdk.getBuildInfo(ISymbianBuilderID.SBSV1_BUILDER);
+ if (sbsv1BuildInfo != null) {
+ IBSFPlatform[] bsfPlatforms = sbsv1BuildInfo.getBSFCatalog().getAdditionalBuiltPlatforms(buildConfig.getPlatformString());
+ if (bsfPlatforms.length > 0) {
+ String plats = "";
+ for (IBSFPlatform plat : bsfPlatforms) {
+ plats = ", " + plat.getName();
+ }
+ plats = plats.replaceFirst(", ", "");
+ launcher.writeToConsole("\n***Additionally built platforms: " + plats + "\n");
}
- plats = plats.replaceFirst(", ", "");
- launcher.writeToConsole("\n***Additionally built platforms: " + plats + "\n");
}
}
@@ -116,18 +162,20 @@
public boolean buildComponent(ICarbideBuildConfiguration buildConfig, IPath componentPath, boolean isTest, CarbideCommandLauncher launcher, IProgressMonitor monitor) {
areWeManagingTheMakeFiles = shouldManageMakeFiles(buildConfig);
-
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)buildConfig.getBuildContext();
+
+
if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
return false;
}
String componentName = componentPath.removeFileExtension().lastSegment();
String buildPlatform = "";
- if ( buildConfig.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
+ if ( buildConfig.getPlatformString().startsWith(ISBSv1BuildContext.ARMV5_PLATFORM) &&
EpocEngineHelper.hasFeatureVariantKeyword(buildConfig.getCarbideProject(), componentPath)){
buildPlatform = buildConfig.getPlatformString().toLowerCase();
- } else {
- buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+ } else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+ buildPlatform = ((ISBSv1BuildContext)buildConfig.getBuildContext()).getBasePlatformForVariation().toLowerCase();
}
// need to run individual build steps when managing makefiles or doing concurrent builds
@@ -143,7 +191,7 @@
}
args.add(EXPORT_CMD);
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldExportArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldExportArgs().split(" ")) {
args.add(arg);
}
@@ -179,7 +227,7 @@
args.add(buildPlatform);
args.add(componentName);
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldLibraryArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldLibraryArgs().split(" ")) {
args.add(arg);
}
@@ -203,7 +251,7 @@
args.add(buildConfig.getTargetString().toLowerCase());
args.add(componentName);
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldResourceArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldResourceArgs().split(" ")) {
args.add(arg);
}
@@ -227,7 +275,7 @@
args.add(buildConfig.getTargetString().toLowerCase());
args.add(componentName);
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldTargetArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldTargetArgs().split(" ")) {
args.add(arg);
}
@@ -250,7 +298,7 @@
args.add(buildConfig.getTargetString().toLowerCase());
args.add(componentName);
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldFinalArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldFinalArgs().split(" ")) {
args.add(arg);
}
@@ -276,7 +324,7 @@
argsList.add(buildConfig.getTargetString().toLowerCase());
argsList.add(componentName);
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldBuildArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldBuildArgs().split(" ")) {
argsList.add(arg);
}
@@ -298,18 +346,19 @@
public boolean cleanComponent(ICarbideBuildConfiguration buildConfig, IPath componentPath, boolean isTest, CarbideCommandLauncher launcher, IProgressMonitor monitor) {
areWeManagingTheMakeFiles = shouldManageMakeFiles(buildConfig);
-
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)buildConfig.getBuildContext();
+
if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
return false;
}
String componentName = componentPath.removeFileExtension().lastSegment();
String buildPlatform = "";
- if ( buildConfig.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
+ if ( buildConfig.getPlatformString().startsWith(ISBSv1BuildContext.ARMV5_PLATFORM) &&
EpocEngineHelper.hasFeatureVariantKeyword(buildConfig.getCarbideProject(), componentPath)){
buildPlatform = buildConfig.getPlatformString().toLowerCase();
- } else {
- buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+ } else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+ buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
}
SubMonitor progress = SubMonitor.convert(monitor, 2);
@@ -340,7 +389,7 @@
argsList.add(buildConfig.getTargetString().toLowerCase());
argsList.add(componentName);
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldCleanArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldCleanArgs().split(" ")) {
argsList.add(arg);
}
@@ -361,18 +410,19 @@
public boolean freezeComponent(ICarbideBuildConfiguration buildConfig, IPath componentPath, boolean isTest, CarbideCommandLauncher launcher, IProgressMonitor monitor) {
areWeManagingTheMakeFiles = shouldManageMakeFiles(buildConfig);
-
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)buildConfig.getBuildContext();
+
if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
return false;
}
String componentName = componentPath.removeFileExtension().lastSegment();
String buildPlatform = "";
- if ( buildConfig.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
+ if ( buildConfig.getPlatformString().startsWith(ISBSv1BuildContext.ARMV5_PLATFORM) &&
EpocEngineHelper.hasFeatureVariantKeyword(buildConfig.getCarbideProject(), componentPath)){
buildPlatform = buildConfig.getPlatformString().toLowerCase();
- } else {
- buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+ } else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+ buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
}
// run abld makefile platform for each component to be built if needed
@@ -393,7 +443,7 @@
argsList.add(buildPlatform);
argsList.add(componentName);
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldFreezeArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldFreezeArgs().split(" ")) {
argsList.add(arg);
}
@@ -425,7 +475,7 @@
}
List buildConfigList = new ArrayList(1);
- buildConfigList.add(buildConfig);
+ buildConfigList.add(buildConfig.getBuildContext());
List normalMakMakePaths = new ArrayList();
List testMakMakePaths = new ArrayList();
@@ -520,7 +570,7 @@
modelProvider.releaseSharedModel(model);
IPath objectDir = null;
- if ( buildConfig.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
+ if ( buildConfig.getPlatformString().startsWith(ISBSv1BuildContext.ARMV5_PLATFORM) &&
EpocEngineHelper.hasFeatureVariantKeyword(cpi, fullMMPPath)){
// if symbian binary variation, then the object file dir will be in sub-directory with /udeb/
// The platform can only be a variant if the MMP file has FEATUREVARIANT keyword && The platform is ARMV5-based.
@@ -597,7 +647,7 @@
final List rules = new ArrayList();
EpocEnginePlugin.runWithMMPData(workspaceRelativeMMPPath,
- new DefaultMMPViewConfiguration(buildConfig.getCarbideProject().getProject(), buildConfig, new AcceptedNodesViewFilter()),
+ new DefaultMMPViewConfiguration(buildConfig.getCarbideProject().getProject(), buildConfig.getBuildContext(), new AcceptedNodesViewFilter()),
new MMPDataRunnableAdapter() {
public Object run(IMMPData mmpData) {
@@ -608,12 +658,8 @@
IPath targetP = new Path(targetPath).makeRelative().addTrailingSeparator();
targetPath = targetP.toOSString();
} else {
- // for EKA1 just leave empty. for EKA2 use sys\bin\
- if (buildConfig.getSDK().getOSVersion().getMajor() > 8) {
- targetPath = "sys\\bin\\"; //$NON-NLS-1$
- } else {
- targetPath = ""; //$NON-NLS-1$
- }
+ // for EKA2 use sys\bin\
+ targetPath = "sys\\bin\\"; //$NON-NLS-1$
}
String dataZDir = buildConfig.getSDK().getReleaseRoot().removeLastSegments(1).toOSString() + "\\Data\\z\\"; //$NON-NLS-1$
@@ -710,13 +756,14 @@
// add the following to the top of the the Deps_GenDependsL subroutine in makdeps.pm
String change = "\r\n\t# Carbide.c++ change. See CARBIDE_CHANGES.TXT for more details.\r\n\tif ($ENV{CARBIDE_NO_DEPENDENCIES}) {\r\n\t\treturn;\r\n\t}\r\n";
+ IPath toolsPath = sdk.getToolsPath();
boolean updated = false;
try {
- File mdFile = sdk.getToolsPath().append("makdeps.pm").toFile();
+ File mdFile = toolsPath.append("makdeps.pm").toFile();
RandomAccessFile makDepsFile = new RandomAccessFile(mdFile, "rw");
// back up the file first
- File backupFile = sdk.getToolsPath().append("makdeps.pmbak").toFile();
+ File backupFile = toolsPath.append("makdeps.pmbak").toFile();
if (backupFile.createNewFile()) {
FileUtils.copyFile(mdFile, backupFile);
}
@@ -753,7 +800,7 @@
}
// now create the CARBIDE_CHANGES.TXT file
- File ourFile = sdk.getToolsPath().append(CARBIDE_CHANGES_FILE).toFile();
+ File ourFile = toolsPath.append(CARBIDE_CHANGES_FILE).toFile();
try {
if (!ourFile.createNewFile()) {
return false;
@@ -781,6 +828,8 @@
public boolean buildAllComponents(ICarbideBuildConfiguration buildConfig, List normalMakMakePaths, List testMakMakePaths, CarbideCommandLauncher launcher, IProgressMonitor monitor) {
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)buildConfig.getBuildContext();
+
//TODO: do we really want to bail if abld returns an error? is this the keepgoing flag? see what the command line builds do.
// they bail on an individual build step, but keep building the other steps even if there's an error and keepgoing is not specified
@@ -811,7 +860,7 @@
argsList.add(buildConfig.getPlatformString().toLowerCase());
argsList.add(buildConfig.getTargetString().toLowerCase());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldBuildArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldBuildArgs().split(" ")) {
argsList.add(arg);
}
@@ -835,7 +884,7 @@
argsList.add(buildConfig.getPlatformString().toLowerCase());
argsList.add(buildConfig.getTargetString().toLowerCase());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldBuildArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldBuildArgs().split(" ")) {
argsList.add(arg);
}
@@ -881,7 +930,7 @@
List args = new ArrayList();
args.add(EXPORT_CMD);
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldExportArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldExportArgs().split(" ")) {
args.add(arg);
}
@@ -916,7 +965,7 @@
args.add(LIBRARY_CMD);
args.add(buildConfig.getPlatformString().toLowerCase());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldLibraryArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldLibraryArgs().split(" ")) {
args.add(arg);
}
@@ -936,7 +985,7 @@
args.add(buildConfig.getPlatformString().toLowerCase());
args.add(buildConfig.getTargetString().toLowerCase());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldResourceArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldResourceArgs().split(" ")) {
args.add(arg);
}
@@ -956,7 +1005,7 @@
args.add(buildConfig.getPlatformString().toLowerCase());
args.add(buildConfig.getTargetString().toLowerCase());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldTargetArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldTargetArgs().split(" ")) {
args.add(arg);
}
@@ -975,7 +1024,7 @@
args.add(buildConfig.getPlatformString().toLowerCase());
args.add(buildConfig.getTargetString().toLowerCase());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldFinalArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldFinalArgs().split(" ")) {
args.add(arg);
}
@@ -997,7 +1046,7 @@
args.add(TEST_CMD);
args.add(EXPORT_CMD);
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldExportArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldExportArgs().split(" ")) {
args.add(arg);
}
@@ -1020,7 +1069,7 @@
args.add(LIBRARY_CMD);
args.add(buildConfig.getPlatformString().toLowerCase());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldLibraryArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldLibraryArgs().split(" ")) {
args.add(arg);
}
@@ -1041,7 +1090,7 @@
args.add(buildConfig.getPlatformString().toLowerCase());
args.add(buildConfig.getTargetString().toLowerCase());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldResourceArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldResourceArgs().split(" ")) {
args.add(arg);
}
@@ -1062,7 +1111,7 @@
args.add(buildConfig.getPlatformString().toLowerCase());
args.add(buildConfig.getTargetString().toLowerCase());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldTargetArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldTargetArgs().split(" ")) {
args.add(arg);
}
@@ -1082,7 +1131,7 @@
args.add(buildConfig.getPlatformString().toLowerCase());
args.add(buildConfig.getTargetString().toLowerCase());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldFinalArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldFinalArgs().split(" ")) {
args.add(arg);
}
@@ -1101,6 +1150,8 @@
public boolean buildComponentSubset(ICarbideBuildConfiguration buildConfig, List normalMakMakePaths, List testMakMakePaths, CarbideCommandLauncher launcher, IProgressMonitor monitor) {
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)buildConfig.getBuildContext();
+
// need to run individual build steps when managing makefiles or doing concurrent builds
if (!areWeManagingTheMakeFiles && !buildConfig.getCarbideProject().isConcurrentBuildingEnabled()) {
// not using our dependency stuff. just call abld [test] build. note that we need
@@ -1123,13 +1174,13 @@
for (IPath path : normalMakMakePaths) {
String buildPlatform = "";
- if ( buildConfig.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
+ if ( buildConfig.getPlatformString().startsWith(ISBSv1BuildContext.ARMV5_PLATFORM) &&
EpocEngineHelper.hasFeatureVariantKeyword(buildConfig.getCarbideProject(), path)) {
buildPlatform = buildConfig.getPlatformString().toLowerCase();
- } else {
- buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+ } else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+ buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
}
List argsList = new ArrayList();
@@ -1138,7 +1189,7 @@
argsList.add(buildConfig.getTargetString().toLowerCase());
argsList.add(path.removeFileExtension().lastSegment());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldBuildArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldBuildArgs().split(" ")) {
argsList.add(arg);
}
@@ -1155,13 +1206,13 @@
for (IPath path : testMakMakePaths) {
String buildPlatform = "";
- if ( buildConfig.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
+ if ( buildConfig.getPlatformString().startsWith(ISBSv1BuildContext.ARMV5_PLATFORM) &&
EpocEngineHelper.hasFeatureVariantKeyword(buildConfig.getCarbideProject(), path)) {
buildPlatform = buildConfig.getPlatformString().toLowerCase();
- } else {
- buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+ } else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+ buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
}
List argsList = new ArrayList();
@@ -1171,7 +1222,7 @@
argsList.add(buildConfig.getTargetString().toLowerCase());
argsList.add(path.removeFileExtension().lastSegment());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldBuildArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldBuildArgs().split(" ")) {
argsList.add(arg);
}
@@ -1216,7 +1267,7 @@
List argsList = new ArrayList();
argsList.add(EXPORT_CMD);
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldExportArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldExportArgs().split(" ")) {
argsList.add(arg);
}
@@ -1250,13 +1301,13 @@
for (IPath path : normalMakMakePaths) {
String buildPlatform = "";
- if ( buildConfig.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
+ if ( buildConfig.getPlatformString().startsWith(ISBSv1BuildContext.ARMV5_PLATFORM) &&
EpocEngineHelper.hasFeatureVariantKeyword(buildConfig.getCarbideProject(), path)) {
buildPlatform = buildConfig.getPlatformString().toLowerCase();
- } else {
- buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+ } else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+ buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
}
argsList.clear();
@@ -1264,7 +1315,7 @@
argsList.add(buildPlatform);
argsList.add(path.removeFileExtension().lastSegment());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldLibraryArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldLibraryArgs().split(" ")) {
argsList.add(arg);
}
@@ -1282,13 +1333,13 @@
for (IPath path : normalMakMakePaths) {
String buildPlatform = "";
- if ( buildConfig.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
+ if ( buildConfig.getPlatformString().startsWith(ISBSv1BuildContext.ARMV5_PLATFORM) &&
EpocEngineHelper.hasFeatureVariantKeyword(buildConfig.getCarbideProject(), path)) {
buildPlatform = buildConfig.getPlatformString().toLowerCase();
- } else {
- buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+ } else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+ buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
}
argsList.clear();
@@ -1297,7 +1348,7 @@
argsList.add(buildConfig.getTargetString().toLowerCase());
argsList.add(path.removeFileExtension().lastSegment());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldResourceArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldResourceArgs().split(" ")) {
argsList.add(arg);
}
@@ -1315,13 +1366,13 @@
for (IPath path : normalMakMakePaths) {
String buildPlatform = "";
- if ( buildConfig.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
+ if ( buildConfig.getPlatformString().startsWith(ISBSv1BuildContext.ARMV5_PLATFORM) &&
EpocEngineHelper.hasFeatureVariantKeyword(buildConfig.getCarbideProject(), path)) {
buildPlatform = buildConfig.getPlatformString().toLowerCase();
- } else {
- buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+ } else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+ buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
}
argsList.clear();
@@ -1330,7 +1381,7 @@
argsList.add(buildConfig.getTargetString().toLowerCase());
argsList.add(path.removeFileExtension().lastSegment());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldTargetArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldTargetArgs().split(" ")) {
argsList.add(arg);
}
@@ -1346,13 +1397,13 @@
// run abld final platform target for each component
for (IPath path : normalMakMakePaths) {
String buildPlatform = "";
- if ( buildConfig.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
+ if ( buildConfig.getPlatformString().startsWith(ISBSv1BuildContext.ARMV5_PLATFORM) &&
EpocEngineHelper.hasFeatureVariantKeyword(buildConfig.getCarbideProject(), path)) {
buildPlatform = buildConfig.getPlatformString().toLowerCase();
- } else {
- buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+ } else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+ buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
}
argsList.clear();
@@ -1361,7 +1412,7 @@
argsList.add(buildConfig.getTargetString().toLowerCase());
argsList.add(path.removeFileExtension().lastSegment());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldFinalArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldFinalArgs().split(" ")) {
argsList.add(arg);
}
@@ -1380,7 +1431,7 @@
argsList.add(TEST_CMD);
argsList.add(EXPORT_CMD);
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldExportArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldExportArgs().split(" ")) {
argsList.add(arg);
}
@@ -1400,13 +1451,13 @@
for (IPath path : testMakMakePaths) {
String buildPlatform = "";
- if ( buildConfig.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
+ if ( buildConfig.getPlatformString().startsWith(ISBSv1BuildContext.ARMV5_PLATFORM) &&
EpocEngineHelper.hasFeatureVariantKeyword(buildConfig.getCarbideProject(), path)) {
buildPlatform = buildConfig.getPlatformString().toLowerCase();
- } else {
- buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+ } else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+ buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
}
argsList.clear();
@@ -1415,7 +1466,7 @@
argsList.add(buildPlatform);
argsList.add(path.removeFileExtension().lastSegment());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldLibraryArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldLibraryArgs().split(" ")) {
argsList.add(arg);
}
@@ -1433,13 +1484,13 @@
for (IPath path : testMakMakePaths) {
String buildPlatform = "";
- if ( buildConfig.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
+ if ( buildConfig.getPlatformString().startsWith(ISBSv1BuildContext.ARMV5_PLATFORM) &&
EpocEngineHelper.hasFeatureVariantKeyword(buildConfig.getCarbideProject(), path)) {
buildPlatform = buildConfig.getPlatformString().toLowerCase();
- } else {
- buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+ } else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+ buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
}
argsList.clear();
@@ -1449,7 +1500,7 @@
argsList.add(buildConfig.getTargetString().toLowerCase());
argsList.add(path.removeFileExtension().lastSegment());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldResourceArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldResourceArgs().split(" ")) {
argsList.add(arg);
}
@@ -1467,13 +1518,13 @@
for (IPath path : testMakMakePaths) {
String buildPlatform = "";
- if ( buildConfig.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
+ if ( buildConfig.getPlatformString().startsWith(ISBSv1BuildContext.ARMV5_PLATFORM) &&
EpocEngineHelper.hasFeatureVariantKeyword(buildConfig.getCarbideProject(), path)) {
buildPlatform = buildConfig.getPlatformString().toLowerCase();
} else {
- buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+ buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
}
argsList.clear();
@@ -1483,7 +1534,7 @@
argsList.add(buildConfig.getTargetString().toLowerCase());
argsList.add(path.removeFileExtension().lastSegment());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldTargetArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldTargetArgs().split(" ")) {
argsList.add(arg);
}
@@ -1500,13 +1551,13 @@
for (IPath path : testMakMakePaths) {
String buildPlatform = "";
- if ( buildConfig.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
+ if ( buildConfig.getPlatformString().startsWith(ISBSv1BuildContext.ARMV5_PLATFORM) &&
EpocEngineHelper.hasFeatureVariantKeyword(buildConfig.getCarbideProject(), path)) {
buildPlatform = buildConfig.getPlatformString().toLowerCase();
- } else {
- buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+ } else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+ buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
}
argsList.clear();
@@ -1516,7 +1567,7 @@
argsList.add(buildConfig.getTargetString().toLowerCase());
argsList.add(path.removeFileExtension().lastSegment());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldFinalArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldFinalArgs().split(" ")) {
argsList.add(arg);
}
@@ -1538,6 +1589,8 @@
SubMonitor progress = SubMonitor.convert(monitor, 5);
progress.setTaskName("Cleaning " + buildConfig.getDisplayString());
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)buildConfig.getBuildContext();
+
if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
return;
}
@@ -1572,7 +1625,7 @@
argsList.add(buildConfig.getPlatformString().toLowerCase());
argsList.add(buildConfig.getTargetString().toLowerCase());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldCleanArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldCleanArgs().split(" ")) {
argsList.add(arg);
}
@@ -1596,7 +1649,7 @@
argsList.add(buildConfig.getPlatformString().toLowerCase());
argsList.add(buildConfig.getTargetString().toLowerCase());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldCleanArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldCleanArgs().split(" ")) {
argsList.add(arg);
}
@@ -1618,7 +1671,7 @@
argsList.add(CLEAN_CMD);
argsList.add(buildConfig.getPlatformString().toLowerCase());
- for (String arg : buildConfig.getBuildArgumentsInfo().getBldmakeCleanArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getBldmakeCleanArgs().split(" ")) {
argsList.add(arg);
}
@@ -1636,6 +1689,8 @@
SubMonitor progress = SubMonitor.convert(monitor, 3 + normalMakMakePaths.size() + testMakMakePaths.size());
progress.setTaskName("Cleaning " + buildConfig.getDisplayString());
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)buildConfig.getBuildContext();
+
if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
return;
}
@@ -1669,13 +1724,13 @@
for (IPath path : normalMakMakePaths) {
String buildPlatform = "";
- if ( buildConfig.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
+ if ( buildConfig.getPlatformString().startsWith(ISBSv1BuildContext.ARMV5_PLATFORM) &&
EpocEngineHelper.hasFeatureVariantKeyword(buildConfig.getCarbideProject(), path)) {
buildPlatform = buildConfig.getPlatformString().toLowerCase();
- } else {
- buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+ } else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+ buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
}
List argsList = new ArrayList();
@@ -1684,7 +1739,7 @@
argsList.add(buildConfig.getTargetString().toLowerCase());
argsList.add(path.removeFileExtension().lastSegment());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldCleanArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldCleanArgs().split(" ")) {
argsList.add(arg);
}
@@ -1711,7 +1766,7 @@
argsList.add(buildConfig.getTargetString().toLowerCase());
argsList.add(path.removeFileExtension().lastSegment());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldCleanArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldCleanArgs().split(" ")) {
argsList.add(arg);
}
@@ -1732,7 +1787,7 @@
argsList.add(CLEAN_CMD);
argsList.add(buildConfig.getPlatformString().toLowerCase());
- for (String arg : buildConfig.getBuildArgumentsInfo().getBldmakeCleanArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getBldmakeCleanArgs().split(" ")) {
argsList.add(arg);
}
@@ -1749,7 +1804,8 @@
SubMonitor progress = SubMonitor.convert(monitor, 4);
progress.setTaskName("Freezing " + buildConfig.getDisplayString());
-
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)buildConfig.getBuildContext();
+
if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
return;
}
@@ -1775,7 +1831,7 @@
argsList.add(FREEZE_CMD);
argsList.add(buildConfig.getPlatformString().toLowerCase());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldFreezeArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldFreezeArgs().split(" ")) {
argsList.add(arg);
}
@@ -1798,7 +1854,7 @@
argsList.add(FREEZE_CMD);
argsList.add(buildConfig.getPlatformString().toLowerCase());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldFreezeArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldFreezeArgs().split(" ")) {
argsList.add(arg);
}
@@ -1818,7 +1874,8 @@
SubMonitor progress = SubMonitor.convert(monitor, 2 + normalMakMakePaths.size() + testMakMakePaths.size());
progress.setTaskName("Freezing " + buildConfig.getDisplayString());
-
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)buildConfig.getBuildContext();
+
if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
return;
}
@@ -1844,13 +1901,13 @@
for (IPath path : normalMakMakePaths) {
String buildPlatform = "";
- if ( buildConfig.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
+ if ( buildConfig.getPlatformString().startsWith(ISBSv1BuildContext.ARMV5_PLATFORM) &&
EpocEngineHelper.hasFeatureVariantKeyword(buildConfig.getCarbideProject(), path)) {
buildPlatform = buildConfig.getPlatformString().toLowerCase();
- } else {
- buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+ } else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+ buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
}
List argsList = new ArrayList();
@@ -1858,7 +1915,7 @@
argsList.add(buildPlatform);
argsList.add(path.removeFileExtension().lastSegment());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldFreezeArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldFreezeArgs().split(" ")) {
argsList.add(arg);
}
@@ -1884,7 +1941,7 @@
argsList.add(buildConfig.getPlatformString().toLowerCase());
argsList.add(path.removeFileExtension().lastSegment());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldFreezeArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldFreezeArgs().split(" ")) {
argsList.add(arg);
}
@@ -2095,7 +2152,8 @@
argsList.add(buildConfig.getTargetString().toLowerCase());
argsList.add(componentName);
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldCleanArgs().split(" ")) {
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)buildConfig.getBuildContext();
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldCleanArgs().split(" ")) {
argsList.add(arg);
}
@@ -2261,12 +2319,12 @@
}
// we need to check the variant hrh files as well
- File prefixFile = config.getSDK().getPrefixFile();
+ File prefixFile = config.getBuildContext().getPrefixFromVariantCfg().toFile();
if (prefixFile != null && prefixFile.lastModified() > oldestMakefileTimestamp) {
return true;
}
- for (File file : config.getPrefixFileIncludes()) {
+ for (File file : config.getBuildContext().getVariantHRHIncludes()) {
if (file.lastModified() > oldestMakefileTimestamp) {
return true;
}
@@ -2275,7 +2333,7 @@
// all make files exist. now make sure the oldest of them is newer than the bld.inf or any of its includes
final long finalOldestMakefileTimestamp = oldestMakefileTimestamp;
Boolean regenerate = (Boolean)EpocEnginePlugin.runWithBldInfView(bldInfPath,
- new DefaultViewConfiguration(config, bldInfPath, new AcceptedNodesViewFilter()),
+ new DefaultViewConfiguration(config.getBuildContext(), bldInfPath, new AcceptedNodesViewFilter()),
new BldInfViewRunnableAdapter() {
public Object run(IBldInfView view) {
for (IPath file : view.getReferencedFiles()) {
@@ -2303,12 +2361,12 @@
ICarbideProjectInfo cpi = config.getCarbideProject();
IPath workingDir = cpi.getINFWorkingDirectory();
- launcher.setErrorParserManager(workingDir, CarbideCPPBuilder.getParserIdArray(config.getErrorParserId()));
+ launcher.setErrorParserManager(workingDir, config.getErrorParserList());
launcher.writeToConsole("\n***Generating abld makefile.\n");
// delete the *.uid.cpp file if it exists so it gets regenerated. makmake won't regenerate it if only an mmp include
// file has changed. see bug #4590 for details.
- if (config.getPlatformString().equals(ISymbianBuildContext.EMULATOR_PLATFORM)) {
+ if (config.getPlatformString().equals(ISBSv1BuildContext.EMULATOR_PLATFORM)) {
File uidFile = new Path(getMakefileForMMP(config, componentPath).getAbsolutePath()).removeFileExtension().addFileExtension("UID.CPP").toFile();
if (uidFile.exists()) {
uidFile.delete();
@@ -2325,18 +2383,19 @@
}
String buildPlatform = "";
- if ( config.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
+ if ( config.getPlatformString().startsWith(ISBSv1BuildContext.ARMV5_PLATFORM) &&
EpocEngineHelper.hasFeatureVariantKeyword(config.getCarbideProject(), componentPath)){
buildPlatform = config.getPlatformString().toLowerCase();
- } else {
- buildPlatform = config.getBasePlatformForVariation().toLowerCase();
+ } else if (config.getBuildContext() instanceof ISBSv1BuildContext) {
+ buildPlatform = ((ISBSv1BuildContext)config.getBuildContext()).getBasePlatformForVariation().toLowerCase();
}
abldArgs.add(MAKEFILE_CMD); //$NON-NLS-1$
abldArgs.add(buildPlatform);
abldArgs.add(componentPath.removeFileExtension().lastSegment());
- for (String arg : config.getBuildArgumentsInfo().getAbldMakefileArgs().split(" ")) {
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)config.getBuildContext();
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldMakefileArgs().split(" ")) {
abldArgs.add(arg);
}
@@ -2358,7 +2417,6 @@
} catch (CoreException e) {
CarbideBuilderPlugin.log(e);
e.printStackTrace();
- //TODO is this enough?
}
}
}
@@ -2382,12 +2440,12 @@
final long makefileTimestamp = makefile.lastModified();
// we need to check the variant hrh files as well
- File prefixFile = config.getSDK().getPrefixFile();
+ File prefixFile = config.getBuildContext().getPrefixFromVariantCfg().toFile();
if (prefixFile != null && prefixFile.lastModified() > makefileTimestamp) {
return true;
}
- for (File file : config.getPrefixFileIncludes()) {
+ for (File file : config.getBuildContext().getVariantHRHIncludes()) {
if (file.lastModified() > makefileTimestamp) {
return true;
}
@@ -2395,7 +2453,7 @@
// see if the makefile is newer than the mmp and all of its includes
Boolean regenerate = (Boolean)EpocEnginePlugin.runWithMMPData(componentPath,
- new DefaultMMPViewConfiguration(cpi.getProject(), config, new AcceptedNodesViewFilter()),
+ new DefaultMMPViewConfiguration(cpi.getProject(), config.getBuildContext(), new AcceptedNodesViewFilter()),
new MMPDataRunnableAdapter() {
public Object run(IMMPData data) {
for (IPath path : data.getReferencedFiles()) {
@@ -2465,12 +2523,12 @@
final long makefileTimestamp = makefile.lastModified();
// we need to check the variant hrh files as well
- File prefixFile = config.getSDK().getPrefixFile();
+ File prefixFile = config.getBuildContext().getPrefixFromVariantCfg().toFile();
if (prefixFile != null && prefixFile.lastModified() > makefileTimestamp) {
return true;
}
- for (File file : config.getPrefixFileIncludes()) {
+ for (File file : config.getBuildContext().getVariantHRHIncludes()) {
if (file.lastModified() > makefileTimestamp) {
return true;
}
@@ -2478,7 +2536,7 @@
// see if the makefile is newer than the mmp and all of its includes
Boolean regenerate = (Boolean)EpocEnginePlugin.runWithMMPData(componentPath,
- new DefaultMMPViewConfiguration(cpi.getProject(), config, new AcceptedNodesViewFilter()),
+ new DefaultMMPViewConfiguration(cpi.getProject(), config.getBuildContext(), new AcceptedNodesViewFilter()),
new MMPDataRunnableAdapter() {
public Object run(IMMPData data) {
for (IPath path : data.getReferencedFiles()) {
@@ -2547,11 +2605,11 @@
String platformName = "";
if (EpocEngineHelper.hasFeatureVariantKeyword(config.getCarbideProject(), componentPath)){
platformName = config.getPlatformString().toUpperCase();
- } else {
- platformName = config.getBasePlatformForVariation();
+ } else if (config.getBuildContext() instanceof ISBSv1BuildContext) {
+ platformName = ((ISBSv1BuildContext)config.getBuildContext()).getBasePlatformForVariation();
}
- makefilePath = makefilePath.append(config.getBasePlatformForVariation().toUpperCase());
+ makefilePath = makefilePath.append(((ISBSv1BuildContext)config.getBuildContext()).getBasePlatformForVariation().toUpperCase());
// and the makefile has the form MMPNAME.PLATFORM
makefilePath = makefilePath.append(mmpName + "." + platformName);
@@ -2607,7 +2665,7 @@
// .d for everything but WINSCW
String dependencyFileExt = "d";
- if (config.getPlatformString().equals(ISymbianBuildContext.EMULATOR_PLATFORM)) {
+ if (config.getPlatformString().equals(ISBSv1BuildContext.EMULATOR_PLATFORM)) {
dependencyFileExt = "dep";
}
@@ -2624,7 +2682,7 @@
// now add the -MD switch to the compiler args
final String platform = config.getPlatformString();
- if (platform.equals(ISymbianBuildContext.EMULATOR_PLATFORM)) {
+ if (platform.equals(ISBSv1BuildContext.EMULATOR_PLATFORM)) {
// append the -MD and -gccdep switches to the CWFLAGS macro
IMacroDefinition[] macros = view.getAllMacroDefinitions("CWFLAGS");
if (macros.length < 1) {
@@ -2639,7 +2697,7 @@
macroText = macroText + " -MD -gccdep" + view.getEOL();
view.replaceDirective(macro, macroText);
- } else if (platform.equals(ISymbianBuildContext.GCCE_PLATFORM)) {
+ } else if (platform.equals(ISBSv1BuildContext.GCCE_PLATFORM)) {
// append the -MD switch to the CCFLAGS macro. there may be more than one so take the last one
IMacroDefinition[] macros = view.getAllMacroDefinitions("CCFLAGS");
if (macros.length < 1) {
@@ -2747,7 +2805,7 @@
newRule = newRule + "\t" + cpp + " -undef -M -nostdinc ";
// add the compiler prefix file if any
- IPath compilerPrefix = config.getCompilerPrefixFile();
+ IPath compilerPrefix = config.getBuildContext().getCompilerPrefixFile();
if (compilerPrefix != null) {
newRule = newRule + "-include \"" + compilerPrefix.toOSString() + "\" ";
}
@@ -2778,7 +2836,7 @@
// find the macros we need to pass, and replace the -u switch with them
String macros = null;
- if (platform.equals(ISymbianBuildContext.EMULATOR_PLATFORM)) {
+ if (platform.equals(ISBSv1BuildContext.EMULATOR_PLATFORM)) {
// the macros are listed in the CWDEFS macro
IMacroDefinition[] defs = view.getAllMacroDefinitions("CWDEFS");
if (defs.length != 1) {
@@ -2793,7 +2851,7 @@
macros = macros.replaceAll("\"", "");
macros = macros.replaceAll("-d ", "-D");
- } else if (platform.equals(ISymbianBuildContext.GCCE_PLATFORM)) {
+ } else if (platform.equals(ISBSv1BuildContext.GCCE_PLATFORM)) {
// the macros are listed in the CCDEFS macro
IMacroDefinition[] defs = view.getAllMacroDefinitions("CCDEFS");
if (defs.length != 1) {
@@ -2835,8 +2893,11 @@
}
// add the compiler prefix file if any
- ISBVPlatform sbvPlatform = config.getSDK().getSBVCatalog().findPlatform(config.getPlatformString());
- File sdkPrefix = config.getSDK().getPrefixFile();
+ ISymbianSDK sdk = config.getSDK();
+ ISBSv1BuildInfo sbsv1BuildInfo = (ISBSv1BuildInfo)sdk.getBuildInfo(ISymbianBuilderID.SBSV1_BUILDER);
+ ISBVPlatform sbvPlatform = sbsv1BuildInfo.getSBVCatalog().findPlatform(config.getPlatformString());
+ File sdkPrefix = config.getBuildContext().getPrefixFromVariantCfg().toFile();
+
if (sbvPlatform != null){
// might be an alternate HRH file to use
IPath varVarHRH = sbvPlatform.getBuildVariantHRHFile();
@@ -2849,7 +2910,6 @@
newRule = newRule + "-include \"" + sdkPrefix.getAbsolutePath() + "\" ";
}
-
newRule += " -o " + depFilePath + view.getEOL();
// for some reason cpp.exe doesn't like paths without the drive letter when working on a subst'ed drive.
@@ -2906,8 +2966,8 @@
}
boolean moveDepFile = false;
- if (!platform.equals(ISymbianBuildContext.EMULATOR_PLATFORM) &&
- !platform.equals(ISymbianBuildContext.GCCE_PLATFORM)) {
+ if (!platform.equals(ISBSv1BuildContext.EMULATOR_PLATFORM) &&
+ !platform.equals(ISBSv1BuildContext.GCCE_PLATFORM)) {
// some form of ARMV5|6
moveDepFile = true;
@@ -2919,9 +2979,9 @@
}
String plat = "";
- if (platform.equals(ISymbianBuildContext.EMULATOR_PLATFORM)) {
+ if (platform.equals(ISBSv1BuildContext.EMULATOR_PLATFORM)) {
plat = "winscw";
- } else if (platform.equals(ISymbianBuildContext.GCCE_PLATFORM)) {
+ } else if (platform.equals(ISBSv1BuildContext.GCCE_PLATFORM)) {
plat = "gcce";
}
@@ -2938,7 +2998,7 @@
// fix for bug #7748. we may need to update the listing rule as well since it could generate
// a dependency file
- if (!platform.equals(ISymbianBuildContext.EMULATOR_PLATFORM)) {
+ if (!platform.equals(ISBSv1BuildContext.EMULATOR_PLATFORM)) {
// only non-WINSCW platforms are affected
rule = view.findRuleForTarget(new Path(rule.getTarget().toString()).removeFileExtension().addFileExtension("lis").toOSString(), true);
if (rule != null) {
@@ -3056,4 +3116,6 @@
public IPath getMakefileDirectory(ICarbideBuildConfiguration config) {
return new Path(config.getSDK().getEPOCROOT()).append(EPOC_BUILD_DIR).append(config.getCarbideProject().getAbsoluteBldInfPath().removeLastSegments(1).setDevice(null));
}
+
+
}
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv2Builder.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv2Builder.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv2Builder.java Fri Aug 20 09:39:24 2010 -0500
@@ -28,10 +28,11 @@
import org.eclipse.core.runtime.SubMonitor;
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
-import com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder;
+import com.nokia.carbide.cdt.builder.EpocEngineHelper;
import com.nokia.carbide.cdt.builder.builder.CarbideCommandLauncher;
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv2BuildContext;
import com.nokia.carbide.cpp.internal.api.sdk.SBSv2Utils;
public class CarbideSBSv2Builder implements ICarbideBuilder {
@@ -47,10 +48,6 @@
SubMonitor progress = SubMonitor.convert(monitor, 3);
progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null));
-
- if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
- return false;
- }
progress.worked(1);
if (progress.isCanceled()) {
@@ -87,36 +84,32 @@
}
/** Get the build-able configuration from the command line (i.e. build alias). This is passed after the sbs -c parameter */
- protected String getConfigName(ICarbideBuildConfiguration buildConfig) {
- String buildAlias = buildConfig.getSBSv2Alias();
+ protected String getConfigName(ICarbideBuildConfiguration buildConfig, IPath componentPath) {
+ String buildAlias = ((ISBSv2BuildContext)buildConfig.getBuildContext()).getSBSv2Alias();
if (buildAlias == null){
// Just get the default target. This is a SBSv1 style configuration name...
buildAlias = buildConfig.getPlatformString().toLowerCase() + "_" + buildConfig.getTargetString().toLowerCase();
}
- ISBSv2BuildConfigInfo sbsv2Info = ((CarbideBuildConfiguration)buildConfig).getSBSv2BuildConfigInfo();
- if (sbsv2Info != null){
- String variant = sbsv2Info.getSBSv2Setting(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_VARIANT);
- if (variant != null && variant.length() > 1){
- buildAlias = buildAlias + variant;
- }
+
+ if (buildAlias.contains(".") && componentPath != null &&
+ !EpocEngineHelper.hasFeatureVariantKeyword(buildConfig.getCarbideProject(), componentPath)){
+ // This is a variant build, but the MMP is not a variant so just take the base alias.
+ buildAlias = buildAlias.split("\\.")[0];
}
+
return buildAlias;
}
public boolean buildComponent(ICarbideBuildConfiguration buildConfig, IPath componentPath, boolean isTest, CarbideCommandLauncher launcher, IProgressMonitor monitor) {
String componentName = componentPath.lastSegment();
- if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
- return false;
- }
-
SubMonitor progress = SubMonitor.convert(monitor, 1);
progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, componentName));
List argsList = new ArrayList();
argsList.add(COMPONENT_ARG);
- argsList.add(componentName);
+ argsList.add(componentPath.toOSString());
if (!invokeSBSCommand(buildConfig, launcher, argsList, isTest)) {
return false;
@@ -137,10 +130,6 @@
SubMonitor progress = SubMonitor.convert(monitor, 1 + normalMakMakePaths.size() + testMakMakePaths.size());
progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null));
- if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
- return false;
- }
-
progress.worked(1);
if (progress.isCanceled()) {
return false;
@@ -191,10 +180,6 @@
SubMonitor progress = SubMonitor.convert(monitor, 3);
progress.setTaskName("Cleaning " + buildConfig.getDisplayString());
- if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
- return;
- }
-
progress.worked(1);
if (progress.isCanceled()) {
return;
@@ -244,10 +229,6 @@
SubMonitor progress = SubMonitor.convert(monitor, 2);
progress.setTaskName("Cleaning " + componentName);
- if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
- return false;
- }
-
int cleanLevel = buildConfig.getCarbideProject().getCleanLevel();
String cleanCmd = REALLYCLEAN_CMD;
if (0 == cleanLevel) {
@@ -257,7 +238,7 @@
List argsList = new ArrayList();
argsList.add(cleanCmd);
argsList.add(COMPONENT_ARG);
- argsList.add(componentName);
+ argsList.add(componentPath.toOSString());
if (!invokeSBSCommand(buildConfig, launcher, argsList, isTest)) {
return false;
@@ -278,10 +259,6 @@
SubMonitor progress = SubMonitor.convert(monitor, 1 + normalMakMakePaths.size() + testMakMakePaths.size());
progress.setTaskName("Cleaning " + buildConfig.getDisplayString());
- if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
- return;
- }
-
progress.worked(1);
if (progress.isCanceled()) {
return;
@@ -343,10 +320,6 @@
SubMonitor progress = SubMonitor.convert(monitor, 3);
progress.setTaskName("Freezing " + buildConfig.getDisplayString());
- if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
- return;
- }
-
progress.worked(1);
if (progress.isCanceled()) {
return;
@@ -383,14 +356,11 @@
}
public boolean freezeComponent(ICarbideBuildConfiguration buildConfig, IPath componentPath, boolean isTest, CarbideCommandLauncher launcher, IProgressMonitor monitor) {
- if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
- return false;
- }
List argsList = new ArrayList();
argsList.add(FREEZE_CMD);
argsList.add(COMPONENT_ARG);
- argsList.add(componentPath.lastSegment());
+ argsList.add(componentPath.toOSString());
if (!invokeSBSCommand(buildConfig, launcher, argsList, isTest)) {
return false;
@@ -410,10 +380,6 @@
SubMonitor progress = SubMonitor.convert(monitor, 1 + normalMakMakePaths.size() + testMakMakePaths.size());
progress.setTaskName("Freezing " + buildConfig.getDisplayString());
- if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
- return;
- }
-
progress.worked(1);
if (progress.isCanceled()) {
return;
@@ -508,7 +474,13 @@
args.add("-b"); //$NON-NLS-1$
args.add(cpi.getAbsoluteBldInfPath().toOSString());
args.add("-c"); //$NON-NLS-1$
- String configName = getConfigName(buildConfig);
+ IPath componentPath = null;
+ if (sbsArgs.size() >= 2){
+ componentPath = new Path(sbsArgs.get(sbsArgs.indexOf("-p")+ 1));
+ sbsArgs.remove(1);
+ sbsArgs.add(componentPath.lastSegment());
+ }
+ String configName = getConfigName(buildConfig, componentPath);
if (isTest) {
configName = configName + ".test"; //$NON-NLS-1$
@@ -516,6 +488,12 @@
args.add(configName);
+ if (!sbsArgs.contains("-p") && configName.contains(".")){
+ // normal build, we also need to add an extra -c param for non-variation build
+ args.add("-c");
+ args.add(configName.split("\\.")[0]);
+ }
+
//TODO this causes output to go to stdout, but only at the end of the build. should we specify a logfile name and tail the file?
args.add("-f"); //$NON-NLS-1$
args.add("-"); //$NON-NLS-1$
@@ -590,7 +568,7 @@
ICarbideProjectInfo cpi = buildConfig.getCarbideProject();
IPath workingDirectory = cpi.getINFWorkingDirectory();
- String configName = getConfigName(buildConfig);
+ String configName = getConfigName(buildConfig, fullMMPPath);
String[] sbsArgs = new String[] {"--source-target=" + file.toOSString(), COMPILE_ARG, configName, COMPONENT_ARG, fullMMPPath.toFile().getName()};
launcher.setErrorParserManager(buildConfig.getCarbideProject().getINFWorkingDirectory(), buildConfig.getErrorParserList());
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/EnvironmentVarsInfo.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/EnvironmentVarsInfo.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/EnvironmentVarsInfo.java Fri Aug 20 09:39:24 2010 -0500
@@ -16,15 +16,12 @@
*/
package com.nokia.carbide.cdt.internal.builder;
-import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
-import com.nokia.carbide.cdt.builder.project.*;
-import com.nokia.carbide.cdt.internal.api.builder.CarbideConfigurationDataProvider;
-import com.nokia.carbide.cdt.internal.builder.gen.CarbideBuildConfig.*;
-import com.nokia.carbide.cdt.internal.builder.ui.BuilderPreferencePage;
-import com.nokia.carbide.cdt.internal.builder.xml.CarbideBuildConfigurationLoader;
-import com.nokia.carbide.cpp.internal.x86build.X86BuildPlugin;
-import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
-import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
import org.eclipse.cdt.utils.spawner.EnvironmentReader;
import org.eclipse.core.resources.IProject;
@@ -32,10 +29,24 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.emf.common.util.EList;
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.*;
+import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
+import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
+import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
+import com.nokia.carbide.cdt.builder.project.IEnvironmentVariable;
+import com.nokia.carbide.cdt.builder.project.IEnvironmentVarsInfo;
+import com.nokia.carbide.cdt.internal.api.builder.CarbideConfigurationDataProvider;
+import com.nokia.carbide.cdt.internal.builder.gen.CarbideBuildConfig.CarbideBuildConfigFactory;
+import com.nokia.carbide.cdt.internal.builder.gen.CarbideBuildConfig.CarbideBuilderConfigInfoType;
+import com.nokia.carbide.cdt.internal.builder.gen.CarbideBuildConfig.ConfigurationType;
+import com.nokia.carbide.cdt.internal.builder.gen.CarbideBuildConfig.EnvVarsType;
+import com.nokia.carbide.cdt.internal.builder.gen.CarbideBuildConfig.UseType;
+import com.nokia.carbide.cdt.internal.builder.gen.CarbideBuildConfig.VarType;
+import com.nokia.carbide.cdt.internal.builder.ui.BuilderPreferencePage;
+import com.nokia.carbide.cdt.internal.builder.xml.CarbideBuildConfigurationLoader;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildContext;
+import com.nokia.carbide.cpp.internal.x86build.X86BuildPlugin;
+import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
+import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
/**
* @deprecated use {@link EnvironmentVarsInfo2} instead
@@ -206,7 +217,7 @@
// Now check for specific variables relating to the Nokia x86 environment
// and update the environment that we just updated, if at all.
- if (context.getPlatformString().equals(ISymbianBuildContext.EMULATOR_PLATFORM) &&
+ if (context.getPlatformString().toUpperCase().equals(ISBSv1BuildContext.EMULATOR_PLATFORM) &&
BuilderPreferencePage.useBuiltInX86Vars()){
int i = 0;
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/EnvironmentVarsInfo2.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/EnvironmentVarsInfo2.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/EnvironmentVarsInfo2.java Fri Aug 20 09:39:24 2010 -0500
@@ -16,10 +16,26 @@
*/
package com.nokia.carbide.cdt.internal.builder;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.cdt.core.settings.model.ICStorageElement;
+import org.eclipse.cdt.utils.spawner.EnvironmentReader;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
import com.nokia.carbide.cdt.builder.extension.IEnvironmentModifier;
-import com.nokia.carbide.cdt.builder.project.*;
+import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
+import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
+import com.nokia.carbide.cdt.builder.project.IEnvironmentVariable;
+import com.nokia.carbide.cdt.builder.project.IEnvironmentVarsInfo;
import com.nokia.carbide.cdt.internal.builder.ui.BuilderPreferencePage;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildContext;
import com.nokia.carbide.cpp.internal.api.sdk.SBSv2Utils;
import com.nokia.carbide.cpp.internal.x86build.X86BuildPlugin;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
@@ -28,15 +44,6 @@
import com.nokia.cpp.internal.api.utils.core.PathUtils;
import com.nokia.cpp.internal.api.utils.core.TrackedResource;
-import org.eclipse.cdt.core.settings.model.ICStorageElement;
-import org.eclipse.cdt.utils.spawner.EnvironmentReader;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-import java.io.File;
-import java.util.*;
-
public class EnvironmentVarsInfo2 implements IEnvironmentVarsInfo {
// NOTE: all the paths below use Win32 paths. We convert these to Unix format at the end of the
@@ -195,7 +202,7 @@
// Now check for specific variables relating to the Nokia x86 environment
// and update the environment that we just updated, if at all.
- if (context.getPlatformString().equals(ISymbianBuildContext.EMULATOR_PLATFORM) &&
+ if (context.getPlatformString().toUpperCase().equals(ISBSv1BuildContext.EMULATOR_PLATFORM) &&
BuilderPreferencePage.useBuiltInX86Vars()) {
int i = 0;
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ISBSv2BuildConfigInfo.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ISBSv2BuildConfigInfo.java Thu Aug 19 13:31:39 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-package com.nokia.carbide.cdt.internal.builder;
-
-/**
- * Interface to SBSv2 build configuration specific data
- */
-public interface ISBSv2BuildConfigInfo {
-
- // Data attribute id's saved in .cproject file
- public final static String ATRRIB_CONFIG_BASE_PLATFORM = "CONFIG_BASE_PLATFORM"; //$NON-NLS-1$
- public final static String ATTRIB_CONFIG_TARGET = "CONFIG_TARGET"; //$NON-NLS-1$
- public final static String ATTRIB_SBSV2_BUILD_ALIAS = "SBSV2_BUILD_ALIAS"; //$NON-NLS-1$
- public final static String ATTRIB_SBSV2_CONFIG_DISPLAY_STRING = "SBSV2_CONFIG_DISPLAY_STRING"; //$NON-NLS-1$
- public final static String ATTRIB_SBSV2_VARIANT = "ATTRIB_SBSV2_VARIANT";
-
- /** Retrieve a specfic .cproject SBSv2 data value from a given ID */
- String getSBSv2Setting(String id);
-
- /**
- * Set a specific SBSv2 configuration specific data value
- * @param id
- * @param value
- */
- void setSBSv2Setting(String id, String value);
-}
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ROMBuilderInfo.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ROMBuilderInfo.java Thu Aug 19 13:31:39 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-package com.nokia.carbide.cdt.internal.builder;
-
-import java.io.File;
-
-import org.eclipse.cdt.core.settings.model.ICStorageElement;
-
-import com.nokia.carbide.cdt.builder.project.IROMBuilderInfo;
-import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
-import com.nokia.cpp.internal.api.utils.core.HostOS;
-
-
-public class ROMBuilderInfo implements IROMBuilderInfo {
-
- private static final String ROMBUILDCOMMANDLINESTORAGE = "ROMBUILDCOMMANDLINESTORAGE"; //$NON-NLS-1$
- private static final String ROMBUILDWORKINGDIRECTORYSTORAGE = "ROMBUILDWORKINGDIRECTORYSTORAGE"; //$NON-NLS-1$
-
-
- private String romBuildCommandLine;
- private String romBuildWorkingDirectory;
-
-
- public ROMBuilderInfo(ISymbianSDK sdk) {
-
- this.romBuildCommandLine = ""; //$NON-NLS-1$
- this.romBuildWorkingDirectory = HostOS.IS_WIN32 ? "C:\\" : "/tmp"; //$NON-NLS-1$ //$NON-NLS-2$
-
- // now set epoc32\rom folder in the sdk as the default working dir
- // this is most common folder that rom images are built from for most symbian kits..
- String dir = sdk.getEPOCROOT() + "epoc32/rom/"; //$NON-NLS-1$
- if (new File(dir).exists())
- romBuildWorkingDirectory = dir;
- }
-
- public void loadFromStorage(ICStorageElement rootStorage) {
- String value = rootStorage.getAttribute(ROMBUILDCOMMANDLINESTORAGE);
- if (value != null) {
- romBuildCommandLine = value;
- }
-
- value = rootStorage.getAttribute(ROMBUILDWORKINGDIRECTORYSTORAGE);
- if (value != null) {
- romBuildWorkingDirectory = value;
- }
- }
-
- public void saveToStorage(ICStorageElement rootStorage) {
- if (romBuildCommandLine.trim().length() > 0) {
- rootStorage.setAttribute(ROMBUILDCOMMANDLINESTORAGE, romBuildCommandLine);
- }
-
- if (romBuildWorkingDirectory.trim().length() > 0) {
- rootStorage.setAttribute(ROMBUILDWORKINGDIRECTORYSTORAGE, romBuildWorkingDirectory);
- }
- }
-
- public String getCommandLine() {
- return romBuildCommandLine;
- }
-
- public String getWorkingDirectory() {
- return romBuildWorkingDirectory;
- }
-
- public void setCommandLine(String romBuildCommandLine) {
- this.romBuildCommandLine = romBuildCommandLine;
- }
-
- public void setWorkingDirectory(String romBuildWorkingDirectory) {
- this.romBuildWorkingDirectory = romBuildWorkingDirectory;
- }
-}
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/SBSv2BuilderInfo.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/SBSv2BuilderInfo.java Thu Aug 19 13:31:39 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-package com.nokia.carbide.cdt.internal.builder;
-
-import java.util.HashMap;
-
-import org.eclipse.cdt.core.settings.model.ICStorageElement;
-
-import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
-
-public class SBSv2BuilderInfo implements ISBSv2BuildConfigInfo {
-
- HashMap sbsv2ConfigDataMap = new HashMap();
-
-// private static String TRUE = "true";
-// private static String FALSE = "false";
-
- ISymbianBuildContext context;
-
- public SBSv2BuilderInfo(ISymbianBuildContext context) {
- String buildAlias = context.getSBSv2Alias() != null ? context.getSBSv2Alias() : "";
- sbsv2ConfigDataMap.put(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_BUILD_ALIAS, buildAlias);
- sbsv2ConfigDataMap.put(ISBSv2BuildConfigInfo.ATRRIB_CONFIG_BASE_PLATFORM, context.getBasePlatformForVariation());
- sbsv2ConfigDataMap.put(ISBSv2BuildConfigInfo.ATTRIB_CONFIG_TARGET, context.getTargetString());
- sbsv2ConfigDataMap.put(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_CONFIG_DISPLAY_STRING, context.getDisplayString());
- sbsv2ConfigDataMap.put(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_VARIANT, "");
- this.context = context;
- }
-
- public void loadFromStorage(ICStorageElement rootStorage) {
-
- String value = rootStorage.getAttribute(ATRRIB_CONFIG_BASE_PLATFORM);
- if (value != null) {
- sbsv2ConfigDataMap.put(ATRRIB_CONFIG_BASE_PLATFORM, value);
- }
-
- value = rootStorage.getAttribute(ATTRIB_SBSV2_VARIANT);
- if (value != null) {
- sbsv2ConfigDataMap.put(ATTRIB_SBSV2_VARIANT, value);
- }
-
- value = rootStorage.getAttribute(ATTRIB_CONFIG_TARGET);
- if (value != null) {
- sbsv2ConfigDataMap.put(ATTRIB_CONFIG_TARGET, value);
- }
-
- value = rootStorage.getAttribute(ATTRIB_SBSV2_BUILD_ALIAS);
- if (value != null) {
- sbsv2ConfigDataMap.put(ATTRIB_SBSV2_BUILD_ALIAS, value);
- }
-
- value = rootStorage.getAttribute(ATTRIB_SBSV2_CONFIG_DISPLAY_STRING);
- if (value != null) {
- sbsv2ConfigDataMap.put(ATTRIB_SBSV2_CONFIG_DISPLAY_STRING, value);
- }
-
- }
-
- public void saveToStorage(ICStorageElement rootStorage) {
-
- String value = sbsv2ConfigDataMap.get(ATRRIB_CONFIG_BASE_PLATFORM);
- if (value != null && value.trim().length() > 0){
- rootStorage.setAttribute(ATRRIB_CONFIG_BASE_PLATFORM, value);
- }
-
- value = sbsv2ConfigDataMap.get(ATTRIB_SBSV2_VARIANT);
- if (value != null && value.trim().length() > 0){
- rootStorage.setAttribute(ATTRIB_SBSV2_VARIANT, value);
- }
-
- value = sbsv2ConfigDataMap.get(ATTRIB_CONFIG_TARGET);
- if (value != null && value.trim().length() > 0){
- rootStorage.setAttribute(ATTRIB_CONFIG_TARGET, value);
- }
-
- value = sbsv2ConfigDataMap.get(ATTRIB_SBSV2_BUILD_ALIAS);
- if (value != null && value.trim().length() > 0){
- rootStorage.setAttribute(ATTRIB_SBSV2_BUILD_ALIAS, value);
- }
-
- value = sbsv2ConfigDataMap.get(ATTRIB_SBSV2_CONFIG_DISPLAY_STRING);
- if (value != null && value.trim().length() > 0){
- rootStorage.setAttribute(ATTRIB_SBSV2_CONFIG_DISPLAY_STRING, value);
- }
-
- }
-
- public String getSBSv2Setting(String id) {
- return sbsv2ConfigDataMap.get(id);
- }
-
- public void setSBSv2Setting(String id, String value) {
- sbsv2ConfigDataMap.put(id, value);
- }
-
-}
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/SISBuilderInfo.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/SISBuilderInfo.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/SISBuilderInfo.java Fri Aug 20 09:39:24 2010 -0500
@@ -27,6 +27,7 @@
import com.nokia.carbide.cdt.internal.builder.gen.CarbideBuildConfig.CarbideBuildConfigFactory;
import com.nokia.carbide.cdt.internal.builder.gen.CarbideBuildConfig.SisBuilderType;
import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
+import com.nokia.carbide.cpp.sdk.core.ISymbianSDKFeatures;
/**
* @deprecated use {@link SISBuilderInfo2} instead
@@ -250,7 +251,7 @@
if (getCertificate().length() > 0) {
return KEY_CERT_SIGN;
}
- if (sdk.isEKA2()) {
+ if (sdk.getSupportedFeatures().contains(ISymbianSDKFeatures.IS_EKA2)) {
return SELF_SIGN;
}
return DONT_SIGN;
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/ArgumentsTabComposite.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/ArgumentsTabComposite.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/ArgumentsTabComposite.java Fri Aug 20 09:39:24 2010 -0500
@@ -25,11 +25,13 @@
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Text;
-import com.nokia.carbide.cdt.builder.BuildArgumentsInfo;
-import com.nokia.carbide.cdt.builder.project.IBuildArgumentsInfo;
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cdt.internal.builder.CarbideBuildConfiguration;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildArgumentsInfo;
+import com.nokia.carbide.cpp.internal.api.sdk.IBuildArgumentsInfo;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildContext;
import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
+import com.nokia.carbide.cpp.sdk.core.ISymbianSDKFeatures;
/**
* Arguments tab for the Carbide Build Configurations page
@@ -159,7 +161,8 @@
}
public void initData(ICarbideBuildConfiguration buildConfig) {
- IBuildArgumentsInfo argsInfo = buildConfig.getBuildArgumentsInfo();
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)buildConfig.getBuildContext();
+ IBuildArgumentsInfo argsInfo = sbsv1Context.getBuildArgumentsInfo();
bldMakeBldfilesEdit.setText(argsInfo.getBldmakeBldFilesArgs());
bldMakeCleanEdit.setText(argsInfo.getBldmakeCleanArgs());
abldBuildEdit.setText(argsInfo.getAbldBuildArgs());
@@ -176,7 +179,8 @@
public boolean compareConfigurationSettings(ICarbideBuildConfiguration selectedConfig, boolean writeToConfig) {
boolean settingsEqual = true;
- IBuildArgumentsInfo existingInfo = selectedConfig.getBuildArgumentsInfo();
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)selectedConfig.getBuildContext();
+ IBuildArgumentsInfo existingInfo = sbsv1Context.getBuildArgumentsInfo();
settingsEqual = existingInfo.getBldmakeBldFilesArgs().equals(bldMakeBldfilesEdit.getText()) &&
existingInfo.getBldmakeCleanArgs().equals(bldMakeCleanEdit.getText()) &&
existingInfo.getAbldBuildArgs().equals(abldBuildEdit.getText()) &&
@@ -190,7 +194,7 @@
existingInfo.getAbldFreezeArgs().equals(abldFreezeEdit.getText());
if (!settingsEqual && writeToConfig) {
- ((CarbideBuildConfiguration)selectedConfig).setBuildArgumentsInfo(new BuildArgumentsInfo(bldMakeBldfilesEdit.getText(), bldMakeCleanEdit.getText(),
+ sbsv1Context.setBuildArgumentsInfo(new BuildArgumentsInfo(bldMakeBldfilesEdit.getText(), bldMakeCleanEdit.getText(),
abldBuildEdit.getText(), abldExportEdit.getText(), abldMakefileEdit.getText(), abldLibraryEdit.getText(), abldResourceEdit.getText(),
abldTargetEdit.getText(), abldFinalEdit.getText(), abldCleanEdit.getText(), abldFreezeEdit.getText()));
}
@@ -211,7 +215,7 @@
abldCleanEdit.setText(""); //$NON-NLS-1$
abldFreezeEdit.setText(""); //$NON-NLS-1$
- if (sdk.isEKA2()) {
+ if (sdk.getSupportedFeatures().contains(ISymbianSDKFeatures.IS_EKA2)) {
abldFreezeEdit.setText("-r"); //$NON-NLS-1$
}
}
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideBuildConfigurationsPage.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideBuildConfigurationsPage.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideBuildConfigurationsPage.java Fri Aug 20 09:39:24 2010 -0500
@@ -151,12 +151,6 @@
// paths and symbols tab
PathsAndSymbolsTabComposite pathsAndSymbolsTabComposite;
- // rom builder tab
- ROMBuilderTabComposite romBuilderTabComposite;
-
- // SBSv2 config data tab
- SBSv2BuildConfigTabComposite sbsv2BuildConfigTabComposite;
-
// Configuration management/switching
private IProject project;
private BuildConfigCombo buildConfigurationCombo;
@@ -226,20 +220,6 @@
data.horizontalIndent = 18;
data.verticalIndent = 18;
control.setLayoutData(data);
-
- //////////////////// SBSv2 Config Data Tab /////////////
- if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(project)) {
-
- TabItem sbsV2TabItem = new TabItem(tabFolder, SWT.NONE);
- sbsV2TabItem.setText(Messages.getString("CarbideBuildConfigurationsPage.SBSv2_Tab")); //$NON-NLS-1$
- sbsV2TabItem.setToolTipText(Messages.getString("CarbideBuildConfigurationsPage.Environement_Tab_ToolTip")); //$NON-NLS-1$
-
- sbsv2BuildConfigTabComposite = new SBSv2BuildConfigTabComposite(sbsV2TabItem);
- sbsv2BuildConfigTabComposite.createControls();
- sbsV2TabItem.setControl(sbsv2BuildConfigTabComposite);
- }
- ////////////////////////////////////////////////////////
-
////////////////////// Environment Tab ////////////////
TabItem envTabItem = new TabItem(tabFolder, SWT.NONE);
@@ -364,15 +344,6 @@
pathsAndSymbolsTabComposite.createControls();
pathsAndSymbolsTabItem.setControl(pathsAndSymbolsTabComposite);
- /////////////////// ROM Builder Tab /////////////////
- TabItem romBuilderTabItem = new TabItem(tabFolder, SWT.NONE);
- romBuilderTabItem.setText(Messages.getString("CarbideRomBuilderTab.Title")); //$NON-NLS-1$
- romBuilderTabItem.setToolTipText(Messages.getString("CarbideRomBuilderTab.ToolTip")); //$NON-NLS-1$
-
- romBuilderTabComposite = new ROMBuilderTabComposite(romBuilderTabItem);
- romBuilderTabComposite.createControls();
- romBuilderTabItem.setControl(romBuilderTabComposite);
-
// read in the settings and populate the prefs...
if (project != null) {
loadConfigurationSettings();
@@ -381,14 +352,11 @@
ICarbideBuildConfiguration config = cpi.getDefaultConfiguration();
if (config != null) {
sisFilesBlock.initData(config);
- if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(project)) {
- sbsv2BuildConfigTabComposite.initData(config);
- }
+
if (argumentsTabcomposite != null) {
argumentsTabcomposite.initData(config);
}
pathsAndSymbolsTabComposite.initData(config);
- romBuilderTabComposite.initData(config);
}
}
setUpEnvVarsTable(new String[0], null);
@@ -660,9 +628,7 @@
boolean sisSettingsEqual = sisFilesBlock.compareConfigurationSettings(selectedConfig, writeToConfig);
boolean sbsv2ConfigEqual = true;
- if (sbsv2BuildConfigTabComposite != null) {
- sbsv2ConfigEqual = sbsv2BuildConfigTabComposite.compareConfigurationSettings(selectedConfig, writeToConfig);
- }
+
// Compare envVars settings
boolean envVarsSettingsEqual = envVarList.size() == envVarListOrig.size() && envVarList.equals(envVarListOrig);
if (!envVarsSettingsEqual && writeToConfig) {
@@ -676,9 +642,7 @@
boolean pathsAndSynmbolsSettingsEqual = pathsAndSymbolsTabComposite.compareConfigurationSettings(selectedConfig, writeToConfig);
- boolean romBuilderSettingsEqual = romBuilderTabComposite.compareConfigurationSettings(selectedConfig, writeToConfig);
-
- return sisSettingsEqual && sbsv2ConfigEqual && envVarsSettingsEqual && argsSettingsEqual && pathsAndSynmbolsSettingsEqual && romBuilderSettingsEqual;
+ return sisSettingsEqual && sbsv2ConfigEqual && envVarsSettingsEqual && argsSettingsEqual && pathsAndSynmbolsSettingsEqual;
}
private void saveConfigurationSettings(ICarbideBuildConfiguration config) {
@@ -981,15 +945,12 @@
ICarbideBuildConfiguration lastConfig = cpi.getNamedConfiguration(lastSelectedConfigName);
if (lastConfig != null) {
sisFilesBlock.initData(lastConfig);
- if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(project)) {
- sbsv2BuildConfigTabComposite.initData(lastConfig);
- }
+
setUpEnvVarsTable(new String[0], null); // refresh env vars info
if (argumentsTabcomposite != null) {
argumentsTabcomposite.initData(lastConfig);
}
pathsAndSymbolsTabComposite.initData(lastConfig);
- romBuilderTabComposite.initData(lastConfig);
}
}
@@ -1001,14 +962,13 @@
sisFilesBlock.performDefaults();
IEnvironmentVarsInfo envVarsDefaults = cpi.getNamedConfiguration(lastSelectedConfigName).getEnvironmentVarsInfo();
- String[] defaultVars = envVarsDefaults.getDefaultEnvVarsSettings(cpi, cpi.getNamedConfiguration(lastSelectedConfigName));
- setUpEnvVarsTable(defaultVars, envVarsDefaults.getDefaultEnvVarsList(cpi, cpi.getNamedConfiguration(lastSelectedConfigName)));
+ String[] defaultVars = envVarsDefaults.getDefaultEnvVarsSettings(cpi, cpi.getNamedConfiguration(lastSelectedConfigName).getBuildContext());
+ setUpEnvVarsTable(defaultVars, envVarsDefaults.getDefaultEnvVarsList(cpi, cpi.getNamedConfiguration(lastSelectedConfigName).getBuildContext()));
if (argumentsTabcomposite != null) {
argumentsTabcomposite.performDefaults(cpi.getNamedConfiguration(lastSelectedConfigName).getSDK());
}
pathsAndSymbolsTabComposite.performDefaults(cpi.getNamedConfiguration(lastSelectedConfigName).getSDK());
- romBuilderTabComposite.performDefaults(cpi.getNamedConfiguration(lastSelectedConfigName).getSDK());
super.performDefaults();
}
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideCPPProjectSettingsPage.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideCPPProjectSettingsPage.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideCPPProjectSettingsPage.java Fri Aug 20 09:39:24 2010 -0500
@@ -52,6 +52,7 @@
import org.eclipse.ui.dialogs.PropertyPage;
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
+import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
import com.nokia.carbide.cdt.internal.api.builder.ui.MMPSelectionUI;
import com.nokia.carbide.cdt.internal.api.builder.ui.MMPSelectionUI.FileInfo;
@@ -355,7 +356,9 @@
// get the list of normal and test project extensions
List buildConfigList = new ArrayList();
- buildConfigList.addAll(cpi.getBuildConfigurations());
+ for (ICarbideBuildConfiguration config : cpi.getBuildConfigurations()){
+ buildConfigList.add(config.getBuildContext());
+ }
enableOrDisableControls();
}
@@ -398,7 +401,11 @@
selectionUI.setLayoutData(gridData);
// set the data
- selectionUI.setBldInfFile(cpi.getAbsoluteBldInfPath(), cpi.getBuildConfigurations(), CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(cpi.getProject()));
+ List buildContexts = new ArrayList();
+ for (ICarbideBuildConfiguration config : cpi.getBuildConfigurations()){
+ buildContexts.add(config.getBuildContext());
+ }
+ selectionUI.setBldInfFile(cpi.getAbsoluteBldInfPath(), buildContexts, CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(cpi.getProject()));
// set checked state
selectionUI.setAllChecked(false);
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/PathsAndSymbolsTabComposite.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/PathsAndSymbolsTabComposite.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/PathsAndSymbolsTabComposite.java Fri Aug 20 09:39:24 2010 -0500
@@ -116,7 +116,7 @@
String macrosFile = cpi.getMacrosFile();
if (macrosFile != null && macrosFile.length() > 0) {
MacroScanner scanner = new MacroScanner(
- new DefaultIncludeFileLocator(buildConfig.getCarbideProject().getProject(), buildConfig),
+ new DefaultIncludeFileLocator(buildConfig.getCarbideProject().getProject(), buildConfig.getBuildContext()),
DefaultModelDocumentProvider.getInstance(),
DefaultTranslationUnitProvider.getInstance());
scanner.scanFile(new File(macrosFile));
@@ -256,7 +256,7 @@
ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(buildConfig.getCarbideProject().getProject());
if (projDes != null) {
- ICConfigurationDescription configDes = projDes.getConfigurationById(buildConfig.getDisplayString());
+ ICConfigurationDescription configDes = projDes.getConfigurationById(buildConfig.getBuildContext().getConfigurationID());
if (configDes != null) {
CConfigurationData configData = configDes.getConfigurationData();
if (configData != null) {
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/ROMBuilderTabComposite.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/ROMBuilderTabComposite.java Thu Aug 19 13:31:39 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-package com.nokia.carbide.cdt.internal.builder.ui;
-
-import java.io.File;
-
-import org.eclipse.cdt.utils.ui.controls.ControlFactory;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.TabItem;
-import org.eclipse.swt.widgets.Text;
-
-import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
-import com.nokia.carbide.cdt.builder.project.IROMBuilderInfo;
-import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
-import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
-
-/**
- * Arguments tab for the Carbide Build Configurations page
- *
- */
-public class ROMBuilderTabComposite extends Composite {
-
- private Text cmdLineEdit;
- private Text workingDirEdit;
- private Button workingDirBrowse;
-
-
- public ROMBuilderTabComposite(TabItem tabItem) {
- super(tabItem.getParent(), SWT.NONE);
- }
-
- public void createControls() {
- setLayout(new GridLayout(3, false));
-
- Label cmdLineLabel = new Label(this, SWT.NONE);
- cmdLineLabel.setText(Messages.getString("CarbideRomBuilderTab.Cmd_Line")); //$NON-NLS-1$
- cmdLineLabel.setToolTipText(Messages.getString("CarbideRomBuilderTab.Cmd_Line_Tool_Tip")); //$NON-NLS-1$
-
- cmdLineEdit = new Text(this, SWT.BORDER);
- cmdLineEdit.setToolTipText(Messages.getString("CarbideRomBuilderTab.BldfilesArgumentsToolTip")); //$NON-NLS-1$
- cmdLineEdit.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
-
- Label workingDirLabel = new Label(this, SWT.NONE);
- workingDirLabel.setText(Messages.getString("CarbideRomBuilderTab.Working_Dir")); //$NON-NLS-1$
- workingDirLabel.setToolTipText(Messages.getString("CarbideRomBuilderTab.Working_Dir_Tool_Tip")); //$NON-NLS-1$
-
- workingDirEdit = new Text(this, SWT.BORDER);
- workingDirEdit.setToolTipText(Messages.getString("CarbideRomBuilderTab.Working_Dir_Tool_Tip")); //$NON-NLS-1$
- workingDirEdit.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
-
- workingDirBrowse = ControlFactory.createPushButton(this, Messages.getString("CarbideRomBuilderTab.Browse")); //$NON-NLS-1$
- workingDirBrowse.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent evt) {
- DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.NONE);
- BrowseDialogUtils.initializeFrom(dialog, workingDirEdit);
-
- dialog.setText(Messages.getString("CarbideRomBuilderTab.Rom_Dir_Dialog_Title")); //$NON-NLS-1$
- String result = dialog.open();
-
- if (result != null) {
- workingDirEdit.setText(result);
- }
- }
- });
- }
-
- public void initData(ICarbideBuildConfiguration buildConfig) {
- IROMBuilderInfo romInfo = buildConfig.getROMBuildInfo();
- cmdLineEdit.setText(romInfo.getCommandLine());
- workingDirEdit.setText(romInfo.getWorkingDirectory());
- }
-
- public boolean compareConfigurationSettings(ICarbideBuildConfiguration selectedConfig, boolean writeToConfig) {
- boolean settingsEqual = true;
-
- IROMBuilderInfo existingInfo = selectedConfig.getROMBuildInfo();
- settingsEqual = existingInfo.getCommandLine().equals(cmdLineEdit.getText()) &&
- existingInfo.getWorkingDirectory().equals(workingDirEdit.getText());
-
- if (!settingsEqual && writeToConfig) {
- existingInfo.setCommandLine(cmdLineEdit.getText());
- existingInfo.setWorkingDirectory(workingDirEdit.getText());
- }
-
- return settingsEqual;
- }
-
- public void performDefaults(ISymbianSDK sdk) {
- cmdLineEdit.setText(""); //$NON-NLS-1$
- workingDirEdit.setText("C:\\"); //$NON-NLS-1$
-
- // now set epoc32\rom folder in the sdk as the default working dir
- // this is most common folder that rom images are built from for most symbian kits..
- String dir = sdk.getEPOCROOT() + "epoc32\\rom\\"; //$NON-NLS-1$
- if (new File(dir).exists())
- workingDirEdit.setText(dir);
- }
-}
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/SBSv2BuildConfigTabComposite.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/SBSv2BuildConfigTabComposite.java Thu Aug 19 13:31:39 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-package com.nokia.carbide.cdt.internal.builder.ui;
-
-import java.io.File;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.TabItem;
-import org.eclipse.swt.widgets.Text;
-
-import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
-import com.nokia.carbide.cdt.internal.builder.CarbideBuildConfiguration;
-import com.nokia.carbide.cdt.internal.builder.ISBSv2BuildConfigInfo;
-import com.nokia.carbide.cpp.internal.api.sdk.SBSv2Utils;
-import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
-
-public class SBSv2BuildConfigTabComposite extends Composite {
-
- private static final String configCmdLabelPrefixText = "Configuration Command: -c "; // $NON-NLS-N$
- private static final String releaseTreeLabelPrefixText = "Release Tree: "; // $NON-NLS-N$
-
- Text variantEdit;
-
- Label configCmdLabel;
- Label releaseTreeLabel;
- private ICarbideBuildConfiguration config;
-
- public SBSv2BuildConfigTabComposite(TabItem tabItem) {
- super(tabItem.getParent(), SWT.NONE);
- }
-
- public void createControls() {
- setLayout(new GridLayout(2, false));
-
- Label variantLabel = new Label(this, SWT.NONE);
- variantLabel.setText(Messages.getString("CarbideSBSv2ConfigTab.VariantLabel")); //$NON-NLS-1$
- variantLabel.setToolTipText(Messages.getString("CarbideSBSv2ConfigTab.VariantLabel_ToolTip")); //$NON-NLS-1$
-
- variantEdit = new Text(this, SWT.BORDER);
- variantEdit.setToolTipText(Messages.getString("CarbideSBSv2ConfigTab.VariantLabel_ToolTip")); //$NON-NLS-1$
- variantEdit.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
- SelectionListener listener;
- variantEdit.addKeyListener( new KeyListener() {
-
- public void keyReleased(KeyEvent e) {
- setVaraintDetailsText();
- }
-
- public void keyPressed(KeyEvent e) {
- // ignore
- }
- });
-
- Group emulatorBuildOptionsGroup;
- emulatorBuildOptionsGroup = new Group(this, SWT.NONE);
- emulatorBuildOptionsGroup.setLayout(new GridLayout(1, false));
- GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1);
- emulatorBuildOptionsGroup.setLayoutData(gd);
- emulatorBuildOptionsGroup.setText("Build Variant Details"); //$NON-NLS-1$
-
- configCmdLabel = new Label(emulatorBuildOptionsGroup, SWT.CHECK);
- configCmdLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
- releaseTreeLabel = new Label(emulatorBuildOptionsGroup, SWT.CHECK);
- releaseTreeLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
- }
-
- public void initData(ICarbideBuildConfiguration buildConfig) {
- this.config = buildConfig;
- ISBSv2BuildConfigInfo sbsv2ConfigInfo = ((CarbideBuildConfiguration)buildConfig).getSBSv2ConfigInfo();
- if (sbsv2ConfigInfo != null && sbsv2ConfigInfo.getSBSv2Setting(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_VARIANT) != null){
- variantEdit.setText(sbsv2ConfigInfo.getSBSv2Setting(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_VARIANT));
- } else {
- variantEdit.setText("");
- }
-
- setVaraintDetailsText();
- }
-
- private void setVaraintDetailsText() {
-
- String configCmdText = configCmdLabelPrefixText;
- if (config != null){
- if (config.getSBSv2Alias() == null){
- configCmdText += config.getPlatformString().toLowerCase() + "_" + config.getTargetString().toLowerCase() + variantEdit.getText();
- } else {
- configCmdText += config.getSBSv2Alias() + variantEdit.getText();
- }
- }
- configCmdLabel.setText(configCmdText);
-
- String variantText = SBSv2Utils.getVariantOutputDirModifier(variantEdit.getText());
- if (variantText == null) variantText = "";
- String relTreeText = releaseTreeLabelPrefixText;
- if (config != null){
- relTreeText += " " + config.getSDK().getEPOCROOT() + "epoc32" + File.separator + "release" + File.separator + config.getPlatformString().toLowerCase() + variantText + File.separator + config.getTargetString().toLowerCase();
- }
- releaseTreeLabel.setText(relTreeText);
- }
-
-
-
- public boolean compareConfigurationSettings(ICarbideBuildConfiguration selectedConfig, boolean writeToConfig) {
- boolean settingsEqual = true;
-
- ISBSv2BuildConfigInfo currSBSv2Info = ((CarbideBuildConfiguration)selectedConfig).getSBSv2ConfigInfo();
- if (currSBSv2Info != null){
- settingsEqual = currSBSv2Info.getSBSv2Setting(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_VARIANT).equals(variantEdit.getText());
-
- if (!settingsEqual && writeToConfig) {
- currSBSv2Info.setSBSv2Setting(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_VARIANT, variantEdit.getText());
- }
- }
-
- return settingsEqual;
- }
-
- public void performDefaults(ISymbianSDK sdk) {
- variantEdit.setText("");
- }
-}
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/SisFilesBlock.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/SisFilesBlock.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/SisFilesBlock.java Fri Aug 20 09:39:24 2010 -0500
@@ -61,6 +61,7 @@
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cdt.builder.project.ISISBuilderInfo;
import com.nokia.carbide.cdt.internal.api.builder.SISBuilderInfo2;
+import com.nokia.carbide.cpp.sdk.core.ISymbianSDKFeatures;
/**
* A composite that displays files in a table. Files can be
@@ -297,7 +298,7 @@
listCopy.add(new SISBuilderInfo2(info));
}
- isEKA2 = buildConfig.getSDK().isEKA2();
+ isEKA2 = buildConfig.getSDK().getSupportedFeatures().contains(ISymbianSDKFeatures.IS_EKA2);
setFiles(listCopy);
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/ABLDCommandHandler.java
--- a/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/ABLDCommandHandler.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/ABLDCommandHandler.java Fri Aug 20 09:39:24 2010 -0500
@@ -37,6 +37,7 @@
import com.nokia.carbide.cdt.builder.builder.CarbideCommandLauncher;
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildContext;
import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils;
public class ABLDCommandHandler extends ProjectCommandHandler {
@@ -180,7 +181,8 @@
args.add(buildConfig.getPlatformString().toLowerCase());
args.add(buildConfig.getTargetString().toLowerCase());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldTargetArgs().split(" ")) { //$NON-NLS-1$
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)buildConfig;
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldTargetArgs().split(" ")) { //$NON-NLS-1$
args.add(arg);
}
@@ -191,7 +193,8 @@
List args = new ArrayList();
args.add("export"); //$NON-NLS-1$
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldExportArgs().split(" ")) { //$NON-NLS-1$
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)buildConfig;
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldExportArgs().split(" ")) { //$NON-NLS-1$
args.add(arg);
}
@@ -204,7 +207,8 @@
args.add(buildConfig.getPlatformString().toLowerCase());
args.add(buildConfig.getTargetString().toLowerCase());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldResourceArgs().split(" ")) { //$NON-NLS-1$
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)buildConfig;
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldResourceArgs().split(" ")) { //$NON-NLS-1$
args.add(arg);
}
@@ -217,7 +221,8 @@
args.add(buildConfig.getPlatformString().toLowerCase());
args.add(buildConfig.getTargetString().toLowerCase());
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldFinalArgs().split(" ")) { //$NON-NLS-1$
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)buildConfig;
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldFinalArgs().split(" ")) { //$NON-NLS-1$
args.add(arg);
}
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/BuildPKGCommandHandler.java
--- a/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/BuildPKGCommandHandler.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/BuildPKGCommandHandler.java Fri Aug 20 09:39:24 2010 -0500
@@ -48,7 +48,7 @@
import com.nokia.carbide.cdt.builder.builder.CarbideCommandLauncher;
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
-import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContext;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
import com.nokia.carbide.cpp.internal.builder.utils.Activator;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils;
@@ -153,7 +153,8 @@
bldMakeLauncher.showCommand(true);
String defaultConfigName = cpi.getDefaultBuildConfigName();
ICarbideBuildConfiguration defaultConfig = cpi.getDefaultConfiguration();
- ISymbianBuildContext context = SymbianBuildContext.getBuildContextFromDisplayName(defaultConfigName);
+ // TODO: YUCKY!!!
+ ISymbianBuildContext context = BuildContextSBSv1.getBuildContextFromDisplayName(defaultConfigName);
bldMakeLauncher.startTimingStats();
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/BuilderUtilsPropertyTester.java
--- a/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/BuilderUtilsPropertyTester.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/BuilderUtilsPropertyTester.java Fri Aug 20 09:39:24 2010 -0500
@@ -61,14 +61,6 @@
if (!CarbideBuilderPlugin.getBuildManager().isCarbideProject(file.getProject())) {
return false;
}
-
- if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(file.getProject())) {
- Version sbsVers = SDKCorePlugin.getSDKManager().getSBSv2Version(false);
- if (sbsVers.compareTo(SDKCorePlugin.getSDKManager().getMinimumSupportedSBSv2Version()) >= 0)
- return true;
- else
- return false;
- }
}
return true;
}
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/CompileHandler.java
--- a/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/CompileHandler.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/CompileHandler.java Fri Aug 20 09:39:24 2010 -0500
@@ -80,7 +80,7 @@
IProject lastProject = selectedFiles.get(0).getProject();
ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(lastProject);
- String[] errorParserIds = CarbideCPPBuilder.getParserIdArray(cpi.getDefaultConfiguration().getErrorParserId());
+ String[] errorParserIds = cpi.getDefaultConfiguration().getErrorParserList();
IPath workingDirectory = cpi.getINFWorkingDirectory();
// create the launcher for the first file's project. if there are files selected for other projects, change the
@@ -104,7 +104,7 @@
if (lastProject != project && path != null) {
lastProject = project;
cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(lastProject);
- errorParserIds = CarbideCPPBuilder.getParserIdArray(cpi.getDefaultConfiguration().getErrorParserId());
+ errorParserIds = cpi.getDefaultConfiguration().getErrorParserList();
workingDirectory = cpi.getINFWorkingDirectory();
launcher = new CarbideCommandLauncher(lastProject, monitor, errorParserIds, workingDirectory);
launcher.showCommand(true);
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/ComponentCommandHandler.java
--- a/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/ComponentCommandHandler.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/ComponentCommandHandler.java Fri Aug 20 09:39:24 2010 -0500
@@ -242,7 +242,7 @@
IProject lastProject = selectedFiles.get(0).getProject();
ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(lastProject);
- String[] errorParserIds = CarbideCPPBuilder.getParserIdArray(cpi.getDefaultConfiguration().getErrorParserId());
+ String[] errorParserIds = cpi.getDefaultConfiguration().getErrorParserList();
IPath workingDirectory = cpi.getINFWorkingDirectory();
// create the launcher for the first file's project. if there are files selected for other projects, change the
@@ -273,7 +273,7 @@
lastProject = project;
cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(lastProject);
- errorParserIds = CarbideCPPBuilder.getParserIdArray(cpi.getDefaultConfiguration().getErrorParserId());
+ errorParserIds = cpi.getDefaultConfiguration().getErrorParserList();
workingDirectory = cpi.getINFWorkingDirectory();
launcher = new CarbideCommandLauncher(lastProject, monitor, errorParserIds, workingDirectory);
launcher.showCommand(true);
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/PreprocessHandler.java
--- a/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/PreprocessHandler.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/PreprocessHandler.java Fri Aug 20 09:39:24 2010 -0500
@@ -73,6 +73,7 @@
import com.nokia.carbide.cdt.builder.builder.CarbideCommandLauncher;
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
+import com.nokia.carbide.cdt.internal.builder.CarbideBuildConfiguration;
import com.nokia.carbide.cpp.epoc.engine.EpocEnginePlugin;
import com.nokia.carbide.cpp.epoc.engine.MMPDataRunnableAdapter;
import com.nokia.carbide.cpp.epoc.engine.model.mmp.EMMPLanguage;
@@ -80,6 +81,7 @@
import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPData;
import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPResource;
import com.nokia.carbide.cpp.epoc.engine.preprocessor.AcceptedNodesViewFilter;
+import com.nokia.carbide.cpp.epoc.engine.preprocessor.IDefine;
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;
@@ -128,7 +130,7 @@
e.printStackTrace();
}
- CarbideCommandLauncher launcher = new CarbideCommandLauncher(project, monitor, CarbideCPPBuilder.getParserIdArray(buildConfig.getErrorParserId()), cpi.getINFWorkingDirectory());
+ CarbideCommandLauncher launcher = new CarbideCommandLauncher(project, monitor, buildConfig.getErrorParserList(), cpi.getINFWorkingDirectory());
launcher.showCommand(true);
String cppTool = "cpp" + HostOS.EXE_EXT; //$NON-NLS-1$
@@ -189,14 +191,15 @@
}
// add the compiler prefix file if any
- IPath compilerPrefix = buildConfig.getCompilerPrefixFile();
+ IPath compilerPrefix = buildConfig.getBuildContext().getCompilerPrefixFile();
if (compilerPrefix != null) {
args.add("-include"); //$NON-NLS-1$
args.add("\"" + compilerPrefix.toOSString() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
}
// add the sdk prefix file if any
- File sdkPrefix = buildConfig.getSDK().getPrefixFile();
+ File sdkPrefix = buildConfig.getBuildContext().getPrefixFromVariantCfg().toFile();
+
if (sdkPrefix != null && sdkPrefix.exists()) {
args.add("-include"); //$NON-NLS-1$
args.add("\"" + sdkPrefix.getAbsolutePath() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
@@ -404,19 +407,18 @@
private List getMacros(ICarbideBuildConfiguration buildConfig, final IPath filePath, final IProgressMonitor monitor) {
final List macros = new ArrayList();
- // platform macros
- for (String platMacro : buildConfig.getSDK().getPlatformMacros(buildConfig.getPlatformString())) {
- macros.add("__" + platMacro + "__"); //$NON-NLS-1$ //$NON-NLS-2$
+ List buildMacros = buildConfig.getBuildContext().getBuildMacros();
+ for (IDefine define : buildMacros){
+ macros.add(define.getName());
}
- // built in macros
- for (String builtinMacro : buildConfig.getBuiltinMacros()) {
- macros.add(builtinMacro);
+ List metaDataMacros = buildConfig.getBuildContext().getMetadataMacros();
+ for (IDefine define : metaDataMacros){
+ macros.add(define.getName());
}
- // vendor macros (e.g. __SERIES60_3x__)
- for (String builtinMacro : buildConfig.getSDK().getVendorSDKMacros()) {
- macros.add(builtinMacro);
+ if (((CarbideBuildConfiguration)buildConfig).hasSTDCPPSupport()){
+ macros.add("__SYMBIAN_STDCPP_SUPPORT__");
}
IProject project = buildConfig.getCarbideProject().getProject();
@@ -429,14 +431,14 @@
// target type macro (e.g. __DLL__)
EpocEnginePlugin.runWithMMPData(workspaceRelativeMMPPath,
- new DefaultMMPViewConfiguration(project, buildConfig, new AcceptedNodesViewFilter()),
+ new DefaultMMPViewConfiguration(project, buildConfig.getBuildContext(), new AcceptedNodesViewFilter()),
new MMPDataRunnableAdapter() {
public Object run(IMMPData mmpData) {
String targetType = mmpData.getSingleArgumentSettings().get(EMMPStatement.TARGETTYPE);
if (targetType != null) {
targetType = targetType.toUpperCase();
- macros.add(targetType);
+ macros.add("__" + targetType + "__");
}
// mmp macros
diff -r 63d0f74e878e -r 0142fe025ce6 builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/ProjectCommandHandler.java
--- a/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/ProjectCommandHandler.java Thu Aug 19 13:31:39 2010 -0500
+++ b/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/ProjectCommandHandler.java Fri Aug 20 09:39:24 2010 -0500
@@ -180,7 +180,7 @@
SubMonitor subMonitor = SubMonitor.convert(monitor, buildConfigList.size());
for (final ICarbideBuildConfiguration currConfig : buildConfigList) {
- launcher.setErrorParserManager(cpi.getINFWorkingDirectory(), CarbideCPPBuilder.getParserIdArray(currConfig.getErrorParserId()));
+ launcher.setErrorParserManager(cpi.getINFWorkingDirectory(), currConfig.getErrorParserList());
if (monitor.isCanceled()) {
return new Status(IStatus.CANCEL, "Carbide.c++ builder utils plugin", IStatus.CANCEL, "Build Cancelled", null);
@@ -221,7 +221,7 @@
ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project);
final ICarbideBuildConfiguration defaultConfig = cpi.getDefaultConfiguration();
- Job buildJob = new Job("Freezing Configuration - " + defaultConfig.getDisplayString()) {
+ Job buildJob = new Job("Freezing Configuration - " + defaultConfig.getBuildContext().getDisplayString()) {
protected IStatus run(IProgressMonitor monitor) {
CarbideCPPBuilder.invokeFreeze(defaultConfig, monitor, true);
Activator.refreshProjectAfterFreeze(project);
diff -r 63d0f74e878e -r 0142fe025ce6 carbidesdk/com.nokia.carbide.cpp.sdk.doc.user/html/reference/api_Change_Notes.htm
--- a/carbidesdk/com.nokia.carbide.cpp.sdk.doc.user/html/reference/api_Change_Notes.htm Thu Aug 19 13:31:39 2010 -0500
+++ b/carbidesdk/com.nokia.carbide.cpp.sdk.doc.user/html/reference/api_Change_Notes.htm Fri Aug 20 09:39:24 2010 -0500
@@ -107,13 +107,44 @@
Added com.nokia.carbide.cdt.builder.project.ISymbianBuildConfiguration#getTargetOutputDirectory( ).
-Since Carbide 3.0.0
+Since Carbide 3.0.0 (C3)
- - IConnectionsManager was updated to indicate it is not intended to be implemented by clients.
+
+
- C3 is an API breaking release, primarily around areas of Symbian SDK management and Symbian build support.
+ This release removes support for Symbian OS versions prior to 9.4 (i.e. only support for Symbian^2 and up are supported).
+ Management of Symbian SDKs has been simplified and the APIs have been trimmed to reflect this.
+
+ - ISymbianSDK
+
+ - added getSupportedFeatures() - see com.nokia.carbide.cpp.sdk.core#ISymbianSDKFeatures for supported feature constants.
+ - added ISDKBuildInfo getBuildInfo(String builderId) - This is used to get the base data (ISymbianBuildContext) for a build configuration, depending on the builder you are using (e.g. abld versus sbsv2). See also com.nokia.carbide.cpp.sdk.core#ISDKBuildInfo
+
+
+ - com.nokia.carbide.cpp.sdk.core#ISDKBuildInfo was added.
+ - com.nokia.carbide.cpp.sdk.core#ISBSv1BuildContext was added.
+ - com.nokia.carbide.cpp.sdk.core#ISBSv2BuildContext was added.
+ - com.nokia.carbide.cpp.sdk.core#ISBSv2BuiISymbianSDKFeatures was added.
+
+ - ICarbideBuildConfiguration
+
+ - added ISymbianBuildContext getBuildContext()
+ - added getDisplayString() - A convenience wrapper for ISymbiabBuildContext
+ - added getSDK() - A convenience wrapper for ISymbiabBuildContext
+ - added getPlatformString() - A convenience wrapper for ISymbiabBuildContext
+ - added getTargetString() - A convenience wrapper for ISymbiabBuildContext
+ - added hasSTDCPPSupport()
+
+
+ - ISymbianBuildContext - This interface is no longer implemented by ICarbideBuildConfiguration. Rather, it is now an abstracted interface for builders to provide base build data for an ICarbideBuildConfiguration instance
+
+ Due to this change, methods that take ISymbiabBuildContext as a parameter may have been using the ICarbideBuildConfiguraiton interface. For example, in com.nokia.carbide.cdt.builder#DefaultMMPViewConfiguration.
+ For these calls, simply add .getBuildContext() to the ICarbideBuildConfiguration instance to explicitly pass the ISymbianBuildContext.
+
+ - IConnectionsManager was updated to indicate it is not intended to be implemented by clients.
- Added several new methods to support automated connection/device discovery agents and default connections.
- - Deprecated IClientServiceSiteUI and adding new IClientServiceSiteUI2 to support concept of default connection
+
- Deprecated IClientServiceSiteUI and adding new IClientServiceSiteUI2 to support concept of default connection
- - getSelectedConnection() and selectConnection() now use connection ids rather than connection objects
+
- getSelectedConnection() and selectConnection() now use connection ids rather than connection objects
- Exposing new selection status to allow reporting when default connection is not supported by client service
@@ -162,6 +193,12 @@
- com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder#generateAbldMakefileIfNecessary(ICarbideBuildConfiguration config, CarbideCommandLauncher launcher, IPath componentPath, boolean isTest)
+
+Since Carbide 3.0
+
+ - ISymbiabSDK#getOSVersion - use ISymbianSDK#getSupportedFeatures instead to test for properties of an SDK.
+
+
Removed APIs
The following Carbide APIs have been removed and are no longer available to plug-ins.
Since Carbide 1.2.0
@@ -192,6 +229,33 @@
None
+Since Carbide 3.0
+
+ - com.nokia.carbide.cpp.sdk.core#ISymbianSDK removed several methods. Please refer to the source code.
+
+
+ - getFilteredBuildConfigurations() has been removed. Please use ISymbianSDK#getBuildInfo(String builderId).getFilteredBuildConfigurations() instead.
+ - getSDKVersion() has been removed. Users should not use SDK and OS version any longer but use ISymbianSDK#getSupportedFeatures() instead.
+
+
+ - ICarbideBuildConfiguration no longer implements ISymbianBuildContext. You will need to use the ICarbideBuildConfiguration#getBuildContext() to access most build context specific data.
+
+ - com.nokia.carbide.cpp.sdk.core#ISDKManager removed several methods.
+
+
+ - getSymbianMacroStore() has been removed.
+ - getBSFScannerEnabled() has been removed.
+ - enableBSFScanner(boolean enabled) has been removed.
+ - setPlatformList(List platList) has been removed.
+ - getPlatformList() has been removed.
+ - getCSLArmToolchainInstallPathAndCheckReqTools() has been removed.
+ - checkDevicesXMLSynchronized() has been removed.
+ - getSBSv2Version(boolean forceScan) has been removed.
+ - getMinimumSupportedSBSv2Version() has been removed.
+
+
+
+