Пример #1
0
        private static List <String> GetDiskNames(string platform, string infFilePath, ref String sdn)
        {
            List <String> sourceDisksNames = IniFileUtils.GetKeys(infFilePath, sdn);

            if (sourceDisksNames.Count == 0)
            {
                sdn = INF_SourceDisksNames;
                sourceDisksNames.AddRange(IniFileUtils.GetKeys(infFilePath, sdn));
            }

            return(sourceDisksNames);
        }
Пример #2
0
        private static List <String> GetDriverFiles(string platform, string infFilePath, ref String sdf)
        {
            List <String> driverFiles = IniFileUtils.GetKeys(infFilePath, sdf);

            if (driverFiles.Count == 0)
            {
                sdf = INF_SourceDisksFiles;
                driverFiles.AddRange(IniFileUtils.GetKeys(infFilePath, sdf));
            }

            return(driverFiles);
        }
Пример #3
0
        private static List <String> GetSearchDirs(string infFilePath)
        {
            List <String> destinationDirs = IniFileUtils.GetKeys(infFilePath, INF_DestinationDirs);

            List <String> searchDirs = new List <String>();

            foreach (String dir in destinationDirs)
            {
                var dirVal = IniFileUtils.GetValue(infFilePath, INF_DestinationDirs, dir).Split(',');
                var dirid  = int.Parse(dirVal[0]);

                var searchDir = IniFileUtils.ResolveDirId(dirid);
                if (dirVal.Length > 1)
                {
                    searchDir += "\\" + dirVal[1].Trim();
                }

                searchDirs.Add(searchDir);
            }

            return(searchDirs);
        }