|
Carbide.c++ | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nokia.carbide.cdt.builder.PKGViewPathHelper
public class PKGViewPathHelper
Helper to resolve paths used in pkg files.
When building a pkg file, you can pass a search directory to makesis (-d) and it will look for any files without paths in that search directory. Carbide also lets you specify macros in the PKG file that need to be expanded, e.g. $(EPOCROOT)
Constructor Summary | |
---|---|
PKGViewPathHelper(IPath pkgFilePath,
IPath epocRoot,
java.lang.String platform,
java.lang.String target)
Constructor for test purposes or for out-of-project experiences. |
|
PKGViewPathHelper(com.nokia.carbide.internal.api.cpp.epoc.engine.model.pkg.IPKGView view,
ICarbideBuildConfiguration buildConfig)
Construct an instance using the given PKG view, to provide the content search location. |
Method Summary | |
---|---|
IPath |
getAbsolutePathFromViewPath(IPath path)
Given a source install-file path from an IPKGInstallFile, convert it to an absolute file system path. |
IPath |
getMainDirectory()
Returns the main directory used as the basis for relative path lookups |
IPath |
getViewPathFromAbsolutePath(IPath path)
Converts an absolute path to a pkg view path. |
void |
setMainDirectory(IPath mainDirectory)
Sets the main directory to use as the basis for relative path lookups |
void |
setSISBuilderInfo(ISISBuilderInfo sisInfo)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PKGViewPathHelper(com.nokia.carbide.internal.api.cpp.epoc.engine.model.pkg.IPKGView view, ICarbideBuildConfiguration buildConfig)
view
- the non-null PKG view (does not take ownership)buildConfig
- the build configuration context. this will be used for expanding PKG macros
and obtaining the content search location, unless set frompublic PKGViewPathHelper(IPath pkgFilePath, IPath epocRoot, java.lang.String platform, java.lang.String target)
Method Detail |
---|
public void setSISBuilderInfo(ISISBuilderInfo sisInfo)
public IPath getMainDirectory()
public void setMainDirectory(IPath mainDirectory)
public IPath getAbsolutePathFromViewPath(IPath path)
Non-absolute paths will first try to be resolved relative to the pkg file directory. If the file
does not exist, we will try to resolve it relative to the search location (when available). If
still not found, the path will be returned relative to the pkg file location.
The content search location will be obtained from the ISISBuilderInfo. The ISISBuilderInfo set from
setSISBuilderInfo(ISISBuilderInfo)
will be used when set, otherwise the first ISISBuilderInfo
in the build configuration that matches the pkg file will be used.
Note that the makesis source code was examined to determine the search order, and it it looks relative to the pkg file directory before checking the search directory. It will of course bail though if either does not exist. Since this helper is not designed to check for the existence of the file, but rather to return the path where the file should be, there may be cases where we return the wrong file path.
path
- relative or absolute path from a IPKGInstallFile
public IPath getViewPathFromAbsolutePath(IPath path)
path
- absolute path
|
Carbide.c++ | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |