--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/BuilderPreferenceConstants.java Tue Aug 18 16:41:37 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/BuilderPreferenceConstants.java Wed Aug 19 11:29:48 2009 -0500
@@ -110,4 +110,11 @@
* @since 2.1
*/
public final static String PREF_DONT_PROMPT_FOR_DEPENDENCY_MISMATCH = "promtToTrackDependencies"; //$NON-NLS-1$
+
+ /**
+ * String setting for arbitrary arguments to be passed to sbs.bat on build.
+ * @since 2.2
+ */
+ public final static String PREF_SBSV2_EXTRA_ARGS = "sbsv2ExtraArgs"; //$NON-NLS-1$
+
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideProjectInfo.java Tue Aug 18 16:41:37 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideProjectInfo.java Wed Aug 19 11:29:48 2009 -0500
@@ -289,4 +289,14 @@
*/
public String makeEngineToUse();
+ /**
+ * Get arbitrary additional arguments to pass to sbs (Raptor) on the command-line
+ *
+ * Note that the workspace setting is returned unless it is overridden by the project setting
+ *
+ * @since 2.2
+ */
+ public String extraSBSv2Args();
+
+
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectInfo.java Tue Aug 18 16:41:37 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectInfo.java Wed Aug 19 11:29:48 2009 -0500
@@ -60,6 +60,7 @@
protected boolean useDebugMode;
protected boolean overrideMakeEngine;
protected String makeEngineToUse;
+ protected String extraSBSv2Args;
// for internal plugin use
public static final String OVERRIDE_WORKSPACE_SETTINGS_KEY = "overrideWorkspaceSettings"; //$NON-NLS-1$
@@ -77,6 +78,7 @@
public static final String USE_DEBUG_MODE = "useDebugMode"; //$NON-NLS-1$
public static final String OVERRIDE_MAKE_ENGINE = "overrideMakeEngine"; //$NON-NLS-1$
public static final String MAKE_ENGINE_TO_USE = "makeEngineToUse"; //$NON-NLS-1$
+ public static final String EXTRA_SBSV2_ARGS = "extraSBSv2Args"; //$NON-NLS-1$
public CarbideProjectInfo(IProject project) {
@@ -223,6 +225,11 @@
if (orig != null){
makeEngineToUse = orig;
}
+ orig = storage.getAttribute(EXTRA_SBSV2_ARGS);
+ if (orig != null){
+ extraSBSv2Args = orig;
+ }
+
}
}
}
@@ -254,6 +261,7 @@
useDebugMode = BuilderPreferencePage.debugMode();
overrideMakeEngine = BuilderPreferencePage.overrideDefaultMakeEngine();
makeEngineToUse = BuilderPreferencePage.makeEngine();
+ extraSBSv2Args = BuilderPreferencePage.extraSBSv2ArgsTextStore();
}
public List<ICarbideBuildConfiguration> getBuildConfigurations() {
@@ -513,6 +521,13 @@
return BuilderPreferencePage.makeEngine();
}
+ public String extraSBSv2Args() {
+ if (overrideWorkspaceSettings) {
+ return extraSBSv2Args;
+ }
+ return BuilderPreferencePage.extraSBSv2ArgsTextStore();
+ }
+
/*
* The following methods are non-API
*/
@@ -567,4 +582,8 @@
public String makeEngineProjectValue() {
return makeEngineToUse;
}
+
+ public String extraSBSv2ArgsProjectValue() {
+ return extraSBSv2Args;
+ }
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectModifier.java Tue Aug 18 16:41:37 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectModifier.java Wed Aug 19 11:29:48 2009 -0500
@@ -74,7 +74,8 @@
useDebugMode = cpi.useDebugMode;
overrideMakeEngine = cpi.overrideMakeEngine;
makeEngineToUse = cpi.makeEngineToUse;
-
+ extraSBSv2Args = cpi.extraSBSv2Args;
+
// make copies of the original data because we don't want to be modifying those
// objects in case the save is never done on this object.
infBuildComponentsList = new ArrayList<String>();
@@ -216,6 +217,8 @@
}
} else if (settingName.equals(MAKE_ENGINE_TO_USE)) {
makeEngineToUse = settingValue;
+ } else if (settingName.equals(EXTRA_SBSV2_ARGS)) {
+ extraSBSv2Args = settingValue;
}
// now write it to the file
@@ -304,6 +307,7 @@
storage.setAttribute(USE_DEBUG_MODE, useDebugMode ? "true" : "false");
storage.setAttribute(OVERRIDE_MAKE_ENGINE, overrideMakeEngine ? "true" : "false");
storage.setAttribute(MAKE_ENGINE_TO_USE, makeEngineToUse);
+ storage.setAttribute(EXTRA_SBSV2_ARGS, extraSBSv2Args);
}
}
} catch (CoreException e) {
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv2Builder.java Tue Aug 18 16:41:37 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv2Builder.java Wed Aug 19 11:29:48 2009 -0500
@@ -531,6 +531,14 @@
args.add(cpi.makeEngineToUse());
}
+ // append extra sbsv2 arguments to the command
+ if (cpi.extraSBSv2Args().trim().length() > 0){
+ String[] extraArgs = cpi.extraSBSv2Args().split(" ");
+ for (String arg : extraArgs){
+ args.add(arg);
+ }
+ }
+
launcher.setErrorParserManager(SBSv2Utils.getSBSBinDirectory(), buildConfig.getErrorParserList());
launcher.writeToConsole("\n***Invoking sbs command\n");
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/BuildSettingsUI.java Tue Aug 18 16:41:37 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/BuildSettingsUI.java Wed Aug 19 11:29:48 2009 -0500
@@ -63,6 +63,8 @@
private Button overrideDefaultMakeEngineCheck;
private Label makeEngineLabel;
private Text makeEngineText;
+ private Label extraArgsLabel;
+ private Text extraArgsText;
public BuildSettingsUI(Shell shell, boolean wantsSBSv2, boolean projectSetting) {
this.shell = shell;
@@ -244,6 +246,16 @@
debugCheck.setToolTipText(Messages.getString("BuildSettingsUI.DebugToolTip")); //$NON-NLS-1$
debugCheck.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
+ extraArgsLabel = new Label(content, SWT.NONE);
+ extraArgsLabel.setText(Messages.getString("BuildSettingsUI.ExtraArgsText")); //$NON-NLS-1$
+ extraArgsLabel.setToolTipText(Messages.getString("BuildSettingsUI.ExtraArgsLabelToolTip")); //$NON-NLS-1$
+ GridData argsGridData = new GridData();
+ extraArgsLabel.setLayoutData(argsGridData);
+
+ extraArgsText = new Text(content, SWT.BORDER);
+ extraArgsText.setToolTipText(Messages.getString("BuildSettingsUI.ExtraArgsToolTipText")); //$NON-NLS-1$
+ extraArgsText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
overrideDefaultMakeEngineCheck = new Button(content, SWT.CHECK);
overrideDefaultMakeEngineCheck.setText(Messages.getString("BuildSettingsUI.OverrideMakeEngineLabel")); //$NON-NLS-1$
overrideDefaultMakeEngineCheck.setToolTipText(Messages.getString("BuildSettingsUI.OverrideMakeEngineToolTip")); //$NON-NLS-1$
@@ -264,7 +276,7 @@
makeEngineText = new Text(content, SWT.BORDER);
makeEngineText.setToolTipText(Messages.getString("BuildSettingsUI.MakeEngineToolTip")); //$NON-NLS-1$
makeEngineText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
-
+
}
private void setConcurrentBuildsEnabledState(boolean enabled) {
@@ -437,6 +449,14 @@
makeEngineText.setText(makeEngine);
}
+ public String getExtraSBSv2Args() {
+ return extraArgsText.getText();
+ }
+
+ public void setExtraSBSv2Args(String args) {
+ extraArgsText.setText(args);
+ }
+
public boolean getDontPromtTrackDeps(){
if (!projectSetting){
return dontCheckForExternalDependencies.getSelection();
@@ -449,5 +469,4 @@
dontCheckForExternalDependencies.setSelection(dontAsk);
}
-
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/BuilderPreferencePage.java Tue Aug 18 16:41:37 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/BuilderPreferencePage.java Wed Aug 19 11:29:48 2009 -0500
@@ -56,6 +56,7 @@
buildSettingsUI.setDebugCheck(debugMode());
buildSettingsUI.setOverrideDefaultMakeEngine(overrideDefaultMakeEngine());
buildSettingsUI.setMakeEngineText(makeEngine());
+ buildSettingsUI.setExtraSBSv2Args(extraSBSv2ArgsTextStore());
}
PlatformUI.getWorkbench().getHelpSystem().setHelp(control, CarbideCPPBuilderUIHelpIds.CARBIDE_BUILDER_PREFERENCE_PAGE);
@@ -92,6 +93,7 @@
store.setValue(BuilderPreferenceConstants.PREF_DEBUG_MODE, buildSettingsUI.getDebugMode());
store.setValue(BuilderPreferenceConstants.PREF_OVERRIDE_MAKE_ENGINE, buildSettingsUI.getOverrideDefaultMakeEngine());
store.setValue(BuilderPreferenceConstants.PREF_MAKE_ENGINE, buildSettingsUI.getMakeEngine());
+ store.setValue(BuilderPreferenceConstants.PREF_SBSV2_EXTRA_ARGS, buildSettingsUI.getExtraSBSv2Args());
}
}
@@ -195,4 +197,9 @@
return store.getString(BuilderPreferenceConstants.PREF_MAKE_ENGINE);
}
+ public static String extraSBSv2ArgsTextStore() {
+ IPreferenceStore store = CarbideBuilderPlugin.getDefault().getPreferenceStore();
+ return store.getString(BuilderPreferenceConstants.PREF_SBSV2_EXTRA_ARGS);
+ }
+
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideCPPProjectSettingsPage.java Tue Aug 18 16:41:37 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideCPPProjectSettingsPage.java Wed Aug 19 11:29:48 2009 -0500
@@ -271,6 +271,8 @@
cpi.writeProjectSetting(CarbideProjectInfo.OVERRIDE_MAKE_ENGINE, overrideMakeEngine);
cpi.writeProjectSetting(CarbideProjectInfo.MAKE_ENGINE_TO_USE, buildSettingsUI.getMakeEngine());
+
+ cpi.writeProjectSetting(CarbideProjectInfo.EXTRA_SBSV2_ARGS, buildSettingsUI.getExtraSBSv2Args());
}
List<String> checkedComponents = getCheckedComponentFilenames();
@@ -325,6 +327,7 @@
buildSettingsUI.setDebugCheck(cpi.useDebugModeProjectValue());
buildSettingsUI.setOverrideDefaultMakeEngine(cpi.overrideMakeEngineProjectValue());
buildSettingsUI.setMakeEngineText(cpi.makeEngineProjectValue());
+ buildSettingsUI.setExtraSBSv2Args(cpi.extraSBSv2ArgsProjectValue());
}
initMMPSelectionUI(cpi);
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/messages.properties Tue Aug 18 16:41:37 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/messages.properties Wed Aug 19 11:29:48 2009 -0500
@@ -95,6 +95,9 @@
BuildSettingsUI.CommonTabLabel=Common
BuildSettingsUI.DebugLabel=Debug mode
BuildSettingsUI.DebugToolTip=Display information useful for debugging
+BuildSettingsUI.ExtraArgsLabelToolTip=Pass additional arguments to the sbs command-line.
+BuildSettingsUI.ExtraArgsText=Additional SBSv2 arguments
+BuildSettingsUI.ExtraArgsToolTipText=Add any extra arguments to be passed to sbs.bat here.
BuildSettingsUI.KeepGoingLabel=Keep going
BuildSettingsUI.KeepGoingToolTip=Continue building, even if some build commands fail
BuildSettingsUI.MakeEngineLabel=Make engine