static bool ProcCommandLine() { if (ArgsDic.ContainsKey("--lint")) {//コマンドラインLint Program.IsCommandLine = true; Environment.Exit(ToolFELintForm.CommandLineLint()); return(true); } if (ArgsDic.ContainsKey("--rebuild")) {//コマンドラインrebuild Program.IsCommandLine = true; Environment.Exit(ToolROMRebuildForm.ComandLineRebuild()); return(true); } if (ArgsDic.ContainsKey("--pointercalc")) {//ポインタ変換 Program.IsCommandLine = true; Environment.Exit(PointerToolForm.ComandLineSearch()); return(true); } if (ArgsDic.ContainsKey("--translate")) {//ROM翻訳の実行 Program.IsCommandLine = true; Environment.Exit(ToolTranslateROMForm.CommandLineTranslate()); return(true); } if (ArgsDic.ContainsKey("--makeups")) {//UPSの作成 Program.IsCommandLine = true; Environment.Exit(ToolUPSPatchSimpleForm.CommandLineMakeUPS()); return(true); } if (ArgsDic.ContainsKey("--songexchange")) {//曲交換 Program.IsCommandLine = true; Environment.Exit(SongExchangeForm.CommandLineImport()); return(true); } #if DEBUG //デバッグの場合はテストを実行 DebugTESTRunner(); if (ArgsDic.ContainsKey("--translate_batch")) {//翻訳を自動実行 DevTranslateForm.CommandLineTranslateOnly(); } if (ArgsDic.ContainsKey("--testonly")) { //フルテストの場合、終了する. Environment.Exit(0); return(true); } #endif return(false); }
public static int CommandLineTranslate() { U.echo("CommandLineTranslate"); ToolTranslateROMForm f = (ToolTranslateROMForm)InputFormRef.JumpFormLow <ToolTranslateROMForm>(); f.OnLoad(new EventArgs()); string fromrom = U.at(Program.ArgsDic, "--fromrom"); if (fromrom != "") { f.SimpleTranslateFromROMFilename.Text = fromrom; f.TranslateFormROMFilename.Text = fromrom; } string torom = U.at(Program.ArgsDic, "--torom"); if (torom != "") { f.SimpleTranslateToROMFilename.Text = torom; f.TranslateToROMFilename.Text = torom; f.FontROMTextBox.Text = torom; } if (Program.ArgsDic.ContainsKey("--importfont")) { string to = U.InnerSplit(f.Translate_to.Text, "=", 0); ToolTranslateROM trans = new ToolTranslateROM(); trans.ApplyTranslatePatch(to); f.tabControl1.SelectedIndex = 1; f.ImportFontButton_Click(f, new EventArgs()); } else { string text = U.at(Program.ArgsDic, "--text"); if (text != "") { f.SimpleTranslateToTranslateDataFilename.Text = text; } f.SimpleFireButton_Click(f, new EventArgs()); } if (Program.ROM.Modified) { MainFormUtil.SaveForce(f); } return(0); }