Exemple #1
0
        public InstalledModule(KSP ksp, Module module, IEnumerable <string> relative_files)
        {
            install_time    = DateTime.Now;
            source_module   = module;
            installed_files = new Dictionary <string, InstalledModuleFile>();

            foreach (string file in relative_files)
            {
                if (Path.IsPathRooted(file))
                {
                    throw new PathErrorKraken(file, "InstalledModule *must* have relative paths");
                }

                // IMF needs a KSP object so it can compute the SHA1.
                installed_files[file] = new InstalledModuleFile(file, ksp);
            }
        }
        public InstalledModule(GameInstance ksp, CkanModule module, IEnumerable <string> relative_files, bool autoInstalled)
        {
            install_time  = DateTime.Now;
            source_module = module;
            // We need case insensitive path matching on Windows
            installed_files = Platform.IsWindows
                ? new Dictionary <string, InstalledModuleFile>(StringComparer.OrdinalIgnoreCase)
                : new Dictionary <string, InstalledModuleFile>();
            auto_installed = autoInstalled;

            foreach (string file in relative_files)
            {
                if (Path.IsPathRooted(file))
                {
                    throw new PathErrorKraken(file, "InstalledModule *must* have relative paths");
                }

                // IMF needs a KSP object so it can compute the SHA1.
                installed_files[file] = new InstalledModuleFile(file, ksp);
            }
        }
Exemple #3
0
        public InstalledModule(KSP ksp, Module module, IEnumerable<string> relative_files)
        {
            install_time = DateTime.Now;
            source_module = module;
            installed_files = new Dictionary<string, InstalledModuleFile>();

            foreach (string file in relative_files)
            {
                if (Path.IsPathRooted(file))
                {
                    throw new PathErrorKraken(file, "InstalledModule *must* have relative paths");
                }

                // IMF needs a KSP object so it can compute the SHA1.
                installed_files[file] = new InstalledModuleFile(file, ksp);
            }
        }