public IDictionary <string, Device> GetDevices() { var devices = new Dictionary <string, Device> (); if (configSource == null || configSource.Configs == null) { return(devices); } foreach (var section in configSource.Configs) { var sec = section as IConfig; if (sec != null && sec.Name.StartsWith("device.", StringComparison.Ordinal)) { var name = sec.Name.Substring("device.".Length); Architecture arch; try { arch = Architecture.FromName(sec.GetString("arch")); } catch { arch = Architecture.ARM; } devices.Add(name, new Device { Name = name, IP = sec.GetString("ip"), Password = sec.GetString("password"), PIN = sec.GetString("pin"), Architecture = arch }); } } return(devices); }
public override void Execute(IList <string> parameters) { Architecture arch; try { arch = Architecture.FromName(parameters [1]); } catch { arch = Architecture.ARM; } CreateAppDescriptor(parameters [0], arch, false); var appName = Path.GetFileNameWithoutExtension(parameters [0]); var pw = Application.Configuration.CSKPassword; while (pw.IsEmpty()) { pw = Extensions.ReadPassword("CSK Password (will not echo): "); } var cmd = String.Format("{0} -package {1}.bar {2} " + "-target bar -sign -storepass \"{3}\"", Application.GetToolPath("blackberry-nativepackager"), appName, "app-descriptor.xml", pw); Run(cmd); }
public override void Execute(IList <string> parameters) { Architecture arch; try { arch = Architecture.FromName(parameters [1]); } catch { arch = Architecture.ARM; } CreateAppDescriptor(parameters [0], arch); }