Exemplo n.º 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);
            }
        }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 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);
            }
        }