mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 02:25:28 +00:00
Print usage instructions on invalid or missing arguments.
This commit is contained in:
parent
bf88e453a8
commit
12db0e6cef
|
@ -68,6 +68,12 @@ namespace OpenTK.Build
|
|||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
if (args.Length == 0)
|
||||
{
|
||||
PrintUsage();
|
||||
return;
|
||||
}
|
||||
|
||||
RootPath = Directory.GetCurrentDirectory();
|
||||
RootPath = RootPath.Substring(
|
||||
0,
|
||||
|
@ -81,75 +87,68 @@ namespace OpenTK.Build
|
|||
Environment.SetEnvironmentVariable("CommonProgramFiles(x86)", String.Empty, EnvironmentVariableTarget.Process);
|
||||
Environment.SetEnvironmentVariable("ProgramFiles(x86)", String.Empty, EnvironmentVariableTarget.Process);
|
||||
|
||||
if (args.Length == 0)
|
||||
foreach (string s in args)
|
||||
{
|
||||
PrintUsage();
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (string s in args)
|
||||
string arg = s.ToLower();
|
||||
switch (arg)
|
||||
{
|
||||
string arg = s.ToLower();
|
||||
switch (arg)
|
||||
{
|
||||
case "debug":
|
||||
case "d":
|
||||
mode = BuildMode.Debug;
|
||||
break;
|
||||
case "debug":
|
||||
case "d":
|
||||
mode = BuildMode.Debug;
|
||||
break;
|
||||
|
||||
case "release":
|
||||
case "r":
|
||||
mode = BuildMode.Release;
|
||||
break;
|
||||
case "release":
|
||||
case "r":
|
||||
mode = BuildMode.Release;
|
||||
break;
|
||||
|
||||
case "mono":
|
||||
target = BuildTarget.Mono;
|
||||
break;
|
||||
case "mono":
|
||||
target = BuildTarget.Mono;
|
||||
break;
|
||||
|
||||
case "net":
|
||||
target = BuildTarget.Net;
|
||||
break;
|
||||
case "net":
|
||||
target = BuildTarget.Net;
|
||||
break;
|
||||
|
||||
case "monodev":
|
||||
case "monodevelop":
|
||||
case "md":
|
||||
target = BuildTarget.MonoDevelop;
|
||||
break;
|
||||
case "monodev":
|
||||
case "monodevelop":
|
||||
case "md":
|
||||
target = BuildTarget.MonoDevelop;
|
||||
break;
|
||||
|
||||
case "sharpdev2":
|
||||
case "sharpdevelop2":
|
||||
case "sd2":
|
||||
target = BuildTarget.SharpDevelop2;
|
||||
break;
|
||||
|
||||
case "sharpdev":
|
||||
case "sharpdevelop":
|
||||
case "sd":
|
||||
target = BuildTarget.SharpDevelop;
|
||||
break;
|
||||
case "sharpdev2":
|
||||
case "sharpdevelop2":
|
||||
case "sd2":
|
||||
target = BuildTarget.SharpDevelop2;
|
||||
break;
|
||||
|
||||
case "vs2005":
|
||||
case "vs":
|
||||
target = BuildTarget.VS2005;
|
||||
break;
|
||||
case "sharpdev":
|
||||
case "sharpdevelop":
|
||||
case "sd":
|
||||
target = BuildTarget.SharpDevelop;
|
||||
break;
|
||||
|
||||
case "clean":
|
||||
target = BuildTarget.Clean;
|
||||
break;
|
||||
|
||||
case "svnclean":
|
||||
target = BuildTarget.SVNClean;
|
||||
break;
|
||||
case "vs2005":
|
||||
case "vs":
|
||||
target = BuildTarget.VS2005;
|
||||
break;
|
||||
|
||||
case "distclean":
|
||||
target = BuildTarget.DistClean;
|
||||
break;
|
||||
case "clean":
|
||||
target = BuildTarget.Clean;
|
||||
break;
|
||||
|
||||
default:
|
||||
Console.WriteLine("Unknown command: {0}", s);
|
||||
PrintUsage();
|
||||
return;
|
||||
}
|
||||
case "svnclean":
|
||||
target = BuildTarget.SVNClean;
|
||||
break;
|
||||
|
||||
case "distclean":
|
||||
target = BuildTarget.DistClean;
|
||||
break;
|
||||
|
||||
default:
|
||||
Console.WriteLine("Unknown command: {0}", s);
|
||||
PrintUsage();
|
||||
return;
|
||||
}
|
||||
|
||||
BinPath = Path.Combine("Binaries", mode == BuildMode.Debug ? "Debug" : "Release");
|
||||
|
|
Loading…
Reference in a new issue