示例#1
0
        static void Main(string[] args)
        {
            try {
                disp = PhysicsFS.Initialize();

                OutputVersions();

                Console.WriteLine("Enter commands. Enter \"help\" for instructions");
                while (true)
                {
                    Console.Write("> ");
                    string line = Console.ReadLine();
                    if (line == null)
                    {
                        break;
                    }
                    try {
                        ProcessCommand(line);
                    } catch (PrintNothingException) {
                    } catch (ExitException) {
                        break;
                    } catch (Exception ex) {
                        Console.WriteLine(ex.ToString());
                    }
                }
            } finally {
                disp?.Dispose();
            }
        }
示例#2
0
        static void SetSaneConfig(string[] args)
        {
            var org           = args[1];
            var app           = args[2];
            var arcExt        = args[3];
            var includeCdRoms = int.TryParse(args[4], out int i) && i != 0;
            var archFirst     = int.TryParse(args[5], out int j) && j != 0;

            PhysicsFS.SetSaneConfig(org, app, arcExt, includeCdRoms, archFirst);
            Console.WriteLine("Successful.");
        }
示例#3
0
        public static void Main(string[] args)
        {
            var host = BuildWebHost(new string[0]);

            using (PhysicsFS.Initialize()) {
                if (args.Length > 0)
                {
                    FileSystem.WriteDir = args[0];
                }

                foreach (var archive in args.Skip(1))
                {
                    FileSystem.Mount(archive, null, appendToPath: true);
                }

                if (args.Length > 0)
                {
                    FileSystem.Mount(args[0], null, appendToPath: true);
                }

                host.Run();
            }
        }
示例#4
0
 static void Init(string[] args)
 {
     Program.disp = PhysicsFS.Initialize();
 }