//マージデータの作成を行う bool MargeAndUpdate() { string orignal = this.OrignalROMTextArea.Text; if (!File.Exists(orignal)) { return(false); } byte[] orignalBIN = File.ReadAllBytes(orignal); byte[] buildBIN = File.ReadAllBytes(this.EABuildROM_Filename); string skill_CustomBuildDirectory = Path.Combine(Program.BaseDirectory, "config", "patch2", "FE8U" , "skill_CustomBuild"); U.mkdir(skill_CustomBuildDirectory); U.CopyDirectory(Path.GetDirectoryName(ParentPatch.PatchFileName), skill_CustomBuildDirectory); U.DeleteFile(skill_CustomBuildDirectory, "0*.bin"); U.DeleteFile(skill_CustomBuildDirectory, "PATCH_*.txt"); //シンボル情報のコピー CopySYM(skill_CustomBuildDirectory); //他のバイナリファイルのコピー CopySomeDumpFiles(skill_CustomBuildDirectory); //ビルドしたROMとバニラを比較して、差分を作る string custombuild = Path.Combine(skill_CustomBuildDirectory, "PATCH_SkillSystem_CustomBuild.txt"); ToolDiffForm.MakeDiff(custombuild, orignalBIN, buildBIN, 10, true); //パッチテキストをマージする MargePatch(custombuild, ParentPatch.PatchFileName, U.atoh(TakeoverSkillAssignmentComboBox.Text)); //作成したパッチを読込み PatchForm.PatchSt newPatchSt = PatchForm.LoadPatch(custombuild, isScanOnly: false); //パッチアップデート PatchForm patchF = (PatchForm)InputFormRef.JumpForm <PatchForm>(); patchF.UpdatePatch(newPatchSt); return(true); }