コード例 #1
0
ファイル: Extractor.cs プロジェクト: AkiniKites/HZDCoreEditor
 public void Extract(CmdOptions options)
 {
     if (File.Exists(options.ExtractPath))
     {
         ExtractFile(options.ExtractPath);
     }
     else if (Directory.Exists(options.ExtractPath))
     {
         ExtractDir(options.ExtractPath, options.GameDir, options.Streams);
     }
     else
     {
         Console.WriteLine("Error, path not found: " + options.ExtractPath);
     }
 }
コード例 #2
0
        static void Main(string[] args)
        {
            var cmds   = new CmdOptions();
            var parser = new Parser(with => with.HelpWriter = Console.Error);

            parser.ParseArguments <CmdOptions>(args)
            .WithParsed(o => cmds = o)
            .WithNotParsed(errs => Console.WriteLine("Unable to parse command line: {0}", String.Join(" ", args)));

            RTTI.SetGameMode(GameType.HZD);

            var ex = new Extractor()
            {
                OutputDir = cmds.OutputFolder
            };

            ex.Extract(cmds);
        }