# HG changeset patch # User timkelly # Date 1280265269 18000 # Node ID 3ecac009d20bd9c8178cc0e07b39b41858b401ca # Parent e82be937be91a74636bf4c42014ecd3b047fcb49 bug 11535. Remove ROM builder. diff -r e82be937be91 -r 3ecac009d20b builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/builder/CarbideCPPBuilder.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/builder/CarbideCPPBuilder.java Tue Jul 27 15:12:04 2010 -0500 +++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/builder/CarbideCPPBuilder.java Tue Jul 27 16:14:29 2010 -0500 @@ -57,14 +57,12 @@ import com.nokia.carbide.cdt.builder.PKGViewPathHelper; import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration; import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo; -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; @@ -76,7 +74,6 @@ import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPData; import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPResource; import com.nokia.carbide.cpp.epoc.engine.preprocessor.AcceptedNodesViewFilter; -import com.nokia.carbide.cpp.internal.api.sdk.SBSv2Utils; import com.nokia.carbide.cpp.internal.qt.core.QtCorePlugin; import com.nokia.carbide.cpp.internal.x86build.X86BuildPlugin; import com.nokia.carbide.cpp.sdk.core.ISBSv1BuildContext; @@ -341,7 +338,6 @@ // build ROM if necessary subMonitor = SubMonitor.convert(monitor, 1); - invokeROMBuilder(buildConfig, launcher, subMonitor.newChild(1)); } else { launcher.writeToConsole("\n***Errors were detected in build. See the Problems or Console view for details.\n"); @@ -1992,53 +1988,6 @@ return null; } - /** - * Invoke the ROM builder for the given build configuration - * @param config - The current configuration from where to get the settings from - * @param cmdLauncher - The object to use for the process execution - * @param monitor - An IProgressMonitor - */ - public static void invokeROMBuilder(ICarbideBuildConfiguration config, CarbideCommandLauncher cmdLauncher, IProgressMonitor monitor) { - - IROMBuilderInfo info = config.getROMBuildInfo(); - if (info != null) { - String commandLine = info.getCommandLine().trim(); - if (commandLine.length() > 0) { - - monitor.setTaskName("Building ROM Image"); - - IPath workingDir = config.getCarbideProject().getINFWorkingDirectory(); - String workingDirString = info.getWorkingDirectory().trim(); - if (workingDirString.length() > 0) { - workingDir = new Path(workingDirString); - } - - cmdLauncher.writeToConsole("\n***Building ROM Image ....\n"); - List args = tokenizeArgsWithQuotes(commandLine); - args.add(0, "/c"); - - cmdLauncher.setErrorParserManager(workingDir, getParserIdArray(ICarbideBuildConfiguration.ERROR_PARSERS_ROM_BUILDER)); - int retVal = cmdLauncher.executeCommand(CarbideCommandLauncher.getCmdExeLocation(), args.toArray(new String[args.size()]), getResolvedEnvVars(config), workingDir); - if (retVal != 0){ - cmdLauncher.writeToConsole("***Non-Zero Status: Specified rom build command returned with exit value = " + retVal); //$NON-NLS-1$ - CarbideBuilderPlugin.createCarbideProjectMarker(config.getCarbideProject().getProject(), IMarker.SEVERITY_ERROR, "Specified rom build command returned with exit value = " + retVal, IMarker.PRIORITY_LOW); //$NON-NLS-1$ - cmdLauncher.writeToConsole("\nRom build failed\n"); - } else { - cmdLauncher.writeToConsole("\nRom build completed\n"); //$NON-NLS-1$ - } - cmdLauncher.writeToConsole(cmdLauncher.getTimingStats()); - - - monitor.worked(1); - if (monitor.isCanceled()) { - return; - } - } - } - - monitor.done(); - } - /** * Returns a list of arguments as strings. The given string is basically split at spaces, but not if the space(s) * is contained in quotes. Arguments are typically quoted if they contain spaces. diff -r e82be937be91 -r 3ecac009d20b builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java Tue Jul 27 15:12:04 2010 -0500 +++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java Tue Jul 27 16:14:29 2010 -0500 @@ -122,12 +122,6 @@ List getBuiltinMacros(); /** - * Returns the ROM builder info from the ROM Builder tab. - * @return - */ - IROMBuilderInfo getROMBuildInfo(); - - /** * Compares two configurations to see if their display names are equivalent. */ boolean equals(Object obj); diff -r e82be937be91 -r 3ecac009d20b builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/IROMBuilderInfo.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/IROMBuilderInfo.java Tue Jul 27 15:12:04 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -package com.nokia.carbide.cdt.builder.project; - -/** - * IROMBuilderInfo represents one instance of configuration data for the ROM Builder tab. - * @see ICarbideBuildConfiguration - */ -public interface IROMBuilderInfo { - - /** - * Get the command line to build the ROM - * @return string which may be empty - */ - String getCommandLine(); - - /** - * Set the command line with which to build the ROM - * @param commandLine - */ - void setCommandLine(String commandLine); - - /** - * Get the working directory to run the build from - * @return string which may be empty - */ - String getWorkingDirectory(); - - /** - * Set the working directory from which to run the build - * @param workingDirectory - */ - void setWorkingDirectory(String workingDirectory); - -} diff -r e82be937be91 -r 3ecac009d20b builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java Tue Jul 27 15:12:04 2010 -0500 +++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java Tue Jul 27 16:14:29 2010 -0500 @@ -43,7 +43,6 @@ import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration; import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo; import com.nokia.carbide.cdt.builder.project.IEnvironmentVarsInfo; -import com.nokia.carbide.cdt.builder.project.IROMBuilderInfo; import com.nokia.carbide.cdt.builder.project.ISISBuilderInfo; import com.nokia.carbide.cdt.internal.api.builder.SISBuilderInfo2; import com.nokia.carbide.cpp.epoc.engine.preprocessor.IDefine; @@ -77,7 +76,6 @@ protected EnvironmentVarsInfo2 envVarsInfo; protected BuildArgumentsInfo buildArgumentsInfo; protected BuildConfigurationData buildConfigData; - protected ROMBuilderInfo romBuilderInfo; protected SBSv2BuilderInfo sbsv2BuilderInfo; protected boolean rebuildNeeded; @@ -96,7 +94,6 @@ envVarsInfo = new EnvironmentVarsInfo2(project, context); buildArgumentsInfo = new BuildArgumentsInfo(getSDK()); buildConfigData = new BuildConfigurationData(this); - romBuilderInfo = new ROMBuilderInfo(getSDK()); if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(project)){ sbsv2BuilderInfo = new SBSv2BuilderInfo((ISBSv2BuildContext)context); } @@ -121,8 +118,6 @@ envVarsInfo.loadFromStorage(se); } else if (se.getName().equals(ARGUMENTS_DATA_ID)) { loadBuildArgsFromStorage(se); - } else if (se.getName().equals(ROM_BUILDER_DATA_ID)) { - romBuilderInfo.loadFromStorage(se); } else if (se.getName().equals(SBSV2_DATA_ID)){ if (sbsv2BuilderInfo != null){ sbsv2BuilderInfo.loadFromStorage(se); @@ -146,7 +141,6 @@ envVarsInfo.saveToStorage(rootStorage.createChild(ENV_VAR_DATA_ID)); saveBuildArgsToStorage(rootStorage.createChild(ARGUMENTS_DATA_ID)); - romBuilderInfo.saveToStorage(rootStorage.createChild(ROM_BUILDER_DATA_ID)); if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(getCarbideProject().getProject())){ sbsv2BuilderInfo.saveToStorage(rootStorage.createChild(SBSV2_DATA_ID)); @@ -424,10 +418,6 @@ this.buildArgumentsInfo = buildArgumentsInfo; } - public IROMBuilderInfo getROMBuildInfo() { - return romBuilderInfo; - } - public ISBSv2BuildConfigInfo getSBSv2BuildConfigInfo(){ return sbsv2BuilderInfo; } diff -r e82be937be91 -r 3ecac009d20b builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ROMBuilderInfo.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ROMBuilderInfo.java Tue Jul 27 15:12:04 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -package com.nokia.carbide.cdt.internal.builder; - -import java.io.File; - -import org.eclipse.cdt.core.settings.model.ICStorageElement; - -import com.nokia.carbide.cdt.builder.project.IROMBuilderInfo; -import com.nokia.carbide.cpp.sdk.core.ISymbianSDK; -import com.nokia.cpp.internal.api.utils.core.HostOS; - - -public class ROMBuilderInfo implements IROMBuilderInfo { - - private static final String ROMBUILDCOMMANDLINESTORAGE = "ROMBUILDCOMMANDLINESTORAGE"; //$NON-NLS-1$ - private static final String ROMBUILDWORKINGDIRECTORYSTORAGE = "ROMBUILDWORKINGDIRECTORYSTORAGE"; //$NON-NLS-1$ - - - private String romBuildCommandLine; - private String romBuildWorkingDirectory; - - - public ROMBuilderInfo(ISymbianSDK sdk) { - - this.romBuildCommandLine = ""; //$NON-NLS-1$ - this.romBuildWorkingDirectory = HostOS.IS_WIN32 ? "C:\\" : "/tmp"; //$NON-NLS-1$ //$NON-NLS-2$ - - // now set epoc32\rom folder in the sdk as the default working dir - // this is most common folder that rom images are built from for most symbian kits.. - String dir = sdk.getEPOCROOT() + "epoc32/rom/"; //$NON-NLS-1$ - if (new File(dir).exists()) - romBuildWorkingDirectory = dir; - } - - public void loadFromStorage(ICStorageElement rootStorage) { - String value = rootStorage.getAttribute(ROMBUILDCOMMANDLINESTORAGE); - if (value != null) { - romBuildCommandLine = value; - } - - value = rootStorage.getAttribute(ROMBUILDWORKINGDIRECTORYSTORAGE); - if (value != null) { - romBuildWorkingDirectory = value; - } - } - - public void saveToStorage(ICStorageElement rootStorage) { - if (romBuildCommandLine.trim().length() > 0) { - rootStorage.setAttribute(ROMBUILDCOMMANDLINESTORAGE, romBuildCommandLine); - } - - if (romBuildWorkingDirectory.trim().length() > 0) { - rootStorage.setAttribute(ROMBUILDWORKINGDIRECTORYSTORAGE, romBuildWorkingDirectory); - } - } - - public String getCommandLine() { - return romBuildCommandLine; - } - - public String getWorkingDirectory() { - return romBuildWorkingDirectory; - } - - public void setCommandLine(String romBuildCommandLine) { - this.romBuildCommandLine = romBuildCommandLine; - } - - public void setWorkingDirectory(String romBuildWorkingDirectory) { - this.romBuildWorkingDirectory = romBuildWorkingDirectory; - } -} diff -r e82be937be91 -r 3ecac009d20b builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideBuildConfigurationsPage.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideBuildConfigurationsPage.java Tue Jul 27 15:12:04 2010 -0500 +++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideBuildConfigurationsPage.java Tue Jul 27 16:14:29 2010 -0500 @@ -151,9 +151,6 @@ // paths and symbols tab PathsAndSymbolsTabComposite pathsAndSymbolsTabComposite; - // rom builder tab - ROMBuilderTabComposite romBuilderTabComposite; - // Configuration management/switching private IProject project; private BuildConfigCombo buildConfigurationCombo; @@ -347,15 +344,6 @@ pathsAndSymbolsTabComposite.createControls(); pathsAndSymbolsTabItem.setControl(pathsAndSymbolsTabComposite); - /////////////////// ROM Builder Tab ///////////////// - TabItem romBuilderTabItem = new TabItem(tabFolder, SWT.NONE); - romBuilderTabItem.setText(Messages.getString("CarbideRomBuilderTab.Title")); //$NON-NLS-1$ - romBuilderTabItem.setToolTipText(Messages.getString("CarbideRomBuilderTab.ToolTip")); //$NON-NLS-1$ - - romBuilderTabComposite = new ROMBuilderTabComposite(romBuilderTabItem); - romBuilderTabComposite.createControls(); - romBuilderTabItem.setControl(romBuilderTabComposite); - // read in the settings and populate the prefs... if (project != null) { loadConfigurationSettings(); @@ -369,7 +357,6 @@ argumentsTabcomposite.initData(config); } pathsAndSymbolsTabComposite.initData(config); - romBuilderTabComposite.initData(config); } } setUpEnvVarsTable(new String[0], null); @@ -655,9 +642,7 @@ boolean pathsAndSynmbolsSettingsEqual = pathsAndSymbolsTabComposite.compareConfigurationSettings(selectedConfig, writeToConfig); - boolean romBuilderSettingsEqual = romBuilderTabComposite.compareConfigurationSettings(selectedConfig, writeToConfig); - - return sisSettingsEqual && sbsv2ConfigEqual && envVarsSettingsEqual && argsSettingsEqual && pathsAndSynmbolsSettingsEqual && romBuilderSettingsEqual; + return sisSettingsEqual && sbsv2ConfigEqual && envVarsSettingsEqual && argsSettingsEqual && pathsAndSynmbolsSettingsEqual; } private void saveConfigurationSettings(ICarbideBuildConfiguration config) { @@ -966,7 +951,6 @@ argumentsTabcomposite.initData(lastConfig); } pathsAndSymbolsTabComposite.initData(lastConfig); - romBuilderTabComposite.initData(lastConfig); } } @@ -985,7 +969,6 @@ argumentsTabcomposite.performDefaults(cpi.getNamedConfiguration(lastSelectedConfigName).getSDK()); } pathsAndSymbolsTabComposite.performDefaults(cpi.getNamedConfiguration(lastSelectedConfigName).getSDK()); - romBuilderTabComposite.performDefaults(cpi.getNamedConfiguration(lastSelectedConfigName).getSDK()); super.performDefaults(); } diff -r e82be937be91 -r 3ecac009d20b builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/ROMBuilderTabComposite.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/ROMBuilderTabComposite.java Tue Jul 27 15:12:04 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,120 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -package com.nokia.carbide.cdt.internal.builder.ui; - -import java.io.File; - -import org.eclipse.cdt.utils.ui.controls.ControlFactory; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.DirectoryDialog; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.TabItem; -import org.eclipse.swt.widgets.Text; - -import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration; -import com.nokia.carbide.cdt.builder.project.IROMBuilderInfo; -import com.nokia.carbide.cpp.sdk.core.ISymbianSDK; -import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils; - -/** - * Arguments tab for the Carbide Build Configurations page - * - */ -public class ROMBuilderTabComposite extends Composite { - - private Text cmdLineEdit; - private Text workingDirEdit; - private Button workingDirBrowse; - - - public ROMBuilderTabComposite(TabItem tabItem) { - super(tabItem.getParent(), SWT.NONE); - } - - public void createControls() { - setLayout(new GridLayout(3, false)); - - Label cmdLineLabel = new Label(this, SWT.NONE); - cmdLineLabel.setText(Messages.getString("CarbideRomBuilderTab.Cmd_Line")); //$NON-NLS-1$ - cmdLineLabel.setToolTipText(Messages.getString("CarbideRomBuilderTab.Cmd_Line_Tool_Tip")); //$NON-NLS-1$ - - cmdLineEdit = new Text(this, SWT.BORDER); - cmdLineEdit.setToolTipText(Messages.getString("CarbideRomBuilderTab.BldfilesArgumentsToolTip")); //$NON-NLS-1$ - cmdLineEdit.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1)); - - Label workingDirLabel = new Label(this, SWT.NONE); - workingDirLabel.setText(Messages.getString("CarbideRomBuilderTab.Working_Dir")); //$NON-NLS-1$ - workingDirLabel.setToolTipText(Messages.getString("CarbideRomBuilderTab.Working_Dir_Tool_Tip")); //$NON-NLS-1$ - - workingDirEdit = new Text(this, SWT.BORDER); - workingDirEdit.setToolTipText(Messages.getString("CarbideRomBuilderTab.Working_Dir_Tool_Tip")); //$NON-NLS-1$ - workingDirEdit.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - - workingDirBrowse = ControlFactory.createPushButton(this, Messages.getString("CarbideRomBuilderTab.Browse")); //$NON-NLS-1$ - workingDirBrowse.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent evt) { - DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.NONE); - BrowseDialogUtils.initializeFrom(dialog, workingDirEdit); - - dialog.setText(Messages.getString("CarbideRomBuilderTab.Rom_Dir_Dialog_Title")); //$NON-NLS-1$ - String result = dialog.open(); - - if (result != null) { - workingDirEdit.setText(result); - } - } - }); - } - - public void initData(ICarbideBuildConfiguration buildConfig) { - IROMBuilderInfo romInfo = buildConfig.getROMBuildInfo(); - cmdLineEdit.setText(romInfo.getCommandLine()); - workingDirEdit.setText(romInfo.getWorkingDirectory()); - } - - public boolean compareConfigurationSettings(ICarbideBuildConfiguration selectedConfig, boolean writeToConfig) { - boolean settingsEqual = true; - - IROMBuilderInfo existingInfo = selectedConfig.getROMBuildInfo(); - settingsEqual = existingInfo.getCommandLine().equals(cmdLineEdit.getText()) && - existingInfo.getWorkingDirectory().equals(workingDirEdit.getText()); - - if (!settingsEqual && writeToConfig) { - existingInfo.setCommandLine(cmdLineEdit.getText()); - existingInfo.setWorkingDirectory(workingDirEdit.getText()); - } - - return settingsEqual; - } - - public void performDefaults(ISymbianSDK sdk) { - cmdLineEdit.setText(""); //$NON-NLS-1$ - workingDirEdit.setText("C:\\"); //$NON-NLS-1$ - - // now set epoc32\rom folder in the sdk as the default working dir - // this is most common folder that rom images are built from for most symbian kits.. - String dir = sdk.getEPOCROOT() + "epoc32\\rom\\"; //$NON-NLS-1$ - if (new File(dir).exists()) - workingDirEdit.setText(dir); - } -}