mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 01:25:39 +00:00
Added option parsing to the main program.
This commit is contained in:
parent
3cb9c5f833
commit
20399f2da7
|
@ -59,6 +59,7 @@
|
|||
<ItemGroup>
|
||||
<Compile Include="CountAttribute.cs" />
|
||||
<Compile Include="GeneratedVariableIdentifier.cs" />
|
||||
<Compile Include="Options.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -18,7 +18,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
using CommandLine;
|
||||
using Mono.Cecil;
|
||||
using Mono.Cecil.Cil;
|
||||
using Mono.Cecil.Rocks;
|
||||
|
@ -29,14 +29,12 @@ namespace OpenTK.Rewrite
|
|||
// with the s IL instructions.
|
||||
internal class Program
|
||||
{
|
||||
private static readonly Options Options = new Options();
|
||||
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
if (args.Length == 0)
|
||||
if (!Parser.Default.ParseArguments(args, Options))
|
||||
{
|
||||
Console.WriteLine("Usage: rewrite [file.dll] [file.snk] [options]");
|
||||
Console.WriteLine("[options] is:");
|
||||
Console.WriteLine(" -debug (enable calls to GL.GetError())");
|
||||
Console.WriteLine(" -dllimport (force calls to use DllImport instead of GetProcAddress)");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue