public Process RunSpacer() { var exeFile = gothic.Version == Gothic.GameVersion.Gothic1 ? gothic.GetGameFile(Gothic.GameFile.SpacerExe) : gothic.GetGameFile(Gothic.GameFile.Spacer2Exe); if (Process.GetProcessesByName(Path.GetFileNameWithoutExtension(exeFile)).Length > 0) { Logger.Fatal("Spacer.Error.AlreadyRunning"); } ZSpy.Run(); ProcessStartInfo spacer = new ProcessStartInfo { FileName = exeFile, WindowStyle = ProcessWindowStyle.Maximized, }; spacer.Arguments = GetGothicArguments().ToString(); Logger.Detailed("Spacer.RunningWithParameters".Translate(spacer.Arguments)); if (Logger.Verbosity <= VerbosityLevel.Detailed) { Logger.Minimal("Spacer.Running".Translate()); } spacerProcess = new Process(); spacerProcess.StartInfo = spacer; spacerProcess.Start(); return(spacerProcess); }
protected void UpdateDialogs() { var gothicSrc = gothic.GetGameFile(Gothic.GameFile.GothicSrc); if (File.Exists(gothicSrc) == false) { Logger.Fatal("Config.Error.FileDidNotFound".Translate(gothicSrc)); } Logger.Minimal("ConvertingSubtitles".Translate()); var updater = new OutputUnitsUpdater.OutputUnitsUpdater ( gothicSrc, Path.Combine(gothic.GetGameDirectory(Gothic.GameDirectory.ScriptsCutscene), "OU.csl") ); try { updater.Update(); } catch (OutputUnitsUpdater.MatchingFilesNotFoundException ex) { Logger.Fatal("FoundNoMatchingFiles".Translate(ex.Line, ex.LineNumber)); } if (Program.Options.CommonTestBuildCompile.ShowDuplicatedSubtitles) { Logger.Normal("SearchingDuplicatedSubtitles".Translate()); var duplicated = updater.GetDuplicates(); if (duplicated.Count > 0) { Logger.Warn("FoundDuplicatedDialogs".Translate()); foreach (var duplicate in duplicated) { Logger.Warn("\t" + duplicate.Name); } } } }