Exemplo n.º 1
0
        public void GenerateScanDataFiles(IProgressStatus monitor, AddinRegistry registry, string scanFolder, bool recursive)
        {
            AddinRegistry reg = new AddinRegistry(registry.RegistryPath, registry.StartupDirectory, registry.DefaultAddinsFolder, registry.AddinCachePath);

            reg.CopyExtensionsFrom(registry);
            reg.GenerateScanDataFilesInProcess(monitor, scanFolder, recursive);
        }
Exemplo n.º 2
0
        public void PreScan(IProgressStatus monitor, string registryPath, string startupDir, string addinsDir, string databaseDir, string scanFolder, bool recursive)
        {
            AddinDatabase.RunningSetupProcess = true;
            AddinRegistry reg = new AddinRegistry(registryPath, startupDir, addinsDir, databaseDir);

            reg.GenerateScanDataFilesInProcess(monitor, scanFolder, recursive);
        }
Exemplo n.º 3
0
        public static int Main(string [] args)
        {
            ProcessProgressStatus monitor = new ProcessProgressStatus(int.Parse(args [0]));

            try {
                string registryPath = Console.In.ReadLine();
                string startupDir   = Console.In.ReadLine();
                string addinsDir    = Console.In.ReadLine();
                string databaseDir  = Console.In.ReadLine();

                AddinDatabase.RunningSetupProcess = true;
                AddinRegistry reg = new AddinRegistry(registryPath, startupDir, addinsDir, databaseDir);

                switch (args [1])
                {
                case "scan": {
                    string folder = args.Length > 2 ? args [2] : null;
                    if (folder.Length == 0)
                    {
                        folder = null;
                    }

                    var context = new ScanOptions();
                    context.Read(Console.In);
                    reg.ScanFolders(monitor, folder, context);
                    break;
                }

                case "pre-scan": {
                    string folder = args.Length > 2 ? args [2] : null;
                    if (folder.Length == 0)
                    {
                        folder = null;
                    }
                    var recursive = bool.Parse(Console.In.ReadLine());
                    reg.GenerateScanDataFilesInProcess(monitor, folder, recursive);
                    break;
                }

                case "get-desc":
                    var outFile = Console.In.ReadLine();
                    reg.ParseAddin(monitor, args [2], args [3]);
                    break;
                }
            } catch (Exception ex) {
                monitor.ReportError("Unexpected error in setup process", ex);
                return(1);
            }
            return(0);
        }