public IProcessAsyncOperation Execute(ExecutionCommand command, IConsole console)
        {
            var cmd          = (MeeGoExecutionCommand)command;
            var targetDevice = MeeGoDevice.GetChosenDevice();

            if (targetDevice == null)
            {
                return(new NullProcessAsyncOperation(false));
            }

            //if (MeeGoUtility.NeedsUploading (cmd.Config)) {
            MeeGoUtility.Upload(targetDevice, cmd.Config, console.Out, console.Error).WaitForCompleted();
            //}

            var auth = GetGdmXAuth(targetDevice);

            if (auth == null)
            {
                console.Error.WriteLine("Could not obtain single X authority for user '" + targetDevice.Username + "'");
                return(new NullProcessAsyncOperation(false));
            }

            var proc = CreateProcess(cmd, null, targetDevice, auth, console.Out.Write, console.Error.Write);

            proc.Run();
            return(proc);
        }
示例#2
0
        public DebuggerStartInfo CreateDebuggerStartInfo(ExecutionCommand command)
        {
            var cmd = (MeeGoExecutionCommand)command;

            var debuggerAddress = Dns.GetHostEntry(Dns.GetHostName()).AddressList[0];
            int debuggerPort    = 10000;

            var dev       = MeeGoDevice.GetChosenDevice();
            var startInfo = new MeeGoSoftDebuggerStartInfo(debuggerAddress, debuggerPort, cmd, dev);

            startInfo.SetUserAssemblies(cmd.UserAssemblyPaths);
            return(startInfo);
        }