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(); } }
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."); }
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(); } }
static void Init(string[] args) { Program.disp = PhysicsFS.Initialize(); }