Print usage instructions on invalid or missing arguments.

This commit is contained in:
the_fiddler 2009-02-28 16:26:25 +00:00
parent bf88e453a8
commit 12db0e6cef

View file

@ -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,12 +87,6 @@ namespace OpenTK.Build
Environment.SetEnvironmentVariable("CommonProgramFiles(x86)", String.Empty, EnvironmentVariableTarget.Process);
Environment.SetEnvironmentVariable("ProgramFiles(x86)", String.Empty, EnvironmentVariableTarget.Process);
if (args.Length == 0)
{
PrintUsage();
}
else
{
foreach (string s in args)
{
string arg = s.ToLower();
@ -150,7 +150,6 @@ namespace OpenTK.Build
PrintUsage();
return;
}
}
BinPath = Path.Combine("Binaries", mode == BuildMode.Debug ? "Debug" : "Release");
ExePath = Path.Combine(BinPath, "Exe");