Beispiel #1
0
        private static void RunCommand()
        {
            if (!String.IsNullOrEmpty(Device) && !Device.Contains("All_iOS_On"))
            {
                Deployer.DeviceId = Device;
            }

            bool bResult = true;

            switch (Command)
            {
            case "backup":
                bResult = Deployer.BackupFiles(Bundle, FileList.ToArray());
                break;

            case "deploy":
                bResult = Deployer.InstallFilesOnDevice(Bundle, Manifest);
                break;

            case "install":
                bResult = Deployer.InstallIPAOnDevice(ipaPath);
                break;

            case "enumerate":
                Deployer.EnumerateConnectedDevices();
                break;
            }

            Program.ExitCode = bResult ? 0 : 1;
        }
Beispiel #2
0
        private static void RunCommand()
        {
            Deployer.DeviceId = Device;

            bool bResult = true;

            switch (Command)
            {
            case "backup":
                bResult = Deployer.BackupFiles(Bundle, FileList.ToArray());
                break;

            case "deploy":
                bResult = Deployer.InstallFilesOnDevice(Bundle, Manifest);
                break;

            case "install":
                bResult = Deployer.InstallIPAOnDevice(ipaPath);
                break;

            case "enumerate":
                Deployer.EnumerateConnectedDevices();
                break;

            case "listdevices":
                Deployer.ListDevices();
                break;

            case "listentodevice":
                Deployer.ListenToDevice(Device);
                break;
            }

            Program.ExitCode = bResult ? 0 : 1;
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            if ((args.Length == 2) && (args[0].Equals("-iphonepackager")))
            {
                // We were run as a 'child' process, quit when our 'parent' process exits
                // There is no parent-child relationship WRT windows, it's self-imposed.
                int ParentPID = int.Parse(args[1]);

                IpcServerChannel Channel = new IpcServerChannel("iPhonePackager");
                ChannelServices.RegisterChannel(Channel, false);
                RemotingConfiguration.RegisterWellKnownServiceType(typeof(DeploymentImplementation), "DeploymentServer_PID" + ParentPID.ToString(), WellKnownObjectMode.Singleton);

                Process ParentProcess = Process.GetProcessById(ParentPID);
                while (!ParentProcess.HasExited)
                {
                    System.Threading.Thread.Sleep(1000);
                }
            }
            else
            {
                // Run directly by some intrepid explorer
                Console.WriteLine("Note: This program should only be started by iPhonePackager");
                Console.WriteLine("  This program cannot be used on it's own.");

                DeploymentImplementation Deployer = new DeploymentImplementation();
                var DeviceList = Deployer.EnumerateConnectedDevices();
                foreach (var Device in DeviceList)
                {
                    Console.WriteLine("  - Found device named {0} of type {1} with UDID {2}", Device.DeviceName, Device.DeviceType, Device.UDID);
                }

                Console.WriteLine("Exiting.");
            }
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            if ((args.Length == 2) && (args[0].Equals("-iphonepackager")))
            {
                try
                {
                    // We were run as a 'child' process, quit when our 'parent' process exits
                    // There is no parent-child relationship WRT windows, it's self-imposed.
                    int ParentPID = int.Parse(args[1]);

                    IpcServerChannel Channel = new IpcServerChannel("iPhonePackager");
                    ChannelServices.RegisterChannel(Channel, false);
                    RemotingConfiguration.RegisterWellKnownServiceType(typeof(DeploymentImplementation), "DeploymentServer_PID" + ParentPID.ToString(), WellKnownObjectMode.Singleton);

                    Process ParentProcess = Process.GetProcessById(ParentPID);
                    while (!ParentProcess.HasExited)
                    {
                        System.Threading.Thread.Sleep(1000);
                    }
                }
                catch (System.Exception)
                {
                }
            }
            else
            {
                // Run directly by some intrepid explorer
                Console.WriteLine("Note: This program should only be started by iPhonePackager");
                Console.WriteLine("  This program cannot be used on it's own.");


                DeploymentImplementation Deployer = new DeploymentImplementation();
                var DeviceList = Deployer.EnumerateConnectedDevices();
                foreach (var Device in DeviceList)
                {
                    Console.WriteLine("  - Found device named {0} of type {1} with UDID {2}", Device.DeviceName, Device.DeviceType, Device.UDID);
                }

                Console.WriteLine("Exiting.");
            }
        }
 public ConnectedDeviceInfo[] EnumerateConnectedDevices()
 {
     return(Deployer.EnumerateConnectedDevices());
 }