refactor abld arguments tab settings under ISBSV1BuildContext API. WIP to push builder specific settings under their respective ISymbianBuildContext implementation.
--- a/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/ProjectPropertiesTest.java Tue Aug 03 11:44:01 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/ProjectPropertiesTest.java Tue Aug 03 14:18:04 2010 -0500
@@ -26,15 +26,16 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.NullProgressMonitor;
-import com.nokia.carbide.cdt.builder.BuildArgumentsInfo;
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
-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.ICarbideProjectModifier;
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.BuildArgumentsInfo;
import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
+import com.nokia.carbide.cpp.internal.api.sdk.IBuildArgumentsInfo;
+import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildContext;
import com.nokia.carbide.cpp.project.core.ProjectCorePlugin;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
@@ -270,11 +271,12 @@
assertNotNull("Ooops, ICarbideProjectInfo is null, something bad happened.", cpi);
ICarbideBuildConfiguration defaultConfig = cpi.getDefaultConfiguration();
- BuildArgumentsInfo argInfoCopyOrig = defaultConfig.getBuildArgumentsInfoCopy();
- BuildArgumentsInfo argInfoCopyMod = defaultConfig.getBuildArgumentsInfoCopy();
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)defaultConfig.getBuildContext();
+ BuildArgumentsInfo argInfoCopyOrig = sbsv1Context.getBuildArgumentsInfoCopy();
+ BuildArgumentsInfo argInfoCopyMod = sbsv1Context.getBuildArgumentsInfoCopy();
// Just sanity check to make sure deprecated methods still exist.
- IBuildArgumentsInfo testDeprecation = defaultConfig.getBuildArgumentsInfo();
+ IBuildArgumentsInfo testDeprecation = sbsv1Context.getBuildArgumentsInfo();
/*String test =*/ testDeprecation.getAbldBuildArgs();
@@ -290,10 +292,10 @@
argInfoCopyMod.abldTargetArgs += target_ARG;
// set the argument
- defaultConfig.setBuildArgumentsInfo(argInfoCopyMod);
+ sbsv1Context.setBuildArgumentsInfo(argInfoCopyMod);
// read the args from memory, make sure it's OK
- BuildArgumentsInfo argInfoCopyVerify = defaultConfig.getBuildArgumentsInfoCopy();
+ BuildArgumentsInfo argInfoCopyVerify = sbsv1Context.getBuildArgumentsInfoCopy();
assertTrue("Failed to re-read build args", argInfoCopyVerify.abldBuildArgs.contains(build_ARG));
assertTrue("Failed to re-read clean args", argInfoCopyVerify.abldCleanArgs.contains(clean_ARG));
assertTrue("Failed to re-read export args", argInfoCopyVerify.abldExportArgs.contains(export_ARG));
@@ -310,7 +312,7 @@
// now read again
// no work, how to know if it loads from disk....
- BuildArgumentsInfo argInfoFromDisk = defaultConfig.getBuildArgumentsInfoCopy();
+ BuildArgumentsInfo argInfoFromDisk = sbsv1Context.getBuildArgumentsInfoCopy();
// read the args now that were pulled from disk, make sure it's OK
assertTrue("Failed to re-read build args", argInfoFromDisk.abldBuildArgs.contains(build_ARG));
@@ -324,10 +326,10 @@
assertTrue("Failed to re-read target args", argInfoFromDisk.abldTargetArgs.contains(target_ARG));
// Now restore the settings, write to disk and verify
- defaultConfig.setBuildArgumentsInfo(argInfoCopyOrig);
+ sbsv1Context.setBuildArgumentsInfo(argInfoCopyOrig);
defaultConfig.saveConfiguration(false); // write to disk
defaultConfig = cpi.getDefaultConfiguration();
- argInfoCopyVerify = defaultConfig.getBuildArgumentsInfoCopy();
+ argInfoCopyVerify = sbsv1Context.getBuildArgumentsInfoCopy();
assertFalse("Failed to re-read build args after restore", argInfoCopyVerify.abldBuildArgs.contains(build_ARG));
assertFalse("Failed to re-read clean args after restore", argInfoCopyVerify.abldCleanArgs.contains(clean_ARG));
assertFalse("Failed to re-read export args after restore", argInfoCopyVerify.abldExportArgs.contains(export_ARG));
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/BuildArgumentsInfo.java Tue Aug 03 11:44:01 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +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;
-
-import com.nokia.carbide.cdt.builder.project.IBuildArgumentsInfo;
-import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
-import com.nokia.carbide.cpp.sdk.core.ISymbianSDKFeatures;
-
-/**
- * Wrapper for the build arguments settings in Carbide Build Configuration preferences
- * @deprecated - ABLD specific implementation. ABLD will be removed in a future Carbide 3.x release.
- */
-public class BuildArgumentsInfo implements IBuildArgumentsInfo {
-
- public static final String BLDMAKEBLDFILESARGSSTORAGE = "BLDMAKEBLDFILESARGSSTORAGE"; //$NON-NLS-1$
- public static final String BLDMAKECLEANARGSSTORAGE = "BLDMAKECLEANARGSSTORAGE"; //$NON-NLS-1$
- public static final String ABLDBUILDARGSSTORAGE = "ABLDBUILDARGSSTORAGE"; //$NON-NLS-1$
- public static final String ABLDEXPORTARGSSTORAGE = "ABLDEXPORTARGSSTORAGE"; //$NON-NLS-1$
- public static final String ABLDMAKEFILEARGSSTORAGE = "ABLDMAKEFILEARGSSTORAGE"; //$NON-NLS-1$
- public static final String ABLDLIBRARYARGSSTORAGE = "ABLDLIBRARYARGSSTORAGE"; //$NON-NLS-1$
- public static final String ABLDRESOURCEARGSSTORAGE = "ABLDRESOURCEARGSSTORAGE"; //$NON-NLS-1$
- public static final String ABLDTARGETARGSSTORAGE = "ABLDTARGETARGSSTORAGE"; //$NON-NLS-1$
- public static final String ABLDFINALARGSSTORAGE = "ABLDFINALARGSSTORAGE"; //$NON-NLS-1$
- public static final String ABLDCLEANARGSSTORAGE = "ABLDCLEANARGSSTORAGE"; //$NON-NLS-1$
- public static final String ABLDFREEZEARGSSTORAGE = "ABLDFREEZEARGSSTORAGE"; //$NON-NLS-1$
-
-
- public String bldmakeBldFilesArgs;
- public String bldmakeCleanArgs;
- public String abldBuildArgs;
- public String abldExportArgs;
- public String abldMakefileArgs;
- public String abldLibraryArgs;
- public String abldResourceArgs;
- public String abldTargetArgs;
- public String abldFinalArgs;
- public String abldCleanArgs;
- public String abldFreezeArgs;
-
-
- public BuildArgumentsInfo(ISymbianSDK sdk) {
-
- this.bldmakeBldFilesArgs = ""; //$NON-NLS-1$
- this.bldmakeCleanArgs = ""; //$NON-NLS-1$
- this.abldBuildArgs = ""; //$NON-NLS-1$
- this.abldExportArgs = ""; //$NON-NLS-1$
- this.abldMakefileArgs = ""; //$NON-NLS-1$
- this.abldLibraryArgs = ""; //$NON-NLS-1$
- this.abldResourceArgs = ""; //$NON-NLS-1$
- this.abldTargetArgs = ""; //$NON-NLS-1$
- this.abldFinalArgs = ""; //$NON-NLS-1$
- this.abldCleanArgs = ""; //$NON-NLS-1$
- this.abldFreezeArgs = ""; //$NON-NLS-1$
-
- if (sdk.getSupportedFeatures().contains(ISymbianSDKFeatures.IS_EKA2)) {
- this.abldFreezeArgs = "-r"; //$NON-NLS-1$
-
- }
- }
-
- public BuildArgumentsInfo(String bldmakeBldFilesArgs, String bldmakeCleanArgs, String abldBuildArgs, String abldExportArgs,
- String abldMakefileArgs, String abldLibraryArgs, String abldResourceArgs, String abldTargetArgs, String abldFinalArgs,
- String abldCleanArgs, String abldFreezeArgs) {
-
- this.bldmakeBldFilesArgs = bldmakeBldFilesArgs;
- this.bldmakeCleanArgs = bldmakeCleanArgs;
- this.abldBuildArgs = abldBuildArgs;
- this.abldExportArgs = abldExportArgs;
- this.abldMakefileArgs = abldMakefileArgs;
- this.abldLibraryArgs = abldLibraryArgs;
- this.abldResourceArgs = abldResourceArgs;
- this.abldTargetArgs = abldTargetArgs;
- this.abldFinalArgs = abldFinalArgs;
- this.abldCleanArgs = abldCleanArgs;
- this.abldFreezeArgs = abldFreezeArgs;
- }
-
- public BuildArgumentsInfo(BuildArgumentsInfo argInfo) {
-
- this.bldmakeBldFilesArgs = argInfo.bldmakeBldFilesArgs;
- this.bldmakeCleanArgs = argInfo.bldmakeCleanArgs;
- this.abldBuildArgs = argInfo.abldBuildArgs;
- this.abldExportArgs = argInfo.abldExportArgs;
- this.abldMakefileArgs = argInfo.abldMakefileArgs;
- this.abldLibraryArgs = argInfo.abldLibraryArgs;
- this.abldResourceArgs = argInfo.abldResourceArgs;
- this.abldTargetArgs = argInfo.abldTargetArgs;
- this.abldFinalArgs = argInfo.abldFinalArgs;
- this.abldCleanArgs = argInfo.abldCleanArgs;
- this.abldFreezeArgs = argInfo.abldFreezeArgs;
- }
-
- public String getBldmakeBldFilesArgs() {
- return bldmakeBldFilesArgs;
- }
-
- public String getBldmakeCleanArgs() {
- return bldmakeCleanArgs;
- }
-
- public String getAbldBuildArgs() {
- return abldBuildArgs;
- }
-
- public String getAbldExportArgs() {
- return abldExportArgs;
- }
-
- public String getAbldMakefileArgs() {
- return abldMakefileArgs;
- }
-
- public String getAbldLibraryArgs() {
- return abldLibraryArgs;
- }
-
- public String getAbldResourceArgs() {
- return abldResourceArgs;
- }
-
- public String getAbldTargetArgs() {
- return abldTargetArgs;
- }
-
- public String getAbldFinalArgs() {
- return abldFinalArgs;
- }
-
- public String getAbldCleanArgs() {
- return abldCleanArgs;
- }
-
- public String getAbldFreezeArgs() {
- return abldFreezeArgs;
- }
-
-}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/builder/CarbideCPPBuilder.java Tue Aug 03 11:44:01 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/builder/CarbideCPPBuilder.java Tue Aug 03 14:18:04 2010 -0500
@@ -899,6 +899,10 @@
*/
public static boolean generateBldmakeMakefilesIfNecessary(ICarbideBuildConfiguration config, CarbideCommandLauncher launcher) {
+ if (!(config.getBuildContext() instanceof ISBSv1BuildContext)){
+ return false; // SBSv1 only!
+ }
+
if (needsBldmakeMakefileGeneration(config)) {
List<String> argsList = new ArrayList<String>();
@@ -907,7 +911,9 @@
argsList.add(((ISBSv1BuildContext)config.getBuildContext()).getBasePlatformForVariation().toLowerCase());
}
- for (String arg : config.getBuildArgumentsInfo().getBldmakeBldFilesArgs().split(" ")) {
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)config.getBuildContext();
+
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getBldmakeBldFilesArgs().split(" ")) {
argsList.add(arg);
}
@@ -2041,34 +2047,6 @@
invokeBuild(config, launcher, monitor, clearMarkers);
}
- /**
- * Invoke bldmake bldfiles on the current bld.inf and SDK.
- * @param config - Config to generate makefiles for.
- * @param cmdLauncher - The process launcher
- * @param monitor - The progress monitor
- * @param console - The console to write the messages to.
- * @param env - The array of environment variables to be used for the process
- * @param workingDir - The full path to the bld.inf file to be used as the current working directory
- *
- * @deprecated use {@link #generateBldmakeMakefilesIfNecessary(ICarbideBuildConfiguration, CarbideCommandLauncher, IConsole, IProgressMonitor, boolean)} instead
- */
- public static boolean invokeBldmakeBldFiles(ICarbideBuildConfiguration config, CarbideCommandLauncher cmdLauncher, IProgressMonitor monitor, IConsole console, String[] env, IPath workingDir ){
- return generateBldmakeMakefilesIfNecessary(config, cmdLauncher);
- }
-
- /**
- * Check to see if abld.bat and the SDK's platform makefile exists. If either don't exist, re-generate makefiles
- * This also tests to make sure the makefile target is OLDER than the bld.inf file.
- * @param bldInfDir - The working dir of the bld.inf file (should not contain 'bld.inf')
- * @param defaultConfig - The ISymbianBuildConfiguration to be built.
- * @return true if makefiles need to be regenerated
- *
- * @deprecated use {@link #needsBldmakeMakefileGeneration(ICarbideBuildConfiguration)}
- */
- public static boolean projectNeedsMakefileGeneration(IPath bldInfDir, ICarbideBuildConfiguration defaultConfig){
- return needsBldmakeMakefileGeneration(defaultConfig);
- }
-
/**
* Checks the Problems view for any error markers.
* @param project - IProject to check for problem markers
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/IBuildArgumentsInfo.java Tue Aug 03 11:44:01 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +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;
-
-/**
- * IBuildArgumentsInfo represents one instance of configuration data for the Arguments tab.
- * This interface only applies for the Symbian 'abld' build system (SBSv1)
- * @see ICarbideBuildConfiguration
- *
- * @deprecated - ABLD specific implementation. ABLD will be removed in a future Carbide 3.x release.
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IBuildArgumentsInfo {
-
- /**
- * Get the arguments to pass to bldmake bldfiles
- * @return string of arguments which may be empty
- */
- String getBldmakeBldFilesArgs();
-
- /**
- * Get the arguments to pass to bldmake clean
- * @return string of arguments which may be empty
- */
- String getBldmakeCleanArgs();
-
- /**
- * Get the arguments to pass to abld build
- * @return string of arguments which may be empty
- */
- String getAbldBuildArgs();
-
- /**
- * Get the arguments to pass to abld export
- * @return string of arguments which may be empty
- */
- String getAbldExportArgs();
-
- /**
- * Get the arguments to pass to abld makefile
- * @return string of arguments which may be empty
- */
- String getAbldMakefileArgs();
-
- /**
- * Get the arguments to pass to abld library
- * @return string of arguments which may be empty
- */
- String getAbldLibraryArgs();
-
- /**
- * Get the arguments to pass to abld resource
- * @return string of arguments which may be empty
- */
- String getAbldResourceArgs();
-
- /**
- * Get the arguments to pass to abld target
- * @return string of arguments which may be empty
- */
- String getAbldTargetArgs();
-
- /**
- * Get the arguments to pass to abld final
- * @return string of arguments which may be empty
- */
- String getAbldFinalArgs();
-
- /**
- * Get the arguments to pass to abld clean
- * @return string of arguments which may be empty
- */
- String getAbldCleanArgs();
-
- /**
- * Get the arguments to pass to abld freeze
- * @return string of arguments which may be empty
- */
- String getAbldFreezeArgs();
-}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java Tue Aug 03 11:44:01 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java Tue Aug 03 14:18:04 2010 -0500
@@ -21,7 +21,6 @@
import org.eclipse.core.runtime.IPath;
-import com.nokia.carbide.cdt.builder.BuildArgumentsInfo;
import com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder;
import com.nokia.carbide.cpp.epoc.engine.preprocessor.IDefine;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
@@ -71,31 +70,7 @@
*/
List<ISISBuilderInfo> 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
- * @deprecated - ABLD specific implementation. ABLD will be removed in a future Carbide 3.x release.
- */
- 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
- * @deprecated - ABLD specific implementation. ABLD will be removed in a future Carbide 3.x release.
- */
- void setBuildArgumentsInfo(BuildArgumentsInfo bldArgInfo);
-
+
/**
* Get the parent Carbide project of this configuration.
* @return ICarbideProjectInfo
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/CarbideConfigurationDataProvider.java Tue Aug 03 11:44:01 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/CarbideConfigurationDataProvider.java Tue Aug 03 14:18:04 2010 -0500
@@ -42,7 +42,6 @@
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;
@@ -59,8 +58,10 @@
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.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.ISBSv2BuildContext;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
@@ -453,8 +454,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);
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java Tue Aug 03 11:44:01 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java Tue Aug 03 14:18:04 2010 -0500
@@ -35,17 +35,16 @@
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.ISISBuilderInfo;
import com.nokia.carbide.cdt.internal.api.builder.SISBuilderInfo2;
import com.nokia.carbide.cpp.epoc.engine.preprocessor.IDefine;
+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.ISBSv1BuildContext;
import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildInfo;
@@ -57,6 +56,7 @@
import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
import com.nokia.cpp.internal.api.utils.core.TrackedResource;
+@SuppressWarnings("deprecation")
public class CarbideBuildConfiguration implements ICarbideBuildConfiguration {
static final String NOT_INSTALLED = "(SDK not found)"; //$NON-NLS-1$
@@ -64,7 +64,6 @@
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
@@ -74,7 +73,7 @@
protected TrackedResource projectTracker;
protected List<ISISBuilderInfo> sisBuilderInfoList;
protected EnvironmentVarsInfo2 envVarsInfo;
- protected BuildArgumentsInfo buildArgumentsInfo;
+
protected BuildConfigurationData buildConfigData;
protected SBSv2BuilderInfo sbsv2BuilderInfo;
protected boolean rebuildNeeded;
@@ -84,7 +83,7 @@
projectTracker = new TrackedResource(project);
sisBuilderInfoList = new ArrayList<ISISBuilderInfo>(0);
envVarsInfo = new EnvironmentVarsInfo2(project, context);
- buildArgumentsInfo = new BuildArgumentsInfo(getSDK());
+
buildConfigData = new BuildConfigurationData(this);
if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(project)){
sbsv2BuilderInfo = new SBSv2BuilderInfo((ISBSv2BuildContext)context);
@@ -107,13 +106,15 @@
}
} 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(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));
@@ -131,7 +132,9 @@
}
envVarsInfo.saveToStorage(rootStorage.createChild(ENV_VAR_DATA_ID));
- saveBuildArgsToStorage(rootStorage.createChild(ARGUMENTS_DATA_ID));
+
+ // Save build context specific settings.
+ this.getBuildContext().saveConfigurationSettings(rootStorage);
if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(getCarbideProject().getProject())){
sbsv2BuilderInfo.saveToStorage(rootStorage.createChild(SBSV2_DATA_ID));
@@ -139,108 +142,7 @@
}
}
- 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);
- }
- }
public ICarbideProjectInfo getCarbideProject() {
// we need to get the project info from the build manager to ensure we
@@ -368,26 +270,6 @@
return config;
}
- public IBuildArgumentsInfo getBuildArgumentsInfo() {
- return (IBuildArgumentsInfo)buildArgumentsInfo;
- }
-
- public BuildArgumentsInfo getBuildArgumentsInfoCopy() {
- return new BuildArgumentsInfo(buildArgumentsInfo);
- }
-
- public void setBuildArgumentsInfo(BuildArgumentsInfo buildArgumentsInfo) {
- this.buildArgumentsInfo = buildArgumentsInfo;
- }
-
- public ISBSv2BuildConfigInfo getSBSv2BuildConfigInfo(){
- return sbsv2BuilderInfo;
- }
-
- public ISBSv2BuildConfigInfo getSBSv2ConfigInfo() {
- return sbsv2BuilderInfo;
- }
-
public IPath getTargetOutputDirectory() {
if (context instanceof ISBSv2BuildContext){
if (((ISBSv2BuildContext) context).getConfigQueryData() != null){
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java Tue Aug 03 11:44:01 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java Tue Aug 03 14:18:04 2010 -0500
@@ -161,7 +161,9 @@
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;
}
@@ -188,7 +190,7 @@
}
args.add(EXPORT_CMD);
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldExportArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldExportArgs().split(" ")) {
args.add(arg);
}
@@ -224,7 +226,7 @@
args.add(buildPlatform);
args.add(componentName);
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldLibraryArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldLibraryArgs().split(" ")) {
args.add(arg);
}
@@ -248,7 +250,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);
}
@@ -272,7 +274,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);
}
@@ -295,7 +297,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);
}
@@ -321,7 +323,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);
}
@@ -343,7 +345,8 @@
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;
}
@@ -385,7 +388,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);
}
@@ -406,7 +409,8 @@
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;
}
@@ -438,7 +442,7 @@
argsList.add(buildPlatform);
argsList.add(componentName);
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldFreezeArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldFreezeArgs().split(" ")) {
argsList.add(arg);
}
@@ -823,6 +827,8 @@
public boolean buildAllComponents(ICarbideBuildConfiguration buildConfig, List<IPath> normalMakMakePaths, List<IPath> 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
@@ -853,7 +859,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);
}
@@ -877,7 +883,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);
}
@@ -923,7 +929,7 @@
List<String> args = new ArrayList<String>();
args.add(EXPORT_CMD);
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldExportArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldExportArgs().split(" ")) {
args.add(arg);
}
@@ -958,7 +964,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);
}
@@ -978,7 +984,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);
}
@@ -998,7 +1004,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);
}
@@ -1017,7 +1023,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);
}
@@ -1039,7 +1045,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);
}
@@ -1062,7 +1068,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);
}
@@ -1083,7 +1089,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);
}
@@ -1104,7 +1110,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);
}
@@ -1124,7 +1130,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);
}
@@ -1143,6 +1149,8 @@
public boolean buildComponentSubset(ICarbideBuildConfiguration buildConfig, List<IPath> normalMakMakePaths, List<IPath> 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
@@ -1180,7 +1188,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);
}
@@ -1213,7 +1221,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);
}
@@ -1258,7 +1266,7 @@
List<String> argsList = new ArrayList<String>();
argsList.add(EXPORT_CMD);
- for (String arg : buildConfig.getBuildArgumentsInfo().getAbldExportArgs().split(" ")) {
+ for (String arg : sbsv1Context.getBuildArgumentsInfo().getAbldExportArgs().split(" ")) {
argsList.add(arg);
}
@@ -1306,7 +1314,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);
}
@@ -1339,7 +1347,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);
}
@@ -1372,7 +1380,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);
}
@@ -1403,7 +1411,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);
}
@@ -1422,7 +1430,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);
}
@@ -1457,7 +1465,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);
}
@@ -1491,7 +1499,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);
}
@@ -1525,7 +1533,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);
}
@@ -1558,7 +1566,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);
}
@@ -1580,6 +1588,8 @@
SubMonitor progress = SubMonitor.convert(monitor, 5);
progress.setTaskName("Cleaning " + buildConfig.getDisplayString());
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)buildConfig.getBuildContext();
+
if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
return;
}
@@ -1614,7 +1624,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);
}
@@ -1638,7 +1648,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);
}
@@ -1660,7 +1670,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);
}
@@ -1678,6 +1688,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;
}
@@ -1726,7 +1738,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);
}
@@ -1753,7 +1765,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);
}
@@ -1774,7 +1786,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);
}
@@ -1791,7 +1803,8 @@
SubMonitor progress = SubMonitor.convert(monitor, 4);
progress.setTaskName("Freezing " + buildConfig.getDisplayString());
-
+ ISBSv1BuildContext sbsv1Context = (ISBSv1BuildContext)buildConfig.getBuildContext();
+
if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
return;
}
@@ -1817,7 +1830,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);
}
@@ -1840,7 +1853,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);
}
@@ -1860,7 +1873,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;
}
@@ -1900,7 +1914,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);
}
@@ -1926,7 +1940,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);
}
@@ -2137,7 +2151,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);
}
@@ -2378,7 +2393,8 @@
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);
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/ArgumentsTabComposite.java Tue Aug 03 11:44:01 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/ArgumentsTabComposite.java Tue Aug 03 14:18:04 2010 -0500
@@ -25,10 +25,11 @@
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;
@@ -160,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());
@@ -177,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()) &&
@@ -191,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()));
}
--- a/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/ABLDCommandHandler.java Tue Aug 03 11:44:01 2010 -0500
+++ b/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/ABLDCommandHandler.java Tue Aug 03 14:18:04 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<String> args = new ArrayList<String>();
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);
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildArgumentsInfo.java Tue Aug 03 14:18:04 2010 -0500
@@ -0,0 +1,149 @@
+/*
+* 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.cpp.internal.api.sdk;
+
+import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
+import com.nokia.carbide.cpp.sdk.core.ISymbianSDKFeatures;
+
+/**
+ * Wrapper for the build arguments settings in Carbide Build Configuration preferences
+ */
+public class BuildArgumentsInfo implements IBuildArgumentsInfo {
+
+ public static final String BLDMAKEBLDFILESARGSSTORAGE = "BLDMAKEBLDFILESARGSSTORAGE"; //$NON-NLS-1$
+ public static final String BLDMAKECLEANARGSSTORAGE = "BLDMAKECLEANARGSSTORAGE"; //$NON-NLS-1$
+ public static final String ABLDBUILDARGSSTORAGE = "ABLDBUILDARGSSTORAGE"; //$NON-NLS-1$
+ public static final String ABLDEXPORTARGSSTORAGE = "ABLDEXPORTARGSSTORAGE"; //$NON-NLS-1$
+ public static final String ABLDMAKEFILEARGSSTORAGE = "ABLDMAKEFILEARGSSTORAGE"; //$NON-NLS-1$
+ public static final String ABLDLIBRARYARGSSTORAGE = "ABLDLIBRARYARGSSTORAGE"; //$NON-NLS-1$
+ public static final String ABLDRESOURCEARGSSTORAGE = "ABLDRESOURCEARGSSTORAGE"; //$NON-NLS-1$
+ public static final String ABLDTARGETARGSSTORAGE = "ABLDTARGETARGSSTORAGE"; //$NON-NLS-1$
+ public static final String ABLDFINALARGSSTORAGE = "ABLDFINALARGSSTORAGE"; //$NON-NLS-1$
+ public static final String ABLDCLEANARGSSTORAGE = "ABLDCLEANARGSSTORAGE"; //$NON-NLS-1$
+ public static final String ABLDFREEZEARGSSTORAGE = "ABLDFREEZEARGSSTORAGE"; //$NON-NLS-1$
+
+
+ public String bldmakeBldFilesArgs;
+ public String bldmakeCleanArgs;
+ public String abldBuildArgs;
+ public String abldExportArgs;
+ public String abldMakefileArgs;
+ public String abldLibraryArgs;
+ public String abldResourceArgs;
+ public String abldTargetArgs;
+ public String abldFinalArgs;
+ public String abldCleanArgs;
+ public String abldFreezeArgs;
+
+
+ public BuildArgumentsInfo(ISymbianSDK sdk) {
+
+ this.bldmakeBldFilesArgs = ""; //$NON-NLS-1$
+ this.bldmakeCleanArgs = ""; //$NON-NLS-1$
+ this.abldBuildArgs = ""; //$NON-NLS-1$
+ this.abldExportArgs = ""; //$NON-NLS-1$
+ this.abldMakefileArgs = ""; //$NON-NLS-1$
+ this.abldLibraryArgs = ""; //$NON-NLS-1$
+ this.abldResourceArgs = ""; //$NON-NLS-1$
+ this.abldTargetArgs = ""; //$NON-NLS-1$
+ this.abldFinalArgs = ""; //$NON-NLS-1$
+ this.abldCleanArgs = ""; //$NON-NLS-1$
+ this.abldFreezeArgs = ""; //$NON-NLS-1$
+
+ if (sdk.getSupportedFeatures().contains(ISymbianSDKFeatures.IS_EKA2)) {
+ this.abldFreezeArgs = "-r"; //$NON-NLS-1$
+
+ }
+ }
+
+ public BuildArgumentsInfo(String bldmakeBldFilesArgs, String bldmakeCleanArgs, String abldBuildArgs, String abldExportArgs,
+ String abldMakefileArgs, String abldLibraryArgs, String abldResourceArgs, String abldTargetArgs, String abldFinalArgs,
+ String abldCleanArgs, String abldFreezeArgs) {
+
+ this.bldmakeBldFilesArgs = bldmakeBldFilesArgs;
+ this.bldmakeCleanArgs = bldmakeCleanArgs;
+ this.abldBuildArgs = abldBuildArgs;
+ this.abldExportArgs = abldExportArgs;
+ this.abldMakefileArgs = abldMakefileArgs;
+ this.abldLibraryArgs = abldLibraryArgs;
+ this.abldResourceArgs = abldResourceArgs;
+ this.abldTargetArgs = abldTargetArgs;
+ this.abldFinalArgs = abldFinalArgs;
+ this.abldCleanArgs = abldCleanArgs;
+ this.abldFreezeArgs = abldFreezeArgs;
+ }
+
+ public BuildArgumentsInfo(BuildArgumentsInfo argInfo) {
+
+ this.bldmakeBldFilesArgs = argInfo.bldmakeBldFilesArgs;
+ this.bldmakeCleanArgs = argInfo.bldmakeCleanArgs;
+ this.abldBuildArgs = argInfo.abldBuildArgs;
+ this.abldExportArgs = argInfo.abldExportArgs;
+ this.abldMakefileArgs = argInfo.abldMakefileArgs;
+ this.abldLibraryArgs = argInfo.abldLibraryArgs;
+ this.abldResourceArgs = argInfo.abldResourceArgs;
+ this.abldTargetArgs = argInfo.abldTargetArgs;
+ this.abldFinalArgs = argInfo.abldFinalArgs;
+ this.abldCleanArgs = argInfo.abldCleanArgs;
+ this.abldFreezeArgs = argInfo.abldFreezeArgs;
+ }
+
+ public String getBldmakeBldFilesArgs() {
+ return bldmakeBldFilesArgs;
+ }
+
+ public String getBldmakeCleanArgs() {
+ return bldmakeCleanArgs;
+ }
+
+ public String getAbldBuildArgs() {
+ return abldBuildArgs;
+ }
+
+ public String getAbldExportArgs() {
+ return abldExportArgs;
+ }
+
+ public String getAbldMakefileArgs() {
+ return abldMakefileArgs;
+ }
+
+ public String getAbldLibraryArgs() {
+ return abldLibraryArgs;
+ }
+
+ public String getAbldResourceArgs() {
+ return abldResourceArgs;
+ }
+
+ public String getAbldTargetArgs() {
+ return abldTargetArgs;
+ }
+
+ public String getAbldFinalArgs() {
+ return abldFinalArgs;
+ }
+
+ public String getAbldCleanArgs() {
+ return abldCleanArgs;
+ }
+
+ public String getAbldFreezeArgs() {
+ return abldFreezeArgs;
+ }
+
+}
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv1.java Tue Aug 03 11:44:01 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv1.java Tue Aug 03 14:18:04 2010 -0500
@@ -16,6 +16,7 @@
import java.util.Collections;
import java.util.List;
+import org.eclipse.cdt.core.settings.model.ICStorageElement;
import org.eclipse.core.runtime.IPath;
import org.osgi.framework.Version;
@@ -48,6 +49,10 @@
// a copy of bad SDK default to fall back
private static ISymbianSDK fallbackForBadSdk = SymbianMissingSDKFactory.createInstance("dummy_ID"); //$NON-NLS-1$
+ // Preference data
+ protected BuildArgumentsInfo buildArgumentsInfo;
+ protected final static String ARGUMENTS_DATA_ID = "ARGUMENTS_DATA_ID"; //$NON-NLS-1$
+
public BuildContextSBSv1(ISymbianSDK theSDK, String thePlatform, String theTarget) {
sdkId = theSDK.getUniqueId();
platform = thePlatform.toUpperCase();
@@ -412,4 +417,142 @@
return getCachedData().getSystemIncludePaths();
}
+ @Override
+ public void loadConfigurationSettings(ICStorageElement se) {
+ if (se.getName().equals(ARGUMENTS_DATA_ID)) {
+ loadBuildArgsFromStorage(se);
+ }
+ }
+
+ @Override
+ public IBuildArgumentsInfo getBuildArgumentsInfo() {
+ return (IBuildArgumentsInfo)buildArgumentsInfo;
+ }
+
+ @Override
+ public BuildArgumentsInfo getBuildArgumentsInfoCopy() {
+ return new BuildArgumentsInfo(buildArgumentsInfo);
+ }
+
+ @Override
+ public void setBuildArgumentsInfo(BuildArgumentsInfo buildArgumentsInfo) {
+ this.buildArgumentsInfo = buildArgumentsInfo;
+ }
+
+ @SuppressWarnings("deprecation")
+ private void loadBuildArgsFromStorage(ICStorageElement rootStorage) {
+ buildArgumentsInfo = new BuildArgumentsInfo(getSDK());
+ 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 == null){
+ buildArgumentsInfo = new BuildArgumentsInfo(getSDK());
+ }
+
+ 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);
+ }
+ }
+
+ @Override
+ public void saveConfigurationSettings(ICStorageElement se) {
+ saveBuildArgsToStorage(se.createChild(ARGUMENTS_DATA_ID));
+ }
+
+
+
}
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv2.java Tue Aug 03 11:44:01 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv2.java Tue Aug 03 14:18:04 2010 -0500
@@ -7,6 +7,7 @@
import java.util.List;
import java.util.Map;
+import org.eclipse.cdt.core.settings.model.ICStorageElement;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
@@ -371,4 +372,17 @@
return configQueryData.getTargettypes();
}
+
+ @Override
+ public void loadConfigurationSettings(ICStorageElement se) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void saveConfigurationSettings(ICStorageElement se) {
+ // TODO Auto-generated method stub
+
+ }
+
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/IBuildArgumentsInfo.java Tue Aug 03 14:18:04 2010 -0500
@@ -0,0 +1,93 @@
+/*
+* 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.cpp.internal.api.sdk;
+
+/**
+ * IBuildArgumentsInfo represents one instance of configuration data for the Arguments tab.
+ * This interface only applies for the Symbian 'abld' build system (SBSv1)
+ * @see ICarbideBuildConfiguration
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IBuildArgumentsInfo {
+
+ /**
+ * Get the arguments to pass to bldmake bldfiles
+ * @return string of arguments which may be empty
+ */
+ String getBldmakeBldFilesArgs();
+
+ /**
+ * Get the arguments to pass to bldmake clean
+ * @return string of arguments which may be empty
+ */
+ String getBldmakeCleanArgs();
+
+ /**
+ * Get the arguments to pass to abld build
+ * @return string of arguments which may be empty
+ */
+ String getAbldBuildArgs();
+
+ /**
+ * Get the arguments to pass to abld export
+ * @return string of arguments which may be empty
+ */
+ String getAbldExportArgs();
+
+ /**
+ * Get the arguments to pass to abld makefile
+ * @return string of arguments which may be empty
+ */
+ String getAbldMakefileArgs();
+
+ /**
+ * Get the arguments to pass to abld library
+ * @return string of arguments which may be empty
+ */
+ String getAbldLibraryArgs();
+
+ /**
+ * Get the arguments to pass to abld resource
+ * @return string of arguments which may be empty
+ */
+ String getAbldResourceArgs();
+
+ /**
+ * Get the arguments to pass to abld target
+ * @return string of arguments which may be empty
+ */
+ String getAbldTargetArgs();
+
+ /**
+ * Get the arguments to pass to abld final
+ * @return string of arguments which may be empty
+ */
+ String getAbldFinalArgs();
+
+ /**
+ * Get the arguments to pass to abld clean
+ * @return string of arguments which may be empty
+ */
+ String getAbldCleanArgs();
+
+ /**
+ * Get the arguments to pass to abld freeze
+ * @return string of arguments which may be empty
+ */
+ String getAbldFreezeArgs();
+}
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/ISBSv1BuildContext.java Tue Aug 03 11:44:01 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/ISBSv1BuildContext.java Tue Aug 03 14:18:04 2010 -0500
@@ -6,7 +6,6 @@
* Build Context specific information for the SBS/Raptor Symbian Builder.
* @see ICarbideBuildConfigation
* @since 3.0
- * @deprecated - ABLD is dead.
*
*/
public interface ISBSv1BuildContext extends ISymbianBuildContext {
@@ -31,4 +30,27 @@
*/
public String getBasePlatformForVariation();
+ /**
+ * 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
+ *
+ */
+ 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);
+
+
}
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISymbianBuildContext.java Tue Aug 03 11:44:01 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISymbianBuildContext.java Tue Aug 03 14:18:04 2010 -0500
@@ -15,6 +15,7 @@
import java.io.File;
import java.util.List;
+import org.eclipse.cdt.core.settings.model.ICStorageElement;
import org.eclipse.core.runtime.IPath;
import com.nokia.carbide.cpp.epoc.engine.preprocessor.IDefine;
@@ -121,5 +122,19 @@
*/
public boolean isSymbianBinaryVariation();
+ /**
+ * Load build context specific configuration settings
+ * @param ICStorageElement - a child of CARBIDE_STORAGE_ID ("CarbideConfigurationDataProvider") in .cproject data
+ * @since 3.0
+ *
+ */
+ public void loadConfigurationSettings(ICStorageElement se);
+
+ /**
+ * Save build context specific configuration settings
+ * @param ICStorageElement - a child of CARBIDE_STORAGE_ID ("CarbideConfigurationDataProvider") in .cproject data
+ * @since 3.0
+ */
+ public void saveConfigurationSettings(ICStorageElement se);
}