author | timkelly |
Thu, 12 Aug 2010 17:32:31 -0500 | |
branch | C3_BUILDER_WORK |
changeset 1821 | 912948898b07 |
parent 1770 | fa990cb697f7 |
permissions | -rw-r--r-- |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
1 |
/* |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
8 |
* |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
11 |
* |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
13 |
* |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
15 |
* |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
16 |
*/ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
17 |
package com.nokia.carbide.cdt.internal.builder; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
18 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
19 |
import java.util.ArrayList; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
20 |
import java.util.List; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
21 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
22 |
import org.eclipse.cdt.core.CCorePlugin; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
23 |
import org.eclipse.cdt.core.model.CoreModel; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
24 |
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
25 |
import org.eclipse.cdt.core.settings.model.ICProjectDescription; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
26 |
import org.eclipse.cdt.core.settings.model.ICStorageElement; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
27 |
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
28 |
import org.eclipse.core.resources.IMarker; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
29 |
import org.eclipse.core.resources.IProject; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
30 |
import org.eclipse.core.runtime.CoreException; |
853
6c8527cdaa2e
Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents:
140
diff
changeset
|
31 |
import org.eclipse.core.runtime.IPath; |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
32 |
import org.eclipse.core.runtime.IStatus; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
33 |
import org.eclipse.core.runtime.NullProgressMonitor; |
1434 | 34 |
import org.eclipse.core.runtime.Path; |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
35 |
import org.eclipse.core.runtime.Status; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
36 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
37 |
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin; |
853
6c8527cdaa2e
Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents:
140
diff
changeset
|
38 |
import com.nokia.carbide.cdt.builder.EpocEngineHelper; |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
39 |
import com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
40 |
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
41 |
import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
42 |
import com.nokia.carbide.cdt.builder.project.IEnvironmentVarsInfo; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
43 |
import com.nokia.carbide.cdt.builder.project.ISISBuilderInfo; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
44 |
import com.nokia.carbide.cdt.internal.api.builder.SISBuilderInfo2; |
1821
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
45 |
import com.nokia.carbide.cpp.epoc.engine.preprocessor.DefineFactory; |
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
46 |
import com.nokia.carbide.cpp.epoc.engine.preprocessor.IDefine; |
1418
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
47 |
import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1; |
1739
5f659a59d04a
refactoring ISBSv2BuildContext, ISBSv1BuildContext, ISBSv2ConfigQueryData from public to internal package.
timkelly
parents:
1710
diff
changeset
|
48 |
import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildContext; |
1434 | 49 |
import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildInfo; |
1739
5f659a59d04a
refactoring ISBSv2BuildContext, ISBSv1BuildContext, ISBSv2ConfigQueryData from public to internal package.
timkelly
parents:
1710
diff
changeset
|
50 |
import com.nokia.carbide.cpp.internal.api.sdk.ISBSv2BuildContext; |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
51 |
import com.nokia.carbide.cpp.internal.api.sdk.SDKManagerInternalAPI; |
1644
2db4594b310f
fix NPEs when SBSv2ConfigQueryData does not exist due to it's EPOCROOT no longer existing (e.g. removing the subst)
timkelly
parents:
1643
diff
changeset
|
52 |
import com.nokia.carbide.cpp.internal.api.sdk.sbsv2.SBSv2QueryUtils; |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
53 |
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext; |
1434 | 54 |
import com.nokia.carbide.cpp.sdk.core.ISymbianBuilderID; |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
55 |
import com.nokia.carbide.cpp.sdk.core.ISymbianSDK; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
56 |
import com.nokia.cpp.internal.api.utils.core.TrackedResource; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
57 |
|
1755
e65ffeef96f7
refactor abld arguments tab settings under ISBSV1BuildContext API. WIP to push builder specific settings under their respective ISymbianBuildContext implementation.
timkelly
parents:
1749
diff
changeset
|
58 |
@SuppressWarnings("deprecation") |
1418
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
59 |
public class CarbideBuildConfiguration implements ICarbideBuildConfiguration { |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
60 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
61 |
static final String NOT_INSTALLED = "(SDK not found)"; //$NON-NLS-1$ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
62 |
|
1420
9dfc6e3dc4b9
more ISymbianBuildCOntext refactoring to get SBSv1 & SBSv2 working to origianl state
timkelly
parents:
1418
diff
changeset
|
63 |
public static final String CARBIDE_STORAGE_ID = "CarbideConfigurationDataProvider"; //$NON-NLS-1$ |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
64 |
protected final static String SIS_BUILDER_DATA_ID = "SIS_BUILDER_DATA_ID"; //$NON-NLS-1$ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
65 |
protected final static String ENV_VAR_DATA_ID = "ENV_VAR_DATA_ID"; //$NON-NLS-1$ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
66 |
protected final static String ROM_BUILDER_DATA_ID = "ROM_BUILDER_DATA_ID"; //$NON-NLS-1$ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
67 |
|
1418
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
68 |
protected ISymbianBuildContext context; |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
69 |
protected TrackedResource projectTracker; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
70 |
protected List<ISISBuilderInfo> sisBuilderInfoList; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
71 |
protected EnvironmentVarsInfo2 envVarsInfo; |
1755
e65ffeef96f7
refactor abld arguments tab settings under ISBSV1BuildContext API. WIP to push builder specific settings under their respective ISymbianBuildContext implementation.
timkelly
parents:
1749
diff
changeset
|
72 |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
73 |
protected BuildConfigurationData buildConfigData; |
1757
ec3c1e4702be
Remove makefile dependency checks on SBSv2 builder since they don't apply.
timkelly
parents:
1755
diff
changeset
|
74 |
|
1257
7adc53ca3844
Fix for Bug 10757 (Build is not started when "Use default incremental builder" option is set in preferences).
stechong
parents:
1249
diff
changeset
|
75 |
protected boolean rebuildNeeded; |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
76 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
77 |
public CarbideBuildConfiguration(IProject project, ISymbianBuildContext context) { |
1418
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
78 |
this.context = context; |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
79 |
projectTracker = new TrackedResource(project); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
80 |
sisBuilderInfoList = new ArrayList<ISISBuilderInfo>(0); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
81 |
envVarsInfo = new EnvironmentVarsInfo2(project, context); |
1755
e65ffeef96f7
refactor abld arguments tab settings under ISBSV1BuildContext API. WIP to push builder specific settings under their respective ISymbianBuildContext implementation.
timkelly
parents:
1749
diff
changeset
|
82 |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
83 |
buildConfigData = new BuildConfigurationData(this); |
1757
ec3c1e4702be
Remove makefile dependency checks on SBSv2 builder since they don't apply.
timkelly
parents:
1755
diff
changeset
|
84 |
|
1257
7adc53ca3844
Fix for Bug 10757 (Build is not started when "Use default incremental builder" option is set in preferences).
stechong
parents:
1249
diff
changeset
|
85 |
rebuildNeeded = true; |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
86 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
87 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
88 |
public void loadFromStorage(ICConfigurationDescription projDes) throws CoreException { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
89 |
// get the storage for our data |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
90 |
ICStorageElement rootStorage = projDes.getStorage(CARBIDE_STORAGE_ID, false); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
91 |
if (rootStorage != null) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
92 |
for (ICStorageElement se : rootStorage.getChildren()) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
93 |
if (se.getName().equals(SIS_BUILDER_DATA_ID)) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
94 |
SISBuilderInfo2 sisInfo = new SISBuilderInfo2(projectTracker.getProject()); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
95 |
sisInfo.loadFromStorage(se); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
96 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
97 |
// ignore old 1.2.x style entries |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
98 |
if (!sisInfo.getPKGFileString().equals("(none)")) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
99 |
sisBuilderInfoList.add(sisInfo); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
100 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
101 |
} else if (se.getName().equals(ENV_VAR_DATA_ID)) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
102 |
envVarsInfo.loadFromStorage(se); |
1757
ec3c1e4702be
Remove makefile dependency checks on SBSv2 builder since they don't apply.
timkelly
parents:
1755
diff
changeset
|
103 |
} |
1755
e65ffeef96f7
refactor abld arguments tab settings under ISBSV1BuildContext API. WIP to push builder specific settings under their respective ISymbianBuildContext implementation.
timkelly
parents:
1749
diff
changeset
|
104 |
|
e65ffeef96f7
refactor abld arguments tab settings under ISBSV1BuildContext API. WIP to push builder specific settings under their respective ISymbianBuildContext implementation.
timkelly
parents:
1749
diff
changeset
|
105 |
// Load build context specific settings. |
e65ffeef96f7
refactor abld arguments tab settings under ISBSV1BuildContext API. WIP to push builder specific settings under their respective ISymbianBuildContext implementation.
timkelly
parents:
1749
diff
changeset
|
106 |
getBuildContext().loadConfigurationSettings(se); |
e65ffeef96f7
refactor abld arguments tab settings under ISBSV1BuildContext API. WIP to push builder specific settings under their respective ISymbianBuildContext implementation.
timkelly
parents:
1749
diff
changeset
|
107 |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
108 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
109 |
} else { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
110 |
throw new CoreException(new Status(IStatus.ERROR, CarbideBuilderPlugin.PLUGIN_ID, IStatus.OK, "Unable to load Carbide settings for project " + projectTracker.getProject().getName() + ", " + getDisplayString(), null)); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
111 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
112 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
113 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
114 |
public void saveToStorage(ICConfigurationDescription configDes) throws CoreException { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
115 |
ICStorageElement rootStorage = configDes.getStorage(CARBIDE_STORAGE_ID, true); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
116 |
if (rootStorage != null) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
117 |
rootStorage.clear(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
118 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
119 |
for (ISISBuilderInfo sisInfo : sisBuilderInfoList) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
120 |
SISBuilderInfo2 info = (SISBuilderInfo2)sisInfo; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
121 |
info.saveToStorage(rootStorage.createChild(SIS_BUILDER_DATA_ID)); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
122 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
123 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
124 |
envVarsInfo.saveToStorage(rootStorage.createChild(ENV_VAR_DATA_ID)); |
1755
e65ffeef96f7
refactor abld arguments tab settings under ISBSV1BuildContext API. WIP to push builder specific settings under their respective ISymbianBuildContext implementation.
timkelly
parents:
1749
diff
changeset
|
125 |
|
e65ffeef96f7
refactor abld arguments tab settings under ISBSV1BuildContext API. WIP to push builder specific settings under their respective ISymbianBuildContext implementation.
timkelly
parents:
1749
diff
changeset
|
126 |
// Save build context specific settings. |
1764
df8e072f8f71
refactoring sbsv2 configuration specific data under ISBSv2BuildContext interfaces (fixes some glitches with prior attempt)
timkelly
parents:
1757
diff
changeset
|
127 |
this.getBuildContext().saveConfigurationSettings(rootStorage, getBuildContext()); |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
128 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
129 |
} |
109
2a4136280275
Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents:
0
diff
changeset
|
130 |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
131 |
public ICarbideProjectInfo getCarbideProject() { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
132 |
// we need to get the project info from the build manager to ensure we |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
133 |
// have the correct object. |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
134 |
return CarbideBuilderPlugin.getBuildManager().getProjectInfo(projectTracker.getProject()); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
135 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
136 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
137 |
public String[] getErrorParserList(){ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
138 |
return CarbideCPPBuilder.getParserIdArray(getErrorParserId()); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
139 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
140 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
141 |
public boolean saveConfiguration(boolean refreshFileSystem) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
142 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
143 |
try { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
144 |
ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(projectTracker.getProject()); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
145 |
if (projDes != null) { |
1433
1a693b01d107
1) Reworking cconfiguration 'id' to be separate from the config display name
timkelly
parents:
1420
diff
changeset
|
146 |
|
1770
fa990cb697f7
refactor out some items from ICarbideBuildConfiguration that should just be under ISymbianBuildContext
timkelly
parents:
1764
diff
changeset
|
147 |
ICConfigurationDescription configDes = projDes.getConfigurationById(getBuildContext().getConfigurationID()); |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
148 |
if (configDes != null) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
149 |
// save the CDT project description. this saves all configs but that's the |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
150 |
// only thing CDT allows at this point. |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
151 |
CCorePlugin.getDefault().setProjectDescription(projectTracker.getProject(), projDes, true, new NullProgressMonitor()); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
152 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
153 |
return true; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
154 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
155 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
156 |
} catch (CoreException e) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
157 |
CarbideBuilderPlugin.log(e.getStatus()); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
158 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
159 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
160 |
return false; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
161 |
} |
1433
1a693b01d107
1) Reworking cconfiguration 'id' to be separate from the config display name
timkelly
parents:
1420
diff
changeset
|
162 |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
163 |
public List<ISISBuilderInfo> getSISBuilderInfoList() { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
164 |
return sisBuilderInfoList; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
165 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
166 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
167 |
public String toString(){ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
168 |
return getDisplayString(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
169 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
170 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
171 |
public IEnvironmentVarsInfo getEnvironmentVarsInfo() { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
172 |
return envVarsInfo; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
173 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
174 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
175 |
public void setEnvironmentVarsInfo(IEnvironmentVarsInfo envVarsInfo) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
176 |
if (envVarsInfo instanceof EnvironmentVarsInfo2) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
177 |
this.envVarsInfo = (EnvironmentVarsInfo2)envVarsInfo; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
178 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
179 |
} |
1318 | 180 |
|
1749
0d2e2c9062b1
Simplify APIs around error parser ids/arrays. Clarify some comments in API after review with David.
timkelly
parents:
1739
diff
changeset
|
181 |
private int getErrorParserId(){ |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
182 |
String plat = this.getPlatformString(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
183 |
|
1418
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
184 |
if (context instanceof ISBSv2BuildContext){ |
1643
3fb715ff2227
Set error parser IDs based on compiler macros from Raptor config query.
stechong
parents:
1621
diff
changeset
|
185 |
String toolChain = ((ISBSv2BuildContext)context).getToolChain(); |
3fb715ff2227
Set error parser IDs based on compiler macros from Raptor config query.
stechong
parents:
1621
diff
changeset
|
186 |
if (toolChain.equalsIgnoreCase(ISBSv2BuildContext.TOOLCHAIN_ARM)){ |
3fb715ff2227
Set error parser IDs based on compiler macros from Raptor config query.
stechong
parents:
1621
diff
changeset
|
187 |
return ERROR_PARSERS_ARMVx; |
3fb715ff2227
Set error parser IDs based on compiler macros from Raptor config query.
stechong
parents:
1621
diff
changeset
|
188 |
} else if (toolChain.equalsIgnoreCase(ISBSv2BuildContext.TOOLCHAIN_GCCE)){ |
1479
a654857ddb87
refactor out ABLD-style platform constants into ISBSv1BuildContext from ISymbianBuildContext
timkelly
parents:
1462
diff
changeset
|
189 |
return ERROR_PARSERS_GCCE; |
1643
3fb715ff2227
Set error parser IDs based on compiler macros from Raptor config query.
stechong
parents:
1621
diff
changeset
|
190 |
} else if (toolChain.equalsIgnoreCase(ISBSv2BuildContext.TOOLCHAIN_WINSCW)){ |
1479
a654857ddb87
refactor out ABLD-style platform constants into ISBSv1BuildContext from ISymbianBuildContext
timkelly
parents:
1462
diff
changeset
|
191 |
return ERROR_PARSERS_WINSCW; |
1643
3fb715ff2227
Set error parser IDs based on compiler macros from Raptor config query.
stechong
parents:
1621
diff
changeset
|
192 |
} |
1479
a654857ddb87
refactor out ABLD-style platform constants into ISBSv1BuildContext from ISymbianBuildContext
timkelly
parents:
1462
diff
changeset
|
193 |
} else { |
a654857ddb87
refactor out ABLD-style platform constants into ISBSv1BuildContext from ISymbianBuildContext
timkelly
parents:
1462
diff
changeset
|
194 |
// SBSV1 |
a654857ddb87
refactor out ABLD-style platform constants into ISBSv1BuildContext from ISymbianBuildContext
timkelly
parents:
1462
diff
changeset
|
195 |
if (plat.equals(ISBSv1BuildContext.EMULATOR_PLATFORM)){ |
a654857ddb87
refactor out ABLD-style platform constants into ISBSv1BuildContext from ISymbianBuildContext
timkelly
parents:
1462
diff
changeset
|
196 |
return ERROR_PARSERS_WINSCW; |
a654857ddb87
refactor out ABLD-style platform constants into ISBSv1BuildContext from ISymbianBuildContext
timkelly
parents:
1462
diff
changeset
|
197 |
} else if (plat.startsWith("ARMV")){ |
a654857ddb87
refactor out ABLD-style platform constants into ISBSv1BuildContext from ISymbianBuildContext
timkelly
parents:
1462
diff
changeset
|
198 |
return ERROR_PARSERS_ARMVx; |
a654857ddb87
refactor out ABLD-style platform constants into ISBSv1BuildContext from ISymbianBuildContext
timkelly
parents:
1462
diff
changeset
|
199 |
} else if (plat.equals(ISBSv1BuildContext.GCCE_PLATFORM)){ |
1418
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
200 |
return ERROR_PARSERS_GCCE; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
201 |
} |
1138
352c0236f181
bug 10674. Sort sbsv2 configuration names with same platform_target alias prefix. ensure gcce error parser is used for sbsv2 GCCE4 build configs, add a project specific (sbsv2 only) edit box that allows user to append whatever they want to the -c parameter (the build alias). Also, fixed SDK support for TB kits now that TB92SF appears as a prefix rather than a suffix in the buildinfo.txt file.
timkelly
parents:
1134
diff
changeset
|
202 |
} |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
203 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
204 |
return ERROR_PARSERS_ALL; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
205 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
206 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
207 |
public CConfigurationData getBuildConfigurationData() { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
208 |
return buildConfigData; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
209 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
210 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
211 |
public boolean valid() { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
212 |
return (SDKManagerInternalAPI.getMissingSdk(this.getSDK().getUniqueId()) == null); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
213 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
214 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
215 |
public void validateAndSetProjectMarker() { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
216 |
if (valid() == false) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
217 |
CarbideBuilderPlugin.createCarbideProjectMarker(this.getCarbideProject().getProject(), IMarker.SEVERITY_ERROR, "SDK " + this.getSDK().getUniqueId() + " from project \"" + this.getCarbideProject().getProject().getName() + "\" is unavailable. Please remap configurations by choosing Project > Properties > Carbide Build Configurations > Manage...", IMarker.PRIORITY_HIGH); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
218 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
219 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
220 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
221 |
public static String badSdkString() { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
222 |
return NOT_INSTALLED; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
223 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
224 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
225 |
// Internal helper for missing SDK marking |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
226 |
public static String toMarkedConfig(String config) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
227 |
if (config == null) |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
228 |
return null; |
1418
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
229 |
if (SDKManagerInternalAPI.getMissingSdk(BuildContextSBSv1.getSDKIDFromConfigName(config)) != null) { |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
230 |
return badSdkString() + config; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
231 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
232 |
return config; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
233 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
234 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
235 |
// Internal helper for converting back configurations with missing SDK marking |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
236 |
public static String fromMarkedConfig (String config) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
237 |
if (config == null) |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
238 |
return null; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
239 |
if (config.startsWith(badSdkString())) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
240 |
return config.substring(badSdkString().length()); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
241 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
242 |
return config; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
243 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
244 |
|
1232
17df11e18bc2
little clean-up/refactor after review of bug 11068
timkelly
parents:
1217
diff
changeset
|
245 |
public IPath getTargetOutputDirectory() { |
1621
393b985a50f3
Raptor scanner discovery on top of new Raptor Query API.
stechong
parents:
1479
diff
changeset
|
246 |
if (context instanceof ISBSv2BuildContext){ |
1644
2db4594b310f
fix NPEs when SBSv2ConfigQueryData does not exist due to it's EPOCROOT no longer existing (e.g. removing the subst)
timkelly
parents:
1643
diff
changeset
|
247 |
if (((ISBSv2BuildContext) context).getConfigQueryData() != null){ |
2db4594b310f
fix NPEs when SBSv2ConfigQueryData does not exist due to it's EPOCROOT no longer existing (e.g. removing the subst)
timkelly
parents:
1643
diff
changeset
|
248 |
return new Path(((ISBSv2BuildContext)context).getConfigQueryData().getOutputPathString()); |
2db4594b310f
fix NPEs when SBSv2ConfigQueryData does not exist due to it's EPOCROOT no longer existing (e.g. removing the subst)
timkelly
parents:
1643
diff
changeset
|
249 |
} else { |
2db4594b310f
fix NPEs when SBSv2ConfigQueryData does not exist due to it's EPOCROOT no longer existing (e.g. removing the subst)
timkelly
parents:
1643
diff
changeset
|
250 |
return new Path("/" + SBSv2QueryUtils.BAD_EPOCROOT); |
2db4594b310f
fix NPEs when SBSv2ConfigQueryData does not exist due to it's EPOCROOT no longer existing (e.g. removing the subst)
timkelly
parents:
1643
diff
changeset
|
251 |
} |
1621
393b985a50f3
Raptor scanner discovery on top of new Raptor Query API.
stechong
parents:
1479
diff
changeset
|
252 |
} else { |
393b985a50f3
Raptor scanner discovery on top of new Raptor Query API.
stechong
parents:
1479
diff
changeset
|
253 |
ISymbianSDK sdk = getSDK(); |
1418
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
254 |
ISBSv1BuildContext v1Context = (ISBSv1BuildContext)context; |
1462 | 255 |
ISBSv1BuildInfo sbsv1BuildInfo = (ISBSv1BuildInfo)sdk.getBuildInfo(ISymbianBuilderID.SBSV1_BUILDER); |
1621
393b985a50f3
Raptor scanner discovery on top of new Raptor Query API.
stechong
parents:
1479
diff
changeset
|
256 |
String releasePlatform = sbsv1BuildInfo.getBSFCatalog().getReleasePlatform(v1Context.getBasePlatformForVariation()); |
393b985a50f3
Raptor scanner discovery on top of new Raptor Query API.
stechong
parents:
1479
diff
changeset
|
257 |
return sdk.getReleaseRoot().append(releasePlatform.toLowerCase()).append(getTargetString().toLowerCase()); |
393b985a50f3
Raptor scanner discovery on top of new Raptor Query API.
stechong
parents:
1479
diff
changeset
|
258 |
} |
1232
17df11e18bc2
little clean-up/refactor after review of bug 11068
timkelly
parents:
1217
diff
changeset
|
259 |
} |
1257
7adc53ca3844
Fix for Bug 10757 (Build is not started when "Use default incremental builder" option is set in preferences).
stechong
parents:
1249
diff
changeset
|
260 |
|
7adc53ca3844
Fix for Bug 10757 (Build is not started when "Use default incremental builder" option is set in preferences).
stechong
parents:
1249
diff
changeset
|
261 |
public boolean getRebuildNeeded() { |
7adc53ca3844
Fix for Bug 10757 (Build is not started when "Use default incremental builder" option is set in preferences).
stechong
parents:
1249
diff
changeset
|
262 |
return rebuildNeeded; |
7adc53ca3844
Fix for Bug 10757 (Build is not started when "Use default incremental builder" option is set in preferences).
stechong
parents:
1249
diff
changeset
|
263 |
} |
7adc53ca3844
Fix for Bug 10757 (Build is not started when "Use default incremental builder" option is set in preferences).
stechong
parents:
1249
diff
changeset
|
264 |
|
7adc53ca3844
Fix for Bug 10757 (Build is not started when "Use default incremental builder" option is set in preferences).
stechong
parents:
1249
diff
changeset
|
265 |
public void setRebuildNeeded(boolean value) { |
7adc53ca3844
Fix for Bug 10757 (Build is not started when "Use default incremental builder" option is set in preferences).
stechong
parents:
1249
diff
changeset
|
266 |
rebuildNeeded = value; |
7adc53ca3844
Fix for Bug 10757 (Build is not started when "Use default incremental builder" option is set in preferences).
stechong
parents:
1249
diff
changeset
|
267 |
} |
1418
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
268 |
|
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
269 |
public ISymbianSDK getSDK() { |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
270 |
return context.getSDK(); |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
271 |
} |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
272 |
|
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
273 |
public String getPlatformString() { |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
274 |
return context.getPlatformString(); |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
275 |
} |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
276 |
|
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
277 |
public String getTargetString() { |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
278 |
return context.getTargetString(); |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
279 |
} |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
280 |
|
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
281 |
public String getDisplayString() { |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
282 |
return context.getDisplayString(); |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
283 |
} |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
284 |
|
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
285 |
public ISymbianBuildContext getBuildContext() { |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
286 |
return context; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
287 |
} |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1362
diff
changeset
|
288 |
|
1821
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
289 |
/** |
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
290 |
* Check that at least one MMP in the project configuration has stdcpp support keyword |
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
291 |
* @return |
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
292 |
* @since 3.0 |
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
293 |
*/ |
1710
94cdcd7c5550
Refactor getBuiltInMacros() to be SBSv1 specific. This are the hard-coded macros misc macros we are adding for SBSv1.
timkelly
parents:
1706
diff
changeset
|
294 |
public boolean hasSTDCPPSupport() { |
94cdcd7c5550
Refactor getBuiltInMacros() to be SBSv1 specific. This are the hard-coded macros misc macros we are adding for SBSv1.
timkelly
parents:
1706
diff
changeset
|
295 |
|
94cdcd7c5550
Refactor getBuiltInMacros() to be SBSv1 specific. This are the hard-coded macros misc macros we are adding for SBSv1.
timkelly
parents:
1706
diff
changeset
|
296 |
ICarbideProjectInfo cpi = this.getCarbideProject(); |
94cdcd7c5550
Refactor getBuiltInMacros() to be SBSv1 specific. This are the hard-coded macros misc macros we are adding for SBSv1.
timkelly
parents:
1706
diff
changeset
|
297 |
|
94cdcd7c5550
Refactor getBuiltInMacros() to be SBSv1 specific. This are the hard-coded macros misc macros we are adding for SBSv1.
timkelly
parents:
1706
diff
changeset
|
298 |
List<ISymbianBuildContext> buildConfig = new ArrayList<ISymbianBuildContext>(); |
94cdcd7c5550
Refactor getBuiltInMacros() to be SBSv1 specific. This are the hard-coded macros misc macros we are adding for SBSv1.
timkelly
parents:
1706
diff
changeset
|
299 |
List<IPath> normalMakMakePaths = new ArrayList<IPath>(); |
94cdcd7c5550
Refactor getBuiltInMacros() to be SBSv1 specific. This are the hard-coded macros misc macros we are adding for SBSv1.
timkelly
parents:
1706
diff
changeset
|
300 |
List<IPath> testMakMakePaths = new ArrayList<IPath>(); |
94cdcd7c5550
Refactor getBuiltInMacros() to be SBSv1 specific. This are the hard-coded macros misc macros we are adding for SBSv1.
timkelly
parents:
1706
diff
changeset
|
301 |
buildConfig.add(this.getBuildContext()); |
94cdcd7c5550
Refactor getBuiltInMacros() to be SBSv1 specific. This are the hard-coded macros misc macros we are adding for SBSv1.
timkelly
parents:
1706
diff
changeset
|
302 |
EpocEngineHelper.getMakMakeFiles(cpi.getAbsoluteBldInfPath(), buildConfig, normalMakMakePaths, testMakMakePaths, new NullProgressMonitor()); |
94cdcd7c5550
Refactor getBuiltInMacros() to be SBSv1 specific. This are the hard-coded macros misc macros we are adding for SBSv1.
timkelly
parents:
1706
diff
changeset
|
303 |
|
94cdcd7c5550
Refactor getBuiltInMacros() to be SBSv1 specific. This are the hard-coded macros misc macros we are adding for SBSv1.
timkelly
parents:
1706
diff
changeset
|
304 |
for (IPath mmpPath : normalMakMakePaths){ |
94cdcd7c5550
Refactor getBuiltInMacros() to be SBSv1 specific. This are the hard-coded macros misc macros we are adding for SBSv1.
timkelly
parents:
1706
diff
changeset
|
305 |
if (EpocEngineHelper.hasSTDCPPSupport(cpi, mmpPath)){ |
94cdcd7c5550
Refactor getBuiltInMacros() to be SBSv1 specific. This are the hard-coded macros misc macros we are adding for SBSv1.
timkelly
parents:
1706
diff
changeset
|
306 |
return true; |
94cdcd7c5550
Refactor getBuiltInMacros() to be SBSv1 specific. This are the hard-coded macros misc macros we are adding for SBSv1.
timkelly
parents:
1706
diff
changeset
|
307 |
} |
94cdcd7c5550
Refactor getBuiltInMacros() to be SBSv1 specific. This are the hard-coded macros misc macros we are adding for SBSv1.
timkelly
parents:
1706
diff
changeset
|
308 |
} |
94cdcd7c5550
Refactor getBuiltInMacros() to be SBSv1 specific. This are the hard-coded macros misc macros we are adding for SBSv1.
timkelly
parents:
1706
diff
changeset
|
309 |
|
94cdcd7c5550
Refactor getBuiltInMacros() to be SBSv1 specific. This are the hard-coded macros misc macros we are adding for SBSv1.
timkelly
parents:
1706
diff
changeset
|
310 |
return false; |
94cdcd7c5550
Refactor getBuiltInMacros() to be SBSv1 specific. This are the hard-coded macros misc macros we are adding for SBSv1.
timkelly
parents:
1706
diff
changeset
|
311 |
} |
1821
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
312 |
|
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
313 |
public List<IDefine> getCompileTimeMacros() { |
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
314 |
|
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
315 |
List<IDefine> defines = new ArrayList<IDefine>(); |
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
316 |
|
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
317 |
defines.addAll(context.getBuildMacros()); |
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
318 |
defines.addAll(context.getCompilerPreincludeDefines()); |
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
319 |
defines.addAll(context.getVariantHRHDefines()); |
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
320 |
defines.addAll(context.getMetadataMacros()); |
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
321 |
|
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
322 |
return defines; |
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
323 |
|
912948898b07
Added ICarbideBuildConfigutation#getCompileTimeMacros() and EpocEngineHelper#getGlobalDefinesForConfiguration()
timkelly
parents:
1770
diff
changeset
|
324 |
} |
1257
7adc53ca3844
Fix for Bug 10757 (Build is not started when "Use default incremental builder" option is set in preferences).
stechong
parents:
1249
diff
changeset
|
325 |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
326 |
} |