public AndroidLaunchOptions(MICore.Xml.LaunchOptions.AndroidLaunchOptions xmlOptions, TargetEngine targetEngine) { if (xmlOptions == null) { throw new ArgumentNullException("xmlOptions"); } this.Package = LaunchOptions.RequireAttribute(xmlOptions.Package, "Package"); this.IsAttach = xmlOptions.Attach; if (!IsAttach) { // LaunchActivity is only required when we're launching this.LaunchActivity = LaunchOptions.RequireAttribute(xmlOptions.LaunchActivity, "LaunchActivity"); } this.SDKRoot = GetOptionalDirectoryAttribute(xmlOptions.SDKRoot, "SDKRoot"); this.NDKRoot = GetOptionalDirectoryAttribute(xmlOptions.NDKRoot, "NDKRoot"); this.TargetArchitecture = LaunchOptions.ConvertTargetArchitectureAttribute(xmlOptions.TargetArchitecture); if (targetEngine == TargetEngine.Native) { this.IntermediateDirectory = RequireValidDirectoryAttribute(xmlOptions.IntermediateDirectory, "IntermediateDirectory"); } else { this.IntermediateDirectory = GetOptionalDirectoryAttribute(xmlOptions.IntermediateDirectory, "IntermediateDirectory"); } if (targetEngine == TargetEngine.Java) { this.JVMHost = LaunchOptions.RequireAttribute(xmlOptions.JVMHost, "JVMHost"); this.JVMPort = xmlOptions.JVMPort; this.SourceRoots = GetSourceRoots(xmlOptions.SourceRoots); foreach (SourceRoot root in this.SourceRoots) { EnsureValidDirectory(root.Path, "SourceRoots"); } } this.AdditionalSOLibSearchPath = xmlOptions.AdditionalSOLibSearchPath; this.AbsolutePrefixSOLibSearchPath = xmlOptions.AbsolutePrefixSOLibSearchPath ?? "\"\""; this.DeviceId = LaunchOptions.RequireAttribute(xmlOptions.DeviceId, "DeviceId"); this.LogcatServiceId = GetLogcatServiceIdAttribute(xmlOptions.LogcatServiceId); this.WaitDynamicLibLoad = xmlOptions.WaitDynamicLibLoad; CheckTargetArchitectureSupported(); }
public IOSLaunchOptions(string exePath, MICore.Xml.LaunchOptions.IOSLaunchOptions xmlOptions) { if (string.IsNullOrEmpty(exePath)) { throw new ArgumentNullException("exePath"); } if (xmlOptions == null) { throw new ArgumentNullException("xmlOptions"); } this.ExePath = exePath; this.RemoteMachineName = LaunchOptions.RequireAttribute(xmlOptions.RemoteMachineName, "RemoteMachineName"); this.PackageId = LaunchOptions.RequireAttribute(xmlOptions.PackageId, "PackageId"); this.VcRemotePort = LaunchOptions.RequirePortAttribute(xmlOptions.vcremotePort, "vcremotePort"); Debug.Assert((uint)IOSDebugTarget.Device == (uint)MICore.Xml.LaunchOptions.IOSLaunchOptionsIOSDebugTarget.Device); Debug.Assert((uint)IOSDebugTarget.Simulator == (uint)MICore.Xml.LaunchOptions.IOSLaunchOptionsIOSDebugTarget.Simulator); this.IOSDebugTarget = (IOSDebugTarget)xmlOptions.IOSDebugTarget; this.TargetArchitecture = LaunchOptions.ConvertTargetArchitectureAttribute(xmlOptions.TargetArchitecture); this.AdditionalSOLibSearchPath = xmlOptions.AdditionalSOLibSearchPath; this.Secure = (xmlOptions.Secure == MICore.Xml.LaunchOptions.IOSLaunchOptionsSecure.True); }
public AndroidLaunchOptions(MICore.Xml.LaunchOptions.AndroidLaunchOptions xmlOptions) { if (xmlOptions == null) { throw new ArgumentNullException("xmlOptions"); } this.Package = LaunchOptions.RequireAttribute(xmlOptions.Package, "Package"); this.IsAttach = xmlOptions.Attach; if (!IsAttach) { // LaunchActivity is only required when we're launching this.LaunchActivity = LaunchOptions.RequireAttribute(xmlOptions.LaunchActivity, "LaunchActivity"); } this.SDKRoot = GetOptionalDirectoryAttribute(xmlOptions.SDKRoot, "SDKRoot"); this.NDKRoot = GetOptionalDirectoryAttribute(xmlOptions.NDKRoot, "NDKRoot"); this.TargetArchitecture = LaunchOptions.ConvertTargetArchitectureAttribute(xmlOptions.TargetArchitecture); this.IntermediateDirectory = RequireValidDirectoryAttribute(xmlOptions.IntermediateDirectory, "IntermediateDirectory"); this.AdditionalSOLibSearchPath = xmlOptions.AdditionalSOLibSearchPath; this.DeviceId = LaunchOptions.RequireAttribute(xmlOptions.DeviceId, "DeviceId"); this.LogcatServiceId = GetLogcatServiceIdAttribute(xmlOptions.LogcatServiceId); CheckTargetArchitectureSupported(); }