示例#1
0
        protected override bool OnBuild(IProgressMonitor monitor, DeployContext ctx)
        {
            string   consMsg;
            IConsole cons;

            if (ExternalConsole)
            {
                cons    = ExternalConsoleFactory.Instance.CreateConsole(CloseConsoleWhenDone);
                consMsg = GettextCatalog.GetString("(in external terminal)");
            }
            else
            {
                cons    = new MonitorConsole(monitor);
                consMsg = "";
            }

            monitor.Log.WriteLine(GettextCatalog.GetString("Executing: {0} {1} {2}", Command, Arguments, consMsg));
            IProcessAsyncOperation process = Runtime.ProcessService.StartConsoleProcess(Command, Arguments, workingDirectory, cons, null);

            process.WaitForCompleted();

            if (cons is MonitorConsole)
            {
                ((MonitorConsole)cons).Dispose();
            }
            return(true);
        }
		protected override bool OnBuild (IProgressMonitor monitor, DeployContext ctx)
		{
			string consMsg;
			IConsole cons;
			if (ExternalConsole) {
				cons = ExternalConsoleFactory.Instance.CreateConsole (CloseConsoleWhenDone);
				consMsg = GettextCatalog.GetString ("(in external terminal)");
			} else {
				cons = new MonitorConsole (monitor);
				consMsg = "";
			}
			
			monitor.Log.WriteLine (GettextCatalog.GetString ("Executing: {0} {1} {2}", Command, Arguments, consMsg));
			IProcessAsyncOperation process = Runtime.ProcessService.StartConsoleProcess (Command, Arguments, workingDirectory, cons, null);
			
			process.WaitForCompleted ();
			
			if (cons is MonitorConsole) {
				((MonitorConsole)cons).Dispose ();
			}
			return true;
		}