/// <summary> /// Starts build. /// </summary> public override void Start() { DateTime startTime = TimeHelper.Now; runHooks(HookType.Pre, HookEvent.AssetsMerge); new Merge(gothic, Merge.MergeOptions.All).MergeAssets(); runHooks(HookType.Post, HookEvent.AssetsMerge); if (Program.Options.CommonTestBuildCompile.NoUpdateSubtitles == false) { runHooks(HookType.Pre, HookEvent.SubtitlesUpdate); UpdateDialogs(); runHooks(HookType.Post, HookEvent.SubtitlesUpdate); } compilingAssetsWatcher.Start(); ZSpy.Run(); gothic.Start(GetGothicArguments()).WaitForExit(); ZSpy.Abort(); compilingAssetsWatcher.Stop(); new VDF(gothic).RunBuilder(); Logger.Minimal("CompletedIn".Translate((TimeHelper.Now - startTime).Minutes, (TimeHelper.Now - startTime).Seconds)); }
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); }
/// <summary> /// Starts test. /// </summary> public override void Start() { DetectIfWorldIsNotExists(); if (Program.Options.CommonTestCompile.Merge != Merge.MergeOptions.None) { runHooks(HookType.Pre, HookEvent.AssetsMerge); new Merge(gothic, Program.Options.CommonTestCompile.Merge).MergeAssets(); runHooks(HookType.Post, HookEvent.AssetsMerge); } if ((Program.Options.CommonTestCompile.Merge == Merge.MergeOptions.All) || (Program.Options.CommonTestCompile.Merge.HasFlag(Merge.MergeOptions.Scripts))) { if (Program.Options.CommonTestBuildCompile.NoUpdateSubtitles == false) { runHooks(HookType.Pre, HookEvent.SubtitlesUpdate); UpdateDialogs(); runHooks(HookType.Post, HookEvent.SubtitlesUpdate); } } Logger.SetOnFatalEvent(() => { gothic.Dispose(); }); if (Mode == TestMode.Full) { gothic.DisableVdfs(); } compilingAssetsWatcher.Start(); ZSpy.Run(); gothic.Start(GetGothicArguments()).WaitForExit(); assetsCompiled = true; if (Mode == TestMode.Full) { gothic.EnableVdfs(); gothic.Start(GetGothicArguments()).WaitForExit(); } ZSpy.Abort(); compilingAssetsWatcher.Stop(); }
/// <summary> /// Starts compilation. /// </summary> public override void Start() { DateTime startTime = TimeHelper.Now; if (Program.Options.CommonTestCompile.Merge != Merge.MergeOptions.None) { runHooks(HookType.Pre, HookEvent.AssetsMerge); new Merge(gothic, Program.Options.CommonTestCompile.Merge).MergeAssets(); runHooks(HookType.Post, HookEvent.AssetsMerge); } if ((Program.Options.CommonTestCompile.Merge == Merge.MergeOptions.All) || (Program.Options.CommonTestCompile.Merge.HasFlag(Merge.MergeOptions.Scripts))) { if (Program.Options.CommonTestBuildCompile.NoUpdateSubtitles == false) { runHooks(HookType.Pre, HookEvent.SubtitlesUpdate); UpdateDialogs(); runHooks(HookType.Post, HookEvent.SubtitlesUpdate); } } Logger.SetOnFatalEvent(() => { gothic.Dispose(); }); if (Mode == CompileMode.Full) { gothic.DisableVdfs(); } compilingAssetsWatcher.Start(); ZSpy.Run(); gothic.Start(GetGothicArguments()).WaitForExit(); ZSpy.Abort(); compilingAssetsWatcher.Stop(); Logger.Minimal("CompletedIn".Translate((TimeHelper.Now - startTime).Minutes, (TimeHelper.Now - startTime).Seconds)); }
public void Start() { RunSpacer().WaitForExit(); ZSpy.Abort(); }