Exemplo n.º 1
0
        public void FindDependenciesRecursive(LayerList registryLayers)
        {
            foreach (var section in _slice.Sections.Where(s => s.SectionType == SliceSection.Type.DEP))
            {
                foreach (var line in section.Lines)
                {
                    var semName = new SemName(line);
                    var dep = registryLayers.FindLayer(semName.NamePart);
                    if (dep != null)
                    {
                        Dependencies.Add(dep);
                        dep.FindDependenciesRecursive(registryLayers);
                    }
                }
            }

            if (Dependencies.Count == 0)
            {
                foreach (var section in _slice.Sections.Where(s => s.SectionType == SliceSection.Type.OS))
                {
                    foreach (var line in section.Lines)
                    {
                        var semName = new SemName(line);
                        if (semName.NamePart != Name)
                        {
                            var os = registryLayers.FindLayer(semName.NamePart);
                            if (os != null)
                            {
                                Dependencies.Add(os);
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Found requested layers
        /// </summary>
        /// <param name="layerList"></param>
        protected virtual void ReportFoundRequested(LayerList layerList)
        {
            var foundLayers = new List <Layer>();

            foreach (var info in layerList.LayerInfos)
            {
                var layer = layerList.FindLayer(info);
                if (!(layer is MissingLayer))
                {
                    foundLayers.Add(layer);
                }
            }
            Console.WriteLine();
            if (foundLayers.Count == 0)
            {
                Console.WriteLine("Found Requested: None");
            }
            else
            {
                Console.WriteLine("Found Requested:");
                foreach (var layer in foundLayers)
                {
                    Console.WriteLine(layer.Slice.RelPath);
                }
            }
        }
Exemplo n.º 3
0
Arquivo: Make.cs Projeto: waybuild/wb
        public virtual Layer MakeLayer()
        {
            var layerParams = Args.GetLayerParams();
            var osParam = Args.GetOsParam();

            var list = new List<Slice>();

            var dirList = new SliceDirectoryList(Args.SlicesDir);
            dirList.ForEach(dir => list.AddRange(dir.FindByOs(osParam)));

            var layers = new LayerList(list);
            var layer = layers.FindLayer(layerParams[0]); //todo: check layer found and has good dependencies
            return layer;
        }
Exemplo n.º 4
0
        public virtual void FindDependenciesRecursive(LayerList layerList)
        {
            foreach (var depInfo in Slice.DepInfos)
            {
                var layer = layerList.FindLayer(depInfo);
                if (!Dependencies.Contains(layer))
                    Dependencies.Add(layer);
            }

            foreach (var dep in Dependencies)
            {
                dep.FindDependenciesRecursive(layerList);
            }
        }
Exemplo n.º 5
0
        public virtual Layer MakeLayer()
        {
            var layerParams = Args.GetLayerParams();
            var osParam     = Args.GetOsParam();

            var list = new List <Slice>();

            var dirList = new SliceDirectoryList(Args.SlicesDir);

            dirList.ForEach(dir => list.AddRange(dir.FindByOs(osParam)));

            var layers = new LayerList(list);
            var layer  = layers.FindLayer(layerParams[0]); //todo: check layer found and has good dependencies

            return(layer);
        }
Exemplo n.º 6
0
 /// <summary>
 /// Found requested layers
 /// </summary>
 /// <param name="layerList"></param>
 protected virtual void ReportFoundRequested(LayerList layerList)
 {
     var foundLayers = new List<Layer>();
     foreach (var info in layerList.LayerInfos)
     {
         var layer = layerList.FindLayer(info);
         if (!(layer is MissingLayer))
             foundLayers.Add(layer);
     }
     Console.WriteLine();
     if (foundLayers.Count == 0)
     {
         Console.WriteLine("Found Requested: None");
     }
     else
     {
         Console.WriteLine("Found Requested:");
         foreach (var layer in foundLayers)
         {
             Console.WriteLine(layer.Slice.RelPath);
         }
     }
 }