public static void UpdateScripts(string responseFile, string sourceExtension) { if (!ScriptUpdatingManager.WaitForVCSServerConnection(true)) { return; } string str = !Provider.enabled ? "." : "Temp/ScriptUpdater/"; APIUpdaterHelper.RunUpdatingProgram("ScriptUpdater.exe", sourceExtension + " " + CommandLineFormatter.PrepareFileName(MonoInstallationFinder.GetFrameWorksFolder()) + " " + str + " " + responseFile); }
private static void RunUpdatingProgram(string executable, string arguments) { string executable2 = EditorApplication.applicationContentsPath + "/Tools/ScriptUpdater/" + executable; ManagedProgram managedProgram = new ManagedProgram(MonoInstallationFinder.GetMonoInstallation("MonoBleedingEdge"), "4.5", executable2, arguments, null); managedProgram.LogProcessStartInfo(); managedProgram.Start(); managedProgram.WaitForExit(); Console.WriteLine(string.Join(Environment.NewLine, managedProgram.GetStandardOutput())); APIUpdaterHelper.HandleUpdaterReturnValue(managedProgram); }
protected ManagedProgram StartCompiler(BuildTarget target, string compiler, List <string> arguments, bool setMonoEnvironmentVariables, string monodistro) { string text = CommandLineFormatter.GenerateResponseFile(arguments); if (this.runUpdater) { APIUpdaterHelper.UpdateScripts(text, this._island.GetExtensionOfSourceFiles()); } ManagedProgram managedProgram = new ManagedProgram(monodistro, this._island._classlib_profile, compiler, " @" + text, setMonoEnvironmentVariables, null); managedProgram.Start(); return(managedProgram); }
protected void RunAPIUpdaterIfRequired(string responseFile, IList <string> pathMappings) { if (!_runAPIUpdater) { return; } var pathMappingsFilePath = Path.GetTempFileName(); File.WriteAllLines(pathMappingsFilePath, pathMappings.ToArray()); APIUpdaterHelper.UpdateScripts(responseFile, _island.GetExtensionOfSourceFiles(), PrepareFileName(pathMappingsFilePath)); }
protected ManagedProgram StartCompiler(BuildTarget target, string compiler, List <string> arguments, bool setMonoEnvironmentVariables) { this.AddCustomResponseFileIfPresent(arguments, Path.GetFileNameWithoutExtension(compiler) + ".rsp"); string responseFile = CommandLineFormatter.GenerateResponseFile((IEnumerable <string>)arguments); if (this.runUpdater) { APIUpdaterHelper.UpdateScripts(responseFile, this._island.GetExtensionOfSourceFiles()); } ManagedProgram managedProgram = new ManagedProgram(MonoInstallationFinder.GetMonoInstallation(), this._island._classlib_profile, compiler, " @" + responseFile, setMonoEnvironmentVariables); managedProgram.Start(); return(managedProgram); }
private static void HandleUpdaterReturnValue(ManagedProgram program) { if (program.ExitCode == 0) { APIUpdaterHelper.UpdateFilesInVCIfNeeded(); return; } ScriptUpdatingManager.ReportExpectedUpdateFailure(); if (program.ExitCode > 0) { APIUpdaterHelper.ReportAPIUpdaterFailure(program.GetErrorOutput()); } else { APIUpdaterHelper.ReportAPIUpdaterCrash(program.GetErrorOutput()); } }
public static void UpdateScripts(string responseFile, string sourceExtension) { if (ScriptUpdatingManager.WaitForVCSServerConnection(true)) { string text = (!Provider.enabled) ? "." : "Temp/ScriptUpdater/"; APIUpdaterHelper.RunUpdatingProgram("ScriptUpdater.exe", string.Concat(new string[] { sourceExtension, " ", CommandLineFormatter.PrepareFileName(MonoInstallationFinder.GetFrameWorksFolder()), " ", text, " ", responseFile })); } }
private static void RunUpdatingProgram(string executable, string arguments) { string executable2 = EditorApplication.applicationContentsPath + "/Tools/ScriptUpdater/" + executable; ManagedProgram managedProgram = new ManagedProgram(MonoInstallationFinder.GetMonoInstallation("MonoBleedingEdge"), "4.5", executable2, arguments); managedProgram.LogProcessStartInfo(); managedProgram.Start(); managedProgram.WaitForExit(); Console.WriteLine(string.Join(Environment.NewLine, managedProgram.GetStandardOutput())); if (managedProgram.ExitCode == 0) { APIUpdaterHelper.UpdateFilesInVCIfNeeded(); } else { APIUpdaterHelper.ReportAPIUpdaterFailure(managedProgram.GetErrorOutput()); } }
private static void HandleUpdaterReturnValue(ManagedProgram program) { if (program.ExitCode == 0) { Console.WriteLine(string.Join(Environment.NewLine, program.GetErrorOutput())); APIUpdaterHelper.UpdateFilesInVCIfNeeded(); } else { ScriptUpdatingManager.ReportExpectedUpdateFailure(); if (program.ExitCode > 0) { APIUpdaterHelper.ReportAPIUpdaterFailure(program.GetErrorOutput()); } else { APIUpdaterHelper.ReportAPIUpdaterCrash(program.GetErrorOutput()); } } }