コード例 #1
0
ファイル: BuildMeta.cs プロジェクト: Itay2805/TomatoBuild
        // TODO: JsonH looks promising to reduce some of the file size

        public static BuildMeta Load(Project project)
        {
            BuildMeta meta = new BuildMeta();

            string filemodifyjson = Path.Combine(project.output_folder, "tomatobuild.filemodify.json");

            if (File.Exists(filemodifyjson))
            {
                meta.lastModifyTable = JsonConvert.DeserializeObject <Dictionary <string, DateTime> >(File.ReadAllText(filemodifyjson));
            }

            return(meta);
        }
コード例 #2
0
        public void Init()
        {
            foreach (Task task in tasks)
            {
                foreach (var entry in variables)
                {
                    task.variables[entry.Key] = entry.Value;
                }
                foreach (var entry in enviroment)
                {
                    task.enviroment[entry.Key] = entry.Value;
                }
                task.variables["output_folder"] = output_folder;
                task.variables["input_folder"]  = input_folder;
                task.variables["project"]       = project;
                task.Init();
            }

            meta = BuildMeta.Load(this);
        }