Exemplo n.º 1
0
 def __init__(self, config: Config, defaultPackageLanguage: int) -> None:
     super().__init__(config, FakeXmlElementFactory.CreateWithName("FakeGenFile", "FSLBUILD_INVALID_INITIAL_VALUE"), SubPackageSupportConfig(PackageType.TopLevel, SubPackageSupport.Disabled))
     self.SourceFilename = None # type: Optional[str]
     self.SourceFileHash = ""   # type: str
     self.Name = ''
     self.ShortName = None  # type: Optional[str]
     self.Namespace = None  # type: Optional[str]
     self.PackageFile = None # type: Optional[PackageFile]
     self.PackageLocation = None  # type: Optional[ToolConfigPackageLocation]
     self.Type = PackageType.Library
     self.IsVirtual = False
     self.DirectDependencies = []  # type: List[XmlGenFileDependency]
     self.DirectRequirements = []  # type: List[XmlGenFileRequirement]
     self.DirectDefines = []
     self.DirectExperimentalRecipe = None    # type: Optional[XmlExperimentalRecipe]
     self.Platforms = {}  # type: Dict[str, XmlGenFilePlatform]
     self.IncludePath = None  # type: Optional[PackagePath]
     self.SourcePath = None  # type: Optional[PackagePath]
     self.ContentPath = None  # type: Optional[PackagePath]
     self.ContentSourcePath = None  # type: Optional[PackagePath]
     self.PackageLanguage = defaultPackageLanguage
     self.BaseIncludePath = "include"
     self.BaseSourcePath = "source"
     self.BuildCustomization = {}  # type: Dict[str, XmlGenFileBuildCustomization]
     self.CompanyName = "NotDefined"
     self.CreationYear = None  # type: Optional[str]
     self.TemplateType = ""
     self.AllowCheck = True
     self.EnableExtendedSourceExtensions = False
     self.AllowCombinedDirectory = False
     self.PackageNameBasedIncludePath = True
     self.PlatformDefaultSupportedValue = True
     self.SystemDefaultValues = LocalPackageDefaultValues()
     self.UnitTest = False
     self.ShowInMainReadme = True
Exemplo n.º 2
0
 def __init__(self, log: Log, platformName: str,
              defaultValues: LocalPackageDefaultValues,
              subPackageSupport: SubPackageSupportConfig) -> None:
     fakeXmlElement = FakeXmlElementFactory.CreateWithName(
         "Platform", platformName)
     super().__init__(log, fakeXmlElement, defaultValues, [], [], [], None,
                      subPackageSupport)
def _LoadPackageConfigurations(log: Log, projectElem: ET.Element, filename: str) -> List[XmlConfigPackageConfiguration]:
    xmlPackageConfigurations = LoadUtil.XMLLoadPackageConfiguration(log, projectElem, filename)
    for entry in xmlPackageConfigurations:
        # if no locations has been supplied then we assume the root folder of the project file
        #if entry.Name == 'default' and len(entry.Locations) <= 0:
        if len(entry.Locations) <= 0:
            xmlConfigPackageLocation = XmlConfigPackageLocation(log, FakeXmlElementFactory.CreateWithName("PackageLocation", MagicStrings.ProjectRoot))
            entry.Locations = [xmlConfigPackageLocation]
    return xmlPackageConfigurations
Exemplo n.º 4
0
    def __init__(self, log: Log, name: str, scanMethod: Optional[int] = None, blacklist: Optional[List[str]] = None) -> None:
        xmlAttribs = {'Name': name}
        if scanMethod is not None:
            xmlAttribs['ScanMethod'] = ScanMethod.ToString(scanMethod)
        xmlElement = FakeXmlElementFactory.Create("PackageLocation", xmlAttribs)
        if blacklist is not None:
            for blacklistEntry in blacklist:
                xmlBlacklistElement = FakeXmlElementFactory.CreateWithName("Blacklist", blacklistEntry)
                xmlElement.append(xmlBlacklistElement)

        super().__init__(log, xmlElement)