Exemplo n.º 1
0
        public static NUSpackage CreateNewPackage(NusPackageConfiguration config)
        {
            Contents contents = new Contents();
            FST      fst      = new FST(contents);

            FSTEntry root = fst.fileEntries.GetRootEntry();

            root.SetContent(contents.fstContent);

            PopulateFSTEntries(config.dir, root);

            Console.WriteLine("Finished reading in input files. Files read. Applying content rules.");

            ContentRulesService.ApplyRules(root, contents, config.rules);

            Console.WriteLine("Generating the FST.");
            fst.Update();

            Console.WriteLine("Generating the Ticket");
            Ticket ticket = new Ticket(config.appInfo.titleID, config.encryptionKey, config.encryptKeyWith);

            Console.WriteLine("Generating the TMD");
            TMD tmd = new TMD(config.appInfo, fst, ticket);

            return(new NUSpackage(fst, ticket, tmd));
        }
Exemplo n.º 2
0
 public NUSpackage(FST fst, Ticket ticket, TMD tmd)
 {
     this.fst    = fst;
     this.ticket = ticket;
     this.tmd    = tmd;
 }