Dispose() public method

public Dispose ( ) : void
return void
Ejemplo n.º 1
0
 private static string ExecuteSystemProcess(string command, string args, string workingdir, bool displayProgress, string progressTitle, string progressInfo)
 {
     if (displayProgress)
     {
         EditorUtility.DisplayCancelableProgressBar(progressTitle, progressInfo, 0.25f);
     }
     ProcessStartInfo si = new ProcessStartInfo {
         FileName = command,
         Arguments = args,
         WorkingDirectory = workingdir,
         CreateNoWindow = true,
         UseShellExecute = true
     };
     Program program = new Program(si);
     program.Start();
     while (!program.WaitForExit(100))
     {
     }
     string str = StringConcat(program.GetStandardOutput()) + StringConcat(program.GetErrorOutput());
     program.Dispose();
     UnityEngine.Debug.Log(command + " " + args + "\n" + str);
     if (displayProgress)
     {
         EditorUtility.ClearProgressBar();
     }
     return str;
 }
 internal static string ExecuteSystemProcess(string command, string args, string workingdir)
 {
     ProcessStartInfo si = new ProcessStartInfo {
         FileName = command,
         Arguments = args,
         WorkingDirectory = workingdir,
         CreateNoWindow = true
     };
     Program program = new Program(si);
     program.Start();
     while (!program.WaitForExit(100))
     {
     }
     string standardOutputAsString = program.GetStandardOutputAsString();
     program.Dispose();
     return standardOutputAsString;
 }
 public void PostProcess(BuildPostProcessArgs args)
 {
     base.m_PostProcessArgs = args;
     AssemblyReferenceChecker checker = new AssemblyReferenceChecker();
     checker.CollectReferences(args.stagingAreaDataManaged, false, 0f, true);
     bool flag = !string.IsNullOrEmpty(checker.WhoReferencesClass("UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform", true));
     this.SaveEditorOnlyPlayerSettingsToPlist();
     base.PostProcess();
     if (flag)
     {
         if (Application.platform != RuntimePlatform.OSXEditor)
         {
             UnityEngine.Debug.LogWarning("OS X Standalone players with GameCenter support need to be built on an OS X machine in order to pass Mac App Store validation.");
         }
         else
         {
             Console.WriteLine("Adding GameKit linkage to OS X binary.");
             ProcessStartInfo info2 = new ProcessStartInfo {
                 FileName = Path.Combine(BuildPipeline.GetPlaybackEngineDirectory(args.target, args.options), "optool")
             };
             string[] textArray1 = new string[] { "install -c weak -p /System/Library/Frameworks/GameKit.framework/Versions/A/GameKit -t \"", this.m_PostProcessArgs.installPath, "/Contents/MacOS/", this.InstallNameWithoutExtension, "\"" };
             info2.Arguments = string.Concat(textArray1);
             info2.CreateNoWindow = true;
             ProcessStartInfo si = info2;
             Program program = new Program(si);
             program.Start();
             while (!program.WaitForExit(100))
             {
             }
             if (program.ExitCode != 0)
             {
                 UnityEngine.Debug.LogError("Running optool to link GameKit failed\n" + si.FileName + " " + si.Arguments + "\n" + program.GetAllOutput());
             }
             program.Dispose();
         }
     }
 }