public new OptionDescription[] GetOptionDescription() { return(((IEnumerable <OptionDescription>) new OptionDescription[14] { new OptionDescription("--type", (string)null, 1, (Action <List <string> >)(s => { this.isUseAdf = false; this.isTypeSpecified = true; try { Enum.Parse(typeof(ContentMetaType), s.First <string>()); } catch (Exception ex) { throw new InvalidOptionException(string.Format("invalid option --type {0}.", (object)s.First <string>())); } this.NspContentInfos[this.contentInfoIndex].MetaType = s.First <string>(); })), OptionUtil.CreateFilePathOptionDescription("--meta", (OptionUtil.PathSetter)(path => { this.isUseAdf = false; this.isMetaSpecified = true; this.NspContentInfos[this.contentInfoIndex].MetaFilePath = path; })), OptionUtil.CreateFilePathOptionDescription("--desc", (OptionUtil.PathSetter)(path => { this.isUseAdf = false; this.NspContentInfos[this.contentInfoIndex].DescFilePath = path; })), new OptionDescription("--keyindex", (string)null, 1, (Action <List <string> >)(s => this.NspContentInfos[this.contentInfoIndex].KeyAreaEncryptionKeyIndex = int.Parse(s.First <string>()))), this.CreateContentOptionDescription("--program", "Program", 3), this.CreateContentOptionDescription("--control", "Control", 1), this.CreateContentOptionDescriptionForHtmlDocument("--html-document", "html-document"), this.CreateContentOptionDescriptionForHtmlDocument("--accessible-urls", "accessible-urls"), this.CreateContentOptionDescription("--legal-information", "LegalInformation", 1), this.CreateContentOptionDescription("--legal-information-dir", "LegalInformation", 1), this.CreateContentOptionDescription("--data", "Data", 1), new OptionDescription("--icon", (string)null, 32, (Action <List <string> >)(s => { if (s.Count % 2 != 0) { throw new InvalidOptionException("--icon <language> <iconPath>..."); } this.NspContentInfos[this.contentInfoIndex].IconList = OptionUtil.CreateIconFileList(s); })), new OptionDescription("--nx-icon", (string)null, 32, (Action <List <string> >)(s => { if (s.Count % 2 != 0) { throw new InvalidOptionException("--nx-icon <language> <iconPath>..."); } this.NspContentInfos[this.contentInfoIndex].NxIconList = OptionUtil.CreateIconFileList(s); })), new OptionDescription("--nx-icon-max-size", (string)null, 32, (Action <List <string> >)(s => this.NspContentInfos[this.contentInfoIndex].NxIconMaxSize = Convert.ToUInt32(s.First <string>()))) }).Concat <OptionDescription>((IEnumerable <OptionDescription>)base.GetOptionDescription()).ToArray <OptionDescription>()); }
public new OptionDescription[] GetOptionDescription() { return(((IEnumerable <OptionDescription>) new OptionDescription[10] { OptionUtil.CreateFilePathOptionDescription("--meta", (OptionUtil.PathSetter)(path => this.MetaFilePath = path)), OptionUtil.CreateFilePathOptionDescription("--desc", (OptionUtil.PathSetter)(path => this.DescFilePath = path)), this.CreateContentOptionDescription("--program", "Program", 3), this.CreateContentOptionDescription("--control", "Control", 1), this.CreateContentOptionDescriptionForHtmlDocument("--html-document", "html-document"), this.CreateContentOptionDescriptionForHtmlDocument("--accessible-urls", "accessible-urls"), this.CreateContentOptionDescription("--legal-information", "LegalInformation", 1), this.CreateContentOptionDescription("--legal-information-dir", "LegalInformation", 1), this.CreateContentOptionDescription("--data", "Data", 1), new OptionDescription("--keyindex", (string)null, 1, (Action <List <string> >)(s => this.KeyAreaEncryptionKeyIndex = int.Parse(s.First <string>()))) }).Concat <OptionDescription>((IEnumerable <OptionDescription>)base.GetOptionDescription()).ToArray <OptionDescription>()); }
public OptionDescription[] GetOptionDescription() { return(new OptionDescription[7] { new OptionDescription((string)null, "-o", 1, (Action <List <string> >)(s => this.OutputDirectory = OptionUtil.GetOutputFilePath(this.OutputDirectory, s.First <string>()))), new OptionDescription("--gamecard", (string)null, 0, (Action <List <string> >)(s => { this.CreateXci = true; this.CreateXcie = true; })), new OptionDescription("--no-xcie", (string)null, 0, (Action <List <string> >)(s => this.NoCreateXcie = true)), new OptionDescription("--auto-boot", (string)null, 0, (Action <List <string> >)(s => this.LaunchFlags |= (byte)1)), new OptionDescription("--history-erase", (string)null, 0, (Action <List <string> >)(s => this.LaunchFlags |= (byte)2)), OptionUtil.CreateFilePathOptionDescription("--upp", (OptionUtil.PathSetter)(path => this.InputUppNspFile = path)), OptionUtil.CreateFilePathOptionDescription("--patch", (OptionUtil.PathSetter)(path => this.InputPatchNspFile = path)) }); }
public OptionDescription[] GetOptionDescription() { return(new OptionDescription[6] { new OptionDescription((string)null, "-o", 1, (Action <List <string> >)(s => this.OutputDirectory = OptionUtil.GetOutputFilePath(".", s.First <string>()))), new OptionDescription("--type", (string)null, 1, (Action <List <string> >)(s => { try { Enum.Parse(typeof(Nintendo.Authoring.AuthoringTool.ContentMetaType), s.First <string>()); } catch (Exception ex) { throw new InvalidOptionException(string.Format("invalid option --type {0}.", (object)s.First <string>())); } this.MetaType = s.First <string>(); })), OptionUtil.CreateFilePathOptionDescription("--meta", (OptionUtil.PathSetter)(path => this.MetaFilePath = path)), new OptionDescription("--icon", (string)null, 32, (Action <List <string> >)(s => { if (s.Count % 2 != 0) { throw new InvalidOptionException("--icon <language> <iconPath>..."); } this.IconFileList = OptionUtil.CreateIconFileList(s); })), new OptionDescription("--nx-icon", (string)null, 32, (Action <List <string> >)(s => { if (s.Count % 2 != 0) { throw new InvalidOptionException("--nx-icon <language> <iconPath>..."); } this.NxIconFileList = OptionUtil.CreateIconFileList(s); })), new OptionDescription("--nx-icon-max-size", (string)null, 32, (Action <List <string> >)(s => this.NxIconMaxSize = Convert.ToUInt32(s.First <string>()))) }); }
public OptionDescription[] GetOptionDescription() { return(new OptionDescription[14] { new OptionDescription((string)null, "-o", 1, (Action <List <string> >)(s => this.OutputDirectory = OptionUtil.GetOutputFilePath(".", s.First <string>()).TrimEnd('/'))), new OptionDescription("--type", (string)null, 1, (Action <List <string> >)(s => { try { Enum.Parse(typeof(Nintendo.Authoring.AuthoringTool.ContentMetaType), s.First <string>()); } catch (Exception ex) { throw new InvalidOptionException(string.Format("invalid option --type {0}.", (object)s.First <string>())); } this.MetaType = s.First <string>(); })), OptionUtil.CreateFilePathOptionDescription("--meta", (OptionUtil.PathSetter)(path => this.MetaFilePath = path)), new OptionDescription("--program", (string)null, 3, (Action <List <string> >)(s => { if (this.CodeDirectory != null) { throw new InvalidOptionException("--program option cannot be used with --code, --data and --logo options."); } this.CodeDirectory = OptionUtil.GetOutputFilePath(".", s.First <string>()); if (s.Count > 1) { if (this.DataDirectory != null) { throw new InvalidOptionException("--program option cannot be used with --code, --data and --logo options."); } this.DataDirectory = OptionUtil.GetOutputFilePath(".", s[1]); } if (s.Count <= 2) { return; } if (this.LogoDirectory != null) { throw new InvalidOptionException("--program option cannot be used with --code, --data and --logo options."); } this.LogoDirectory = OptionUtil.GetOutputFilePath(".", s[2]); })), new OptionDescription("--code", (string)null, 1, (Action <List <string> >)(s => { if (this.CodeDirectory != null) { throw new InvalidOptionException("--program option cannot be used with --code, --data and --logo options."); } this.CodeDirectory = OptionUtil.GetOutputFilePath(".", s.First <string>()); })), new OptionDescription("--data", (string)null, 1, (Action <List <string> >)(s => { if (this.DataDirectory != null) { throw new InvalidOptionException("--program option cannot be used with --code, --data and --logo options."); } this.DataDirectory = OptionUtil.GetOutputFilePath(".", s.First <string>()); })), new OptionDescription("--logo", (string)null, 1, (Action <List <string> >)(s => { if (this.LogoDirectory != null) { throw new InvalidOptionException("--program option cannot be used with --code, --data and --logo options."); } this.LogoDirectory = OptionUtil.GetOutputFilePath(".", s.First <string>()); })), new OptionDescription("--control", (string)null, 1, (Action <List <string> >)(s => this.ControlDirectory = OptionUtil.GetOutputFilePath(".", s.First <string>()))), new OptionDescription("--html-document", (string)null, 1, (Action <List <string> >)(s => this.HtmlDocumentDirectory = OptionUtil.GetOutputFilePath(".", s.First <string>()))), new OptionDescription("--accessible-urls", (string)null, 1, (Action <List <string> >)(s => this.AccessibleUrlsDirectory = OptionUtil.GetOutputFilePath(".", s.First <string>()))), new OptionDescription("--legal-information-dir", (string)null, 1, (Action <List <string> >)(s => this.LegalInformationDirectory = OptionUtil.GetOutputFilePath(".", s.First <string>()))), new OptionDescription("--icon", (string)null, 32, (Action <List <string> >)(s => { if (s.Count % 2 != 0) { throw new InvalidOptionException("--icon <language> <iconPath>..."); } this.IconFileList = OptionUtil.CreateIconFileList(s); })), new OptionDescription("--nx-icon", (string)null, 32, (Action <List <string> >)(s => { if (s.Count % 2 != 0) { throw new InvalidOptionException("--nx-icon <language> <iconPath>..."); } this.NxIconFileList = OptionUtil.CreateIconFileList(s); })), new OptionDescription("--nx-icon-max-size", (string)null, 32, (Action <List <string> >)(s => this.NxIconMaxSize = Convert.ToUInt32(s.First <string>()))) }); }