Add support for SBSv2 config specific data. Bug 11068.
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java Thu Apr 15 09:49:37 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java Thu Apr 15 13:09:25 2010 -0500
@@ -18,6 +18,8 @@
import com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder;
import com.nokia.carbide.cdt.builder.project.*;
+import com.nokia.carbide.cdt.internal.builder.CarbideBuildConfiguration;
+import com.nokia.carbide.cdt.internal.builder.ISBSv2BuildConfigInfo;
import com.nokia.carbide.cpp.epoc.engine.*;
import com.nokia.carbide.cpp.epoc.engine.image.*;
import com.nokia.carbide.cpp.epoc.engine.model.bldinf.*;
@@ -852,6 +854,14 @@
}
String releasePlatform = buildConfig.getSDK().getBSFCatalog().getReleasePlatform(buildConfig.getBasePlatformForVariation());
+ if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(buildConfig.getCarbideProject().getProject())){
+ // Test is this is an SBSv2 build binary variant (changes the output directory)
+ ISBSv2BuildConfigInfo sbsv2Info = ((CarbideBuildConfiguration)buildConfig).getSBSv2BuildConfigInfo();
+ if ( sbsv2Info != null && sbsv2Info.getVariantOutputDirModifier() != null && !releasePlatform.contains(".") ){
+ releasePlatform = releasePlatform + sbsv2Info.getVariantOutputDirModifier();
+ }
+ }
+
IPath path = buildConfig.getSDK().getReleaseRoot().append(releasePlatform.toLowerCase()).append(buildConfig.getTargetString().toLowerCase());
// if targetpath is non-null and this is an EKA1 emulator config then add it
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/PKGViewPathHelper.java Thu Apr 15 09:49:37 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/PKGViewPathHelper.java Thu Apr 15 13:09:25 2010 -0500
@@ -22,6 +22,8 @@
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cdt.builder.project.ISISBuilderInfo;
+import com.nokia.carbide.cdt.internal.builder.CarbideBuildConfiguration;
+import com.nokia.carbide.cdt.internal.builder.ISBSv2BuildConfigInfo;
import com.nokia.carbide.internal.api.cpp.epoc.engine.model.pkg.IPKGView;
import com.nokia.cpp.internal.api.utils.core.Check;
@@ -69,7 +71,14 @@
this.pkgFilePath = view.getModel().getPath();
this.buildConfig = buildConfig;
this.epocRoot = new Path(buildConfig.getSDK().getEPOCROOT());
- this.platform = buildConfig.getPlatformString();
+ this.platform = buildConfig.getPlatformString();
+ if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(buildConfig.getCarbideProject().getProject())){
+ // Test is this is an SBSv2 build binary variant (changes the output directory)
+ ISBSv2BuildConfigInfo sbsv2Info = ((CarbideBuildConfiguration)buildConfig).getSBSv2BuildConfigInfo();
+ if ( sbsv2Info != null && sbsv2Info.getVariantOutputDirModifier() != null && !platform.contains(".") ){
+ this.platform = this.platform + sbsv2Info.getVariantOutputDirModifier();
+ }
+ }
this.target = buildConfig.getTargetString();
this.mainDirectory = pkgFilePath.removeLastSegments(1);
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/builder/CarbideCPPBuilder.java Thu Apr 15 09:49:37 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/builder/CarbideCPPBuilder.java Thu Apr 15 13:09:25 2010 -0500
@@ -59,9 +59,11 @@
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.cdt.internal.builder.CarbideBuildConfiguration;
import com.nokia.carbide.cdt.internal.builder.CarbideSBSv1Builder;
import com.nokia.carbide.cdt.internal.builder.CarbideSBSv2Builder;
import com.nokia.carbide.cdt.internal.builder.ICarbideBuilder;
+import com.nokia.carbide.cdt.internal.builder.ISBSv2BuildConfigInfo;
import com.nokia.carbide.cdt.internal.builder.ui.BuilderPreferencePage;
import com.nokia.carbide.cdt.internal.builder.ui.MMPSelectionDialog;
import com.nokia.carbide.cpp.epoc.engine.EpocEnginePlugin;
@@ -1915,7 +1917,15 @@
pkgFileStr.contains(PKG_SYMBOL_TARGET) ) {
// need to create a new PKG file, resolved...
pkgFileStr = pkgFileStr.replace(PKG_SYMBOL_EPOCROOT, context.getSDK().getEPOCROOT());
- pkgFileStr = pkgFileStr.replace(PKG_SYMBOL_PLATFORM, context.getPlatformString().toLowerCase());
+ String platSubst = context.getPlatformString().toLowerCase();
+ if (context instanceof CarbideBuildConfiguration){
+ // Test is this is an SBSv2 build binary variant (changes the output directory)
+ ISBSv2BuildConfigInfo sbsv2Info = ((CarbideBuildConfiguration)context).getSBSv2BuildConfigInfo();
+ if (sbsv2Info != null && sbsv2Info.getVariantOutputDirModifier() != null){
+ platSubst = platSubst + sbsv2Info.getVariantOutputDirModifier();
+ }
+ }
+ pkgFileStr = pkgFileStr.replace(PKG_SYMBOL_PLATFORM, platSubst);
pkgFileStr = pkgFileStr.replace(PKG_SYMBOL_TARGET, context.getTargetString().toLowerCase());
IPath tmpPKGPath = pkgFile.removeLastSegments(1);
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java Thu Apr 15 09:49:37 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java Thu Apr 15 13:09:25 2010 -0500
@@ -18,10 +18,7 @@
import java.util.List;
-import org.eclipse.core.runtime.IPath;
-
import com.nokia.carbide.cdt.builder.BuildArgumentsInfo;
-import com.nokia.carbide.cdt.builder.EpocEngineHelper;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
/**
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java Thu Apr 15 09:49:37 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java Thu Apr 15 13:09:25 2010 -0500
@@ -63,10 +63,6 @@
// SBSv2 only config settings
protected final static String SBSV2_DATA_ID = "SBSV2_DATA_ID"; //$NON-NLS-1$
- protected final static String ATRRIB_CONFIG_BASE_PLATFORM = "CONFIG_BASE_PLATFORM"; //$NON-NLS-1$
- protected final static String ATTRIB_CONFIG_TARGET = "CONFIG_TARGET"; //$NON-NLS-1$
- protected final static String ATTRIB_SBSV2_BUILD_ALIAS = "SBSV2_BUILD_ALIAS"; //$NON-NLS-1$
- protected final static String ATTRIB_SBSV2_CONFIG_DISPLAY_STRING = "SBSV2_CONFIG_DISPLAY_STRING"; //$NON-NLS-1$
protected TrackedResource projectTracker;
protected List<ISISBuilderInfo> sisBuilderInfoList;
@@ -74,8 +70,8 @@
protected BuildArgumentsInfo buildArgumentsInfo;
protected BuildConfigurationData buildConfigData;
protected ROMBuilderInfo romBuilderInfo;
+ protected SBSv2BuilderInfo sbsv2BuilderInfo;
-
public CarbideBuildConfiguration(IProject project, ISymbianBuildContext context) {
super(context.getSDK(), context.getPlatformString(), context.getTargetString(), context.getSBSv2Alias());
projectTracker = new TrackedResource(project);
@@ -84,6 +80,9 @@
buildArgumentsInfo = new BuildArgumentsInfo(getSDK());
buildConfigData = new BuildConfigurationData(this);
romBuilderInfo = new ROMBuilderInfo(getSDK());
+ if (context.getSBSv2Alias() != null){
+ sbsv2BuilderInfo = new SBSv2BuilderInfo(context);
+ }
}
public void loadFromStorage(ICConfigurationDescription projDes) throws CoreException {
@@ -105,6 +104,8 @@
loadBuildArgsFromStorage(se);
} else if (se.getName().equals(ROM_BUILDER_DATA_ID)) {
romBuilderInfo.loadFromStorage(se);
+ } else if (se.getName().equals(SBSV2_DATA_ID)){
+ sbsv2BuilderInfo.loadFromStorage(se);
}
}
} else {
@@ -127,18 +128,11 @@
romBuilderInfo.saveToStorage(rootStorage.createChild(ROM_BUILDER_DATA_ID));
if (getSBSv2Alias() != null){
- saveSBSv2DataToStorage(rootStorage.createChild(SBSV2_DATA_ID));
+ sbsv2BuilderInfo.saveToStorage(rootStorage.createChild(SBSV2_DATA_ID));
}
}
}
- private void saveSBSv2DataToStorage(ICStorageElement createChild) {
- createChild.setAttribute(ATRRIB_CONFIG_BASE_PLATFORM, getPlatformString());
- createChild.setAttribute(ATTRIB_CONFIG_TARGET, getTargetString());
- createChild.setAttribute(ATTRIB_SBSV2_BUILD_ALIAS, getSBSv2Alias());
- createChild.setAttribute(ATTRIB_SBSV2_CONFIG_DISPLAY_STRING, getDisplayString());
- }
-
private void loadBuildArgsFromStorage(ICStorageElement rootStorage) {
String value = rootStorage.getAttribute(BuildArgumentsInfo.BLDMAKEBLDFILESARGSSTORAGE);
if (value != null) {
@@ -408,6 +402,9 @@
return romBuilderInfo;
}
+ public ISBSv2BuildConfigInfo getSBSv2BuildConfigInfo(){
+ return sbsv2BuilderInfo;
+ }
private boolean hasSTDCPPSupport() {
@@ -427,4 +424,8 @@
return false;
}
+
+ public ISBSv2BuildConfigInfo getSBSv2ConfigInfo() {
+ return sbsv2BuilderInfo;
+ }
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildData.java Thu Apr 15 09:49:37 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildData.java Thu Apr 15 13:09:25 2010 -0500
@@ -58,7 +58,14 @@
@Override
public ICOutputEntry[] getOutputDirectories() {
- IPath outputPath = carbideBuildConfig.getSDK().getReleaseRoot().append(carbideBuildConfig.getPlatformString()).append(carbideBuildConfig.getTargetString());
+ String thePlatform = carbideBuildConfig.getPlatformString();
+ if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(carbideBuildConfig.getCarbideProject().getProject())){
+ ISBSv2BuildConfigInfo sbsv2Info = ((CarbideBuildConfiguration)carbideBuildConfig).getSBSv2BuildConfigInfo();
+ if ( sbsv2Info != null && sbsv2Info.getVariantOutputDirModifier() != null ){
+ thePlatform = thePlatform + sbsv2Info.getVariantOutputDirModifier();
+ }
+ }
+ IPath outputPath = carbideBuildConfig.getSDK().getReleaseRoot().append(thePlatform).append(carbideBuildConfig.getTargetString());
return new ICOutputEntry[]{new COutputEntry(outputPath, null, 0)};
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv2Builder.java Thu Apr 15 09:49:37 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv2Builder.java Thu Apr 15 13:09:25 2010 -0500
@@ -88,7 +88,16 @@
/** 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) {
- return buildConfig.getSBSv2Alias();
+ String buildAlias = buildConfig.getSBSv2Alias();
+ 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;
+ }
+
+ }
+ return buildAlias;
}
public boolean buildComponent(ICarbideBuildConfiguration buildConfig, IPath componentPath, boolean isTest, CarbideCommandLauncher launcher, IProgressMonitor monitor) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ISBSv2BuildConfigInfo.java Thu Apr 15 13:09:25 2010 -0500
@@ -0,0 +1,48 @@
+/*
+* 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);
+
+ /**
+ * If a variant is defined and it chages the output directory, return the directory name.
+ * For example, armv5_udeb.phone1 would return '.phone1'. If not variant that changes the release tree, then null
+ * @return null if not a variant or the value to append to the platform release tree directory
+ */
+ String getVariantOutputDirModifier();
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/SBSv2BuilderInfo.java Thu Apr 15 13:09:25 2010 -0500
@@ -0,0 +1,130 @@
+/*
+* 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<String, String> sbsv2ConfigDataMap = new HashMap<String, String>();
+
+// private static String TRUE = "true";
+// private static String FALSE = "false";
+
+ ISymbianBuildContext context;
+
+ public SBSv2BuilderInfo(ISymbianBuildContext context) {
+ sbsv2ConfigDataMap.put(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_BUILD_ALIAS, context.getSBSv2Alias());
+ 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);
+
+ }
+
+ public String getVariantOutputDirModifier() {
+ String newOutputDir = null;
+ String variantText = getSBSv2Setting(ATTRIB_SBSV2_VARIANT);
+ if (variantText != null && variantText.length() > 1){
+ String[] variantTok = variantText.split("\\.");
+ if (variantTok.length > 1){
+ if (variantTok[1].toLowerCase().equals("generic")){
+ return null;
+ } else if (variantTok[1].toLowerCase().equals("tracecompiler")){
+ return null;
+ } else {
+ newOutputDir = "." + variantTok[1];
+ }
+ }
+ }
+ return newOutputDir;
+ }
+
+
+
+}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideBuildConfigurationsPage.java Thu Apr 15 09:49:37 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideBuildConfigurationsPage.java Thu Apr 15 13:09:25 2010 -0500
@@ -154,6 +154,9 @@
// rom builder tab
ROMBuilderTabComposite romBuilderTabComposite;
+ // SBSv2 config data tab
+ SBSv2BuildConfigTabComposite sbsv2BuildConfigTabComposite;
+
// Configuration management/switching
private IProject project;
private BuildConfigCombo buildConfigurationCombo;
@@ -224,6 +227,20 @@
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);
envTabItem.setText(Messages.getString("CarbideBuildConfigurationsPage.Environment_Tab")); //$NON-NLS-1$
@@ -364,6 +381,9 @@
ICarbideBuildConfiguration config = cpi.getDefaultConfiguration();
if (config != null) {
sisFilesBlock.initData(config);
+ if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(project)) {
+ sbsv2BuildConfigTabComposite.initData(config);
+ }
if (argumentsTabcomposite != null) {
argumentsTabcomposite.initData(config);
}
@@ -638,7 +658,9 @@
// Compare each of the settings to see if they are the same
boolean sisSettingsEqual = sisFilesBlock.compareConfigurationSettings(selectedConfig, writeToConfig);
-
+
+ boolean sbsv2ConfigEqual = sbsv2BuildConfigTabComposite.compareConfigurationSettings(selectedConfig, writeToConfig);
+
// Compare envVars settings
boolean envVarsSettingsEqual = envVarList.size() == envVarListOrig.size() && envVarList.equals(envVarListOrig);
if (!envVarsSettingsEqual && writeToConfig) {
@@ -654,7 +676,7 @@
boolean romBuilderSettingsEqual = romBuilderTabComposite.compareConfigurationSettings(selectedConfig, writeToConfig);
- return sisSettingsEqual && envVarsSettingsEqual && argsSettingsEqual && pathsAndSynmbolsSettingsEqual && romBuilderSettingsEqual;
+ return sisSettingsEqual && sbsv2ConfigEqual && envVarsSettingsEqual && argsSettingsEqual && pathsAndSynmbolsSettingsEqual && romBuilderSettingsEqual;
}
private void saveConfigurationSettings(ICarbideBuildConfiguration config) {
@@ -957,6 +979,9 @@
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);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/SBSv2BuildConfigTabComposite.java Thu Apr 15 13:09:25 2010 -0500
@@ -0,0 +1,76 @@
+/*
+* 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 org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+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.sdk.core.ISymbianSDK;
+
+public class SBSv2BuildConfigTabComposite extends Composite {
+
+ Text variantEdit;
+
+ public SBSv2BuildConfigTabComposite(TabItem tabItem) {
+ super(tabItem.getParent(), SWT.NONE);
+ }
+
+ public void createControls() {
+ setLayout(new GridLayout(3, 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, 2, 1));
+ }
+
+ public void initData(ICarbideBuildConfiguration buildConfig) {
+ ISBSv2BuildConfigInfo sbsv2ConfigInfo = ((CarbideBuildConfiguration)buildConfig).getSBSv2ConfigInfo();
+ if (sbsv2ConfigInfo.getSBSv2Setting(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_VARIANT) != null){
+ variantEdit.setText(sbsv2ConfigInfo.getSBSv2Setting(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_VARIANT));
+ }
+
+ }
+
+ public boolean compareConfigurationSettings(ICarbideBuildConfiguration selectedConfig, boolean writeToConfig) {
+ boolean settingsEqual = true;
+
+ ISBSv2BuildConfigInfo currSBSv2Info = ((CarbideBuildConfiguration)selectedConfig).getSBSv2ConfigInfo();
+ 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("");
+ }
+}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/messages.properties Thu Apr 15 09:49:37 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/messages.properties Thu Apr 15 13:09:25 2010 -0500
@@ -36,6 +36,12 @@
CarbideBuildConfigurationsPage.Browse_Key_ToolTip=Look for the key in the file system.
CarbideBuildConfigurationsPage.Additional_Options=Additional Options:
CarbideBuildConfigurationsPage.Additional_Options_ToolTip=Any other command-line options you want to pass to signsis.
+
+CarbideBuildConfigurationsPage.SBSv2_Tab=SBSv2
+CarbideBuildConfigurationsPage.SBSv2_Tab_ToolTip=SBSv2 Build Configuration Specific Information
+CarbideSBSv2ConfigTab.VariantLabel=Apply variant to build configuration
+CarbideSBSv2ConfigTab.VariantLabel_ToolTip=Appends the text box value to the -c argument to construct a variant build configuration.
+
CarbideBuildConfigurationsPage.Environment_Tab=Environment
CarbideBuildConfigurationsPage.Environement_Tab_ToolTip=This tab controls how the Windows environment is set up for each build process invoked.
CarbideBuildConfigurationsPage.Env_Vars_Group=Environment Variabes (Bold items override the default value)
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SymbianBuildContext.java Thu Apr 15 09:49:37 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SymbianBuildContext.java Thu Apr 15 13:09:25 2010 -0500
@@ -439,14 +439,4 @@
public String getSBSv2Alias() {
return sbsv2Alias;
}
-
- public void setSBSv2Alias(String sbsv2Alias) {
- this.sbsv2Alias = sbsv2Alias;
- }
-
- public void setDisplayString(String newDisplayName) {
- this.displayString = newDisplayName;
-
- }
-
}
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISymbianBuildContext.java Thu Apr 15 09:49:37 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISymbianBuildContext.java Thu Apr 15 13:09:25 2010 -0500
@@ -151,7 +151,4 @@
*/
public String getSBSv2Alias();
- public void setSBSv2Alias(String newAlias);
-
- public void setDisplayString(String newDisplayName);
}