author | timkelly |
Thu, 08 Apr 2010 15:42:53 -0500 | |
changeset 1183 | 00adbfb5e5c4 |
parent 1138 | 352c0236f181 |
child 1221 | f41fa762c65f |
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 |
*/ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
13 |
package com.nokia.carbide.cpp.internal.api.sdk; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
14 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
15 |
import java.io.File; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
16 |
import java.io.FileFilter; |
693
2d475d296af4
Look for sbs or sbs.bat under SBS_HOME/bin first, instead of only looking at the PATH.
Ed Swartz <ed.swartz@nokia.com>
parents:
629
diff
changeset
|
17 |
import java.text.MessageFormat; |
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
18 |
import java.util.ArrayList; |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
19 |
import java.util.Collections; |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
20 |
import java.util.Comparator; |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
21 |
import java.util.HashMap; |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
22 |
import java.util.Iterator; |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
23 |
import java.util.List; |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
24 |
import java.util.Map; |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
25 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
26 |
import javax.xml.parsers.DocumentBuilder; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
27 |
import javax.xml.parsers.DocumentBuilderFactory; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
28 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
29 |
import org.eclipse.cdt.utils.spawner.EnvironmentReader; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
30 |
import org.eclipse.core.filesystem.URIUtil; |
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
31 |
import org.eclipse.core.runtime.IPath; |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
32 |
import org.eclipse.core.runtime.Path; |
629 | 33 |
import org.eclipse.core.runtime.preferences.IEclipsePreferences; |
34 |
import org.eclipse.core.runtime.preferences.InstanceScope; |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
35 |
import org.osgi.framework.Version; |
629 | 36 |
import org.osgi.service.prefs.BackingStoreException; |
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
37 |
import org.w3c.dom.Element; |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
38 |
import org.w3c.dom.Node; |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
39 |
import org.w3c.dom.NodeList; |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
40 |
import org.xml.sax.InputSource; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
41 |
import org.xml.sax.helpers.DefaultHandler; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
42 |
|
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
43 |
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext; |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
44 |
import com.nokia.carbide.cpp.sdk.core.ISymbianSDK; |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
45 |
import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin; |
176 | 46 |
import com.nokia.cpp.internal.api.utils.core.FileUtils; |
608
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
47 |
import com.nokia.cpp.internal.api.utils.core.HostOS; |
176 | 48 |
import com.nokia.cpp.internal.api.utils.core.Logging; |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
49 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
50 |
/** |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
51 |
* Utility class for SBSv2 |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
52 |
* @since 2.0 |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
53 |
*/ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
54 |
public class SBSv2Utils { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
55 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
56 |
private static final String SBSV2_FILTERED_CONFIGS_STORE = "sbsv2FilteredConfigs"; //$NON-NLS-1$ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
57 |
private static final String SBSV2_FILTERED_CONFIGS_DELIMETER = ";"; //$NON-NLS-1$ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
58 |
|
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
59 |
/** |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
60 |
* Map of usable Raptor alias for -c parameter and base platform: <alise, base plat> |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
61 |
*/ |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
62 |
private static Map<String, String> unfilteredSBSv2ConfigNames; |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
63 |
|
608
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
64 |
protected static final String SBS_HOME = "SBS_HOME"; |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
65 |
protected static String sbsHome; |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
66 |
protected static IPath sbsPath; |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
67 |
|
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
68 |
private static boolean scannedSbsState = false; |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
69 |
private static final String sbsScriptName = HostOS.IS_WIN32 ? "sbs.bat" : "sbs"; |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
70 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
71 |
/** |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
72 |
* Get the path to the SBSv2 bin directory. This is based on the SBS_HOME environment variable |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
73 |
* and may or may not actually exist. |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
74 |
* @return absolute path to the bin directory, or null if SBS_HOME is not set |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
75 |
*/ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
76 |
public static IPath getSBSBinDirectory() { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
77 |
String sbsHome = EnvironmentReader.getEnvVar("SBS_HOME"); //$NON-NLS-1$ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
78 |
if (sbsHome != null) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
79 |
return new Path(sbsHome).append("bin"); //$NON-NLS-1$ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
80 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
81 |
return null; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
82 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
83 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
84 |
/** |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
85 |
* Get the build configurations supported by SBSv2 |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
86 |
* @param refreshList whether or not to parse the configuration xml files again |
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
87 |
* @return A map of raptor aliases (key) to base build platform. Never null; |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
88 |
*/ |
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
89 |
public static Map<String, String> getUnfilteredSBSv2BuildConfigurations(boolean refreshList) { |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
90 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
91 |
if (unfilteredSBSv2ConfigNames == null || refreshList) { |
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
92 |
unfilteredSBSv2ConfigNames = new HashMap<String, String>(); |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
93 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
94 |
// parse the xml files in SBS_HOME/lib/config/ to get SBSv2 configs |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
95 |
try { |
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 |
IPath configPath = getSBSBinDirectory(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
98 |
if (configPath != null) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
99 |
configPath = configPath.removeLastSegments(1).append("lib/config"); //$NON-NLS-1$ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
100 |
File configDir = configPath.toFile(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
101 |
if (configDir.exists() && configDir.isDirectory()) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
102 |
File[] configFiles = FileUtils.listFilesInTree(configDir, new FileFilter() { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
103 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
104 |
public boolean accept(File arg0) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
105 |
if (arg0.isDirectory()) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
106 |
return true; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
107 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
108 |
return arg0.getName().toLowerCase().endsWith("xml"); //$NON-NLS-1$ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
109 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
110 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
111 |
}, false); |
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 |
for (File file : configFiles) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
114 |
getConfigsForFile(file); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
115 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
116 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
117 |
} |
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 |
} catch (Exception e) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
120 |
e.printStackTrace(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
121 |
Logging.log(SDKCorePlugin.getDefault(), Logging.newStatus(SDKCorePlugin.getDefault(), e)); |
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 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
125 |
return unfilteredSBSv2ConfigNames; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
126 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
127 |
|
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 |
* Given a list of SDKs, returns the list of the SDK's supported by SBSv2 |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
130 |
* @param sdks list of SDK's to check |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
131 |
* @return list of SBSv2 supported SDK's, may be empty |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
132 |
*/ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
133 |
public static List<ISymbianSDK> getSupportedSDKs(List<ISymbianSDK> sdks) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
134 |
List<ISymbianSDK> supportedSDKs = new ArrayList<ISymbianSDK>(); |
629 | 135 |
|
136 |
// If there is no SBSv1 builder, then assume all SDKs are SBSv2 capable |
|
137 |
if (!enableSBSv1Support()) { |
|
138 |
supportedSDKs.addAll(sdks); |
|
139 |
} else { |
|
140 |
//TODO need a better way to do this from Symbian. |
|
141 |
// For now, just filter out anything older than 9.4 |
|
142 |
for (ISymbianSDK sdk : sdks) { |
|
143 |
Version osVersion = sdk.getOSVersion(); |
|
144 |
if (osVersion.getMajor() > 8 || |
|
145 |
(osVersion.getMajor() == 8 && osVersion.getMinor() > 3)) { |
|
146 |
supportedSDKs.add(sdk); |
|
147 |
} |
|
148 |
} |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
149 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
150 |
return supportedSDKs; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
151 |
} |
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 |
/** |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
154 |
* Returns the list of SBSv2 build configuration names that should |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
155 |
* be filtered out of any UI |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
156 |
*/ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
157 |
public static String[] getSBSv2ConfigurationsToFilter() { |
629 | 158 |
IEclipsePreferences prefs = new InstanceScope().getNode(SDKCorePlugin.PLUGIN_ID); |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
159 |
if (prefs != null) { |
629 | 160 |
String configs = prefs.get(SBSV2_FILTERED_CONFIGS_STORE, ""); |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
161 |
return configs.split(SBSV2_FILTERED_CONFIGS_DELIMETER); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
162 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
163 |
return new String[0]; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
164 |
} |
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 |
* Set the list of SBSv2 build configurations that should be filtered |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
168 |
* out of any UI |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
169 |
* @param configs configs to be filtered |
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 static void setSBSv2ConfigurationsToFilter(String[] configs) { |
629 | 172 |
IEclipsePreferences prefs = new InstanceScope().getNode(SDKCorePlugin.PLUGIN_ID); |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
173 |
if (prefs != null) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
174 |
String store = ""; //$NON-NLS-1$ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
175 |
for (String config : configs) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
176 |
store = store + SBSV2_FILTERED_CONFIGS_DELIMETER + config; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
177 |
} |
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 |
// remove the leading delimeter |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
180 |
if (store.length() > 0) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
181 |
store = store.substring(1); |
266
c7ecdd0b9f52
Fix bug 9310. Fix save problem with Platform Filter Prefs (sbsv2) and add Restore / Apply buttons.
timkelly
parents:
176
diff
changeset
|
182 |
} |
c7ecdd0b9f52
Fix bug 9310. Fix save problem with Platform Filter Prefs (sbsv2) and add Restore / Apply buttons.
timkelly
parents:
176
diff
changeset
|
183 |
if (store.length() >= 0){ |
c7ecdd0b9f52
Fix bug 9310. Fix save problem with Platform Filter Prefs (sbsv2) and add Restore / Apply buttons.
timkelly
parents:
176
diff
changeset
|
184 |
// lenght of zero means there are not configs to filter (or show them all) |
629 | 185 |
prefs.put(SBSV2_FILTERED_CONFIGS_STORE, store); |
186 |
try { |
|
187 |
prefs.flush(); |
|
188 |
} catch (BackingStoreException e) { |
|
189 |
Logging.log(SDKCorePlugin.getDefault(), |
|
190 |
Logging.newStatus(SDKCorePlugin.getDefault(), e)); |
|
191 |
} |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
192 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
193 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
194 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
195 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
196 |
/** |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
197 |
* Gets the list of SBSv2 build contexts for the given SDK |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
198 |
* @param sdk the SDK to get the build contexts for |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
199 |
* @return the list of SBSv2 build contexts. the list may be empty |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
200 |
*/ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
201 |
public static List<ISymbianBuildContext> getFilteredSBSv2BuildContexts(ISymbianSDK sdk) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
202 |
List<ISymbianBuildContext> contexts = new ArrayList<ISymbianBuildContext>(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
203 |
|
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
204 |
Iterator it = getUnfilteredSBSv2BuildConfigurations(false).entrySet().iterator(); |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
205 |
|
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
206 |
while (it.hasNext()){ |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
207 |
|
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
208 |
Map.Entry buildConfigPair = (Map.Entry)it.next(); |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
209 |
String alias = (String)buildConfigPair.getKey(); // The sbsv2 alias |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
210 |
String basePlat = (String)buildConfigPair.getValue(); |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
211 |
boolean addConfig = true; |
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
212 |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
213 |
for (String filteredConfig : getSBSv2ConfigurationsToFilter()) { |
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
214 |
if (filteredConfig.compareTo(alias) == 0) { |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
215 |
addConfig = false; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
216 |
break; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
217 |
} |
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 |
if (addConfig) { |
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
221 |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
222 |
// only support configs that fall into something we can make a build context |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
223 |
// out of. They must have a platform and a target. |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
224 |
String targetString = null; |
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
225 |
String[] configTokens = alias.split("_"); // $//$NON-NLS-N$ |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
226 |
// We presume that aliases have the second token as the "target". |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
227 |
if (configTokens[1].toLowerCase().endsWith("deb")) { //$NON-NLS-1$ //$NON-NLS-2$ |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
228 |
targetString = ISymbianBuildContext.DEBUG_TARGET; |
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
229 |
} else if (configTokens[1].toLowerCase().endsWith("rel")) { //$NON-NLS-1$ //$NON-NLS-2$ |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
230 |
targetString = ISymbianBuildContext.RELEASE_TARGET; |
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 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
233 |
if (targetString != null) { |
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
234 |
SymbianBuildContext context = null; |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
235 |
context = new SymbianBuildContext(sdk, basePlat, targetString, alias); |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
236 |
if (context != null) |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
237 |
contexts.add(context); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
238 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
239 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
240 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
241 |
|
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
|
242 |
return sortContexts(contexts); |
0
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 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
245 |
/** |
608
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
246 |
* Whether or not to display SBSv1 builder UI |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
247 |
* @return true if SBSv1 is available, false otherwise |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
248 |
*/ |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
249 |
public static boolean enableSBSv1Support() { |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
250 |
if (!enableSBSv2Support()) |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
251 |
return true; |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
252 |
|
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
253 |
// TODO LINUX: more accurate check |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
254 |
if (HostOS.IS_WIN32) |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
255 |
return true; |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
256 |
return false; |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
257 |
} |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
258 |
|
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
259 |
/** |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
260 |
* Whether or not to display SBSv2 builder UI |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
261 |
* @return true if SBSv2 is installed, false otherwise |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
262 |
*/ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
263 |
public static boolean enableSBSv2Support() { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
264 |
IPath sbsBinPath = getSBSBinDirectory(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
265 |
if (sbsBinPath != null && sbsBinPath.toFile().exists()) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
266 |
return true; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
267 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
268 |
return false; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
269 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
270 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
271 |
private static void getConfigsForFile(File file) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
272 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
273 |
try { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
274 |
Element root = null; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
275 |
DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
276 |
parser.setErrorHandler(new DefaultHandler()); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
277 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
278 |
InputSource source = new InputSource(URIUtil.toURI(file.getAbsolutePath()).getPath()); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
279 |
root = parser.parse(source).getDocumentElement(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
280 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
281 |
NodeList children = root.getChildNodes(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
282 |
for (int i=0; i< children.getLength(); i++) { |
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
283 |
getConfigsForNode(children.item(i), root); |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
284 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
285 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
286 |
} catch (Exception e) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
287 |
e.printStackTrace(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
288 |
Logging.log(SDKCorePlugin.getDefault(), Logging.newStatus(SDKCorePlugin.getDefault(), e)); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
289 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
290 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
291 |
|
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
292 |
private static void getConfigsForNode(Node node, Node parentNode) { |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
293 |
if (node.getNodeName().equals("config")) { //$NON-NLS-1$ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
294 |
Node abstractNode = node.getAttributes().getNamedItem("abstract"); //$NON-NLS-1$ |
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
295 |
Node namedNode = node.getAttributes().getNamedItem("name"); //$NON-NLS-1$ |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
296 |
if (abstractNode == null || abstractNode.getNodeValue().equals("false")) { //$NON-NLS-1$ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
297 |
if (namedNode != null) { |
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
298 |
|
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
299 |
// Get the parent base build platform |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
300 |
String baseBuildPlatform = null; |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
301 |
if (parentNode != null){ |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
302 |
baseBuildPlatform = parentNode.getAttributes().getNamedItem("name").getNodeValue(); |
1183 | 303 |
if (baseBuildPlatform.split("_").length > 1){ |
304 |
baseBuildPlatform = baseBuildPlatform.split("_")[0]; |
|
305 |
} |
|
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
306 |
} |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
307 |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
308 |
// only support configs that fall into something we can make a build context |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
309 |
// out of. They must have a platform and a target. |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
310 |
String configName = namedNode.getNodeValue(); |
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
311 |
String[] configTokens = configName.split("_"); |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
312 |
if (configTokens.length >= 2) { //$NON-NLS-1$ |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
313 |
String target = configTokens[1]; |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
314 |
if (target.endsWith("deb") || target.endsWith("rel")){ //$NON-NLS-1$ |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
315 |
if (baseBuildPlatform == null){ |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
316 |
baseBuildPlatform = "unknown"; |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
317 |
} |
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
318 |
unfilteredSBSv2ConfigNames.put(configName, baseBuildPlatform); |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
319 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
320 |
} |
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
321 |
} |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
322 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
323 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
324 |
NodeList children = node.getChildNodes(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
325 |
for (int i=0; i< children.getLength(); i++) { |
1134
081b99cb271a
bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents:
693
diff
changeset
|
326 |
getConfigsForNode(children.item(i), node); |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
327 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
328 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
329 |
} |
608
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
330 |
|
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
331 |
/** |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
332 |
* (Re-)scan the SBSv2 / Raptor configuration |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
333 |
* @return message if error, else null |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
334 |
*/ |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
335 |
public static String scanSBSv2() { |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
336 |
// do some basic checks |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
337 |
sbsHome = System.getenv(SBS_HOME); |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
338 |
if (sbsHome == null) { |
693
2d475d296af4
Look for sbs or sbs.bat under SBS_HOME/bin first, instead of only looking at the PATH.
Ed Swartz <ed.swartz@nokia.com>
parents:
629
diff
changeset
|
339 |
return Messages.getString("SBSv2Utils.DefineSBS_HOMEMessage"); //$NON-NLS-1$ |
608
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
340 |
} |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
341 |
|
693
2d475d296af4
Look for sbs or sbs.bat under SBS_HOME/bin first, instead of only looking at the PATH.
Ed Swartz <ed.swartz@nokia.com>
parents:
629
diff
changeset
|
342 |
IPath expectedPath = new Path(sbsHome).append("bin").append(sbsScriptName); |
2d475d296af4
Look for sbs or sbs.bat under SBS_HOME/bin first, instead of only looking at the PATH.
Ed Swartz <ed.swartz@nokia.com>
parents:
629
diff
changeset
|
343 |
if (expectedPath.toFile().exists()) { |
2d475d296af4
Look for sbs or sbs.bat under SBS_HOME/bin first, instead of only looking at the PATH.
Ed Swartz <ed.swartz@nokia.com>
parents:
629
diff
changeset
|
344 |
sbsPath = expectedPath; |
2d475d296af4
Look for sbs or sbs.bat under SBS_HOME/bin first, instead of only looking at the PATH.
Ed Swartz <ed.swartz@nokia.com>
parents:
629
diff
changeset
|
345 |
} else { |
2d475d296af4
Look for sbs or sbs.bat under SBS_HOME/bin first, instead of only looking at the PATH.
Ed Swartz <ed.swartz@nokia.com>
parents:
629
diff
changeset
|
346 |
sbsPath = HostOS.findProgramOnPath(sbsScriptName, null); |
2d475d296af4
Look for sbs or sbs.bat under SBS_HOME/bin first, instead of only looking at the PATH.
Ed Swartz <ed.swartz@nokia.com>
parents:
629
diff
changeset
|
347 |
if (sbsPath == null) { |
2d475d296af4
Look for sbs or sbs.bat under SBS_HOME/bin first, instead of only looking at the PATH.
Ed Swartz <ed.swartz@nokia.com>
parents:
629
diff
changeset
|
348 |
return MessageFormat.format( |
2d475d296af4
Look for sbs or sbs.bat under SBS_HOME/bin first, instead of only looking at the PATH.
Ed Swartz <ed.swartz@nokia.com>
parents:
629
diff
changeset
|
349 |
Messages.getString("SBSv2Utils.CannotFindSBSScriptError"), //$NON-NLS-1$ |
2d475d296af4
Look for sbs or sbs.bat under SBS_HOME/bin first, instead of only looking at the PATH.
Ed Swartz <ed.swartz@nokia.com>
parents:
629
diff
changeset
|
350 |
sbsScriptName); |
2d475d296af4
Look for sbs or sbs.bat under SBS_HOME/bin first, instead of only looking at the PATH.
Ed Swartz <ed.swartz@nokia.com>
parents:
629
diff
changeset
|
351 |
} |
608
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
352 |
} |
693
2d475d296af4
Look for sbs or sbs.bat under SBS_HOME/bin first, instead of only looking at the PATH.
Ed Swartz <ed.swartz@nokia.com>
parents:
629
diff
changeset
|
353 |
|
608
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
354 |
return null; |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
355 |
} |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
356 |
|
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
357 |
/** |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
358 |
* Get the path to SBSv2 (sbs.bat or sbs) |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
359 |
*/ |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
360 |
public static IPath getSBSPath() { |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
361 |
if (!scannedSbsState) { |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
362 |
scanSBSv2(); |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
363 |
scannedSbsState = true; |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
364 |
} |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
365 |
return sbsPath != null ? sbsPath : new Path(sbsScriptName); // dummy |
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
366 |
} |
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
|
367 |
|
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
|
368 |
private static List<ISymbianBuildContext> sortContexts(List<ISymbianBuildContext> contexts){ |
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
|
369 |
|
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
|
370 |
// 3 sorting stages to handle long Raptor aliases, and multiple aliases that have a similar platform and target prefix (e.g. armv5_urel) |
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
|
371 |
|
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
|
372 |
Collections.sort(contexts, new Comparator<ISymbianBuildContext>() { |
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
|
373 |
|
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
|
374 |
// First sort the target name (Debug / Release) and push Emulation to the top |
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
|
375 |
public int compare(ISymbianBuildContext o1, ISymbianBuildContext o2) { |
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
|
376 |
String sbsAlias1 = o1.getSBSv2Alias(); |
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
|
377 |
String sbsAlias2 = o2.getSBSv2Alias(); |
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
|
378 |
|
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
|
379 |
if (o1.getPlatformString().equals(o2.getPlatformString())) { |
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
|
380 |
if (o1.getSBSv2Alias().split("_").length == 2 && o2.getSBSv2Alias().split("_").length == 2) |
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
|
381 |
return o1.getTargetString().compareTo(o2.getTargetString()); |
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
|
382 |
else if (sbsAlias1.split("_").length >= 3 && sbsAlias1.split("_").length >= 3) |
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
|
383 |
return 1; |
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
|
384 |
} else { |
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
|
385 |
if (sbsAlias1.toUpperCase().startsWith(ISymbianBuildContext.EMULATOR_PLATFORM)) { |
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
|
386 |
return -1; |
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
|
387 |
}else if (sbsAlias2.toUpperCase().startsWith(ISymbianBuildContext.EMULATOR_PLATFORM)) { |
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
|
388 |
return 1; |
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
|
389 |
} |
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
|
390 |
} |
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
|
391 |
return sbsAlias1.compareTo(sbsAlias2); |
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
|
392 |
|
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
|
393 |
} |
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
|
394 |
|
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
|
395 |
}); |
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
|
396 |
|
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
|
397 |
// Sort long alias names |
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
|
398 |
Collections.sort(contexts, new Comparator<ISymbianBuildContext>() { |
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
|
399 |
|
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
|
400 |
public int compare(ISymbianBuildContext o1, ISymbianBuildContext o2) { |
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
|
401 |
String sbsAlias1 = o1.getSBSv2Alias(); |
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
|
402 |
String sbsAlias2 = o2.getSBSv2Alias(); |
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
|
403 |
|
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
|
404 |
if (sbsAlias1.split("_").length >= 3 && sbsAlias1.split("_").length >= 3 && !sbsAlias1.equals(sbsAlias2)){ |
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
|
405 |
String temp1[] = sbsAlias1.split("_"); |
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
|
406 |
String temp2[] = sbsAlias2.split("_"); |
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
|
407 |
String suffix1 = ""; |
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
|
408 |
String suffix2 = ""; |
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
|
409 |
for (int i = 2; i < temp1.length; i++){ |
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
|
410 |
suffix1 += temp1[i] + "_"; |
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
|
411 |
} |
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
|
412 |
|
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
|
413 |
for (int i = 2; i < temp2.length; i++){ |
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
|
414 |
suffix2 += temp2[i] + "_"; |
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
|
415 |
} |
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
|
416 |
|
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
|
417 |
return suffix1.compareTo(suffix2); |
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
|
418 |
} |
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
|
419 |
|
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
|
420 |
return 0; |
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
|
421 |
} |
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
|
422 |
}); |
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
|
423 |
|
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
|
424 |
// Sort the target string for long aliases |
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
|
425 |
Collections.sort(contexts, new Comparator<ISymbianBuildContext>() { |
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
|
426 |
|
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
|
427 |
public int compare(ISymbianBuildContext o1, ISymbianBuildContext o2) { |
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
|
428 |
String sbsAlias1 = o1.getSBSv2Alias(); |
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
|
429 |
String sbsAlias2 = o2.getSBSv2Alias(); |
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
|
430 |
String temp1[] = sbsAlias1.split("_"); |
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
|
431 |
String temp2[] = sbsAlias2.split("_"); |
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
|
432 |
String suffix1 = ""; |
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
|
433 |
String suffix2 = ""; |
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
|
434 |
for (int i = 2; i < temp1.length; i++){ |
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
|
435 |
suffix1 += temp1[i] + "_"; |
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
|
436 |
} |
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
|
437 |
|
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
|
438 |
for (int i = 2; i < temp2.length; i++){ |
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
|
439 |
suffix2 += temp2[i] + "_"; |
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
|
440 |
} |
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
|
441 |
|
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
|
442 |
if (sbsAlias1.split("_").length >= 3 && sbsAlias1.split("_").length >= 3 && suffix1.equals(suffix2)){ |
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
|
443 |
return o1.getTargetString().compareTo(o2.getTargetString()); |
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
|
444 |
} |
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
|
445 |
|
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
|
446 |
return 0; |
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
|
447 |
} |
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
|
448 |
}); |
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
|
449 |
|
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
|
450 |
return contexts; |
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
|
451 |
} |
608
d2a651a847a5
Initial work to support an ISDKManager implementation that only understands SBSv2 (meaning, no devices.xml support).
Ed Swartz <ed.swartz@nokia.com>
parents:
266
diff
changeset
|
452 |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
453 |
} |