author | timkelly |
Thu, 26 Aug 2010 09:57:08 -0500 | |
changeset 1892 | 2009dcd074b0 |
parent 1871 | 4d38e1ac1cff |
child 1984 | 0dc4caef98fa |
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.sdk.core.model; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
14 |
|
1418
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
15 |
import java.io.File; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
16 |
import java.io.FileReader; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
17 |
import java.io.IOException; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
18 |
import java.io.Reader; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
19 |
import java.util.HashMap; |
1434 | 20 |
import java.util.HashSet; |
1418
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
21 |
import java.util.Map; |
1434 | 22 |
import java.util.Set; |
1418
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
23 |
|
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
24 |
import javax.xml.XMLConstants; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
25 |
import javax.xml.parsers.DocumentBuilder; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
26 |
import javax.xml.parsers.DocumentBuilderFactory; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
27 |
import javax.xml.parsers.ParserConfigurationException; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
28 |
import javax.xml.transform.Source; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
29 |
import javax.xml.transform.TransformerException; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
30 |
import javax.xml.transform.stream.StreamSource; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
31 |
import javax.xml.validation.Schema; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
32 |
import javax.xml.validation.SchemaFactory; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
33 |
import javax.xml.validation.Validator; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
34 |
|
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
35 |
import org.eclipse.core.resources.ResourcesPlugin; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
36 |
import org.eclipse.core.runtime.IPath; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
37 |
import org.eclipse.core.runtime.IStatus; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
38 |
import org.eclipse.core.runtime.Path; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
39 |
import org.eclipse.core.runtime.Status; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
40 |
import org.osgi.framework.Version; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
41 |
import org.w3c.dom.Document; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
42 |
import org.w3c.dom.NamedNodeMap; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
43 |
import org.w3c.dom.Node; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
44 |
import org.w3c.dom.traversal.NodeIterator; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
45 |
import org.xml.sax.SAXException; |
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
46 |
|
1434 | 47 |
import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildInfo; |
48 |
import com.nokia.carbide.cpp.internal.api.sdk.ISymbianSDKModifier; |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
49 |
import com.nokia.carbide.cpp.internal.sdk.core.gen.Devices.DeviceType; |
1434 | 50 |
import com.nokia.carbide.cpp.sdk.core.ISDKBuildInfo; |
51 |
import com.nokia.carbide.cpp.sdk.core.ISymbianBuilderID; |
|
1418
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
52 |
import com.nokia.carbide.cpp.sdk.core.ISymbianSDK; |
1434 | 53 |
import com.nokia.carbide.cpp.sdk.core.ISymbianSDKFeatures; |
1418
8ca7cf978139
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
timkelly
parents:
1410
diff
changeset
|
54 |
import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin; |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
55 |
import com.sun.org.apache.xpath.internal.XPathAPI; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
56 |
|
1434 | 57 |
public class SymbianSDK implements ISymbianSDK, ISymbianSDKModifier { |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
58 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
59 |
public static final String MANIFEST_XML_LOCATION = "/epoc32/kit/manifest.xml"; //$NON-NLS-1$ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
60 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
61 |
// manifest.xml attributes |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
62 |
private static final String PATH_ID_INCLUDEDIR = "includeDir"; //$NON-NLS-1$ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
63 |
private static final String PATH_ID_TOOLSDIR = "toolsDir"; //$NON-NLS-1$ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
64 |
private static final String PATH_ID_SRCDIR = "srcDir"; //$NON-NLS-1$ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
65 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
66 |
private static final String RELEASE = "release"; //$NON-NLS-1$ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
67 |
private static final String BUILD_INFO_TXT_FILE = "epoc32/data/buildinfo.txt"; //$NON-NLS-1$ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
68 |
private static final String BUILD_INFO_KEYWORD = "ManufacturerSoftwareBuild"; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
69 |
|
610
bfb3ab3f70f2
Initial round of Unix portability fixes (using HostOS class), and fixes to EPOC engine unit tests.
Ed Swartz <ed.swartz@nokia.com>
parents:
343
diff
changeset
|
70 |
private static final String WINSCW_UREL_DIR = "epoc32/release/winscw/urel"; |
1666
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
71 |
private static final String WINSCW_UDEB_DIR = "epoc32/release/winscw/udeb"; |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
72 |
private static final String ARMV5_UDEB_DIR = "epoc32/release/armv5/udeb"; |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
73 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
74 |
protected DeviceType deviceEntry = null; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
75 |
private boolean enabled = true; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
76 |
private Version osVersion; |
1434 | 77 |
private Map<String, ISDKBuildInfo> buildInfoMap = new HashMap<String, ISDKBuildInfo>(); |
1462 | 78 |
private Map<String, File> prefixFileMap = new HashMap<String, File>(); |
1666
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
79 |
private Set<Object> sdkFeatures = new HashSet<Object>(); |
0
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 |
public SymbianSDK(DeviceType device) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
82 |
deviceEntry = device; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
83 |
scanSDK(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
84 |
} |
1462 | 85 |
|
86 |
public void addSupportedFeature(Object feature) { |
|
87 |
sdkFeatures.add(feature); |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
88 |
} |
1462 | 89 |
|
90 |
public ISDKBuildInfo getBuildInfo(String builderId) { |
|
91 |
ISDKBuildInfo buildInfo = buildInfoMap.get(builderId); |
|
1695
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
92 |
if (buildInfo == null) { |
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
93 |
if (builderId.equals(ISymbianBuilderID.SBSV1_BUILDER)) { |
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
94 |
buildInfo = createSBSv1BuildInfo(); |
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
95 |
} else if (builderId.equals(ISymbianBuilderID.SBSV2_BUILDER)) { |
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
96 |
buildInfo = createSBSv2BuildInfo(); |
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
97 |
} |
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
98 |
} |
1462 | 99 |
return buildInfo; |
100 |
} |
|
101 |
||
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
102 |
public String getEPOCROOT() { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
103 |
if (deviceEntry != null) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
104 |
String epocRoot = deviceEntry.getEpocroot(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
105 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
106 |
if (epocRoot.length() > 2 && epocRoot.substring(1, 2).equals(":")){ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
107 |
// make sure it's a full windows path... |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
108 |
File resolvedEPOCROOT = new File(epocRoot); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
109 |
try { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
110 |
// canonicalize the path so the case is correct |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
111 |
// for URI lookups (e.g. for prebuilt indexes) |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
112 |
resolvedEPOCROOT = resolvedEPOCROOT.getCanonicalFile(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
113 |
epocRoot = resolvedEPOCROOT.toString(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
114 |
} catch (IOException e) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
115 |
// ignored... |
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 |
int len = epocRoot.length(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
120 |
if (len > 0 && epocRoot.charAt(len-1) != '\\' && epocRoot.charAt(len-1) != '/'){ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
121 |
epocRoot += File.separator; |
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 |
return epocRoot; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
125 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
126 |
return ""; |
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 |
|
1462 | 129 |
public IPath getIncludePath() { |
130 |
String epocRoot = getEPOCROOT(); |
|
131 |
if (epocRoot.length() > 0) { |
|
132 |
IPath epoc32IncPath = new Path(epocRoot).append("epoc32/include"); |
|
133 |
// try to canonicalize it so it matches actual file system case |
|
134 |
try { |
|
135 |
epoc32IncPath = new Path(epoc32IncPath.toFile().getCanonicalPath()); |
|
136 |
} catch (IOException e) { |
|
137 |
} |
|
138 |
return epoc32IncPath; |
|
139 |
} |
|
140 |
return null; |
|
141 |
} |
|
142 |
||
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
143 |
public Version getOSVersion() { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
144 |
if (osVersion == null){ |
1675 | 145 |
return new Version("9.5"); |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
146 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
147 |
return osVersion; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
148 |
} |
1462 | 149 |
|
1771
bd45dfd2e7ee
Remove ISymbianSDK#getPrefixFile. You can get this from ISDKBuildInfo#getPrefixFromVariantCfg().
timkelly
parents:
1736
diff
changeset
|
150 |
// public File getPrefixFile(String builderId) { |
bd45dfd2e7ee
Remove ISymbianSDK#getPrefixFile. You can get this from ISDKBuildInfo#getPrefixFromVariantCfg().
timkelly
parents:
1736
diff
changeset
|
151 |
// File prefixFile = prefixFileMap.get(builderId); |
bd45dfd2e7ee
Remove ISymbianSDK#getPrefixFile. You can get this from ISDKBuildInfo#getPrefixFromVariantCfg().
timkelly
parents:
1736
diff
changeset
|
152 |
// if (prefixFile == null) { |
bd45dfd2e7ee
Remove ISymbianSDK#getPrefixFile. You can get this from ISDKBuildInfo#getPrefixFromVariantCfg().
timkelly
parents:
1736
diff
changeset
|
153 |
// ISDKBuildInfo buildInfo = getBuildInfo(builderId); |
bd45dfd2e7ee
Remove ISymbianSDK#getPrefixFile. You can get this from ISDKBuildInfo#getPrefixFromVariantCfg().
timkelly
parents:
1736
diff
changeset
|
154 |
// if (buildInfo != null) { |
bd45dfd2e7ee
Remove ISymbianSDK#getPrefixFile. You can get this from ISDKBuildInfo#getPrefixFromVariantCfg().
timkelly
parents:
1736
diff
changeset
|
155 |
// IPath prefixFilePath = buildInfo.getPrefixFromVariantCfg(); |
bd45dfd2e7ee
Remove ISymbianSDK#getPrefixFile. You can get this from ISDKBuildInfo#getPrefixFromVariantCfg().
timkelly
parents:
1736
diff
changeset
|
156 |
// if (prefixFilePath != null) { |
bd45dfd2e7ee
Remove ISymbianSDK#getPrefixFile. You can get this from ISDKBuildInfo#getPrefixFromVariantCfg().
timkelly
parents:
1736
diff
changeset
|
157 |
// prefixFile = prefixFilePath.toFile(); |
bd45dfd2e7ee
Remove ISymbianSDK#getPrefixFile. You can get this from ISDKBuildInfo#getPrefixFromVariantCfg().
timkelly
parents:
1736
diff
changeset
|
158 |
// setPrefixFile(prefixFilePath, builderId); |
bd45dfd2e7ee
Remove ISymbianSDK#getPrefixFile. You can get this from ISDKBuildInfo#getPrefixFromVariantCfg().
timkelly
parents:
1736
diff
changeset
|
159 |
// } |
bd45dfd2e7ee
Remove ISymbianSDK#getPrefixFile. You can get this from ISDKBuildInfo#getPrefixFromVariantCfg().
timkelly
parents:
1736
diff
changeset
|
160 |
// } |
bd45dfd2e7ee
Remove ISymbianSDK#getPrefixFile. You can get this from ISDKBuildInfo#getPrefixFromVariantCfg().
timkelly
parents:
1736
diff
changeset
|
161 |
// } |
bd45dfd2e7ee
Remove ISymbianSDK#getPrefixFile. You can get this from ISDKBuildInfo#getPrefixFromVariantCfg().
timkelly
parents:
1736
diff
changeset
|
162 |
// return prefixFile; |
bd45dfd2e7ee
Remove ISymbianSDK#getPrefixFile. You can get this from ISDKBuildInfo#getPrefixFromVariantCfg().
timkelly
parents:
1736
diff
changeset
|
163 |
// } |
1462 | 164 |
|
165 |
public IPath getReleaseRoot() { |
|
166 |
String epocRoot = getEPOCROOT(); |
|
167 |
if (epocRoot.length() > 0) { |
|
168 |
IPath epoc32RelPath = new Path(epocRoot).append("epoc32/release"); |
|
169 |
// try to canonicalize it so it matches actual file system case |
|
170 |
try { |
|
171 |
epoc32RelPath = new Path(epoc32RelPath.toFile().getCanonicalPath()); |
|
172 |
} catch (IOException e) { |
|
173 |
} |
|
174 |
return epoc32RelPath; |
|
175 |
} |
|
176 |
return null; |
|
177 |
} |
|
178 |
||
179 |
@SuppressWarnings("rawtypes") |
|
180 |
public Set getSupportedFeatures() { |
|
181 |
return sdkFeatures; |
|
182 |
} |
|
183 |
||
184 |
public IPath getToolsPath() { |
|
185 |
String epocRoot = getEPOCROOT(); |
|
186 |
if (epocRoot.length() > 0) { |
|
187 |
IPath epoc32ToolsPath = new Path(epocRoot).append("epoc32/tools"); |
|
188 |
// try to canonicalize it so it matches actual file system case |
|
189 |
try { |
|
190 |
epoc32ToolsPath = new Path(epoc32ToolsPath.toFile().getCanonicalPath()); |
|
191 |
} catch (IOException e) { |
|
192 |
} |
|
193 |
return epoc32ToolsPath; |
|
194 |
} |
|
195 |
return null; |
|
0
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 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
198 |
public String getUniqueId() { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
199 |
if (deviceEntry != null) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
200 |
return deviceEntry.getId(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
201 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
202 |
return ""; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
203 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
204 |
|
1736
ba74c19c6de3
fix bug 11762. Fix targettypes for MMP editor to retrieve properly depending on whether build config is SBsv1 or SBSv2.
timkelly
parents:
1710
diff
changeset
|
205 |
|
1434 | 206 |
|
1462 | 207 |
public boolean isEnabled() { |
208 |
if (!SDKCorePlugin.SUPPORTS_SBSV1_BUILDER && |
|
209 |
(getOSVersion().getMajor() < 9 || |
|
210 |
(getOSVersion().getMajor() == 9 && getOSVersion().getMinor() <= 4))){ |
|
211 |
return false; |
|
212 |
} |
|
213 |
return enabled; |
|
214 |
} |
|
215 |
||
216 |
/** |
|
217 |
* Remove single line C-style comments, multi-line C++-style comments and blank lines |
|
218 |
*/ |
|
219 |
public static String removeComments(String aIntermediateContent) { |
|
220 |
// Strip out comments. There are uncovered cases here where this regex approach fails |
|
221 |
// when combining cpp and c style comments. |
|
222 |
String lNewline = "(\\r\\n|\\r|\\n)"; |
|
223 |
||
224 |
// Note: we used to use the regex below for cpp comments (from http://ostermiller.org/findcomment.html ) |
|
225 |
// String lCppStyleComments = "/\\*(?:.|[\\n\\r])*?\\*/"; |
|
226 |
// but it throws StackOverFlowExceptions for large inputs |
|
227 |
// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5050507 |
|
228 |
// suggests that regex OR is the cause - therefore use dotall mode: (?s) instead |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
229 |
|
1462 | 230 |
String lCStyleComments = "(?m)//(.*)$"; |
231 |
String lCppStyleComments = "(?s)/\\*.*?\\*/"; |
|
232 |
String lBlankLines = "(?m)(^(\\s)*$"+lNewline+")+"; |
|
233 |
aIntermediateContent = aIntermediateContent.replaceAll(lCStyleComments, ""); |
|
234 |
aIntermediateContent = aIntermediateContent.replaceAll(lCppStyleComments, ""); |
|
235 |
aIntermediateContent = aIntermediateContent.replaceAll(lBlankLines,""); |
|
236 |
return aIntermediateContent; |
|
237 |
} |
|
238 |
||
239 |
public void scanSDK(){ |
|
240 |
ISBSv1BuildInfo sbsv1BuildInfo = (ISBSv1BuildInfo)getBuildInfo(ISymbianBuilderID.SBSV1_BUILDER); |
|
241 |
||
242 |
sbsv1BuildInfo.clearPlatformMacros(); |
|
243 |
||
244 |
if (!setDataFromManifestXML()){ |
|
1695
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
245 |
//need to scan SDK files for OS version |
1462 | 246 |
scanSDKForVersionInfo(); |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
247 |
} |
1462 | 248 |
|
249 |
setSupportFeatures(); |
|
250 |
} |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
251 |
|
1462 | 252 |
public void setBuildInfo(ISDKBuildInfo buildInfo, String builderId) { |
253 |
buildInfoMap.put(builderId, buildInfo); |
|
254 |
} |
|
255 |
||
256 |
public void setEnabled(boolean enable) { |
|
257 |
enabled = enable; |
|
258 |
} |
|
259 |
||
260 |
public void setEPOCROOT(String epocRoot) { |
|
261 |
deviceEntry.setEpocroot(epocRoot); |
|
262 |
} |
|
263 |
||
264 |
public void setName(String name) { |
|
265 |
if (deviceEntry != null) { |
|
266 |
deviceEntry.setName(name); |
|
267 |
} |
|
268 |
} |
|
269 |
||
270 |
public void setOSVersion(Version osVer) { |
|
271 |
this.osVersion = osVer; |
|
0
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 |
|
1462 | 274 |
public void setPrefixFile(IPath prefixFile, String builderId) { |
1463
c435b58e283f
fix NPE for finding variant.cfg when EPOCROOT does not exist
timkelly
parents:
1462
diff
changeset
|
275 |
if (prefixFile == null) |
c435b58e283f
fix NPE for finding variant.cfg when EPOCROOT does not exist
timkelly
parents:
1462
diff
changeset
|
276 |
return; |
1695
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
277 |
File file = prefixFile.toFile(); |
1462 | 278 |
prefixFileMap.put(builderId, file); |
279 |
} |
|
280 |
||
281 |
public void setUniqueId(String id) { |
|
282 |
deviceEntry.setId(id); |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
283 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
284 |
|
1462 | 285 |
/* (non-Javadoc) |
286 |
* @see java.lang.Object#toString() |
|
287 |
*/ |
|
288 |
@Override |
|
289 |
public String toString() { |
|
290 |
return getUniqueId(); |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
291 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
292 |
|
1695
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
293 |
private SBSv1BuildInfo createSBSv1BuildInfo() { |
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
294 |
SBSv1BuildInfo buildInfo = new SBSv1BuildInfo(this); |
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
295 |
setBuildInfo(buildInfo, ISymbianBuilderID.SBSV1_BUILDER); |
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
296 |
return buildInfo; |
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
297 |
} |
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
298 |
|
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
299 |
private SBSv2BuildInfo createSBSv2BuildInfo() { |
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
300 |
SBSv2BuildInfo buildInfo = new SBSv2BuildInfo(this); |
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
301 |
setBuildInfo(buildInfo, ISymbianBuilderID.SBSV2_BUILDER); |
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
302 |
return buildInfo; |
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
303 |
} |
176858b7f249
Create buildinfo and prefix file on demand to improve performance.
stechong
parents:
1675
diff
changeset
|
304 |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
305 |
private boolean hasManifestXML(){ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
306 |
File manifestXML = new File(deviceEntry.getEpocroot(), MANIFEST_XML_LOCATION); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
307 |
if (manifestXML.exists()){ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
308 |
return true; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
309 |
} else { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
310 |
return false; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
311 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
312 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
313 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
314 |
/** |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
315 |
* Parses the epoc32\kit\manifest.xml file and add the relavant SDK information |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
316 |
* For a manifest to be properly mapped you need at minimum: epocRoot, id, and label filled out. |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
317 |
*/ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
318 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
319 |
private boolean processManifest(File manifestFile){ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
320 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
321 |
boolean hasParseError = false; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
322 |
Document doc = null; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
323 |
// XML Valiation code from: http://java.sun.com/developer/technicalArticles/xml/validationxpath/ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
324 |
try { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
325 |
|
1434 | 326 |
// Parse an XML document into a DOM tree. |
327 |
DocumentBuilder parser = |
|
328 |
DocumentBuilderFactory.newInstance().newDocumentBuilder(); |
|
329 |
doc = parser.parse(manifestFile); |
|
330 |
||
331 |
// Create a SchemaFactory capable of understanding WXS schemas. |
|
332 |
SchemaFactory factory = |
|
333 |
SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); |
|
334 |
||
335 |
// Load a WXS schema, represented by a Schema instance. |
|
336 |
String tempStr = manifestFile.getAbsolutePath(); |
|
337 |
int index = tempStr.lastIndexOf(File.separator); |
|
338 |
tempStr = tempStr.substring(0, index); |
|
339 |
tempStr += File.separator + "sdkManifest.xsd"; |
|
340 |
Source schemaFile = new StreamSource(new File(tempStr)); |
|
341 |
Schema schema = factory.newSchema(schemaFile); |
|
342 |
||
343 |
// Create a Validator object, which can be used to validate |
|
344 |
// an instance document. |
|
345 |
Validator validator = schema.newValidator(); |
|
346 |
||
347 |
// Validate the DOM tree. |
|
348 |
// Don't use new DOMSource(doc) for manifest, that requires namespace |
|
349 |
// and some (e.g. S60) manifest.xml says xsi:noNamespaceSchemaLocation. |
|
350 |
// Failure will show in Java 6 |
|
351 |
// see detail in XERCESJ-1163 boog report |
|
352 |
// http://issues.apache.org/jira/browse/XERCESJ-1163?page=all |
|
353 |
validator.validate(new StreamSource(manifestFile)); |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
354 |
|
1434 | 355 |
} catch (ParserConfigurationException e) { |
356 |
ResourcesPlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, SDKCorePlugin.getPluginId(), IStatus.ERROR, "SDK Manifest could not be parsed correctly.", e)); |
|
357 |
hasParseError = true; |
|
358 |
} catch (SAXException e) { |
|
359 |
ResourcesPlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, SDKCorePlugin.getPluginId(), IStatus.ERROR, "SDK Manifest failed schema validation.", e)); |
|
360 |
hasParseError = true; |
|
361 |
// exception handling - document not valid! |
|
362 |
} catch (IOException e) { |
|
363 |
// This SDK has not manifest, don't post error |
|
364 |
hasParseError = true; |
|
365 |
} |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
366 |
|
1434 | 367 |
// if there were any parse errors, throw an exception so that suitable defaults |
368 |
// can be calculated from the devices.xml entry. |
|
369 |
if (hasParseError) { |
|
370 |
return false; |
|
371 |
} |
|
372 |
||
373 |
try { |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
374 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
375 |
Node node = XPathAPI.selectSingleNode(doc, "sdk/paths"); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
376 |
for (NodeIterator nodeIter = XPathAPI.selectNodeIterator(doc, "sdk"); (node = nodeIter.nextNode()) != null;) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
377 |
NamedNodeMap attribs = node.getAttributes(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
378 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
379 |
node = XPathAPI.selectSingleNode(doc, "sdk/paths/@root"); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
380 |
String path = node == null ? null : node.getNodeValue(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
381 |
if (null != path) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
382 |
// make sure EPOCROOT is terminated with a path delimiter |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
383 |
if (!path.endsWith(File.separator)) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
384 |
path += File.separator; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
385 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
386 |
// EPOCROOT is currently ignored. |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
387 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
388 |
for (NodeIterator pathsNodeIter = XPathAPI.selectNodeIterator(doc, "sdk/paths/root"); (node = pathsNodeIter.nextNode()) != null;) |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
389 |
{ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
390 |
// Loop through the sdk:paths:root elements and pick out check all the 'id' attriutes for matches... |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
391 |
attribs = node.getAttributes(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
392 |
String rootType = attribs.getNamedItem("id").getNodeValue(); |
1434 | 393 |
if (rootType.equals(PATH_ID_INCLUDEDIR)) { |
394 |
node = attribs.getNamedItem("path"); |
|
395 |
/*if (null!=node){ |
|
396 |
setIncludePath(new Path(path + node.getNodeName())); |
|
397 |
}*/ |
|
398 |
} else if (rootType.equals(RELEASE)) { |
|
399 |
node = attribs.getNamedItem("path"); |
|
400 |
/*if (null!=node){ |
|
401 |
setReleaseRoot(new Path(path + node.getNodeName())); |
|
402 |
}*/ |
|
403 |
} else if (rootType.equals(PATH_ID_TOOLSDIR)) { |
|
404 |
node = attribs.getNamedItem("path"); |
|
405 |
/*if (null!=node){ |
|
406 |
setToolsPath(new Path(path + node.getNodeName())); |
|
407 |
}*/ |
|
408 |
} else if (rootType.equals(PATH_ID_SRCDIR)) { |
|
409 |
node = attribs.getNamedItem("path"); |
|
410 |
/*if (null!=node){ |
|
411 |
setSourcePath(new Path(path + node.getNodeName())); |
|
412 |
}*/ |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
413 |
} |
1434 | 414 |
} |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
415 |
} |
1434 | 416 |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
417 |
// Get the osInfo |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
418 |
node = XPathAPI.selectSingleNode(doc, "sdk/osInfo"); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
419 |
if (null != node){ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
420 |
attribs = node.getAttributes(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
421 |
node = attribs.getNamedItem("version"); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
422 |
if (null != node) |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
423 |
{ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
424 |
try { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
425 |
setOSVersion(new Version(node.getNodeValue())); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
426 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
427 |
catch (IllegalArgumentException e){ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
428 |
// ignored...improper format |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
429 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
430 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
431 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
432 |
|
1462 | 433 |
// Get the SDK Version... |
434 |
node = XPathAPI.selectSingleNode(doc, "sdk/sdkVersion"); |
|
435 |
if (null != node) { |
|
436 |
try { |
|
1667
352fb86872dd
remove ISymbianSDK: getSDKVersion(), getName() and related methods.
timkelly
parents:
1666
diff
changeset
|
437 |
// ignored |
1434 | 438 |
} |
1462 | 439 |
catch (IllegalArgumentException e){ |
440 |
// ignored...improper format |
|
441 |
} |
|
442 |
} |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
443 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
444 |
} catch (TransformerException e){ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
445 |
e.printStackTrace(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
446 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
447 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
448 |
return true; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
449 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
450 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
451 |
/** |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
452 |
* Scans the SDK's epoc32\data\buildinfo.txt file and tries to build the Version |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
453 |
* and branch identifiers. This should not be called when a manifest.xml file exits |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
454 |
* |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
455 |
*/ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
456 |
private void scanSDKForVersionInfo(){ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
457 |
File epocRoot = new File(getEPOCROOT()); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
458 |
File bldInfoFile = new File(epocRoot, BUILD_INFO_TXT_FILE); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
459 |
if (!bldInfoFile.exists()) |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
460 |
return; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
461 |
|
1410
575de035cb1e
fix bug 11353 (uncaught exception when parsing version info from buildinfo.txt)
timkelly
parents:
1371
diff
changeset
|
462 |
if (getOSVersion().getMajor() == 0) |
575de035cb1e
fix bug 11353 (uncaught exception when parsing version info from buildinfo.txt)
timkelly
parents:
1371
diff
changeset
|
463 |
setOSVersion(new Version("9.5.0")); // Set a default version that will work with all EKA2 |
575de035cb1e
fix bug 11353 (uncaught exception when parsing version info from buildinfo.txt)
timkelly
parents:
1371
diff
changeset
|
464 |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
465 |
try { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
466 |
char[] cbuf = new char[(int) bldInfoFile.length()]; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
467 |
Reader reader = new FileReader(bldInfoFile); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
468 |
reader.read(cbuf); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
469 |
reader.close(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
470 |
String[] lines = new String(cbuf).split("\r|\r\n|\n"); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
471 |
for (int i = 0; i < lines.length; i++) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
472 |
// skip comments and blank lines |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
473 |
String line = removeComments(lines[i]); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
474 |
if (line.matches("\\s*#.*") || line.trim().length() == 0) |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
475 |
continue; |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
476 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
477 |
line = line.trim(); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
478 |
if (line.startsWith(BUILD_INFO_KEYWORD)){ |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
479 |
String[] versionTokens = line.split(" "); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
480 |
if (versionTokens.length == 3){ |
1410
575de035cb1e
fix bug 11353 (uncaught exception when parsing version info from buildinfo.txt)
timkelly
parents:
1371
diff
changeset
|
481 |
|
575de035cb1e
fix bug 11353 (uncaught exception when parsing version info from buildinfo.txt)
timkelly
parents:
1371
diff
changeset
|
482 |
if (versionTokens[2].toUpperCase().contains("TB92SF")){ |
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:
874
diff
changeset
|
483 |
setOSVersion(new Version("9.5.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:
874
diff
changeset
|
484 |
break; |
1410
575de035cb1e
fix bug 11353 (uncaught exception when parsing version info from buildinfo.txt)
timkelly
parents:
1371
diff
changeset
|
485 |
} else if (versionTokens[2].toUpperCase().contains("TB101SF")){ |
575de035cb1e
fix bug 11353 (uncaught exception when parsing version info from buildinfo.txt)
timkelly
parents:
1371
diff
changeset
|
486 |
setOSVersion(new Version("9.6.0")); |
575de035cb1e
fix bug 11353 (uncaught exception when parsing version info from buildinfo.txt)
timkelly
parents:
1371
diff
changeset
|
487 |
break; |
575de035cb1e
fix bug 11353 (uncaught exception when parsing version info from buildinfo.txt)
timkelly
parents:
1371
diff
changeset
|
488 |
} else if (versionTokens[2].toUpperCase().contains("TB102SF")){ |
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:
874
diff
changeset
|
489 |
setOSVersion(new Version("9.6.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:
874
diff
changeset
|
490 |
break; |
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:
874
diff
changeset
|
491 |
} |
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:
874
diff
changeset
|
492 |
else if (versionTokens[2].lastIndexOf("v") > 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:
874
diff
changeset
|
493 |
int index = versionTokens[2].lastIndexOf("v"); |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
494 |
String osVersionString = versionTokens[2].substring(index+1, versionTokens[2].length()); |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
495 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
496 |
// Set the version, split on alphanumeric to get rid of any junk at the end |
1410
575de035cb1e
fix bug 11353 (uncaught exception when parsing version info from buildinfo.txt)
timkelly
parents:
1371
diff
changeset
|
497 |
String[] tempStr = osVersionString.split("[a-zA-Z_]"); |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
498 |
if (tempStr.length != 0){ |
1410
575de035cb1e
fix bug 11353 (uncaught exception when parsing version info from buildinfo.txt)
timkelly
parents:
1371
diff
changeset
|
499 |
try { |
575de035cb1e
fix bug 11353 (uncaught exception when parsing version info from buildinfo.txt)
timkelly
parents:
1371
diff
changeset
|
500 |
setOSVersion(Version.parseVersion(tempStr[0])); |
575de035cb1e
fix bug 11353 (uncaught exception when parsing version info from buildinfo.txt)
timkelly
parents:
1371
diff
changeset
|
501 |
} catch (Exception e) { |
575de035cb1e
fix bug 11353 (uncaught exception when parsing version info from buildinfo.txt)
timkelly
parents:
1371
diff
changeset
|
502 |
// ignore, default version already set |
575de035cb1e
fix bug 11353 (uncaught exception when parsing version info from buildinfo.txt)
timkelly
parents:
1371
diff
changeset
|
503 |
// just catch exception so we move along to the next SDK |
575de035cb1e
fix bug 11353 (uncaught exception when parsing version info from buildinfo.txt)
timkelly
parents:
1371
diff
changeset
|
504 |
} |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
505 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
506 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
507 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
508 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
509 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
510 |
} catch (IOException e) { |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
511 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
512 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
513 |
|
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
514 |
} |
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
515 |
|
1462 | 516 |
private boolean setDataFromManifestXML(){ |
517 |
if (hasManifestXML()){ |
|
518 |
||
519 |
if (processManifest(new File(deviceEntry.getEpocroot(), MANIFEST_XML_LOCATION))){ |
|
520 |
return true; |
|
521 |
} else { |
|
522 |
return false; |
|
523 |
} |
|
524 |
||
525 |
} else { |
|
526 |
return false; |
|
527 |
} |
|
231
4885a40e8b9b
fix bug 9032. Only scan SDKs for plugins once for an IDE configuration lifetime.
timkelly
parents:
189
diff
changeset
|
528 |
} |
4885a40e8b9b
fix bug 9032. Only scan SDKs for plugins once for an IDE configuration lifetime.
timkelly
parents:
189
diff
changeset
|
529 |
|
1434 | 530 |
private void setSupportFeatures() { |
531 |
scanForWINSCW_UREL(); |
|
1861
b068cf1b44ee
Added ISymbianSDKFeatures#IS_WINSCW_UDEB_SUPPORTED.
stechong
parents:
1779
diff
changeset
|
532 |
scanForWINSCW_UDEB(); |
1666
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
533 |
scanForAvkon(); |
1462 | 534 |
sdkFeatures.add(ISymbianSDKFeatures.IS_EKA2); |
1434 | 535 |
} |
536 |
||
1666
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
537 |
/** |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
538 |
* Check if avkon is a supported feature. |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
539 |
*/ |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
540 |
private void scanForAvkon() { |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
541 |
String armv5UDEBFullPathStr = getEPOCROOT(); |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
542 |
armv5UDEBFullPathStr += ARMV5_UDEB_DIR; |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
543 |
IPath armv5UDEBPath = new Path(armv5UDEBFullPathStr); |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
544 |
if (armv5UDEBPath != null && armv5UDEBPath.toFile().exists()){ |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
545 |
if (armv5UDEBPath.append("avkon.dll").toFile().exists()){ |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
546 |
sdkFeatures.add(ISymbianSDKFeatures.IS_AVKON_SUPPORTED); |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
547 |
return; |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
548 |
} |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
549 |
// not there, check winscw |
1892 | 550 |
String winscwUDEBFullPathStr = getEPOCROOT(); |
551 |
winscwUDEBFullPathStr += WINSCW_UDEB_DIR; |
|
552 |
IPath winscwURELPath = new Path(winscwUDEBFullPathStr); |
|
1666
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
553 |
if (winscwURELPath != null && winscwURELPath.toFile().exists()){ |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
554 |
if (winscwURELPath.append("avkon.dll").toFile().exists()){ |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
555 |
sdkFeatures.add(ISymbianSDKFeatures.IS_AVKON_SUPPORTED); |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
556 |
return; |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
557 |
} |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
558 |
} |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
559 |
} |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
560 |
} |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
561 |
|
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
562 |
/** |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
563 |
* Check to see whether or not we should support WINSCW UREL |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
564 |
*/ |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
565 |
private void scanForWINSCW_UREL(){ |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
566 |
String winscwURELFullPathStr = getEPOCROOT(); |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
567 |
winscwURELFullPathStr += WINSCW_UREL_DIR; |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
568 |
IPath winscwURELPath = new Path(winscwURELFullPathStr); |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
569 |
if (winscwURELPath != null && winscwURELPath.toFile().exists()){ |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
570 |
if (winscwURELPath.append("epoc.exe").toFile().exists()){ |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
571 |
if (winscwURELPath.append("euser.dll").toFile().exists()){ |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
572 |
sdkFeatures.add(ISymbianSDKFeatures.IS_WINSCW_UREL_SUPPORTED); |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
573 |
} |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
574 |
} |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
575 |
} |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
576 |
} |
5243d04d3917
fix 11553. For project template filtering, use feature fags. No longer us OS/SDK version or name attribute.
timkelly
parents:
1621
diff
changeset
|
577 |
|
1861
b068cf1b44ee
Added ISymbianSDKFeatures#IS_WINSCW_UDEB_SUPPORTED.
stechong
parents:
1779
diff
changeset
|
578 |
/** |
b068cf1b44ee
Added ISymbianSDKFeatures#IS_WINSCW_UDEB_SUPPORTED.
stechong
parents:
1779
diff
changeset
|
579 |
* Check to see whether or not we should support WINSCW UDEB |
b068cf1b44ee
Added ISymbianSDKFeatures#IS_WINSCW_UDEB_SUPPORTED.
stechong
parents:
1779
diff
changeset
|
580 |
*/ |
b068cf1b44ee
Added ISymbianSDKFeatures#IS_WINSCW_UDEB_SUPPORTED.
stechong
parents:
1779
diff
changeset
|
581 |
private void scanForWINSCW_UDEB(){ |
b068cf1b44ee
Added ISymbianSDKFeatures#IS_WINSCW_UDEB_SUPPORTED.
stechong
parents:
1779
diff
changeset
|
582 |
String winscwURELFullPathStr = getEPOCROOT(); |
b068cf1b44ee
Added ISymbianSDKFeatures#IS_WINSCW_UDEB_SUPPORTED.
stechong
parents:
1779
diff
changeset
|
583 |
winscwURELFullPathStr += WINSCW_UDEB_DIR; |
b068cf1b44ee
Added ISymbianSDKFeatures#IS_WINSCW_UDEB_SUPPORTED.
stechong
parents:
1779
diff
changeset
|
584 |
IPath winscwURELPath = new Path(winscwURELFullPathStr); |
b068cf1b44ee
Added ISymbianSDKFeatures#IS_WINSCW_UDEB_SUPPORTED.
stechong
parents:
1779
diff
changeset
|
585 |
if (winscwURELPath != null && winscwURELPath.toFile().exists()){ |
b068cf1b44ee
Added ISymbianSDKFeatures#IS_WINSCW_UDEB_SUPPORTED.
stechong
parents:
1779
diff
changeset
|
586 |
if (winscwURELPath.append("epoc.exe").toFile().exists()){ |
b068cf1b44ee
Added ISymbianSDKFeatures#IS_WINSCW_UDEB_SUPPORTED.
stechong
parents:
1779
diff
changeset
|
587 |
if (winscwURELPath.append("euser.dll").toFile().exists()){ |
b068cf1b44ee
Added ISymbianSDKFeatures#IS_WINSCW_UDEB_SUPPORTED.
stechong
parents:
1779
diff
changeset
|
588 |
sdkFeatures.add(ISymbianSDKFeatures.IS_WINSCW_UDEB_SUPPORTED); |
b068cf1b44ee
Added ISymbianSDKFeatures#IS_WINSCW_UDEB_SUPPORTED.
stechong
parents:
1779
diff
changeset
|
589 |
} |
b068cf1b44ee
Added ISymbianSDKFeatures#IS_WINSCW_UDEB_SUPPORTED.
stechong
parents:
1779
diff
changeset
|
590 |
} |
b068cf1b44ee
Added ISymbianSDKFeatures#IS_WINSCW_UDEB_SUPPORTED.
stechong
parents:
1779
diff
changeset
|
591 |
} |
b068cf1b44ee
Added ISymbianSDKFeatures#IS_WINSCW_UDEB_SUPPORTED.
stechong
parents:
1779
diff
changeset
|
592 |
} |
b068cf1b44ee
Added ISymbianSDKFeatures#IS_WINSCW_UDEB_SUPPORTED.
stechong
parents:
1779
diff
changeset
|
593 |
|
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
594 |
} |